mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
Merge pull request #6043 from aruizramon/purchase-taxes-client-validation
Validate on changing from Total to Valuation/Valuation&Total when add…
This commit is contained in:
@@ -18,3 +18,13 @@ frappe.ui.form.on("Purchase Taxes and Charges", "add_deduct_tax", function(doc,
|
|||||||
}
|
}
|
||||||
refresh_field('add_deduct_tax', d.name, 'taxes');
|
refresh_field('add_deduct_tax', d.name, 'taxes');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on("Purchase Taxes and Charges", "category", function(doc, cdt, cdn) {
|
||||||
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
|
if (d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
|
||||||
|
msgprint(__("Cannot deduct when category is for 'Valuation' or 'Vaulation and Total'"));
|
||||||
|
d.add_deduct_tax = '';
|
||||||
|
}
|
||||||
|
refresh_field('add_deduct_tax', d.name, 'taxes');
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user