mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
Fix error message (#14716)
This commit is contained in:
@@ -819,28 +819,30 @@ frappe.ui.form.on('Payment Entry Reference', {
|
|||||||
|
|
||||||
reference_name: function(frm, cdt, cdn) {
|
reference_name: function(frm, cdt, cdn) {
|
||||||
var row = locals[cdt][cdn];
|
var row = locals[cdt][cdn];
|
||||||
return frappe.call({
|
if (row.reference_name && row.reference_doctype) {
|
||||||
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_reference_details",
|
return frappe.call({
|
||||||
args: {
|
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_reference_details",
|
||||||
reference_doctype: row.reference_doctype,
|
args: {
|
||||||
reference_name: row.reference_name,
|
reference_doctype: row.reference_doctype,
|
||||||
party_account_currency: frm.doc.payment_type=="Receive" ?
|
reference_name: row.reference_name,
|
||||||
frm.doc.paid_from_account_currency : frm.doc.paid_to_account_currency
|
party_account_currency: frm.doc.payment_type=="Receive" ?
|
||||||
},
|
frm.doc.paid_from_account_currency : frm.doc.paid_to_account_currency
|
||||||
callback: function(r, rt) {
|
},
|
||||||
if(r.message) {
|
callback: function(r, rt) {
|
||||||
$.each(r.message, function(field, value) {
|
if(r.message) {
|
||||||
frappe.model.set_value(cdt, cdn, field, value);
|
$.each(r.message, function(field, value) {
|
||||||
})
|
frappe.model.set_value(cdt, cdn, field, value);
|
||||||
|
})
|
||||||
|
|
||||||
let allocated_amount = frm.doc.unallocated_amount > row.outstanding_amount ?
|
let allocated_amount = frm.doc.unallocated_amount > row.outstanding_amount ?
|
||||||
row.outstanding_amount : frm.doc.unallocated_amount;
|
row.outstanding_amount : frm.doc.unallocated_amount;
|
||||||
|
|
||||||
frappe.model.set_value(cdt, cdn, 'allocated_amount', allocated_amount);
|
frappe.model.set_value(cdt, cdn, 'allocated_amount', allocated_amount);
|
||||||
frm.refresh_fields();
|
frm.refresh_fields();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
allocated_amount: function(frm) {
|
allocated_amount: function(frm) {
|
||||||
|
|||||||
Reference in New Issue
Block a user