mirror of
https://github.com/itflow-org/itflow
synced 2026-03-13 17:24:51 +00:00
Updated Quote and Recurring to match invoice UI updates
This commit is contained in:
@@ -154,7 +154,7 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
<td>Date</td>
|
<td>Date</td>
|
||||||
<td class="text-right"><?php echo $quote_date; ?></td>
|
<td class="text-right"><?php echo $quote_date; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="text-bold">
|
||||||
<td>Expire</td>
|
<td>Expire</td>
|
||||||
<td class="text-right"><?php echo $quote_expire; ?></td>
|
<td class="text-right"><?php echo $quote_expire; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -233,21 +233,16 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
<div class="col-sm-3 offset-sm-2">
|
<div class="col-sm-3 offset-sm-2">
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tbody>
|
<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">
|
<tr class="border-bottom">
|
||||||
<td>Subtotal</td>
|
<td>Subtotal</td>
|
||||||
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?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 } ?>
|
||||||
<?php if ($total_tax > 0) { ?>
|
<?php if ($total_tax > 0) { ?>
|
||||||
<tr class="border-bottom">
|
<tr class="border-bottom">
|
||||||
<td>Tax</td>
|
<td>Tax</td>
|
||||||
@@ -378,11 +373,11 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
text: 'Expire',
|
text: 'Expire',
|
||||||
style: 'invoiceDateTitle'
|
style: 'invoiceDueDateTitle'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: <?php echo json_encode(html_entity_decode($quote_expire)) ?>,
|
text: <?php echo json_encode(html_entity_decode($quote_expire)) ?>,
|
||||||
style: 'invoiceDateValue'
|
style: 'invoiceDueDateValue'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
@@ -501,7 +496,7 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
rowSpan: 3,
|
rowSpan: '*',
|
||||||
text: <?php echo json_encode(html_entity_decode($quote_note)) ?>,
|
text: <?php echo json_encode(html_entity_decode($quote_note)) ?>,
|
||||||
style: 'notesText'
|
style: 'notesText'
|
||||||
},
|
},
|
||||||
@@ -514,6 +509,20 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
style: 'itemsFooterSubValue'
|
style: 'itemsFooterSubValue'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
<?php if ($quote_discount > 0) { ?>
|
||||||
|
[
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
text: 'Discount',
|
||||||
|
style: 'itemsFooterSubTitle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: <?php echo json_encode(numfmt_format_currency($currency_format, -$quote_discount, $quote_currency_code)) ?>,
|
||||||
|
style: 'itemsFooterSubValue'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($total_tax > 0) { ?>
|
||||||
[
|
[
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
@@ -525,15 +534,16 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
style: 'itemsFooterSubValue'
|
style: 'itemsFooterSubValue'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
<?php } ?>
|
||||||
[
|
[
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
text: 'Total',
|
text: 'Total',
|
||||||
style: 'itemsFooterSubTitle'
|
style: 'itemsFooterTotalTitle'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: <?php echo json_encode(numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code)) ?>,
|
text: <?php echo json_encode(numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code)) ?>,
|
||||||
style: 'itemsFooterSubValue'
|
style: 'itemsFooterTotalValue'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
@@ -600,6 +610,19 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
alignment: 'right',
|
alignment: 'right',
|
||||||
margin: [0,5,0,5]
|
margin: [0,5,0,5]
|
||||||
},
|
},
|
||||||
|
// Invoice Due Dates
|
||||||
|
invoiceDueDateTitle: {
|
||||||
|
fontSize: 10,
|
||||||
|
bold: true,
|
||||||
|
alignment: 'left',
|
||||||
|
margin: [0,5,0,5]
|
||||||
|
},
|
||||||
|
invoiceDueDateValue: {
|
||||||
|
fontSize: 10,
|
||||||
|
bold: true,
|
||||||
|
alignment: 'right',
|
||||||
|
margin: [0,5,0,5]
|
||||||
|
},
|
||||||
// Items Header
|
// Items Header
|
||||||
itemsHeader: {
|
itemsHeader: {
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
|
|||||||
55
quote.php
55
quote.php
@@ -422,21 +422,16 @@ if (isset($_GET['quote_id'])) {
|
|||||||
<div class="col-sm-3 offset-sm-2">
|
<div class="col-sm-3 offset-sm-2">
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tbody>
|
<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">
|
<tr class="border-bottom">
|
||||||
<td>Subtotal</td>
|
<td>Subtotal</td>
|
||||||
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?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 } ?>
|
||||||
<?php if ($total_tax > 0) { ?>
|
<?php if ($total_tax > 0) { ?>
|
||||||
<tr class="border-bottom">
|
<tr class="border-bottom">
|
||||||
<td>Tax</td>
|
<td>Tax</td>
|
||||||
@@ -642,11 +637,11 @@ require_once "footer.php";
|
|||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
text: 'Expire',
|
text: 'Expire',
|
||||||
style: 'invoiceDateTitle'
|
style: 'invoiceDueDateTitle'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: <?php echo json_encode(html_entity_decode($quote_expire)) ?>,
|
text: <?php echo json_encode(html_entity_decode($quote_expire)) ?>,
|
||||||
style: 'invoiceDateValue'
|
style: 'invoiceDueDateValue'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
@@ -765,7 +760,7 @@ require_once "footer.php";
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
rowSpan: 3,
|
rowSpan: '*',
|
||||||
text: <?php echo json_encode(html_entity_decode($quote_note)) ?>,
|
text: <?php echo json_encode(html_entity_decode($quote_note)) ?>,
|
||||||
style: 'notesText'
|
style: 'notesText'
|
||||||
},
|
},
|
||||||
@@ -778,6 +773,20 @@ require_once "footer.php";
|
|||||||
style: 'itemsFooterSubValue'
|
style: 'itemsFooterSubValue'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
<?php if ($quote_discount > 0) { ?>
|
||||||
|
[
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
text: 'Discount',
|
||||||
|
style: 'itemsFooterSubTitle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: <?php echo json_encode(numfmt_format_currency($currency_format, -$quote_discount, $quote_currency_code)) ?>,
|
||||||
|
style: 'itemsFooterSubValue'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($total_tax > 0) { ?>
|
||||||
[
|
[
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
@@ -789,15 +798,16 @@ require_once "footer.php";
|
|||||||
style: 'itemsFooterSubValue'
|
style: 'itemsFooterSubValue'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
<?php } ?>
|
||||||
[
|
[
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
text: 'Total',
|
text: 'Total',
|
||||||
style: 'itemsFooterSubTitle'
|
style: 'itemsFooterTotalTitle'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: <?php echo json_encode(numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code)) ?>,
|
text: <?php echo json_encode(numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code)) ?>,
|
||||||
style: 'itemsFooterSubValue'
|
style: 'itemsFooterTotalValue'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
@@ -864,6 +874,19 @@ require_once "footer.php";
|
|||||||
alignment: 'right',
|
alignment: 'right',
|
||||||
margin: [0,5,0,5]
|
margin: [0,5,0,5]
|
||||||
},
|
},
|
||||||
|
// Invoice Due Dates
|
||||||
|
invoiceDueDateTitle: {
|
||||||
|
fontSize: 10,
|
||||||
|
bold: true,
|
||||||
|
alignment: 'left',
|
||||||
|
margin: [0,5,0,5]
|
||||||
|
},
|
||||||
|
invoiceDueDateValue: {
|
||||||
|
fontSize: 10,
|
||||||
|
bold: true,
|
||||||
|
alignment: 'right',
|
||||||
|
margin: [0,5,0,5]
|
||||||
|
},
|
||||||
// Items Header
|
// Items Header
|
||||||
itemsHeader: {
|
itemsHeader: {
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
|
|||||||
@@ -356,31 +356,25 @@ if (isset($_GET['recurring_id'])) {
|
|||||||
<div class="col-sm-3 offset-sm-2">
|
<div class="col-sm-3 offset-sm-2">
|
||||||
<table class="table table-borderless">
|
<table class="table table-borderless">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
|
||||||
if ($recurring_discount > 0) {
|
|
||||||
?>
|
|
||||||
<tr class="border-bottom">
|
|
||||||
<td>Discount</td>
|
|
||||||
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $recurring_discount, $recurring_currency_code); ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$sub_total = $sub_total - $invoice_discount;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<tr class="border-bottom">
|
<tr class="border-bottom">
|
||||||
<td>Subtotal</td>
|
<td>Subtotal</td>
|
||||||
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $recurring_currency_code); ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $recurring_currency_code); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php if ($recurring_discount > 0) { ?>
|
||||||
|
<tr class="border-bottom">
|
||||||
|
<td>Discount</td>
|
||||||
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $recurring_discount, $recurring_currency_code); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
<?php if ($total_tax > 0) { ?>
|
<?php if ($total_tax > 0) { ?>
|
||||||
<tr class="border-bottom">
|
<tr class="border-bottom">
|
||||||
<td>Tax</td>
|
<td>Tax</td>
|
||||||
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax, $recurring_currency_code); ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax, $recurring_currency_code); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<tr class="border-bottom">
|
<tr class="border-bottom text-bold">
|
||||||
<td><strong>Total</strong></td>
|
<td>Total</td>
|
||||||
<td class="text-right"><strong><?php echo numfmt_format_currency($currency_format, $recurring_amount, $recurring_currency_code); ?></strong></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $recurring_amount, $recurring_currency_code); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user