Skip to content

Commit

Permalink
Merge pull request self-xdsd#313 from criske/issue300
Browse files Browse the repository at this point in the history
self-xdsd#300 Allow Invoice Payment Only If totalAmount >= 108 EUR
  • Loading branch information
amihaiemil authored Jan 5, 2021
2 parents d932daf + 37c5912 commit b6142ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/resources/public/js/getAndAddContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ var projectContractsCount = -1;
+ "</a> ";
if (invoice.paymentTime == "null" && invoice.transactionId == "null") {
status = "Active";
if (parseFloat(invoice.totalAmount) > 0.0) {
var totalAmount = parseFloat(invoice.totalAmount.substring(0, invoice.totalAmount.length - 1)
.replace(",",".").trim())
if (totalAmount >= 108.0) {
payIcon = "<a href='#' title='Pay Invoice' class='payInvoice' "
+ "data-contributor='" + contract.id.contributorUsername + "' "
+ "data-role='" + contract.id.role + "' data-repo='" + contract.id.repoFullName + "'>"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/public/js/wallets.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function payInvoice(invoice, contract, payButton) {
*/
function newInvoiceAsTableRow(invoice) {
var status = "Active"
var downloadLink = "<a href='#' title='Download Invoice' class='downloadInvoice'>"
var downloadLink ="<a href='#' title='Download Invoice' class='downloadInvoice'>"
+ "<i class='fa fa-file-pdf-o fa-lg'></i>"
+ "</a>";
return "<tr>" +
Expand Down

0 comments on commit b6142ef

Please sign in to comment.