Fixed itemised tax calc to fix pos loading
This commit is contained in:
parent
7773ee8960
commit
fbb5945ff3
@ -1116,7 +1116,7 @@ class TestSalesInvoice(unittest.TestCase):
|
||||
})
|
||||
si.insert()
|
||||
|
||||
tax_breakup_html = '''\n<div class="tax-break-up" style="overflow-x: auto;">\n\t<table class="table table-bordered table-hover">\n\t\t<thead><tr><th class="text-left" style="min-width: 120px;">Item Name</th>\n<th class="text-right" style="min-width: 80px;">Taxable Amount</th>\n<th class="text-right" style="min-width: 80px;">_Test Account Service Tax - _TC</th></tr></thead>\n\t\t<tbody><tr><td>_Test Item</td><td class="text-right">\u20b9 5,000.00</td><td class="text-right">(10.0%) \u20b9 500.00</td></tr></tbody>\n\t</table>\n</div>'''
|
||||
tax_breakup_html = '''\n<div class="tax-break-up" style="overflow-x: auto;">\n\t<table class="table table-bordered table-hover">\n\t\t<thead><tr><th class="text-left" style="min-width: 120px;">Item Name</th><th class="text-right" style="min-width: 80px;">Taxable Amount</th><th class="text-right" style="min-width: 80px;">_Test Account Service Tax - _TC</th></tr></thead>\n\t\t<tbody><tr><td>_Test Item</td><td class="text-right">\u20b9 5,000.00</td><td class="text-right">(10.0%) \u20b9 500.00</td></tr></tbody>\n\t</table>\n</div>'''
|
||||
|
||||
self.assertEqual(si.other_charges_calculation, tax_breakup_html)
|
||||
|
||||
|
@ -531,8 +531,8 @@ class calculate_taxes_and_totals(object):
|
||||
<tbody>{rows}</tbody>
|
||||
</table>
|
||||
</div>'''.format(**{
|
||||
"headings": "\n".join(headings),
|
||||
"rows": "\n".join(rows)
|
||||
"headings": "".join(headings),
|
||||
"rows": "".join(rows)
|
||||
})
|
||||
|
||||
def get_item_tax(self, item_tax, tax_accounts, company_currency):
|
||||
@ -605,7 +605,7 @@ def get_table_rows(distinct_items, item_tax, tax_accounts, company_currency):
|
||||
rows.append("<tr><td>{item_name}</td><td class='text-right'>{taxable_amount}</td>{taxes}</tr>".format(**{
|
||||
"item_name": item.item_name,
|
||||
"taxable_amount": fmt_money(item.net_amount, item.precision("net_amount"), company_currency),
|
||||
"taxes": "\n".join(taxes)
|
||||
"taxes": "".join(taxes)
|
||||
}))
|
||||
|
||||
return rows
|
@ -689,7 +689,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
||||
return '<th style="min-width: 80px;" class="text-right">' + (head || "") + "</th>";
|
||||
}
|
||||
}
|
||||
).join("\n");
|
||||
).join("");
|
||||
|
||||
var distinct_item_names = [];
|
||||
var distinct_items = [];
|
||||
@ -711,9 +711,9 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
||||
return item_tax_record[head[0]] ?
|
||||
"<td class='text-right'>(" + item_tax_record[head[0]][0] + ") " + item_tax_record[head[0]][1] + "</td>" :
|
||||
"<td></td>";
|
||||
}).join("\n")
|
||||
}).join("")
|
||||
});
|
||||
}).join("\n");
|
||||
}).join("");
|
||||
|
||||
if(!rows) return "";
|
||||
return '<div class="tax-break-up" style="overflow-x: auto;">\
|
||||
|
Loading…
x
Reference in New Issue
Block a user