@foreach($accountingVouchers as $accountingVoucher)
PACKING SLIP
{{ $accountingVoucher->debitLedger->name }}
{{ $accountingVoucher->debitLedger->address }} |
{{ $accountingVoucher->voucher_date }} |
|
Item |
Qty |
Rate |
Amount |
@foreach($accountingVoucher->items as $key => $item)
| {{ $key + 1 }} |
{{ $item->stockItem->name }} |
{{ $item->quantity }} |
{{ number_format($item->price_inc_tax, 2) }} |
{{ number_format($item->total,2) }} |
@endforeach
@if($accountingVoucher->items->count() < 5)
@for($i = $accountingVoucher->items->count(); $i <= 4; $i++)
| |
|
|
|
|
@endfor
@endif
@php
if($accountingVoucher->previousBalanceDrCr == 'Dr'){
$nettotal = $accountingVoucher->previousBalance + $accountingVoucher->amount;
}
else if($accountingVoucher->previousBalanceDrCr == 'Cr')
{
if($accountingVoucher->previousBalance > $accountingVoucher->amount)
{
$nettotal = $accountingVoucher->previousBalance - $accountingVoucher->amount;
}
else{
$nettotal = $accountingVoucher->amount - $accountingVoucher->previousBalance;
}
}
else{
$nettotal = $accountingVoucher->previousBalance + $accountingVoucher->amount;
}
@endphp
|
Sales |
: |
{{ 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