@if (isset($oneSupplier))
| Name |
: |
{{ $oneSupplier->name }} |
| Phone |
: |
{{ $oneSupplier->phone }} |
| Address |
: |
{{ ($oneSupplier->address == NULL)?'NULL':$oneSupplier->address; }} |
Supplier Ledger
@php
$balance = 0;
@endphp
@forelse($transaction as $key => $data)
@php
$balance = $balance + $data->debit - $data->credit;
@endphp
| {{ date('Y-m-d', strtotime($data->date)) }} |
@if ($data->transaction_type == 'Purchase')
{{ $data->transaction_type.' ('.$data->purchase->purchase_no.')' }}
@elseif ($data->transaction_type == 'Paid to Supplier')
{{ $data->transaction_type.' ('.$data->purchase->purchase_no.')' }}
@else
{{ $data->transaction_type }}
@endif
|
{{ $data->debit }} |
{{ $data->credit }} |
{{ $balance >= 0 ? number_format($balance,2) : '('.number_format(abs($balance), 2).')' }} |
@empty
| No Data Found |
@endforelse
Closing Balance : {{ $balance >= 0 ? number_format($balance,2) : '('.number_format(abs($balance), 2).')' }}
@else
@endif