Format money through billingMoney in the 51 places that called numfmt_format_currency directly, on client and vendor pages, payment and credit messages, the portal home, the guest card page and the report, dashboard and search helpers

This commit is contained in:
johnnyq
2026-11-20 23:58:05 -05:00
parent 31c34fd92a
commit d0caeee324
23 changed files with 52 additions and 51 deletions

View File

@@ -86,7 +86,7 @@ $pill_url = function ($view) {
return '?' . http_build_query(array_filter(['q' => $_GET['q'] ?? '', 'show' => $view]));
};
$money = function ($amount) use ($currency_format, $session_company_currency) {
return escapeHtml(numfmt_format_currency($currency_format, $amount, $session_company_currency));
return escapeHtml(billingMoney($amount, $session_company_currency));
};
?>

View File

@@ -12,7 +12,7 @@ $agent = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT user_id, user_name, us
$list = $agent && laborCostReady() ? array_reverse(laborCostRates()[$user_id] ?? []) : [];
$default = laborCostDefault();
$money = function ($amount) use ($currency_format, $session_company_currency) {
return escapeHtml(numfmt_format_currency($currency_format, $amount, $session_company_currency));
return escapeHtml(billingMoney($amount, $session_company_currency));
};
ob_start();

View File

@@ -42,8 +42,8 @@ $summaries = [
'localization' => escapeHtml(implode(' · ', array_filter([$localization['locales'][$company['company_locale'] ?? ''] ?? '', $company['company_currency'] ?? '', $config_timezone]))),
'theme' => '<span class="itflow-settings-dot theme-' . escapeHtml($config_theme) . '"></span>' . escapeHtml($themes[$config_theme] ?? $config_theme) . (file_exists(dirname(__DIR__) . '/uploads/favicon.ico') ? ' · its own tab icon' : ''),
'default' => 'Opens on ' . escapeHtml($start_pages[$config_start_page] ?? $config_start_page) . ' · ' . ($config_default_net_terms ? 'net ' . intval($config_default_net_terms) : 'due on receipt')
. ($config_default_hourly_rate > 0 ? ' · ' . escapeHtml(numfmt_format_currency($currency_format, $config_default_hourly_rate, $session_company_currency)) . ' an hour' : '')
. (billingDefaults()['after_hours'] > 0 ? ', ' . escapeHtml(numfmt_format_currency($currency_format, billingDefaults()['after_hours'], $session_company_currency)) . ' after hours' : ''),
. ($config_default_hourly_rate > 0 ? ' · ' . escapeHtml(billingMoney($config_default_hourly_rate, $session_company_currency)) . ' an hour' : '')
. (billingDefaults()['after_hours'] > 0 ? ', ' . escapeHtml(billingMoney(billingDefaults()['after_hours'], $session_company_currency)) . ' after hours' : ''),
'ticket' => 'Next ' . escapeHtml($config_ticket_prefix . $config_ticket_next_number) . ' · email to ticket ' . $on_off($config_ticket_email_parse),
'project' => 'Next ' . escapeHtml($config_project_prefix . $config_project_next_number),
'quote' => 'Next ' . escapeHtml($config_quote_prefix . $config_quote_next_number),