diff --git a/guest_view_invoice.php b/guest_view_invoice.php
index f1ee664b..18f5c6ba 100644
--- a/guest_view_invoice.php
+++ b/guest_view_invoice.php
@@ -80,6 +80,8 @@ if (!empty($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_stripe_client_pays_fees = intval($row['config_stripe_client_pays_fees']);
//Set Currency Format
@@ -109,16 +111,15 @@ $sql_amount_paid = mysqli_query($mysqli, "SELECT SUM(payment_amount) AS amount_p
$row = mysqli_fetch_array($sql_amount_paid);
$amount_paid = floatval($row['amount_paid']);
-$balance = $invoice_amount - $amount_paid;
-
// Check config to see if client pays fees is enabled
if ($config_stripe_client_pays_fees == 1) {
- $percentage_fee = 0.029;
- $flat_fee = 0.30;
- // Calculate the amount to charge the client
- $balance_to_pay = ($balance + $flat_fee) / (1 - $percentage_fee);
- $stripe_fee = $balance_to_pay - $balance;
- }
+ // Calculate the amount to charge the client
+ $balance_to_pay = ($balance + $config_stripe_flat_fee) / (1 - $coinfig_stripe_percentage_fee);
+ $stripe_fee = $balance_to_pay - $balance;
+} else {
+ $gateway_fee = 0;
+ $balance = $invoice_amount - $amount_paid;
+}
//check to see if overdue
$invoice_color = $invoice_badge_color; // Default
@@ -297,7 +298,19 @@ $sql_invoice_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE it
Paid |
|
-
+
+
+
+ Gateway Fee |
+ |
+
+
| Balance |
|
diff --git a/js/ticket_time_tracking.js b/js/ticket_time_tracking.js
index f60a7016..081319e3 100644
--- a/js/ticket_time_tracking.js
+++ b/js/ticket_time_tracking.js
@@ -103,7 +103,6 @@
document.getElementById("startStopTimer").innerText = "Start";
}
-
function handleInputFocus() {
if (!isPaused) {
pauseTimer();
@@ -126,7 +125,6 @@
}
}
-
function updateRunningTicketsCount() {
let runningTickets = parseInt(document.getElementById('runningTicketsCount').innerText, 10);
@@ -136,31 +134,27 @@
runningTickets = Math.max(0, runningTickets - 1);
}
- document.getElementById('runningTicketsCount').innerText = runningTickets.toString();
+ document.getElementById('runningTicketsCount').innerText = runningTickets.toString();
}
// Function to check status and pause timer
function checkStatusAndPauseTimer() {
var status = document.querySelector('select[name="status"]').value;
- if (status.includes("Pending")) {
+ if (status.includes("Pending") || status.includes("Close")) {
pauseTimer();
}
}
-
-
document.getElementById("hours").addEventListener('change', updateTimeFromInput);
document.getElementById("minutes").addEventListener('change', updateTimeFromInput);
document.getElementById("seconds").addEventListener('change', updateTimeFromInput);
-
document.getElementById("hours").addEventListener('focus', handleInputFocus);
document.getElementById("minutes").addEventListener('focus', handleInputFocus);
document.getElementById("seconds").addEventListener('focus', handleInputFocus);
document.querySelector('select[name="status"]').addEventListener('change', checkStatusAndPauseTimer);
-
document.getElementById("startStopTimer").addEventListener('click', function() {
if (timerInterval === null) {
startTimer();
diff --git a/settings_online_payment.php b/settings_online_payment.php
index 33425dfb..76201245 100644
--- a/settings_online_payment.php
+++ b/settings_online_payment.php
@@ -24,7 +24,7 @@ require_once "inc_all_settings.php";