feat: address display

This commit is contained in:
barredterra
2021-09-16 17:22:25 +02:00
committed by marination
parent db47e1b69c
commit b186f8e9d7
2 changed files with 20 additions and 7 deletions

View File

@@ -78,6 +78,12 @@ frappe.ui.form.on("Dunning", {
}); });
} }
}, },
customer_address: function (frm) {
erpnext.utils.get_address_display(frm, "customer_address");
},
company_address: function (frm) {
erpnext.utils.get_address_display(frm, "company_address");
},
dunning_type: function (frm) { dunning_type: function (frm) {
frm.trigger("get_dunning_letter_text"); frm.trigger("get_dunning_letter_text");
}, },

View File

@@ -21,10 +21,11 @@
"address_display", "address_display",
"contact_person", "contact_person",
"contact_display", "contact_display",
"column_break_16",
"company_address",
"company_address_display",
"contact_mobile", "contact_mobile",
"contact_email", "contact_email",
"column_break_18",
"company_address_display",
"section_break_6", "section_break_6",
"dunning_type", "dunning_type",
"column_break_8", "column_break_8",
@@ -206,15 +207,11 @@
"options": "Phone", "options": "Phone",
"read_only": 1 "read_only": 1
}, },
{
"fieldname": "column_break_18",
"fieldtype": "Column Break"
},
{ {
"fetch_from": "sales_invoice.company_address_display", "fetch_from": "sales_invoice.company_address_display",
"fieldname": "company_address_display", "fieldname": "company_address_display",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"label": "Company Address", "label": "Company Address Display",
"read_only": 1 "read_only": 1
}, },
{ {
@@ -346,6 +343,16 @@
"print_hide": 1, "print_hide": 1,
"read_only": 1, "read_only": 1,
"report_hide": 1 "report_hide": 1
},
{
"fieldname": "column_break_16",
"fieldtype": "Column Break"
},
{
"fieldname": "company_address",
"fieldtype": "Link",
"label": "Company Address",
"options": "Address"
} }
], ],
"is_submittable": 1, "is_submittable": 1,