Added currency code to quotes, guest view quote and invoice

This commit is contained in:
johnnyq
2021-08-18 20:56:59 -04:00
parent b89a000483
commit c439f4d388
3 changed files with 49 additions and 45 deletions

View File

@@ -43,7 +43,7 @@ if(isset($_GET['quote_id'])){
}
$client_website = $row['client_website'];
$client_currency_code = $row['client_currency_code'];
$client_currency_symbol = get_currency_symbol("$client_currency_code");
$client_currency_symbol = get_currency_symbol($client_currency_code);
$client_net_terms = $row['client_net_terms'];
if($client_net_terms == 0){
$client_net_terms = $config_default_net_terms;
@@ -237,9 +237,9 @@ if(isset($_GET['quote_id'])){
<td><?php echo $item_name; ?></td>
<td><?php echo $item_description; ?></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right">$<?php echo number_format($item_price,2); ?></td>
<td class="text-right">$<?php echo number_format($item_tax,2); ?></td>
<td class="text-right">$<?php echo number_format($item_total,2); ?></td>
<td class="text-right"><?php echo $client_currency_code; ?><?php echo number_format($item_price,2); ?></td>
<td class="text-right"><?php echo $client_currency_code; ?><?php echo number_format($item_tax,2); ?></td>
<td class="text-right"><?php echo $client_currency_code; ?><?php echo number_format($item_total,2); ?></td>
</tr>
<?php
@@ -311,17 +311,17 @@ if(isset($_GET['quote_id'])){
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right">$<?php echo number_format($sub_total,2); ?></td>
<td class="text-right"><?php echo $client_currency_code; ?><?php echo number_format($sub_total,2); ?></td>
</tr>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right">$<?php echo number_format($total_tax,2); ?></td>
<td class="text-right"><?php echo $client_currency_code; ?><?php echo number_format($total_tax,2); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Total</strong></td>
<td class="text-right"><strong>$<?php echo number_format($quote_amount,2); ?></strong></td>
<td class="text-right"><strong><?php echo $client_currency_code; ?><?php echo number_format($quote_amount,2); ?></strong></td>
</tr>
</tbody>
</table>
@@ -570,15 +570,15 @@ var docDefinition = {
style:'itemQty'
},
{
text:'$<?php echo number_format($item_price,2); ?>',
text:'<?php echo $client_currency_code; ?><?php echo number_format($item_price,2); ?>',
style:'itemNumber'
},
{
text:'$<?php echo number_format($item_tax,2); ?>',
text:'<?php echo $client_currency_code; ?><?php echo number_format($item_tax,2); ?>',
style:'itemNumber'
},
{
text: '$<?php echo number_format($item_total,2); ?>',
text: '<?php echo $client_currency_code; ?><?php echo number_format($item_total,2); ?>',
style:'itemNumber'
}
],
@@ -620,7 +620,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text:'$<?php echo number_format($sub_total,2); ?>',
text:'<?php echo $client_currency_code; ?><?php echo number_format($sub_total,2); ?>',
style:'itemsFooterSubValue'
}
],
@@ -631,7 +631,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '$<?php echo number_format($total_tax,2); ?>',
text: '<?php echo $client_currency_code; ?><?php echo number_format($total_tax,2); ?>',
style:'itemsFooterSubValue'
}
],
@@ -642,7 +642,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '$<?php echo number_format($quote_amount,2); ?>',
text: '<?php echo $client_currency_code; ?><?php echo number_format($quote_amount,2); ?>',
style:'itemsFooterSubValue'
}
],