From 66cab6c1aba066c01c525ea32ca21da5f407e67b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 27 Aug 2025 17:38:41 -0400 Subject: [PATCH] Fixed Guest Pay removed old stripe vars in place of new payment provider vars --- guest/guest_view_invoice.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/guest/guest_view_invoice.php b/guest/guest_view_invoice.php index 32b69411..08b04ab5 100644 --- a/guest/guest_view_invoice.php +++ b/guest/guest_view_invoice.php @@ -60,9 +60,6 @@ $contact_mobile = nullable_htmlentities(formatPhoneNumber($row['contact_mobile'] $client_website = nullable_htmlentities($row['client_website']); $client_currency_code = nullable_htmlentities($row['client_currency_code']); $client_net_terms = intval($row['client_net_terms']); -if ($client_net_terms == 0) { - $client_net_terms = intval($row['config_default_net_terms']); -} $sql = mysqli_query($mysqli, "SELECT * FROM companies, settings WHERE companies.company_id = settings.company_id AND companies.company_id = 1"); $row = mysqli_fetch_array($sql); @@ -88,10 +85,13 @@ if (!empty($company_logo)) { $company_logo_base64 = base64_encode(file_get_contents("../uploads/settings/$company_logo")); } $company_locale = nullable_htmlentities($row['company_locale']); -$config_invoice_footer = nullable_htmlentities($row['config_invoice_footer']); -$config_stripe_enable = intval($row['config_stripe_enable']); -$config_stripe_percentage_fee = floatval($row['config_stripe_percentage_fee']); -$config_stripe_flat_fee = floatval($row['config_stripe_flat_fee']); +$config_invoice_footer = nullable_htmlentities($row['config_invoice_footer']); + +// Get Payment Provide Details +$sql = mysqli_query($mysqli, "SELECT * FROM payment_providers WHERE payment_provider_active = 1 LIMIT 1"); +$row = mysqli_fetch_array($sql); +$payment_provider_id = intval($row['payment_provider_id']); +$payment_provider_name = nullable_htmlentities($row['payment_provider_name']); //Set Currency Format $currency_format = numfmt_create($company_locale, NumberFormatter::CURRENCY); @@ -172,7 +172,7 @@ if ($balance > 0) { Download + if ($invoice_status !== "Paid" && $invoice_status !== "Cancelled" && $invoice_status !== "Draft" && $payment_provider_id) { ?> Pay Now