mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
Merge pull request #21819 from rohitwaghchaure/tax-template-not-applied-if-valid-from-blank-hotfix
fix: item tax template not applied if valid from is blank
This commit is contained in:
@@ -1459,7 +1459,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
this.child.serial_no = (this.item_serial_no[this.child.item_code]
|
||||
? this.item_serial_no[this.child.item_code][0] : '');
|
||||
|
||||
const tax_template_is_valid = frappe.datetime.get_diff(frappe.datetime.now_date(), this.items[0].valid_from) > 0;
|
||||
const tax_template_is_valid = true;
|
||||
if (this.items && this.items[0].valid_from) {
|
||||
tax_template_is_valid = frappe.datetime.get_diff(frappe.datetime.now_date(),
|
||||
this.items[0].valid_from) > 0;
|
||||
}
|
||||
|
||||
this.child.item_tax_template = tax_template_is_valid ? this.items[0].item_tax_template : '';
|
||||
this.child.item_tax_rate = JSON.stringify(this.tax_data[this.child.item_tax_template]);
|
||||
|
||||
Reference in New Issue
Block a user