From 4f76ed1c683c7b1dc58cc8e82d6c36b8dea6406d Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 8 Nov 2022 10:39:21 +0530 Subject: [PATCH] chore: Resolve conflicts --- .../doctype/purchase_order/purchase_order.js | 33 +++---------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 1944b08e800..2559ce76da6 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -43,6 +43,11 @@ frappe.ui.form.on("Purchase Order", { erpnext.queries.setup_queries(frm, "Warehouse", function() { 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) { @@ -84,35 +89,7 @@ frappe.ui.form.on("Purchase Order", { }); }, __('Create')); } -<<<<<<< HEAD } -======= - }, - - onload: function(frm) { - set_schedule_date(frm); - if (!frm.doc.transaction_date){ - frm.set_value('transaction_date', frappe.datetime.get_today()) - } - - erpnext.queries.setup_queries(frm, "Warehouse", function() { - 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) { - if (!frm.doc.apply_tds) { - frm.set_value("tax_withholding_category", ''); - } else { - frm.set_value("tax_withholding_category", frm.supplier_tds); - } - }, ->>>>>>> 92f37ca111 (fix: Reset advance paid amount on Oreder cancel and amend) }); frappe.ui.form.on("Purchase Order Item", {