fix: remove tds account in taxes table on change of Tax Withholding Category

This commit is contained in:
l0gesh29
2025-01-29 15:37:38 +05:30
parent 49570a5544
commit 79b5a3e1dd

View File

@@ -372,6 +372,18 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
}
}
tax_withholding_category(frm) {
var me = this;
let filtered_taxes = (me.frm.doc.taxes || []).filter((row) => !row.is_tax_withholding_account);
me.frm.clear_table("taxes");
filtered_taxes.forEach((row) => {
me.frm.add_child("taxes", row);
});
me.frm.refresh_field("taxes");
}
credit_to() {
var me = this;
if (this.frm.doc.credit_to) {