@php
use Carbon\Carbon;
$balance = $data['payment_account']->opening_balance;
@endphp
@foreach ($data['transactions'] as $item)
{{ Carbon::parse($item['created_at'])->format('m/d/Y h:i A') }} |
{{ __('accounting.' . $item['type']) }}
({{ __('accounting.' . getTransactionTypeDetails($item['transaction_type'])->transaction_type) }})
|
@if ($item['payment_method'] == '1')
{{ __('accounting.cash') }}
@elseif ($item['payment_method'] == '2')
{{ __('accounting.card') }}
@elseif ($item['payment_method'] == '3')
{{ __('accounting.cheque') }}
@elseif ($item['payment_method'] == '4')
{{ __('accounting.bank_transfer') }}
@elseif ($item['payment_method'] == '5')
{{ __('accounting.other') }}
@endif
|
{{ getUserDetails($item['created_by'])->first_name }} |
@if ($item['accounce_type'] === 'debit')
{{ $item['amount'] }}
@php
$balance += $item['amount'];
@endphp
@endif
|
@if ($item['accounce_type'] === 'credit')
{{ $item['amount'] }}
@php
$balance -= $item['amount'];
@endphp
@endif
|
{{ $balance }}
|
{{--
| --}}
@endforeach