@extends('layouts.app') @section('content')

Income Statement

Reset

TRUSTWAY LANKA (Pvt) Ltd

Income Statement

Branch: {{ $branchName }} | For the period {{ \Carbon\Carbon::parse($dateFrom)->format('d/m/Y') }} to {{ \Carbon\Carbon::parse($dateTo)->format('d/m/Y') }}

@php $revenueTotal = 0; @endphp @foreach($revenueData as $account) @php $revenueTotal += $account['amount']; @endphp @if($account['amount'] != 0) @endif @foreach($account['sub_accounts'] as $sub) @php $revenueTotal += $sub['amount']; @endphp @if($sub['amount'] != 0) @endif @endforeach @endforeach
A/C Code Account Description Amount
Revenue
{{ $account['account_code'] }} {{ $account['account_name'] }} {{ number_format($account['amount'], 2) }}
{{ $sub['sub_account_code'] }} {{ $sub['sub_account_name'] }} {{ number_format($sub['amount'], 2) }}
Total Revenue {{ number_format($revenueTotal, 2) }}
@php $expensesTotal = 0; @endphp @foreach($expensesData as $account) @php $expensesTotal += $account['amount']; @endphp @if($account['amount'] != 0) @endif @foreach($account['sub_accounts'] as $sub) @php $expensesTotal += $sub['amount']; @endphp @if($sub['amount'] != 0) @endif @endforeach @endforeach
A/C Code Account Description Amount
Expenses
{{ $account['account_code'] }} {{ $account['account_name'] }} {{ number_format($account['amount'], 2) }}
{{ $sub['sub_account_code'] }} {{ $sub['sub_account_name'] }} {{ number_format($sub['amount'], 2) }}
Total Expenses {{ number_format($expensesTotal, 2) }}
{{ ($revenueTotal - $expensesTotal) >= 0 ? 'Net Income' : 'Net Loss' }} {{ number_format(abs($revenueTotal - $expensesTotal), 2) }}
@endsection