diff --git a/client_assets.php b/client_assets.php index 21c141de..7786a693 100644 --- a/client_assets.php +++ b/client_assets.php @@ -130,7 +130,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Network 0) { ?> + if ($other_count > 0) { ?> Other diff --git a/client_certificates.php b/client_certificates.php index 2f6ea275..51adf31d 100644 --- a/client_certificates.php +++ b/client_certificates.php @@ -24,7 +24,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Certificates

- +
+ + + +
@@ -43,22 +51,18 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- -
- - - -
diff --git a/client_documents.php b/client_documents.php index 87cb35d9..67b3749c 100644 --- a/client_documents.php +++ b/client_documents.php @@ -155,10 +155,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- -
- +
+
+
+ +
+ +
+
+
+
+
+ +
diff --git a/client_domains.php b/client_domains.php index 450bbde1..c6a027cf 100644 --- a/client_domains.php +++ b/client_domains.php @@ -25,7 +25,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Domains

- +
+ + + +
@@ -33,7 +41,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
@@ -45,10 +52,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-

diff --git a/client_invoices.php b/client_invoices.php index 9d10bf50..9ecef0a8 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -26,8 +26,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Invoices

-
- +
+
+ + + +
@@ -46,7 +54,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
diff --git a/client_networks.php b/client_networks.php index d18b8d89..b15a7a6d 100644 --- a/client_networks.php +++ b/client_networks.php @@ -28,7 +28,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Networks

- +
+ + + +
+
@@ -47,7 +56,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- +
diff --git a/client_payments.php b/client_payments.php index 77071d90..a7e0f47d 100644 --- a/client_payments.php +++ b/client_payments.php @@ -25,8 +25,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
-
-

Payments

+
+

Payments

+
+ +
@@ -44,7 +47,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
diff --git a/client_quotes.php b/client_quotes.php index cc038769..d4a7022c 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -27,7 +27,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Quotes

- +
+ + + +
@@ -46,7 +54,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
diff --git a/client_recurring_invoices.php b/client_recurring_invoices.php index 2e4bb952..824af5e5 100644 --- a/client_recurring_invoices.php +++ b/client_recurring_invoices.php @@ -26,7 +26,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Recurring Invoices

- +
+ + + +
@@ -45,7 +53,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
diff --git a/client_services.php b/client_services.php index c06d0696..cb7ca1a5 100644 --- a/client_services.php +++ b/client_services.php @@ -34,10 +34,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); -
- -
- +
+
+
+ +
+ +
+
+
+ +
+
+
diff --git a/client_trips.php b/client_trips.php index a1b73a33..8debe53c 100644 --- a/client_trips.php +++ b/client_trips.php @@ -27,7 +27,16 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

Trips

- +
+ + + +
+
@@ -46,7 +55,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
diff --git a/expenses.php b/expenses.php index 50beb6f1..8d76408f 100644 --- a/expenses.php +++ b/expenses.php @@ -49,7 +49,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
@@ -83,6 +82,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+
+
+ +
+
diff --git a/js/ticket_time_tracking.js b/js/ticket_time_tracking.js index a49a8fb0..c50bf1a9 100644 --- a/js/ticket_time_tracking.js +++ b/js/ticket_time_tracking.js @@ -114,6 +114,16 @@ localStorage.removeItem(getLocalStorageKey("pausedTime")); } } + + + // Function to check status and pause timer + function checkStatusAndPauseTimer() { + var status = document.querySelector('select[name="status"]').value; + if (status.includes("Pending")) { + pauseTimer(); + } + } + document.getElementById("hours").addEventListener('change', updateTimeFromInput); document.getElementById("minutes").addEventListener('change', updateTimeFromInput); @@ -124,6 +134,9 @@ 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(); @@ -140,16 +153,17 @@ // Wait for other synchronous actions (if any) to complete before resetting the timer. setTimeout(forceResetTimer, 100); // 100ms delay should suffice, but you can adjust as needed. }); - + try { displayTime(); if (!localStorage.getItem(getLocalStorageKey("startTime")) && !localStorage.getItem(getLocalStorageKey("pausedTime"))) { - // If first time, start the timer automatically startTimer(); } else if (localStorage.getItem(getLocalStorageKey("startTime"))) { - // Continue timer if it was running before startTimer(); } + + // Check and pause timer if status is pending + checkStatusAndPauseTimer(); } catch (error) { console.error("There was an issue initializing the timer:", error); } diff --git a/quote.php b/quote.php index e2617045..81c51cf8 100644 --- a/quote.php +++ b/quote.php @@ -99,7 +99,7 @@ if (isset($_GET['quote_id'])) { $json_products = json_encode($products); } - ?> +?>