Refactored Currency Display using PHP numfmt_format_currency() function as this is best practice and will put the right currency symbol in the right place based off locale and currency type

This commit is contained in:
johnnyq 2022-02-17 22:20:59 -05:00
parent 8d8b922ba5
commit a9346845ab
26 changed files with 148 additions and 174 deletions

View File

@ -104,7 +104,7 @@
<tr>
<td><a class="text-dark" href="#" data-toggle="modal" data-target="#editAccountModal<?php echo $account_id; ?>"><?php echo $account_name; ?></a></td>
<td><?php echo $account_currency_code; ?></td>
<td class="text-right"><?php echo get_currency_symbol($account_currency_code); ?> <?php echo number_format($balance,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $balance, $account_currency_code); ?></td>
<td>
<div class="dropdown dropleft text-center">
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">

View File

@ -225,8 +225,8 @@ $location_phone = formatPhoneNumber($location_phone);
<?php if($session_user_role == 1 OR $session_user_role > 3){ ?>
<div class="col-md-3 border-left">
<h4 class="text-secondary">Billing</h4>
<h6 class="ml-1 text-secondary">Paid <div class="text-dark float-right"> <?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($amount_paid,2); ?></div></h6>
<h6 class="ml-1 text-secondary">Balance <div class="<?php if($balance > 0){ echo "text-danger"; }else{ echo "text-dark"; } ?> float-right"> <?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($balance,2); ?></div></h6>
<h6 class="ml-1 text-secondary">Paid <div class="text-dark float-right"> <?php echo numfmt_format_currency($currency_format, $amount_paid, $client_currency_code); ?></div></h6>
<h6 class="ml-1 text-secondary">Balance <div class="<?php if($balance > 0){ echo "text-danger"; }else{ echo "text-dark"; } ?> float-right"> <?php echo numfmt_format_currency($currency_format, $balance, $client_currency_code); ?></div></h6>
<h6 class="ml-1 text-secondary">Net Terms <div class="text-dark float-right"><?php echo $client_net_terms; ?> <small class="text-secondary">Days</small></div></h6>
</div>
<?php } ?>

View File

@ -143,7 +143,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<tr>
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></td>
<td><?php echo $invoice_scope_display; ?></td>
<td class="text-right"><?php echo get_currency_symbol($invoice_currency_code); ?> <?php echo number_format($invoice_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
<td><?php echo $invoice_date; ?></td>
<td><div class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></div></td>
<td><?php echo $category_name; ?></td>

View File

@ -101,6 +101,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$invoice_number = $row['invoice_number'];
$invoice_status = $row['invoice_status'];
$invoice_amount = $row['invoice_amount'];
$invoice_currency_code = $row['invoice_currency_code'];
$invoice_date = $row['invoice_date'];
$payment_date = $row['payment_date'];
$payment_method = $row['payment_method'];
@ -111,6 +112,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$payment_reference_display = $payment_reference;
}
$payment_amount = $row['payment_amount'];
$payment_currency_code = $row['payment_currency_code'];
$account_name = $row['account_name'];
@ -119,8 +121,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><?php echo $payment_date; ?></td>
<td><?php echo $invoice_date; ?></td>
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($invoice_amount,2); ?></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code); ?></td>
<td><?php echo $payment_method; ?></td>
<td><?php echo $payment_reference_display; ?></td>
<td><?php echo $account_name; ?></td>

View File

@ -134,7 +134,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<tr>
<td><a href="quote.php?quote_id=<?php echo $quote_id; ?>"><?php echo "$quote_prefix$quote_number"; ?></a></td>
<td><?php echo $quote_scope_display; ?></td>
<td class="text-right"><?php echo get_currency_symbol($quote_currency_code); ?> <?php echo number_format($quote_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code); ?></td>
<td><?php echo $quote_date; ?></td>
<td><?php echo $category_name; ?></td>
<td>

View File

@ -84,10 +84,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover">
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
<tr>
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_number&o=<?php echo $disp; ?>">Number</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_number&o=<?php echo $disp; ?>">Number</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_scope&o=<?php echo $disp; ?>">Scope</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_frequency&o=<?php echo $disp; ?>">Frequency</a></th>
<th class="text-right"><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_amount&o=<?php echo $disp; ?>">Amount</a></th>
<th class="text-right"><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_amount&o=<?php echo $disp; ?>">Amount</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_last_sent&o=<?php echo $disp; ?>">Last Sent</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=recurring_next_date&o=<?php echo $disp; ?>">Next Date</a></th>
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sb; ?>&sb=category_name&o=<?php echo $disp; ?>">Category</a></th>
@ -129,7 +129,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><a href="recurring_invoice.php?recurring_id=<?php echo $recurring_id; ?>"><?php echo "$recurring_prefix$recurring_number"; ?></a></td>
<td><?php echo $recurring_scope; ?></td>
<td><?php echo ucwords($recurring_frequency); ?>ly</td>
<td class="text-right"><?php echo get_currency_symbol($recurring_currency_code); ?> <?php echo number_format($recurring_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $recurring_amount, $recurring_currency_code); ?></td>
<td><?php echo $recurring_last_sent; ?></td>
<td><?php echo $recurring_next_date; ?></td>
<td><?php echo $category_name; ?></td>

View File

@ -227,7 +227,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS amount_paid FROM payments, invoices WHERE payment_invoice_id = invoice_id AND invoice_client_id = $client_id");
$row = mysqli_fetch_array($sql_amount_paid);
$amount_paid = $row['amount_paid'];
$smount_paid = $row['amount_paid'];
$balance = $invoice_amounts - $amount_paid;
//set Text color on balance
@ -298,9 +298,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
?>
</td>
<td class="text-right">
Balance: <span class="<?php echo $balance_text_color; ?>"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($balance,2); ?></span>
Balance: <span class="<?php echo $balance_text_color; ?>"><?php echo numfmt_format_currency($currency_format, $balance, $session_company_currency); ?></span>
<br>
Paid: <?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($amount_paid,2); ?>
Paid: <?php echo numfmt_format_currency($currency_format, $amount_paid, $session_company_currency); ?>
</td>
<td>
<div class="dropdown dropleft text-center">

View File

@ -32,6 +32,9 @@ while($row = mysqli_fetch_array($sql_companies)){
$config_recurring_auto_send_invoice = $row['config_recurring_auto_send_invoice'];
$config_base_url = $row['config_base_url'];
//Set Currency Format
$currency_format = numfmt_create('en-US', NumberFormatter::CURRENCY);
//Tickets
$config_ticket_prefix = $row['config_ticket_prefix'];
$config_ticket_next_number = $row['config_ticket_next_number'];
@ -184,7 +187,6 @@ while($row = mysqli_fetch_array($sql_companies)){
$invoice_url_key = $row['invoice_url_key'];
$invoice_amount = $row['invoice_amount'];
$invoice_currency_code = $row['invoice_currency_code'];
$invoice_currency_symbol = htmlentities(get_currency_symbol($invoice_currency_code)); //Needs HTML entities due to encoding (Â was showing up)
$client_id = $row['client_id'];
$client_name = $row['client_name'];
$contact_name = $row['contact_name'];
@ -217,7 +219,7 @@ while($row = mysqli_fetch_array($sql_companies)){
$mail->Subject = "Overdue Invoice $invoice_prefix$invoice_number";
$mail->Body = "Hello $contact_name,<br><br>According to our records, we have not received payment for invoice $invoice_prefix$invoice_number. Please submit your payment as soon as possible. If you have any questions please contact us at $company_phone.
<br><br>
Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: $invoice_currency_symbol$invoice_amount<br>Due Date: $invoice_due<br><br><br>To view your invoice online click <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: " . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "<br>Due Date: $invoice_due<br><br><br>To view your invoice online click <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
$mail->send();
@ -246,7 +248,6 @@ while($row = mysqli_fetch_array($sql_companies)){
$recurring_next_date = $row['recurring_next_date'];
$recurring_amount = $row['recurring_amount'];
$recurring_currency_code = $row['recurring_currency_code'];
$recurring_currency_symbol = htmlentities(get_currency_symbol($recurring_currency_code)); //Needs HTML entities due to encoding (Â was showing up)
$recurring_note = mysqli_real_escape_string($mysqli,$row['recurring_note']); //Escape SQL
$category_id = $row['recurring_category_id'];
$client_id = $row['recurring_client_id'];
@ -340,7 +341,7 @@ while($row = mysqli_fetch_array($sql_companies)){
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = "Invoice $invoice_prefix$invoice_number";
$mail->Body = "Hello $contact_name,<br><br>Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: $recurring_currency_symbol$invoice_amount<br>Due Date: $invoice_due<br><br><br>To view your invoice online click <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$new_invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
$mail->Body = "Hello $contact_name,<br><br>Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: " . numfmt_format_currency($currency_format, $invoice_amount, $recurring_currency_code) . "<br>Due Date: $invoice_due<br><br><br>To view your invoice online click <a href='https://$config_base_url/guest_view_invoice.php?invoice_id=$new_invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
$mail->send();

View File

@ -172,6 +172,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$expense_id = $row['expense_id'];
$expense_date = $row['expense_date'];
$expense_amount = $row['expense_amount'];
$expense_currency_code = $row['expense_currency_code'];
$expense_description = $row['expense_description'];
$expense_receipt = $row['expense_receipt'];
$expense_reference = $row['expense_reference'];
@ -193,7 +194,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<tr>
<td><?php echo $receipt_attached; ?> <a class="text-dark" href="#" data-toggle="modal" data-target="#editExpenseModal<?php echo $expense_id; ?>"><?php echo $expense_date; ?></a></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_amount, $expense_currency_code); ?></td>
<td><?php echo $vendor_name; ?></td>
<td><?php echo truncate($expense_description,50); ?></td>
<td><?php echo $category_name; ?></td>

View File

@ -183,40 +183,6 @@ function truncate($text, $chars) {
return $text;
}
function get_currency_symbol($cc){
$cc = strtoupper($cc);
$currency = array(
"USD" => "$" , //U.S. Dollar
"AUD" => "$" , //Australian Dollar
"BRL" => "R$" , //Brazilian Real
"CAD" => "C$" , //Canadian Dollar
"CZK" => "" , //Czech Koruna
"DKK" => "kr" , //Danish Krone
"EUR" => "" , //Euro
"HKD" => "&#36" , //Hong Kong Dollar
"HUF" => "Ft" , //Hungarian Forint
"ILS" => "" , //Israeli New Sheqel
"INR" => "", //Indian Rupee
"JPY" => "¥" , //Japanese Yen
"MYR" => "RM" , //Malaysian Ringgit
"MXN" => "&#36" , //Mexican Peso
"NOK" => "kr" , //Norwegian Krone
"NZD" => "&#36" , //New Zealand Dollar
"PHP" => "" , //Philippine Peso
"PLN" => "" ,//Polish Zloty
"GBP" => "£" , //Pound Sterling
"SEK" => "kr" , //Swedish Krona
"CHF" => "Fr" , //Swiss Franc
"TWD" => "$" , //Taiwan New Dollar
"THB" => "฿" , //Thai Baht
"TRY" => "" //Turkish Lira
);
if(array_key_exists($cc, $currency)){
return $currency[$cc];
}
}
function get_otp($secret_seed) {
//TOTP seed (String representation)
$otp = '';

View File

@ -42,7 +42,6 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
$client_website = $row['client_website'];
$client_currency_code = $row['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;
@ -64,6 +63,9 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
$config_stripe_publishable = $row['config_stripe_publishable'];
$config_stripe_secret = $row['config_stripe_secret'];
//Set Currency Format
$currency_format = numfmt_create('en-US', NumberFormatter::CURRENCY);
$ip = strip_tags(mysqli_real_escape_string($mysqli,get_ip()));
$os = strip_tags(mysqli_real_escape_string($mysqli,get_os()));
$browser = strip_tags(mysqli_real_escape_string($mysqli,get_web_browser()));
@ -229,9 +231,9 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
<td><?php echo $item_name; ?></td>
<td><div style="white-space:pre-line"><?php echo $item_description; ?></div></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_price,2); ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_tax,2); ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_price, $invoice_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_tax, $invoice_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_total, $invoice_currency_code); ?></td>
</tr>
<?php
@ -260,23 +262,23 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($sub_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $invoice_currency_code); ?></td>
</tr>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($total_tax,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax, $invoice_currency_code); ?></td>
</tr>
<?php } ?>
<?php if($amount_paid > 0){ ?>
<tr class="border-bottom">
<td><div class="text-success">Paid to Date</div></td>
<td class="text-right text-success"><?php echo $client_currency_symbol; ?> <?php echo number_format($amount_paid,2); ?></td>
<td class="text-right text-success"><?php echo numfmt_format_currency($currency_format, $amount_paid, $invoice_currency_code); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Balance Due</strong></td>
<td class="text-right"><strong><?php echo $client_currency_symbol; ?> <?php echo number_format($balance,2); ?></strong></td>
<td class="text-right"><strong><?php echo numfmt_format_currency($currency_format, $balance, $invoice_currency_code); ?></strong></td>
</tr>
</tbody>
</table>
@ -467,15 +469,15 @@ var docDefinition = {
style:'itemQty'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_price,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_price, $invoice_currency_code); ?>',
style:'itemNumber'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_tax,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_tax, $invoice_currency_code); ?>',
style:'itemNumber'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($item_total,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $item_total, $invoice_currency_code); ?>',
style:'itemNumber'
}
],
@ -517,7 +519,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($sub_total,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $sub_total, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -528,7 +530,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($total_tax,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $total_tax, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -539,7 +541,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($invoice_amount,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -550,7 +552,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($amount_paid,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $amount_paid, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -561,7 +563,7 @@ var docDefinition = {
style:'itemsFooterTotalTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($balance,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $balance, $invoice_currency_code); ?>',
style:'itemsFooterTotalTitle'
}
@ -744,6 +746,7 @@ var docDefinition = {
$invoice_date = $row['invoice_date'];
$invoice_due = $row['invoice_due'];
$invoice_amount = $row['invoice_amount'];
$invoice_currency_code = $row['invoice_currency_code'];
$invoice_url_key = $row['invoice_url_key'];
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
$difference = time() - strtotime($invoice_due);
@ -755,7 +758,7 @@ var docDefinition = {
<th class="text-center"><a href="guest_view_invoice.php?invoice_id=<?php echo $invoice_id; ?>&url_key=<?php echo $invoice_url_key; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></th>
<td><?php echo $invoice_date; ?></td>
<td class="text-danger text-bold"><?php echo $invoice_due; ?> (<?php echo $days; ?> Days Late)</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo $invoice_amount; ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
</tr>
<?php
@ -803,6 +806,7 @@ var docDefinition = {
$invoice_date = $row['invoice_date'];
$invoice_due = $row['invoice_due'];
$invoice_amount = $row['invoice_amount'];
$invoice_currency_code = $row['invoice_currency_code'];
$invoice_url_key = $row['invoice_url_key'];
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
$difference = strtotime($invoice_due) - time();
@ -814,7 +818,7 @@ var docDefinition = {
<th class="text-center"><a href="guest_view_invoice.php?invoice_id=<?php echo $invoice_id; ?>&url_key=<?php echo $invoice_url_key; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></th>
<td><?php echo $invoice_date; ?></td>
<td><?php echo $invoice_due; ?> (Due in <?php echo $days; ?> Days)</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo $invoice_amount; ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
</tr>
<?php
@ -863,6 +867,7 @@ var docDefinition = {
$invoice_date = $row['invoice_date'];
$invoice_due = $row['invoice_due'];
$invoice_amount = $row['invoice_amount'];
$invoice_currency_code = $row['invoice_currency_code'];
$invoice_url_key = $row['invoice_url_key'];
$invoice_tally_total = $invoice_amount + $invoice_tally_total;
@ -872,7 +877,7 @@ var docDefinition = {
<th class="text-center"><a href="guest_view_invoice.php?invoice_id=<?php echo $invoice_id; ?>&url_key=<?php echo $invoice_url_key; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></th>
<td><?php echo $invoice_date; ?></td>
<td><?php echo $invoice_due; ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo $invoice_amount; ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
</tr>
<tr>
@ -887,6 +892,7 @@ var docDefinition = {
$payment_id = $row['payment_id'];
$payment_date = $row['payment_date'];
$payment_amount = $row['payment_amount'];
$payment_currency_code = $row['payment_currency_code']
$payment_method = $row['payment_method'];
$payment_reference = $row['payment_reference'];
if(strtotime($payment_date) > strtotime($invoice_due)){
@ -904,7 +910,7 @@ var docDefinition = {
?>
<tr>
<td colspan="4"><?php echo $payment_date; ?> - <?php echo $client_currency_symbol; ?> <?php echo $payment_amount; ?> - <?php echo $payment_method; ?> - <?php echo $payment_reference; ?> - <?php echo $days; ?> <?php echo $payment_note; ?></td>
<td colspan="4"><?php echo $payment_date; ?> - <?php echo numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code); ?> - <?php echo $payment_method; ?> - <?php echo $payment_reference; ?> - <?php echo $days; ?> <?php echo $payment_note; ?></td>
</tr>
<?php

View File

@ -27,6 +27,7 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
$quote_status = $row['quote_status'];
$quote_date = $row['quote_date'];
$quote_amount = $row['quote_amount'];
$quote_currency_code = $row['quote_currency_code'];
$quote_note = $row['quote_note'];
$category_id = $row['category_id'];
$client_id = $row['client_id'];
@ -41,7 +42,6 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
$client_website = $row['client_website'];
$client_currency_code = $row['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;
@ -60,6 +60,9 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
}
$config_quote_footer = $row['config_quote_footer'];
//Set Currency Format
$currency_format = numfmt_create('en-US', NumberFormatter::CURRENCY);
$ip = get_ip();
$os = get_os();
$browser = get_web_browser();

View File

@ -44,7 +44,6 @@ if(isset($_GET['invoice_id'])){
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
$client_website = $row['client_website'];
$client_currency_code = $row['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;
@ -280,9 +279,9 @@ if(isset($_GET['invoice_id'])){
<td><?php echo $item_name; ?></td>
<td><div style="white-space:pre-line"><?php echo $item_description; ?></div></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_price,2); ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_tax,2); ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?><?php echo number_format($item_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_price, $invoice_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_tax, $invoice_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_total, $invoice_currency_code); ?></td>
</tr>
<?php
@ -354,23 +353,23 @@ if(isset($_GET['invoice_id'])){
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($sub_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $invoice_currency_code); ?></td>
</tr>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($total_tax,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax, $invoice_currency_code); ?></td>
</tr>
<?php } ?>
<?php if($amount_paid > 0){ ?>
<tr class="border-bottom">
<td><div class="text-success">Paid to Date</div></td>
<td class="text-right text-success"><?php echo $client_currency_symbol; ?> <?php echo number_format($amount_paid,2); ?></td>
<td class="text-right text-success"><?php echo numfmt_format_currency($currency_format, $amount_paid, $invoice_currency_code); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Balance Due</strong></td>
<td class="text-right"><strong><?php echo $client_currency_symbol; ?> <?php echo number_format($balance,2); ?></strong></td>
<td class="text-right"><strong><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></strong></td>
</tr>
</tbody>
</table>
@ -461,13 +460,14 @@ if(isset($_GET['invoice_id'])){
$payment_id = $row['payment_id'];
$payment_date = $row['payment_date'];
$payment_amount = $row['payment_amount'];
$payment_currency_code = $row['payment_currency_code'];
$payment_reference = $row['payment_reference'];
$account_name = $row['account_name'];
?>
<tr>
<td><?php echo $payment_date; ?></td>
<td class=" text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($payment_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $payment_currency_code); ?></td>
<td><?php echo $payment_reference; ?></td>
<td><?php echo $account_name; ?></td>
<td class="text-center"><a class="btn btn-danger btn-sm" href="post.php?delete_payment=<?php echo $payment_id; ?>"><i class="fa fa-trash"></i></a></td>
@ -518,7 +518,7 @@ include("footer.php");
});
</script>
<script src='plugins/pdfmake/pdfmake.js'></script>
<script src='plugins/pdfmake/pdfmake.min.js'></script>
<script src='plugins/pdfmake/vfs_fonts.js'></script>
<script>
@ -696,15 +696,15 @@ var docDefinition = {
style:'itemQty'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_price,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_price, $invoice_currency_code); ?>',
style:'itemNumber'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_tax,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_tax, $invoice_currency_code); ?>',
style:'itemNumber'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($item_total,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $item_total, $invoice_currency_code); ?>',
style:'itemNumber'
}
],
@ -746,7 +746,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($sub_total,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $sub_total, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -757,7 +757,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($total_tax,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $total_tax, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -768,7 +768,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($invoice_amount,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -779,7 +779,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($amount_paid,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $amount_paid, $invoice_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -790,7 +790,7 @@ var docDefinition = {
style:'itemsFooterTotalTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($balance,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $balance, $invoice_currency_code); ?>',
style:'itemsFooterTotalTitle'
}

View File

@ -160,7 +160,7 @@
<!-- small box -->
<a href="?<?php echo $url_query_strings_sb; ?>&status=Draft" class="small-box bg-secondary">
<div class="inner">
<h3><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_draft,2); ?></h3>
<h3><?php echo numfmt_format_currency($currency_format, $total_draft, $session_company_currency); ?></h3>
<p><?php echo $draft_count; ?> Draft</p>
</div>
<div class="icon">
@ -174,7 +174,7 @@
<!-- small box -->
<a href="?<?php echo $url_query_strings_sb; ?>&status=Sent" class="small-box bg-warning">
<div class="inner text-white">
<h3><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_sent,2); ?></h3>
<h3><?php echo numfmt_format_currency($currency_format, $total_sent, $session_company_currency); ?></h3>
<p><?php echo $sent_count; ?> Sent</p>
</div>
<div class="icon">
@ -188,7 +188,7 @@
<!-- small box -->
<a href="?<?php echo $url_query_strings_sb; ?>&status=Viewed" class="small-box bg-info">
<div class="inner">
<h3><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_viewed,2); ?></h3>
<h3><?php echo numfmt_format_currency($currency_format, $total_viewed, $session_company_currency); ?></h3>
<p><?php echo $viewed_count; ?> Viewed</p>
</div>
<div class="icon">
@ -202,7 +202,7 @@
<!-- small box -->
<a href="?<?php echo $url_query_strings_sb; ?>&status=Partial" class="small-box bg-primary">
<div class="inner">
<h3><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_partial,2); ?></h3>
<h3><?php echo numfmt_format_currency($currency_format, $total_partial, $session_company_currency); ?></h3>
<p><?php echo $partial_count; ?> Partial</p>
</div>
<div class="icon">
@ -342,7 +342,7 @@
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></td>
<td><?php echo $invoice_scope_display; ?></td>
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=invoices"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo get_currency_symbol($invoice_currency_code); ?> <?php echo number_format($invoice_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code); ?></td>
<td><?php echo $invoice_date; ?></td>
<td class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></td>
<td><?php echo $category_name; ?></td>

View File

@ -170,6 +170,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$payment_date = $row['payment_date'];
$payment_method = $row['payment_method'];
$payment_amount = $row['payment_amount'];
$payment_currency_code = $row['payment_currency_code'];
$payment_reference = $row['payment_reference'];
if(empty($payment_reference)){
$payment_reference_display = "-";
@ -187,7 +188,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><?php echo $invoice_date; ?></td>
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>"><?php echo "$invoice_prefix$invoice_number"; ?></a></td>
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=payments"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount, $payment_currency_code); ?></td>
<td><?php echo $payment_method; ?></td>
<td><?php echo $payment_reference_display; ?></td>
<td><?php echo $account_name; ?></td>

View File

@ -3047,7 +3047,6 @@ if(isset($_GET['email_quote'])){
$quote_note = $row['quote_note'];
$quote_url_key = $row['quote_url_key'];
$quote_currency_code = $row['quote_currency_code'];
$quote_currency_symbol = htmlentities(get_currency_symbol($quote_currency_code)); //Needs HTML entities due to encoding (Â was showing up)
$client_id = $row['client_id'];
$client_name = $row['client_name'];
$contact_name = $row['contact_name'];
@ -3096,7 +3095,7 @@ if(isset($_GET['email_quote'])){
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = "Quote";
$mail->Body = "Hello $contact_name,<br><br>Thank you for your inquiry, we are pleased to provide you with the following estimate.<br><br><br>Total Cost: $quote_currency_symbol$quote_amount<br><br><br>View and accept your estimate online <a href='https://$base_url/guest_view_quote.php?quote_id=$quote_id&url_key=$quote_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
$mail->Body = "Hello $contact_name,<br><br>Thank you for your inquiry, we are pleased to provide you with the following estimate.<br><br><br>Total Cost: " . numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code) . "<br><br><br>View and accept your estimate online <a href='https://$base_url/guest_view_quote.php?quote_id=$quote_id&url_key=$quote_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
$mail->send();
echo 'Message has been sent';
@ -3499,7 +3498,6 @@ if(isset($_POST['add_payment'])){
$amount = floatval($_POST['amount']);
$account = intval($_POST['account']);
$currency_code = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['currency_code'])));
$currency_symbol = htmlentities(get_currency_symbol($currency_code)); //Needs HTML entities due to encoding (Â was showing up)
$payment_method = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['payment_method'])));
$reference = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['reference'])));
$email_receipt = intval($_POST['email_receipt']);
@ -3531,6 +3529,7 @@ if(isset($_POST['add_payment'])){
$invoice_prefix = $row['invoice_prefix'];
$invoice_number = $row['invoice_number'];
$invoice_url_key = $row['invoice_url_key'];
$invoice_currency_code = $row['invoice_currency_code'];
$client_name = $row['client_name'];
$contact_name = $row['contact_name'];
$contact_email = $row['contact_email'];
@ -3556,10 +3555,6 @@ if(isset($_POST['add_payment'])){
//Calculate the Invoice balance
$invoice_balance = $invoice_amount - $total_payments_amount;
//Format Amount
$formatted_amount = number_format($amount,2);
$formatted_invoice_balance = number_format($invoice_balance,2);
//Determine if invoice has been paid then set the status accordingly
if($invoice_balance == 0){
@ -3587,7 +3582,7 @@ if(isset($_POST['add_payment'])){
// Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = "Payment Recieved - Invoice $invoice_prefix$invoice_number";
$mail->Body = "Hello $contact_name,<br><br>We have recieved your payment in the amount of $currency_symbol$formatted_amount for invoice <a href='https://$base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>$invoice_prefix$invoice_number</a>. Please keep this email as a receipt for your records.<br><br>Amount: $currency_symbol$formatted_amount<br>Balance: $currency_symbol$formatted_invoice_balance<br><br>Thank you for your business!<br><br><br>~<br>$company_name<br>$company_phone";
$mail->Body = "Hello $contact_name,<br><br>We have recieved your payment in the amount of " . numfmt_format_currency($currency_format, $amount, $payment_currency_code) . " for invoice <a href='https://$base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>$invoice_prefix$invoice_number</a>. Please keep this email as a receipt for your records.<br><br>Amount: " . numfmt_format_currency($currency_format, $amount, $payment_currency_code) . "<br>Balance: " . numfmt_format_currency($currency_format, $invoice_balance, $invoice_currency_code) . "<br><br>Thank you for your business!<br><br><br>~<br>$company_name<br>$company_phone";
$mail->send();
echo 'Message has been sent';
@ -3623,7 +3618,7 @@ if(isset($_POST['add_payment'])){
// Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = "Partial Payment Recieved - Invoice $invoice_prefix$invoice_number";
$mail->Body = "Hello $contact_name,<br><br>We have recieved partial payment in the amount of $currency_symbol$formatted_amount and it has been applied to invoice <a href='https://$base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>$invoice_prefix$invoice_number</a>. Please keep this email as a receipt for your records.<br><br>Amount: $currency_symbol$formatted_amount<br>Balance: $currency_symbol$formatted_invoice_balance<br><br>Thank you for your business!<br><br><br>~<br>$company_name<br>$company_phone";
$mail->Body = "Hello $contact_name,<br><br>We have recieved partial payment in the amount of " . numfmt_format_currency($currency_format, $amount, $payment_currency_code) . " and it has been applied to invoice <a href='https://$base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>$invoice_prefix$invoice_number</a>. Please keep this email as a receipt for your records.<br><br>Amount: " . numfmt_format_currency($currency_format, $amount, $payment_currency_code) . "<br>Balance: " . numfmt_format_currency($currency_format, $invoice_balance, $invoice_currency_code) . "<br><br>Thank you for your business!<br><br><br>~<br>$company_name<br>$company_phone";
$mail->send();
echo 'Message has been sent';
@ -3717,7 +3712,6 @@ if(isset($_GET['email_invoice'])){
$invoice_amount = $row['invoice_amount'];
$invoice_url_key = $row['invoice_url_key'];
$invoice_currency_code = $row['invoice_currency_code'];
$invoice_currency_symbol = htmlentities(get_currency_symbol($invoice_currency_code)); //Needs HTML entities due to encoding (Â was showing up)
$client_id = $row['client_id'];
$client_name = $row['client_name'];
$client_name = $row['client_name'];
@ -3779,7 +3773,7 @@ if(isset($_GET['email_invoice'])){
}else{
$mail->Subject = "Invoice $invoice_prefix$invoice_number";
$mail->Body = "Hello $contact_name,<br><br>Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: $invoice_currency_symbol$invoice_amount<br>Balance Due: $invoice_currency_symbol$balance<br>Due Date: $invoice_due<br><br><br>To view your invoice online click <a href='https://$base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
$mail->Body = "Hello $contact_name,<br><br>Please view the details of the invoice below.<br><br>Invoice: $invoice_prefix$invoice_number<br>Issue Date: $invoice_date<br>Total: " . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "<br>Balance Due: " . numfmt_format_currency($currency_format, $balance, $invoice_currency_code) . "<br>Due Date: $invoice_due<br><br><br>To view your invoice online click <a href='https://$base_url/guest_view_invoice.php?invoice_id=$invoice_id&url_key=$invoice_url_key'>here</a><br><br><br>~<br>$company_name<br>$company_phone";
//$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
}

View File

@ -94,6 +94,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
$product_description_display = "<div style='white-space:pre-line'>$product_description</div>";
}
$product_price = $row['product_price'];
$product_currency_code = $row['product_currency_code'];
$product_created_at = $row['product_created_at'];
$category_id = $row['category_id'];
$category_name = $row['category_name'];
@ -104,7 +105,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><a class="text-dark" href="#" data-toggle="modal" data-target="#editProductModal<?php echo $product_id; ?>"><?php echo $product_name; ?></a></td>
<td><?php echo $category_name; ?></td>
<td><?php echo $product_description_display; ?></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($product_price,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $product_price, $product_currency_code); ?></td>
<td>
<div class="dropdown dropleft text-center">
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">

View File

@ -39,7 +39,6 @@ if(isset($_GET['quote_id'])){
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
$client_website = $row['client_website'];
$client_currency_code = $row['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;
@ -244,9 +243,9 @@ if(isset($_GET['quote_id'])){
<td><?php echo $item_name; ?></td>
<td><div style="white-space:pre-line"><?php echo $item_description; ?></div></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_price,2); ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($item_tax,2); ?></td>
<td class="text-right"><?php echo $client_currency_symbol; ?><?php echo number_format($item_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_price, $quote_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_tax, $quote_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_total, $quote_currency_code); ?></td>
</tr>
<?php
@ -319,17 +318,17 @@ if(isset($_GET['quote_id'])){
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($sub_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?></td>
</tr>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right"><?php echo $client_currency_symbol; ?> <?php echo number_format($total_tax,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax, $quote_currency_code); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Total</strong></td>
<td class="text-right"><strong><?php echo $client_currency_symbol; ?> <?php echo number_format($quote_amount,2); ?></strong></td>
<td class="text-right"><strong><?php echo numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code); ?></strong></td>
</tr>
</tbody>
</table>
@ -424,7 +423,7 @@ include("footer.php");
});
</script>
<script src='plugins/pdfmake/pdfmake.js'></script>
<script src='plugins/pdfmake/pdfmake.min.js'></script>
<script src='plugins/pdfmake/vfs_fonts.js'></script>
<script>
@ -591,15 +590,15 @@ var docDefinition = {
style:'itemQty'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_price,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_price, $quote_currency_code); ?>',
style:'itemNumber'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_tax,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_tax, $quote_currency_code); ?>',
style:'itemNumber'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($item_total,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $item_total, $quote_currency_code); ?>',
style:'itemNumber'
}
],
@ -641,7 +640,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text:'<?php echo $client_currency_symbol; ?> <?php echo number_format($sub_total,2); ?>',
text:'<?php echo numfmt_format_currency($currency_format, $sub_total, $quote_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -652,7 +651,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($total_tax,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $total_tax, $quote_currency_code); ?>',
style:'itemsFooterSubValue'
}
],
@ -663,7 +662,7 @@ var docDefinition = {
style:'itemsFooterSubTitle'
},
{
text: '<?php echo $client_currency_symbol; ?> <?php echo number_format($quote_amount,2); ?>',
text: '<?php echo numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code); ?>',
style:'itemsFooterSubValue'
}
],

View File

@ -209,7 +209,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><a href="quote.php?quote_id=<?php echo $quote_id; ?>"><?php echo "$quote_prefix$quote_number"; ?></a></td>
<td><?php echo $quote_scope_display; ?></td>
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=quotes"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo get_currency_symbol($quote_currency_code); ?> <?php echo number_format($quote_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $quote_amount, $quote_currency_code); ?></td>
<td><?php echo $quote_date; ?></td>
<td><?php echo $category_name; ?></td>
<td>

View File

@ -213,9 +213,9 @@ if(isset($_GET['recurring_id'])){
<td><?php echo $item_name; ?></td>
<td><div style="white-space:pre-line"><?php echo $item_description; ?></div></td>
<td class="text-center"><?php echo $item_quantity; ?></td>
<td class="text-right"><?php echo get_currency_symbol($client_currency_code); ?> <?php echo number_format($item_price,2); ?></td>
<td class="text-right"><?php echo get_currency_symbol($client_currency_code); ?> <?php echo number_format($item_tax,2); ?></td>
<td class="text-right"><?php echo get_currency_symbol($client_currency_code); ?> <?php echo number_format($item_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_price, $recurring_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_tax, $recurring_currency_code); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $item_total, $recurring_currency_code); ?></td>
</tr>
<?php
@ -287,17 +287,17 @@ if(isset($_GET['recurring_id'])){
<tbody>
<tr class="border-bottom">
<td>Subtotal</td>
<td class="text-right"><?php echo get_currency_symbol($client_currency_code); ?> <?php echo number_format($sub_total,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $sub_total, $recurring_currency_code); ?></td>
</tr>
<?php if($total_tax > 0){ ?>
<tr class="border-bottom">
<td>Tax</td>
<td class="text-right"><?php echo get_currency_symbol($client_currency_code); ?> <?php echo number_format($total_tax,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax, $recurring_currency_code); ?></td>
</tr>
<?php } ?>
<tr class="border-bottom">
<td><strong>Amount</strong></td>
<td class="text-right"><strong><?php echo get_currency_symbol($client_currency_code); ?> <?php echo number_format($recurring_amount,2); ?></strong></td>
<td class="text-right"><strong><?php echo numfmt_format_currency($currency_format, $recurring_amount, $recurring_currency_code); ?></strong></td>
</tr>
</tbody>
</table>

View File

@ -207,7 +207,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><?php echo $recurring_scope; ?></td>
<td><?php echo ucwords($recurring_frequency); ?>ly</td>
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=recurring"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo get_currency_symbol($recurring_currency_code); ?> <?php echo number_format($recurring_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $recurring_amount, $recurring_currency_code); ?></td>
<td><?php echo $recurring_last_sent; ?></td>
<td><?php echo $category_name; ?></td>
<td>

View File

@ -91,7 +91,7 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
?>
<td class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_amount_for_month,2); ?></a></td>
<td class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_month, $session_company_currency); ?></a></td>
<?php
@ -99,7 +99,7 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
?>
<th class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_expense_for_all_months,2); ?></a></th>
<th class="text-right"><a class="text-dark" href="expenses.php?q=<?php echo $category_name; ?>&dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo numfmt_format_currency($currency_format, $total_expense_for_all_months, $session_company_currency); ?></a></th>
</tr>
<?php
@ -121,14 +121,14 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
?>
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_month,2); ?></a></th>
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo "$year-$month"; ?>-01&dtt=<?php echo "$year-$month"; ?>-31"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_month, $session_company_currency); ?></a></th>
<?php
}
?>
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_expense_for_all_months,2); ?></th>
<th class="text-right"><a class="text-dark" href="expenses.php?dtf=<?php echo $year; ?>-01-01&dtt=<?php echo $year; ?>-12-31"><?php echo numfmt_format_currency($currency_format, $total_expense_for_all_months, $session_company_currency); ?></th>
</tr>
</tbody>
</table>

