diff --git a/client_payments.php b/client_payments.php deleted file mode 100644 index 870a9a9e..00000000 --- a/client_payments.php +++ /dev/null @@ -1,168 +0,0 @@ - - -
| - - Payment Date - - | -- - Invoice Date - - | -- - Invoice - - | -- - Invoice Amount - - | -- - Payment Amount - - | -- - Method - - | -- - Reference - - | -- - Account - - | -- |
|---|---|---|---|---|---|---|---|---|
| - | - | - | - | - | - | - | - |
-
-
-
-
- |
-
Payments diff --git a/modals/client_payment_export_modal.php b/modals/payment_export_modal.php similarity index 79% rename from modals/client_payment_export_modal.php rename to modals/payment_export_modal.php index a76f2c93..bd618abd 100644 --- a/modals/client_payment_export_modal.php +++ b/modals/payment_export_modal.php @@ -8,12 +8,14 @@
diff --git a/payments.php b/payments.php index 240bbccb..913b6511 100644 --- a/payments.php +++ b/payments.php @@ -4,7 +4,14 @@ $sort = "payment_date"; $order = "DESC"; -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 invoice_client_id = $client_id"; +} else { + require_once "includes/inc_all.php"; + $client_query = ''; +} // Perms enforceUserPermission('module_financial'); @@ -42,6 +49,7 @@ $sql = mysqli_query( 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 + $client_query ORDER BY $sort $order LIMIT $record_from, $record_to" ); @@ -50,12 +58,20 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>