Precision issue in tax calculation
This commit is contained in:
parent
5e893ef8fd
commit
0a35effe49
@ -343,13 +343,12 @@ class PurchaseInvoice(BuyingController):
|
||||
self.get_gl_dict({
|
||||
"account": stock_received_but_not_billed,
|
||||
"against": self.credit_to,
|
||||
"debit": flt(item.item_tax_amount),
|
||||
"debit": flt(item.item_tax_amount, self.precision("item_tax_amount", item)),
|
||||
"remarks": self.remarks or "Accounting Entry for Stock"
|
||||
})
|
||||
)
|
||||
|
||||
negative_expense_to_be_booked += flt(item.item_tax_amount)
|
||||
|
||||
negative_expense_to_be_booked += flt(item.item_tax_amount, self.precision("item_tax_amount", item))
|
||||
|
||||
if negative_expense_to_be_booked and valuation_tax:
|
||||
# credit valuation tax amount in "Expenses Included In Valuation"
|
||||
|
||||
@ -209,7 +209,7 @@ class AccountsController(TransactionBase):
|
||||
|
||||
def calculate_taxes(self):
|
||||
# maintain actual tax rate based on idx
|
||||
actual_tax_dict = dict([[tax.idx, tax.rate] for tax in self.tax_doclist
|
||||
actual_tax_dict = dict([[tax.idx, flt(tax.rate, self.precision("tax_amount", tax))] for tax in self.tax_doclist
|
||||
if tax.charge_type == "Actual"])
|
||||
|
||||
for n, item in enumerate(self.item_doclist):
|
||||
|
||||
@ -647,7 +647,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
||||
// maintain actual tax rate based on idx
|
||||
$.each(this.frm.tax_doclist, function(i, tax) {
|
||||
if (tax.charge_type == "Actual") {
|
||||
actual_tax_dict[tax.idx] = flt(tax.rate);
|
||||
actual_tax_dict[tax.idx] = flt(tax.rate, precision("tax_amount", tax));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user