mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 09:14:08 +00:00
Fix customer portal not reflecting company default currency
The customer portal bootstrap now returns current_company_currency alongside the customer's own currency. The store falls back to the company currency when the customer has no currency assigned. Fixes #142
This commit is contained in:
@@ -31,10 +31,13 @@ class BootstrapController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$companyCurrencyId = CompanySetting::getSetting('currency', $customer->company_id);
|
||||
|
||||
return (new CustomerResource($customer))
|
||||
->additional(['meta' => [
|
||||
'menu' => $menu,
|
||||
'current_customer_currency' => Currency::find($customer->currency_id),
|
||||
'current_company_currency' => $companyCurrencyId ? Currency::find($companyCurrencyId) : null,
|
||||
'modules' => Module::where('enabled', true)->pluck('name'),
|
||||
'current_company_language' => CompanySetting::getSetting('language', $customer->company_id),
|
||||
]]);
|
||||
|
||||
Reference in New Issue
Block a user