View File

@ -101,7 +101,7 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount_for_month,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount_for_month, $session_company_currency); ?></td>
<?php
@ -109,7 +109,7 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
?>
<td class="text-right text-bold"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_payment_for_all_months,2); ?></td>
<td class="text-right text-bold"><?php echo numfmt_format_currency($currency_format, $total_payment_for_all_months, $session_company_currency); ?></td>
</tr>
<?php
@ -138,14 +138,14 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_total_amount_for_month,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_total_amount_for_month, $session_company_currency); ?></th>
<?php
}
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_payment_for_all_months,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $total_payment_for_all_months, $session_company_currency); ?></th>
</tr>
</tbody>
</table>

View File

@ -87,7 +87,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount_for_quarter_one,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount_for_quarter_one, $session_company_currency); ?></td>
<?php
@ -109,7 +109,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount_for_quarter_two,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount_for_quarter_two, $session_company_currency); ?></td>
<?php
@ -130,7 +130,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount_for_quarter_three,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount_for_quarter_three, $session_company_currency); ?></td>
<?php
@ -153,9 +153,9 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_amount_for_quarter_four,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_amount_for_quarter_four, $session_company_currency); ?></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_payments_for_all_four_quarters,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_payments_for_all_four_quarters, $session_company_currency); ?></td>
</tr>
<?php
@ -188,7 +188,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_total_amount_for_quarter_one,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_total_amount_for_quarter_one, $session_company_currency); ?></th>
<?php
@ -210,7 +210,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_total_amount_for_quarter_two,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_total_amount_for_quarter_two, $session_company_currency); ?></th>
<?php
@ -232,7 +232,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_total_amount_for_quarter_three,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_total_amount_for_quarter_three, $session_company_currency); ?></th>
<?php
@ -256,9 +256,9 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($payment_total_amount_for_quarter_four,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $payment_total_amount_for_quarter_four, $session_company_currency); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_payments_for_all_four_quarters,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $total_payments_for_all_four_quarters, $session_company_currency); ?></th>
</tr>
<tr>
@ -286,7 +286,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_amount_for_quarter_one,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_quarter_one, $session_company_currency); ?></td>
<?php
@ -300,7 +300,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_amount_for_quarter_two,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_quarter_two, $session_company_currency); ?></td>
<?php
@ -314,7 +314,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_amount_for_quarter_three,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_quarter_three, $session_company_currency); ?></td>
<?php
@ -330,9 +330,9 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_amount_for_quarter_four,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_quarter_four, $session_company_currency); ?></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_expenses_for_all_four_quarters,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_expenses_for_all_four_quarters, $session_company_currency); ?></td>
</tr>
<?php
@ -357,7 +357,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_one,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_one, $session_company_currency); ?></th>
<?php
@ -371,7 +371,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_two,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_amount_for_quarter_two, $session_company_currency); ?></th>
<?php
@ -385,7 +385,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_three,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_three, $session_company_currency); ?></th>
<?php
@ -401,7 +401,7 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_four,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_four, $session_company_currency); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_expenses_for_all_four_quarters,2); ?></th>
</tr>
@ -415,11 +415,11 @@ $sql_categories_expense = mysqli_query($mysqli,"SELECT * FROM categories WHERE c
?>
<th>Net Profit</th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($net_profit_quarter_one,2); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($net_profit_quarter_two,2); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($net_profit_quarter_three,2); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($net_profit_quarter_four,2); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($net_profit_year,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $net_profit_quarter_one, $session_company_currency); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $net_profit_quarter_two, $session_company_currency); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $net_profit_quarter_three, $session_company_currency); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $net_profit_quarter_four, $session_company_currency); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $net_profit_year, $session_company_currency); ?></th>
</tr>
</tbody>
</table>

