fix: TDS check getting checked after reload

This commit is contained in:
Deepesh Garg
2021-03-22 19:19:55 +05:30
parent a1104f040d
commit bb3c44dbb3

View File

@@ -509,7 +509,7 @@ frappe.ui.form.on("Purchase Invoice", {
},
onload: function(frm) {
if(frm.doc.__onload) {
if(frm.doc.__onload && frm.is_new()) {
if(frm.doc.supplier) {
frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0;
}