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