[minor] payment entry company trigger
This commit is contained in:
parent
efd5eadfea
commit
d487bf77e1
@ -79,8 +79,13 @@ frappe.ui.form.on('Payment Entry', {
|
||||
frm.events.show_general_ledger(frm);
|
||||
},
|
||||
|
||||
company: function(frm) {
|
||||
frm.events.hide_unhide_fields(frm);
|
||||
frm.events.set_dynamic_labels(frm);
|
||||
},
|
||||
|
||||
hide_unhide_fields: function(frm) {
|
||||
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
|
||||
var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
|
||||
|
||||
frm.toggle_display("source_exchange_rate",
|
||||
(frm.doc.paid_amount && frm.doc.paid_from_account_currency != company_currency));
|
||||
@ -118,7 +123,7 @@ frappe.ui.form.on('Payment Entry', {
|
||||
},
|
||||
|
||||
set_dynamic_labels: function(frm) {
|
||||
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
|
||||
var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
|
||||
|
||||
frm.set_currency_labels(["base_paid_amount", "base_received_amount", "base_total_allocated_amount",
|
||||
"difference_amount"], company_currency);
|
||||
|
Loading…
x
Reference in New Issue
Block a user