View File

@ -81,7 +81,7 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($tax_collected_quarter_one,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $tax_collected_quarter_one, $session_company_currency); ?></td>
<?php
@ -104,7 +104,7 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($tax_collected_quarter_two,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $tax_collected_quarter_two, $session_company_currency); ?></td>
<?php
@ -127,7 +127,7 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($tax_collected_quarter_three,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $tax_collected_quarter_three, $session_company_currency); ?></td>
<?php
@ -152,9 +152,9 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($tax_collected_quarter_four,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $tax_collected_quarter_four, $session_company_currency); ?></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_tax_collected_four_quarters,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $total_tax_collected_four_quarters, $session_company_currency); ?></td>
</tr>
<?php
@ -177,7 +177,7 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_one,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_one, $session_company_currency); ?></th>
<?php
@ -191,7 +191,7 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_two,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_two, $session_company_currency); ?></th>
<?php
@ -205,7 +205,7 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_three,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_three, $session_company_currency); ?></th>
<?php
@ -221,9 +221,9 @@ $sql_tax = mysqli_query($mysqli,"SELECT * FROM taxes WHERE company_id = $session
?>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($expense_total_amount_for_quarter_four,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $expense_total_amount_for_quarter_four, $session_company_currency); ?></th>
<th class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($total_expenses_for_all_four_quarters,2); ?></th>
<th class="text-right"><?php echo numfmt_format_currency($currency_format, $total_expenses_for_all_four_quarters, $session_company_currency); ?></th>
</tr>
</tbody>
</table>

View File

@ -186,7 +186,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
<td><a class="text-dark" href="#" data-toggle="modal" data-target="#editTransferModal<?php echo $transfer_id; ?>"><?php echo $transfer_date; ?></a></td>
<td><?php echo $account_name_from; ?></td>
<td><?php echo $account_name_to; ?></td>
<td class="text-right"><?php echo get_currency_symbol($session_company_currency); ?> <?php echo number_format($transfer_amount,2); ?></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $transfer_amount, $session_company_currency); ?></td>
<td>
<div class="dropdown dropleft text-center">
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">