From a5ff978a7764e44b25809724ee57ffb014a2081b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 19 Feb 2025 12:10:03 -0500 Subject: [PATCH] Merged Global Recurring Invoices with Client Recurring Invoices seperated them with some header logic --- client_recurring_invoices.php | 224 ---------------------------------- includes/client_side_nav.php | 2 +- recurring_invoice.php | 4 +- recurring_invoices.php | 23 +++- 4 files changed, 23 insertions(+), 230 deletions(-) delete mode 100644 client_recurring_invoices.php diff --git a/client_recurring_invoices.php b/client_recurring_invoices.php deleted file mode 100644 index d9d1453e..00000000 --- a/client_recurring_invoices.php +++ /dev/null @@ -1,224 +0,0 @@ - - -
-
-

Recurring Invoices

-
-
- - 0) { ?> - - - -
-
-
-
-
- -
- -
-
- -
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
- - "> - - - - - - - - - - - - - - - - - - "; - } else { - $auto_pay_display = " - - Create - - "; - require "modals/recurring_payment_add_modal.php"; - } - - ?> - - - - - - - - - - - - - - - - - -
- - Number - - - - Scope - - - - Amount - - - - Frequency - - - - Last Sent - - - - Next Date - - - - Category - - - - Auto Pay - - - - Status - - Action
ly - - - - - -
-
- -
-
- - diff --git a/recurring_invoices.php b/recurring_invoices.php index 0cf05b3a..dd356e3c 100644 --- a/recurring_invoices.php +++ b/recurring_invoices.php @@ -4,7 +4,14 @@ $sort = "recurring_next_date"; $order = "ASC"; -require_once "includes/inc_all.php"; +// If client_id is in URI then show client Side Bar and client header +if (isset($_GET['client_id'])) { + require_once "includes/inc_all_client.php"; + $client_query = "AND recurring_client_id = $client_id"; +} else { + require_once "includes/inc_all.php"; + $client_query = ''; +} // Perms enforceUserPermission('module_sales'); @@ -20,6 +27,7 @@ $sql = mysqli_query( LEFT JOIN recurring_payments ON recurring_payment_recurring_invoice_id = recurring_id WHERE (CONCAT(recurring_prefix,recurring_number) LIKE '%$q%' OR recurring_frequency LIKE '%$q%' OR recurring_scope LIKE '%$q%' OR client_name LIKE '%$q%' OR category_name LIKE '%$q%') AND DATE(recurring_created_at) BETWEEN '$dtf' AND '$dtt' + $client_query ORDER BY $sort $order LIMIT $record_from, $record_to"); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); @@ -36,6 +44,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+ + +
@@ -104,11 +115,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Scope + Client + Amount @@ -195,11 +208,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - + "> + + - + + + ly