@component('components.widget', ['class' => 'box-primary',
'title' => __('accounting::lang.chart_of_account_overview')])
@lang('accounting::lang.account_type') |
@lang('accounting::lang.current_balance') |
@foreach($account_types as $k => $v)
@php
$bal = 0;
foreach($coa_overview as $overview) {
if($overview->account_primary_type==$k && !empty($overview->balance)) {
$bal = (float)$overview->balance;
}
}
@endphp
{{$v['label']}}
{{-- Suffix CR/DR as per value --}}
@if($bal < 0)
{{ (in_array($v['label'], ['Asset', 'Expenses']) ? ' (CR)' : ' (DR)') }}
@endif
|
@format_currency(abs($bal))
|
@endforeach
{!! $coa_overview_chart->container() !!}
@endcomponent
@foreach($all_charts as $key => $chart)
@component('components.widget', ['class' => 'box-primary',
'title' => __('accounting::lang.' . $key)])
{!! $chart->container() !!}
@endcomponent
@endforeach
@stop
@section('javascript')
{!! $coa_overview_chart->script() !!}
@foreach($all_charts as $key => $chart)
{!! $chart->script() !!}
@endforeach
@stop