@foreach($accountingVouchers as $accountingVoucher)
PACKING SLIP
{{ $accountingVoucher->creditLedger->name }}
{{ $accountingVoucher->creditLedger->address }}
{{ $accountingVoucher->voucher_date }}
@foreach($accountingVoucher->items as $key => $item) @endforeach @if($accountingVoucher->items->count() < 5) @for($i = $accountingVoucher->items->count(); $i <= 4; $i++) @endfor @endif
Item Qty Rate Amount
{{ $key + 1 }} {{ $item->stockItem->name }} {{ $item->quantity }} {{ number_format($item->price_inc_tax, 2) }} {{ number_format($item->total,2) }}
         

@php if($accountingVoucher->previousBalanceDrCr == 'Cr'){ $nettotal = $accountingVoucher->previousBalance + $accountingVoucher->amount; } else if($accountingVoucher->previousBalanceDrCr == 'Dr') { if($accountingVoucher->previousBalance > $accountingVoucher->amount) { $nettotal = $accountingVoucher->previousBalance - $accountingVoucher->amount; } else{ $nettotal = $accountingVoucher->amount - $accountingVoucher->previousBalance; } } else{ $nettotal = $accountingVoucher->previousBalance + $accountingVoucher->amount; } @endphp
Purchase : {{ number_format($accountingVoucher->amount,2) }}
Old Balance : {{ number_format($accountingVoucher->previousBalance,2) }}
Net Amount : {{ number_format($nettotal,2) }}
{{--
Old Balance : {{ number_format($accountingVoucher->previousBalance,2) }}
Sales : {{ number_format($accountingVoucher->amount,2) }}
Balance {{ number_format($nettotal ,2) }}
--}} @if($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach