fix: Report and JSON generation for Advances received

This commit is contained in:
Deepesh Garg
2021-07-15 15:36:54 +05:30
parent 5e22405c45
commit 8b644d8889
8 changed files with 174 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
frappe.ui.form.on("Payment Entry", {
company: function(frm) {
frappe.call({
'method': 'frappe.contacts.doctype.address.address.get_default_address',
'args': {
'doctype': 'Company',
'name': frm.doc.company
},
'callback': function(r) {
me.frm.set_value('company_address', r.message);
}
});
},
party: function(frm) {
if (frm.doc.party_type == "Customer" && frm.doc.party) {
frappe.call({
'method': 'frappe.contacts.doctype.address.address.get_default_address',
'args': {
'doctype': 'Customer',
'name': frm.doc.party
},
'callback': function(r) {
me.frm.set_value('customer_address', r.message);
}
});
}
}
});