This commit is contained in:
Casey 2025-11-26 17:07:53 -06:00
parent afa161a0cf
commit c35689aaf8
3 changed files with 26 additions and 3 deletions

View file

@ -96,11 +96,10 @@ def upsert_estimate(data):
print("DOIFJSEOFJISLFK")
try:
data = json.loads(data) if isinstance(data, str) else data
print("DEBUG: Upsert estimate data received:", data)
address_name = frappe.get_value("Address", fieldname="name", filters={"full_address": data.get("address")})
print("DEBUG: Retrieved address name:", data.get("address_name"))
new_estimate = frappe.get_doc({
"doctype": "Quotation",
"custom_installation_address": address_name,
"custom_installation_address": data.get("address_name"),
"contact_email": data.get("contact_email"),
"party_name": data.get("contact_name"),
"customer_name": data.get("customer_name"),