From 9ecf6f273b092f33573c9f541e616852be330e2f Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 18 Nov 2022 11:42:30 +0200 Subject: [PATCH] fix: total amount for invoice --- lnbits/extensions/tpos/templates/tpos/tpos.html | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lnbits/extensions/tpos/templates/tpos/tpos.html b/lnbits/extensions/tpos/templates/tpos/tpos.html index 929af4d7a..0dd105b9b 100644 --- a/lnbits/extensions/tpos/templates/tpos/tpos.html +++ b/lnbits/extensions/tpos/templates/tpos/tpos.html @@ -395,22 +395,7 @@ if (!selectedTipOption) return this.showInvoice() - const 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.tipAmount = (selectedTipOption / 100) * this.amount this.showInvoice() }, submitForm: function () {