@php
$balanceValue = $client->balance->balance;
$balance = number_format_custom($balanceValue, 4, $client->currency->format);
$lastDot = strrpos($balance, '.');
$lastComma = strrpos($balance, ',');
if ($lastDot === false && $lastComma === false) {
$int = $balance;
$dec = '';
$separator = '';
} else {
if ($lastDot > $lastComma) {
$separator = '.';
$pos = $lastDot;
} else {
$separator = ',';
$pos = $lastComma;
}
$int = substr($balance, 0, $pos);
$dec = substr($balance, $pos + 1);
}
$balanceColor = $balanceValue >= 0 ? 'text-success' : 'text-danger';
@endphp
{{ $client->currency->prefix }}
{!! $int !!}{{ $separator }}{!! $dec !!}
{{ $client->currency->suffix }}
{{ __('main.Credit') }}
{{ $client->currency->prefix }}
{{ number_format_custom($client->credit_limit, 4, $client->currency->format) }}
{{ $client->currency->suffix }}