@extends(!$download ? 'layouts.app' : 'layouts.app_with_out_nav',['dashBoardTitle'=>'PROFIT & LOSS']) @section('buttons')
 TB  BS  TR
@endsection @section('content')
@if (session('status')) @endif
{{strtoUpper($companyDetails->taxpayer)}} {{$companyDetails->tax_registration_number}} From Date: {{date('d-M-Y',strtotime(@$trialBalanceDetails->from))}} To Date: {{date('d-M-Y',strtotime(@$trialBalanceDetails->to))}}
@php $total_type = 0; $returnArray = array('total_income','total_expenses'); @endphp @foreach($trialBalanceBSPL as $key => $trial) @php $item_total = $total_type; @endphp @foreach($trial as $items) @endforeach @php $array_key = 'total_'.$key; @endphp @if($array_key == 'total_income') @php $returnArray['total_income'] = $item_total; @endphp @endif @if($array_key == 'total_expenses') @php $returnArray['total_expenses'] = $item_total; @endphp @endif @if(!$download) @endif @endforeach
{{trans('United Arab Emirates')}}
{{trans('Statement of Financial Position')}}
{{ucfirst($key)}}
{{$items->section_name}} @if($key == "income") @if($items->credit_value) @php $item_total += round(floatval($items->credit_value),2); @endphp
@csrf
{{number_format(abs(round(floatval($items->credit_value),2)),2)}}
@endif @endif @if($key == "expenses") @if($items->debit_value) @php $item_total += abs(round(floatval($items->debit_value),2)); @endphp
@csrf
{{number_format(abs(round(floatval($items->debit_value),2)),2)}}
@endif @endif
@csrf
{{trans('Total')}} {{ucfirst($key)}} {{number_format(abs(round($item_total,2)),2)}}
{{trans('Net Profit/Loss')}} {{number_format(round(abs($returnArray['total_income']) - abs($returnArray['total_expenses']),2),2)}}
@if(!$download) @endif @endsection