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

This commit is contained in:
mergify[bot]
2021-11-23 11:41:24 +05:30
committed by GitHub
parent adcf906d1c
commit b7c63212cd

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>