mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-28 11:08:32 +00:00
fix: Issues while cancel/amending Purchase Invoice with TDS enabled
(cherry picked from commit f7c9258770)
# Conflicts:
# erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
This commit is contained in:
@@ -569,6 +569,10 @@ frappe.ui.form.on("Purchase Invoice", {
|
|||||||
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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (frm.is_new()) {
|
||||||
|
frm.clear_table("tax_withheld_vouchers");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
is_subcontracted: function(frm) {
|
is_subcontracted: function(frm) {
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ class PurchaseInvoice(BuyingController):
|
|||||||
supplier_tds = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
|
supplier_tds = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
|
||||||
self.set_onload("supplier_tds", supplier_tds)
|
self.set_onload("supplier_tds", supplier_tds)
|
||||||
|
|
||||||
|
if self.is_new():
|
||||||
|
self.set("tax_withheld_vouchers", [])
|
||||||
|
|
||||||
def before_save(self):
|
def before_save(self):
|
||||||
if not self.on_hold:
|
if not self.on_hold:
|
||||||
self.release_date = ""
|
self.release_date = ""
|
||||||
@@ -1373,7 +1376,12 @@ class PurchaseInvoice(BuyingController):
|
|||||||
"GL Entry",
|
"GL Entry",
|
||||||
"Stock Ledger Entry",
|
"Stock Ledger Entry",
|
||||||
"Repost Item Valuation",
|
"Repost Item Valuation",
|
||||||
|
<<<<<<< HEAD
|
||||||
"Purchase Invoice",
|
"Purchase Invoice",
|
||||||
|
=======
|
||||||
|
"Payment Ledger Entry",
|
||||||
|
"Tax Withheld Vouchers",
|
||||||
|
>>>>>>> f7c9258770 (fix: Issues while cancel/amending Purchase Invoice with TDS enabled)
|
||||||
)
|
)
|
||||||
|
|
||||||
self.update_advance_tax_references(cancel=1)
|
self.update_advance_tax_references(cancel=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user