From 674da36cd1c5845580d7a758ea729ad59746e48f Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 11 Jun 2025 17:12:37 -0400 Subject: [PATCH] Do Not calculate Non-Billable Invoices towards a clients balance Convert Add Payment Modal to AJAX and add it as an option from the invoice listing page --- ajax/ajax_invoice_pay.php | 182 +++++++++++++++++++++++++++ client/index.php | 2 +- clients.php | 2 +- dashboard.php | 6 +- guest/guest_view_invoice.php | 4 +- includes/inc_all_client.php | 2 +- invoice.php | 11 +- invoices.php | 16 +++ modals/invoice_payment_add_modal.php | 146 --------------------- report_clients_with_balance.php | 5 +- 10 files changed, 216 insertions(+), 160 deletions(-) create mode 100644 ajax/ajax_invoice_pay.php delete mode 100644 modals/invoice_payment_add_modal.php diff --git a/ajax/ajax_invoice_pay.php b/ajax/ajax_invoice_pay.php new file mode 100644 index 00000000..cbf6eb1c --- /dev/null +++ b/ajax/ajax_invoice_pay.php @@ -0,0 +1,182 @@ + + + +
+ + + + + + +
+ + - - + + Add Payment @@ -701,7 +705,6 @@ if (isset($_GET['invoice_id'])) { \ No newline at end of file diff --git a/report_clients_with_balance.php b/report_clients_with_balance.php index 40f15ce7..cd677d07 100644 --- a/report_clients_with_balance.php +++ b/report_clients_with_balance.php @@ -27,8 +27,9 @@ enforceUserPermission('module_financial'); invoices ON clients.client_id = invoices.invoice_client_id - AND invoices.invoice_status NOT LIKE 'Draft' - AND invoices.invoice_status NOT LIKE 'Cancelled' + AND invoices.invoice_status != 'Draft' + AND invoices.invoice_status != 'Cancelled' + AND invoice_status != 'Non-Billable' LEFT JOIN (SELECT payment_invoice_id,