fix: total amount for invoice
This commit is contained in:
parent
476f915fd2
commit
9ecf6f273b
1 changed files with 1 additions and 16 deletions
|
|
@ -395,22 +395,7 @@
|
||||||
|
|
||||||
if (!selectedTipOption) return this.showInvoice()
|
if (!selectedTipOption) return this.showInvoice()
|
||||||
|
|
||||||
const tipAmount = (selectedTipOption / 100) * this.amount
|
this.tipAmount = (selectedTipOption / 100) * this.amount
|
||||||
const subtotal = this.amount
|
|
||||||
const grandTotal = tipAmount + subtotal
|
|
||||||
const totalString = grandTotal.toFixed(2)
|
|
||||||
|
|
||||||
this.stack = []
|
|
||||||
for (var i = 0; i < totalString.length; i++) {
|
|
||||||
const char = totalString[i]
|
|
||||||
|
|
||||||
if (char !== '.') {
|
|
||||||
this.stack.push(char)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.tipAmount = tipAmount
|
|
||||||
|
|
||||||
this.showInvoice()
|
this.showInvoice()
|
||||||
},
|
},
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue