import frappe
from custom_ui.db_utils import build_success_response, build_error_response


@frappe.whitelist()
def get_incomplete_bids(company):
    print("Getting Incomplete Bids")
    try:
        filters = {'status': "Unscheduled", 'company': company}
        count = frappe.db.count("On-Site Meeting", filters=filters)
        print("Incomplete Bids:", count)
        return build_success_response([count])
    except Exception as e:
        return build_error_response(str(e), 500)

