fix: Minor changes
Added value in fetch from and removed client side code
This commit is contained in:
parent
e7f67592a8
commit
a877115ff4
@ -38,6 +38,8 @@
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fetch_from": "sales_invoice.outstanding_amount",
|
||||
"fetch_if_empty": 1,
|
||||
"fieldname": "outstanding_amount",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
@ -58,7 +60,7 @@
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-09-23 15:29:54.199318",
|
||||
"modified": "2019-09-26 11:05:36.016772",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Discounted Invoice",
|
||||
|
@ -204,15 +204,9 @@ frappe.ui.form.on('Invoice Discounting', {
|
||||
});
|
||||
|
||||
frappe.ui.form.on('Discounted Invoice', {
|
||||
sales_invoice: (frm, cdt, cdn) => {
|
||||
sales_invoice: (frm) => {
|
||||
frm.events.calculate_total_amount(frm);
|
||||
frm.events.refresh_filters(frm);
|
||||
|
||||
let row = locals[cdt][cdn];
|
||||
frappe.db.get_value("Sales Invoice",row["sales_invoice"], "outstanding_amount", (res) => {
|
||||
row.outstanding_amount = res["outstanding_amount"];
|
||||
frm.refresh_field("invoices");
|
||||
});
|
||||
},
|
||||
invoices_remove: (frm) => {
|
||||
frm.events.calculate_total_amount(frm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user