From 37c59126d5b7cff5e30ad92b0109038e7abe3282 Mon Sep 17 00:00:00 2001 From: cristianpela Date: Tue, 5 Jan 2021 11:32:27 +0200 Subject: [PATCH] #300 Allow Invoice Payment Only If totalAmount >= 108 EUR - fixed transformation currency to float --- src/main/resources/public/js/getAndAddContracts.js | 3 --- src/main/resources/public/js/wallets.js | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/resources/public/js/getAndAddContracts.js b/src/main/resources/public/js/getAndAddContracts.js index eca43a4b..9069228a 100644 --- a/src/main/resources/public/js/getAndAddContracts.js +++ b/src/main/resources/public/js/getAndAddContracts.js @@ -166,9 +166,6 @@ var projectContractsCount = -1; + "" + ""; } - if(totalAmount === 0.0){ - downloadLink = ""; - } } else { status = "Paid"; } diff --git a/src/main/resources/public/js/wallets.js b/src/main/resources/public/js/wallets.js index 76b71284..8019579a 100644 --- a/src/main/resources/public/js/wallets.js +++ b/src/main/resources/public/js/wallets.js @@ -215,11 +215,9 @@ function payInvoice(invoice, contract, payButton) { */ function newInvoiceAsTableRow(invoice) { var status = "Active" - var totalAmount = parseFloat(invoice.totalAmount.substring(0, invoice.totalAmount.length - 1) - .replace(",",".").trim()) - var downloadLink = totalAmount > 0.0 ? "" + var downloadLink ="" + "" - + "": ""; + + ""; return "" + "" + invoice.id + "" + "" + invoice.createdAt.split('T')[0] + "" +