Tax category validation ignored in material request
This commit is contained in:
parent
a6fc3f6337
commit
98d9d797fd
@ -52,9 +52,8 @@ class BuyingController(StockController):
|
|||||||
validate_warehouse_company(w, self.company)
|
validate_warehouse_company(w, self.company)
|
||||||
|
|
||||||
def validate_stock_or_nonstock_items(self):
|
def validate_stock_or_nonstock_items(self):
|
||||||
if not self.get_stock_items():
|
if self.meta.get_field("other_charges") and not self.get_stock_items():
|
||||||
tax_for_valuation = [d.account_head for d in
|
tax_for_valuation = [d.account_head for d in self.get("other_charges")
|
||||||
self.get("other_charges")
|
|
||||||
if d.category in ["Valuation", "Valuation and Total"]]
|
if d.category in ["Valuation", "Valuation and Total"]]
|
||||||
if tax_for_valuation:
|
if tax_for_valuation:
|
||||||
frappe.throw(_("Tax Category can not be 'Valuation' or 'Valuation and Total' as all items are non-stock items"))
|
frappe.throw(_("Tax Category can not be 'Valuation' or 'Valuation and Total' as all items are non-stock items"))
|
||||||
|
Loading…
Reference in New Issue
Block a user