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
+4 -4
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>