Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{
"name": "Payment Entry-plot",
"idx": 97,
"dt": "Payment Entry",
"label": "Plot",
"fieldname": "plot",
Expand All @@ -14,7 +13,6 @@
},
{
"name": "Payment Entry-plot_number",
"idx": 97,
"dt": "Payment Entry",
"label": "Plot Number",
"fieldname": "plot_number",
Expand All @@ -26,7 +24,6 @@
},
{
"name": "Payment Entry-plot_outstanding_amount",
"idx": 97,
"dt": "Payment Entry",
"label": "Plot Outstanding Amount",
"fieldname": "plot_outstanding_amount",
Expand All @@ -35,5 +32,17 @@
"read_only": 1,
"allow_on_submit": 1,
"doctype": "Custom Field"
},
{
"name": "Payment Entry-mobile_no",
"dt": "Payment Entry",
"label": "Mobile No",
"fieldname": "mobile_no",
"insert_after": "contact_email",
"fieldtype": "Data",
"options": "Phone",
"read_only": 1,
"in_preview": 1,
"doctype": "Custom Field"
}
]
4 changes: 4 additions & 0 deletions landms/payment_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def validate_payment_entry(doc, method=None):
if not doc.get("references"):
return

if doc.contact_person and not doc.mobile_no:
contact_info = frappe.get_cached_value("Contact", doc.contact_person, ["mobile_no", "phone"], as_dict=True)
doc.mobile_no = contact_info.get("mobile_no") or contact_info.get("phone")

normalized_rows = []
seen_invoice_rows: dict[tuple[str, str], dict] = {}

Expand Down