big updates

This commit is contained in:
Casey 2025-11-21 12:29:31 -06:00
parent 34f2c110d6
commit 03a230b8f7
14 changed files with 2417 additions and 242 deletions

View file

@ -269,7 +269,9 @@ def upsert_client(data):
# Check for existing address
filters = {
"address_title": data.get("address_title"),
"address_line1": data.get("address_line1"),
"city": data.get("city"),
"state": data.get("state"),
}
existing_address = frappe.db.exists("Address", filters)
print("Existing address check:", existing_address)
@ -280,10 +282,10 @@ def upsert_client(data):
address_doc = frappe.get_doc({
"doctype": "Address",
"address_line1": data.get("address_line1"),
"address_line2": data.get("address_line2"),
"city": data.get("city"),
"state": data.get("state"),
"country": "United States",
"address_title": data.get("address_title"),
"pincode": data.get("pincode"),
"custom_customer_to_bill": customer_doc.name
}).insert(ignore_permissions=True)