fix: replaced "row_id" to "idx" as "row_id" was not available in variable "tax", also replaced "-1" by "-2" as "idx" starts with 0 rather than 1
This commit is contained in:
parent
23cb5e1869
commit
7a45c8bc28
@ -345,11 +345,11 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
current_tax_amount = (tax_rate / 100.0) * item.net_amount;
|
current_tax_amount = (tax_rate / 100.0) * item.net_amount;
|
||||||
} else if(tax.charge_type == "On Previous Row Amount") {
|
} else if(tax.charge_type == "On Previous Row Amount") {
|
||||||
current_tax_amount = (tax_rate / 100.0) *
|
current_tax_amount = (tax_rate / 100.0) *
|
||||||
this.frm.doc["taxes"][cint(tax.row_id) - 1].tax_amount_for_current_item;
|
this.frm.doc["taxes"][cint(tax.idx) - 2].tax_amount_for_current_item;
|
||||||
|
|
||||||
} else if(tax.charge_type == "On Previous Row Total") {
|
} else if(tax.charge_type == "On Previous Row Total") {
|
||||||
current_tax_amount = (tax_rate / 100.0) *
|
current_tax_amount = (tax_rate / 100.0) *
|
||||||
this.frm.doc["taxes"][cint(tax.row_id) - 1].grand_total_for_current_item;
|
this.frm.doc["taxes"][cint(tax.idx) - 2].grand_total_for_current_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.set_item_wise_tax(item, tax, tax_rate, current_tax_amount);
|
this.set_item_wise_tax(item, tax, tax_rate, current_tax_amount);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user