feat: Validity for Item taxes (#20135)

* feat: Validity for Item taxes

* fix: Trigger for gst hsn code

* fix: Sort taxes based on validity

* fix: Validation for item tax template and filters based on validity

* fix: Add missing semicolon

* fix: Validate tax template only if item code available

* fix: Do not validate or filter item tax template if no item taxes applied

* fix: Consider item group for validating taxes

* fix: Test cases for item tax  validation

* fix: Item tax template filtering fixes

* fix: Add missing semicolon

* fix: Remove unnecessary query
This commit is contained in:
Deepesh Garg
2020-01-06 15:34:15 +05:30
committed by Nabin Hait
parent b5f91bea90
commit ef0d26c161
10 changed files with 212 additions and 114 deletions

View File

@@ -107,6 +107,12 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
filters:{ 'item_code': row.item_code }
}
});
if(this.frm.fields_dict["items"].grid.get_field('item_code')) {
this.frm.set_query("item_tax_template", "items", function(doc, cdt, cdn) {
return me.set_query_for_item_tax_template(doc, cdt, cdn)
});
}
},
refresh: function(doc) {