fix: do not check appy_tds in Purchase Order Automatically

(cherry picked from commit be6c174b43)
This commit is contained in:
ljain112
2024-09-03 11:44:55 +05:30
committed by Mergify
parent 11359bd235
commit 5edebb28a5
2 changed files with 2 additions and 2 deletions

View File

@@ -84,8 +84,6 @@ frappe.ui.form.on("Purchase Order", {
fetch_payment_terms_template: cint(!frm.doc.ignore_default_payment_terms_template),
},
function () {
frm.doc.apply_tds = frm.supplier_tds ? 1 : 0;
frm.doc.tax_withholding_category = frm.supplier_tds;
frm.set_df_property("apply_tds", "read_only", frm.supplier_tds ? 0 : 1);
frm.set_df_property("tax_withholding_category", "hidden", frm.supplier_tds ? 0 : 1);
}

View File

@@ -655,6 +655,8 @@ class PurchaseOrder(BuyingController):
self.tax_withholding_category = tds_category
self.set_onload("supplier_tds", tds_category)
super().set_missing_values(for_validate)
@frappe.request_cache
def item_last_purchase_rate(name, conversion_rate, item_code, conversion_factor=1.0):