From 409084c49963a40cd9857eb2c2bbe55541f04969 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 16 Jun 2025 15:49:38 -0400 Subject: [PATCH] Update UI on Quote, Recurring Invoice and Guest views to match new optimized Invoice UI Layout --- guest/guest_view_invoice.php | 122 +++++++++++++++-------------------- guest/guest_view_quote.php | 118 ++++++++++++++++----------------- invoice.php | 16 ++--- quote.php | 122 ++++++++++++++++------------------- recurring_invoice.php | 97 +++++++++++++--------------- 5 files changed, 222 insertions(+), 253 deletions(-) diff --git a/guest/guest_view_invoice.php b/guest/guest_view_invoice.php index ed47a0c1..b6bfedb0 100644 --- a/guest/guest_view_invoice.php +++ b/guest/guest_view_invoice.php @@ -178,87 +178,71 @@ if ($balance > 0) {
-
-
- "> + +
+
+ " alt="Company logo">
-
- -
-
- -
-
- - -
-
- -
-
- -

Invoice

-
-
-
-
+
  • -
  • -
  • -
  • -
  • +
  • +
  • +
-
-
-
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
- -
-
-
-
-
- +

INVOICE

+
+ +
+
- + + + + + - - + +
DateInvoice #:
Date:
Due
Due:
+ +
+
+
+
Bill To:
+
    +
  • +
  • +
  • +
  • +
+
-
+
- - +
+ - + - + - + @@ -298,7 +282,7 @@ if ($balance > 0) { -
+
@@ -311,41 +295,41 @@ if ($balance > 0) {
ProductItem Description QtyPriceUnit Price TaxTotalAmount
- - + + 0) { ?> - - + + 0) { ?> - - + + - - + + 0) { ?> - - + + - - - + + + @@ -355,7 +339,7 @@ if ($balance > 0) {
-
+
diff --git a/guest/guest_view_quote.php b/guest/guest_view_quote.php index b16c6185..3181f605 100644 --- a/guest/guest_view_quote.php +++ b/guest/guest_view_quote.php @@ -87,6 +87,21 @@ $config_quote_footer = nullable_htmlentities($row['config_quote_footer']); //Set Currency Format $currency_format = numfmt_create($company_locale, NumberFormatter::CURRENCY); +//Set Badge color based off of quote status +if ($quote_status == "Sent") { + $quote_badge_color = "warning text-white"; +} elseif ($quote_status == "Viewed") { + $quote_badge_color = "primary"; +} elseif ($quote_status == "Accepted") { + $quote_badge_color = "success"; +} elseif ($quote_status == "Declined") { + $quote_badge_color = "danger"; +} elseif ($quote_status == "Invoiced") { + $quote_badge_color = "info"; +} else { + $quote_badge_color = "secondary"; +} + //Update status to Viewed only if invoice_status = "Sent" if ($quote_status == 'Sent') { mysqli_query($mysqli, "UPDATE quotes SET quote_status = 'Viewed' WHERE quote_id = $quote_id"); @@ -115,82 +130,69 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
-
+
- "> + " alt="Company logo">
-
- -
-
- -
-
- -

Quote

-
-
- -
- -
+
  • -
  • -
  • -
  • -
  • +
  • +
  • +
-
-
- -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
- -
-
-
-
-
-
Subtotal
Subtotal:
Discount
Discount: -
Tax
Tax:
Total
Total:
Paid
Paid:
Balance
Balance:
+

QUOTE

+
+ +
+
- + + + + + - - + +
DateQuote #:
Date:
Expire
Expires:
+ +
+
+
+
To:
+
    +
  • +
  • +
  • +
  • +
+
-
+
- - +
+ - + - + - + @@ -233,7 +235,7 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie -
+
@@ -247,24 +249,24 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
ProductItem Description QtyPriceUnit Price TaxTotalAmount
- - + + 0) { ?> - - + + 0) { ?> - - + + - - + + diff --git a/invoice.php b/invoice.php index b6dde0b8..d3bab716 100644 --- a/invoice.php +++ b/invoice.php @@ -449,7 +449,7 @@ if (isset($_GET['invoice_id'])) { - - - + + +
Subtotal
Subtotal:
Discount
Discount:
Tax
Tax:
Total
Total:
- + @@ -535,9 +535,9 @@ if (isset($_GET['invoice_id'])) {
Balance:
Balance:
@@ -593,7 +593,7 @@ if (isset($_GET['invoice_id'])) {
-
+
">
Payments @@ -609,7 +609,7 @@ if (isset($_GET['invoice_id'])) {
- "> + @@ -646,7 +646,7 @@ if (isset($_GET['invoice_id'])) { -
+
">
Tickets @@ -675,7 +675,7 @@ if (isset($_GET['invoice_id'])) {
Date Amount
- "> + diff --git a/quote.php b/quote.php index 918dc504..9680a4ef 100644 --- a/quote.php +++ b/quote.php @@ -247,79 +247,70 @@ if (isset($_GET['quote_id'])) {
-
-
+
+
" alt="Company logo">
-
-
-
- -
-
-

Quote

-
-
-
-
+
    -
  • -

    -
  • +
  • -
  • -
  • -
  • -
  • +
  • +
  • +
-
-
    -
  • -

    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
-
-
-
-
-
+
-
Date Subject
+

QUOTE

+
+ +
+
- + + + + + - - + +
DateQuote #:
Date:
Expire
Expires:
+ +
+
+
+
To:
+
    +
  • +
  • +
  • +
  • +
+
-
+
- - +
+ - - + + - + @@ -391,12 +382,12 @@ if (isset($_GET['quote_id'])) { "> + //find largest order number and add 1 + $sql = mysqli_query($mysqli, "SELECT MAX(item_order) AS item_order FROM invoice_items WHERE item_quote_id = $quote_id"); + $row = mysqli_fetch_array($sql); + $item_order = intval($row['item_order']) + 1; + echo $item_order; + ?>">
Item DescriptionQuantityPriceQtyUnit Price TaxTotalAmount
@@ -405,7 +396,7 @@ if (isset($_GET['quote_id'])) { - + @@ -442,11 +433,11 @@ if (isset($_GET['quote_id'])) { -