fix: POS Item cart only taxes with amount displayed (#28501)

This commit is contained in:
Subin Tom 2021-11-23 10:35:43 +05:30 committed by GitHub
parent 5ba1bc1572
commit 1909bb569e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -502,6 +502,7 @@ erpnext.PointOfSale.ItemCart = class {
if (taxes.length) {
const currency = this.events.get_frm().doc.currency;
const taxes_html = taxes.map(t => {
if (t.tax_amount_after_discount_amount == 0.0) return;
const description = /[0-9]+/.test(t.description) ? t.description : `${t.description} @ ${t.rate}%`;
return `<div class="tax-row">
<div class="tax-label">${description}</div>