Skip to content

Commit

Permalink
#463 totalAmount parsing fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
amihaiemil committed Apr 18, 2022
1 parent 47adbc0 commit 073c676
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/resources/public/js/getAndAddContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,13 @@ var projectContractsCount = -1;
+ "data-original-title=\"" + failMessage.replaceAll('"', '\'')+ "\">"
+"</i>";
}
var totalAmount = parseFloat(invoice.totalAmount.substring(0, invoice.totalAmount.length - 1)
.replace(",",".").trim())
var totalAmount = parseFloat(
invoice.totalAmount
.substring(0, invoice.totalAmount.length - 1)
.replace(".", "")
.replace(",",".")
.trim()
)
if (totalAmount >= 108.0) {
payIcon = "<a href='#' title='Pay Invoice' class='payInvoice' "
+ "data-contributor='" + contract.id.contributorUsername + "' "
Expand Down

0 comments on commit 073c676

Please sign in to comment.