diff --git a/admin_logs.php b/admin_logs.php index 5fc93f1e..99cc103c 100644 --- a/admin_logs.php +++ b/admin_logs.php @@ -13,6 +13,7 @@ if (isset($_GET['user']) & !empty($_GET['user'])) { } else { // Default - any $user_query = ''; + $user = ''; } // Log Type Filter @@ -22,6 +23,7 @@ if (isset($_GET['type']) & !empty($_GET['type'])) { } else { // Default - any $log_type_query = ''; + $type = ''; } // Log Action Filter @@ -31,6 +33,7 @@ if (isset($_GET['action']) & !empty($_GET['action'])) { } else { // Default - any $log_action_query = ''; + $action = ''; } //Rebuild URL diff --git a/clients.php b/clients.php index fcd5937f..f636843e 100644 --- a/clients.php +++ b/clients.php @@ -43,6 +43,7 @@ if (isset($_GET['industry']) & !empty($_GET['industry'])) { } else { // Default - any $industry_query = ''; + $industry = ''; } // Referral Filter @@ -52,6 +53,7 @@ if (isset($_GET['referral']) & !empty($_GET['referral'])) { } else { // Default - any $referral_query = ''; + $referral = ''; } //Rebuild URL diff --git a/payments.php b/payments.php index fa0ec3fc..69110afe 100644 --- a/payments.php +++ b/payments.php @@ -6,6 +6,17 @@ $order = "DESC"; require_once "inc_all.php"; + +// Payment Method Filter +if (isset($_GET['method']) & !empty($_GET['method'])) { + $payment_method_query = "AND (payment_method = '" . sanitizeInput($_GET['method']) . "')"; + $method = nullable_htmlentities($_GET['method']); +} else { + // Default - any + $payment_method_query = ''; + $method = ''; +} + // Account Filter if (isset($_GET['account']) & !empty($_GET['account'])) { $account_query = 'AND (payment_account_id = ' . intval($_GET['account']) . ')'; @@ -13,6 +24,7 @@ if (isset($_GET['account']) & !empty($_GET['account'])) { } else { // Default - any $account_query = ''; + $account = ''; } //Rebuild URL @@ -26,6 +38,8 @@ $sql = mysqli_query( LEFT JOIN accounts ON payment_account_id = account_id WHERE DATE(payment_date) BETWEEN '$dtf' AND '$dtt' AND (CONCAT(invoice_prefix,invoice_number) LIKE '%$q%' OR client_name LIKE '%$q%' OR account_name LIKE '%$q%' OR payment_method LIKE '%$q%' OR payment_reference LIKE '%$q%') + $account_query + $payment_method_query ORDER BY $sort $order LIMIT $record_from, $record_to" ); @@ -50,6 +64,44 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); +
+
+ +
+
+ +
+
+ +
+
" id="advancedFilter">
@@ -81,26 +133,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
-
- - -
-