Setting 0 for the Payment Provider threshold disables the invoice amount check

This commit is contained in:
johnnyq
2025-10-01 15:23:00 -04:00
parent 9072c37e95
commit 0e401df3c0
4 changed files with 22 additions and 8 deletions

View File

@@ -173,7 +173,15 @@ if ($balance > 0) {
<i class="fa fa-fw fa-download mr-2"></i>Download
</a>
<?php
if ($invoice_status !== "Paid" && $invoice_status !== "Cancelled" && $invoice_status !== "Draft" && $payment_provider_id && $payment_provider_threshold > $invoice_amount) { ?>
if ($invoice_status !== "Paid" &&
$invoice_status !== "Cancelled" &&
$invoice_status !== "Draft" &&
$payment_provider_id &&
(
$payment_provider_threshold == 0 ||
$payment_provider_threshold > $invoice_amount
)
){ ?>
<a class="btn btn-success" href="guest_pay_invoice_stripe.php?invoice_id=<?php echo $invoice_id; ?>&url_key=<?php echo $url_key; ?>"><i class="fa fa-fw fa-credit-card mr-2"></i>Pay Now </a>
<?php } ?>
</div>