Merge pull request #790 from twetech/Discounts-pt-2

Update Quotes and Recurrings with discounts
This commit is contained in:
Johnny
2023-10-25 17:34:34 -04:00
committed by GitHub
13 changed files with 241 additions and 120 deletions

View File

@@ -31,6 +31,7 @@ if (isset($_GET['quote_id'])) {
$quote_date = nullable_htmlentities($row['quote_date']);
$quote_expire = nullable_htmlentities($row['quote_expire']);
$quote_amount = floatval($row['quote_amount']);
$quote_discount = floatval($row['quote_discount_amount']);
$quote_currency_code = nullable_htmlentities($row['quote_currency_code']);
$quote_note = nullable_htmlentities($row['quote_note']);
$quote_url_key = nullable_htmlentities($row['quote_url_key']);
@@ -421,6 +422,17 @@ if (isset($_GET['quote_id'])) {
<div class="col-sm-3 offset-sm-2">
<table class="table table-borderless">
<tbody>
<?php
if ($quote_discount > 0) {
?>
<tr class="border-bottom">
<td>Discount</td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $quote_discount, $quote_currency_code); ?></td>
</tr>
<?php
$sub_total = $sub_total - $quote_discount;
}
?>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?></td>