mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-24 13:42:10 +01:00
fix: Reset advance paid amount on Oreder cancel and amend
(cherry picked from commit 92f37ca111)
This commit is contained in:
@@ -101,6 +101,11 @@ frappe.ui.form.on("Purchase Order", {
|
|||||||
erpnext.queries.setup_queries(frm, "Warehouse", function() {
|
erpnext.queries.setup_queries(frm, "Warehouse", function() {
|
||||||
return erpnext.queries.warehouse(frm.doc);
|
return erpnext.queries.warehouse(frm.doc);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// On cancel and amending a purchase order with advance payment, reset advance paid amount
|
||||||
|
if (frm.is_new()) {
|
||||||
|
frm.set_value("advance_paid", 0)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
apply_tds: function(frm) {
|
apply_tds: function(frm) {
|
||||||
|
|||||||
@@ -124,6 +124,11 @@ frappe.ui.form.on("Sales Order", {
|
|||||||
return query;
|
return query;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// On cancel and amending a sales order with advance payment, reset advance paid amount
|
||||||
|
if (frm.is_new()) {
|
||||||
|
frm.set_value("advance_paid", 0)
|
||||||
|
}
|
||||||
|
|
||||||
frm.ignore_doctypes_on_cancel_all = ['Purchase Order'];
|
frm.ignore_doctypes_on_cancel_all = ['Purchase Order'];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user