Skip to content

Commit 1c6138c

Browse files
author
niravkrish
committed
change variable name
1 parent 47a53b5 commit 1c6138c

File tree

1 file changed

+8
-9
lines changed
  • app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary

1 file changed

+8
-9
lines changed

app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/tax.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ define([
2020
var isTaxDisplayedInGrandTotal = window.checkoutConfig.includeTaxInGrandTotal,
2121
isFullTaxSummaryDisplayed = window.checkoutConfig.isFullTaxSummaryDisplayed,
2222
isZeroTaxDisplayed = window.checkoutConfig.isZeroTaxDisplayed,
23-
totalPercentage = 0,
24-
amount = '',
25-
rates = '';
23+
taxAmount = 0,
24+
rates = 0;
2625

2726
return Component.extend({
2827
defaults: {
@@ -108,24 +107,24 @@ define([
108107
* @return {*|String}
109108
*/
110109
getTaxAmount: function (parent, percentage) {
111-
amount = parent.amount;
110+
var totalPercentage = 0;
111+
taxAmount = parent.amount;
112112
rates = parent.rates;
113-
totalPercentage = 0;
114113
_.each(rates, function (rate) {
115114
totalPercentage += parseFloat(rate.percent);
116115
});
117116

118-
return this.getFormattedPrice(this.getPercentAmount(amount, totalPercentage, percentage));
117+
return this.getFormattedPrice(this.getPercentAmount(taxAmount, totalPercentage, percentage));
119118
},
120119

121120
/**
122-
* @param {*} amount
121+
* @param {*} taxAmount
123122
* @param {*} totalPercentage
124123
* @param {*} percentage
125124
* @return {*|String}
126125
*/
127-
getPercentAmount: function (amount, totalPercentage, percentage) {
128-
return parseFloat((amount * percentage) / totalPercentage);
126+
getPercentAmount: function (taxAmount, totalPercentage, percentage) {
127+
return parseFloat((taxAmount * percentage) / totalPercentage);
129128
},
130129

131130
/**

0 commit comments

Comments
 (0)