valuation type charges can not be inclusive

This commit is contained in:
Nabin Hait 2015-02-24 16:05:19 +05:30
parent 903c42a130
commit 72c359afa2
2 changed files with 4 additions and 0 deletions

View File

@ -386,3 +386,5 @@ def validate_inclusive_tax(tax, doc):
not all([cint(t.included_in_print_rate) for t in doc.get("taxes")[:cint(tax.row_id) - 1]]):
# all rows about the reffered tax should be inclusive
_on_previous_row_error("1 - %d" % (tax.row_id,))
elif tax.category == "Valuation":
frappe.throw(_("Valuation type charges can not marked as Inclusive"))

View File

@ -76,6 +76,8 @@ cur_frm.cscript.validate_inclusive_tax = function(tax) {
// all rows above this tax should be inclusive
on_previous_row_error(tax.row_id == 1 ? "1" : "1 - " + tax.row_id);
}
} else if(tax.category == "Valuation") {
frappe.throw(__("Valuation type charges can not marked as Inclusive"));
}
}
}