crater
crater copied to clipboard
Swap currency position
I think this worked nicely in SQL: swap_currency_symbol: 'true', but in SQLite I can't swap currency position from left to right, with a space, like so: 2.500,00 €
It works in dashboard, but not on generated PDF's. I've tried: swap_currency_symbol: 'true' swap_currency_symbol: 'false' swap_currency_symbol: '1' swap_currency_symbol: '0' no luck.. it's always the same
Can someone please help me configure this for SQLite db, image is attached.
Thanks
Any news on this one?
@gokkstudio I'll try and submit a PR soon but for now you can fix this by editing app/Models/Currency.php
and adding a Laravel $casts
definition to force casting swap_currency_symbol
to a boolean.
class Currency extends Model
{
use HasFactory;
protected $guarded = [
'id'
];
protected $casts = [
'swap_currency_symbol' => 'boolean'
];
}
The issue is (at least with SQLite) swap_currency_symbol: false is passed as "0"
to JS and evaluates as true!