From dd017da1400ea105a0ccafd6b857bc97bbfc768e Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 24 Aug 2024 14:47:27 -0400 Subject: [PATCH] Several UX/UI Updates to Guest Invoice, Added Account Balance to the Top Right, removed Invoice History as this should be viewed via the client portal. Update the wording for Previous unpaid invoices to Outstanding Invoices, added invoice counts, reduced margin and padding in invoice tables, reworded Pay Online to Pay Now --- guest_view_invoice.php | 159 ++++++++++------------------------------- 1 file changed, 36 insertions(+), 123 deletions(-) diff --git a/guest_view_invoice.php b/guest_view_invoice.php index a77c2c61..8c3fe1a3 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -166,12 +166,11 @@ if ($balance > 0) {
@@ -801,79 +800,23 @@ if ($balance > 0) { 1) { ?> - -
-
- Previous Unpaid Invoices -
-
- - - - - - - - - - - - - > - - - - - - - - - -
Invoice #DateDue DateAmount
( Days Late)
-
-
- - CURDATE() AND(invoice_status = 'Sent' OR invoice_status = 'Viewed' OR invoice_status = 'Partial') ORDER BY invoice_number DESC"); +$sql_current_invoices = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_client_id = $client_id AND invoice_due > CURDATE() AND(invoice_status = 'Sent' OR invoice_status = 'Viewed' OR invoice_status = 'Partial') ORDER BY invoice_number DESC"); -if (mysqli_num_rows($sql) > 1) { ?> +if ($sql_current_invoices) { + $current_invoices_count = mysqli_num_rows($sql_current_invoices); + ?> - -
+
- Current Invoices + Current Invoices
- +
- + @@ -882,7 +825,7 @@ if (mysqli_num_rows($sql) > 1) { ?> 1) { ?> - + @@ -910,37 +853,40 @@ if (mysqli_num_rows($sql) > 1) { ?>
Invoice #Invoice Date Due Amount
(Due in Days)
- + 1) { ?> +$outstanding_invoices_count = mysqli_num_rows($sql_outstanding_invoices); -
-
- Previous Invoices Paid +if ($sql_outstanding_invoices) { ?> + +
+
+ Outstanding Invoices
- +
- + - + 1) { ?> $invoice_currency_code = nullable_htmlentities($row['invoice_currency_code']); $invoice_url_key = nullable_htmlentities($row['invoice_url_key']); $invoice_tally_total = $invoice_amount + $invoice_tally_total; + $difference = time() - strtotime($invoice_due); + $days = floor($difference / (60*60*24)); ?> > - - - - - - + + strtotime($invoice_due)) { - $payment_note = "Late"; - $difference = strtotime($payment_date) - strtotime($invoice_due); - $days = floor($difference / (60*60*24)) . " Days"; - } else { - $payment_note = ""; - $days = ""; - } - - - $invoice_tally_total = $invoice_amount + $invoice_tally_total; - - ?> - - - - - - - - + } + ?>
Invoice #Invoice DateDue DateDue Amount
Payments (Over Due by Days)
- - - -
-