mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-16 17:46:59 +02:00
Fixed invoices page to display right currency
This commit is contained in:
parent
e22ed9782e
commit
dd5aef123d
2 changed files with 11 additions and 9 deletions
|
@ -53,6 +53,9 @@ class FinancialsController extends Controller
|
|||
$billing_company = $db->selectValue('SELECT companyNumber FROM registrar WHERE id = ?',
|
||||
[ $invoice_details['registrar_id'] ]
|
||||
);
|
||||
$currency = $db->selectValue('SELECT currency FROM registrar WHERE id = ?',
|
||||
[ $invoice_details['registrar_id'] ]
|
||||
);
|
||||
$billing_vat = $db->selectValue('SELECT vatNumber FROM registrar WHERE id = ?',
|
||||
[ $invoice_details['registrar_id'] ]
|
||||
);
|
||||
|
@ -87,7 +90,6 @@ class FinancialsController extends Controller
|
|||
$billing_country = $billing_country['name'];
|
||||
|
||||
$locale = $_SESSION['_lang'] ?? 'en_US'; // Fallback to 'en_US' if no locale is set
|
||||
$currency = $_SESSION['_currency'] ?? 'USD'; // Fallback to 'USD' if no currency is set
|
||||
|
||||
// Initialize the number formatter for the locale
|
||||
$numberFormatter = new \NumberFormatter($locale, \NumberFormatter::DECIMAL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue