VENDOR REPORT

{{--*/ $dr_total = 0 /*--}} {{--*/ $cr_total = 0 /*--}} {{--*/ $total = $account_open_balance /*--}} @foreach($account_transactions as $index=>$cash_book_transaction) @if($cash_book_transaction->transaction_type =='PAYMENTS') {{--*/ $amount = $cash_book_transaction->amount /*--}} @elseif(sizeof($cash_book_transaction->journalVoucher->goodsReceivedNoteJournalVouchers)>0) {{--*/ $total_amount = 0 /*--}} {{--*/ $i = 0 /*--}} {{--*/ $sub_amount_usd = 0 /*--}} {{--*/ $sub_amount_tsh = 0 /*--}} {{--*/ $total_tax_usd = 0 /*--}} {{--*/ $total_tax_tsh = 0 /*--}} {{--*/ $sub_trip_amount = 0 /*--}} {{--*/ $number_of_rows = 6/*--}} {{--*/ $y = 0 /*--}} @foreach($cash_book_transaction->journalVoucher->goodsReceivedNoteJournalVouchers as $goods_received_note_journal_voucher) {{--*/ $total_amount_stock_entries = 0/*--}} {{--*/ $total_rows_stock_entries = sizeof($goods_received_note_journal_voucher->goodsReceivedNote->stockReceivedEntries) /*--}} @foreach($goods_received_note_journal_voucher->goodsReceivedNote->stockReceivedEntries as $index=>$stock_received_entry) @if($i == 0) @endif {{--*/ $total_amonut += $stock_received_entry->price_per_item*$stock_received_entry->quantity /*--}} {{--*/ $total_amount_stock_entries += $stock_received_entry->price_per_item*$stock_received_entry->quantity /*--}} {{--*/ $amount = $stock_received_entry->price_per_item*$stock_received_entry->quantity /*--}} @if($total_rows_stock_entries > 1) @if($total_rows_stock_entries == ++$y) @else @if($cash_book_transaction['type']=='DEBITED') {{--*/ $total -= $amount /*--}} @endif @if($cash_book_transaction['type']=='CREDITED') {{--*/ $total += $amount /*--}} @endif @endif @else @endif {{--*/ $i=1 /*--}} @endforeach @endforeach @else {{--*/ $amount = $cash_book_transaction->amount /*--}} @endif @endforeach
{{$vendor->name}}
From {{\Carbon\Carbon::parse($date[0])->toFormattedDateString()}} To {{\Carbon\Carbon::parse($date[1])->toFormattedDateString()}}
Date LPO/GRN Ref Item Desc Qty Price Dr Cr Balance
Open Balance as of {{\Carbon\Carbon::parse($date[0])->toFormattedDateString()}} {{ ($total > 0) ? number_format($total) : "( ".number_format(-1*$total)." )" }}
{{\Carbon\Carbon::parse($cash_book_transaction['date'])->toFormattedDateString()}} JV#{{$cash_book_transaction->journalVoucher->id}} {{$cash_book_transaction['description']}} @if($cash_book_transaction['type']=='DEBITED') {{ number_format($amount)}} {{--*/ $total -= $amount /*--}} @endif @if($cash_book_transaction['type']=='CREDITED') {{ number_format($amount) }} {{--*/ $total += $amount /*--}} @endif {{ ($total > 0) ? number_format($total) : "( ".number_format(-1*$total)." )" }}
{{\Carbon\Carbon::parse($cash_book_transaction['date'])->toFormattedDateString()}} #{{$goods_received_note_journal_voucher->goodsReceivedNote->lpo()->id}}/ #{{$stock_received_entry->id}} JV#{{$cash_book_transaction->journalVoucher->id}} {{$stock_received_entry->item}} {{number_format($stock_received_entry->quantity)}} {{$stock_received_entry->unit_of_measure}} {{number_format($stock_received_entry->price_per_item)}} @if($cash_book_transaction['type']=='DEBITED') {{ number_format($total_amount_stock_entries)}} {{--*/ $total -= $amount /*--}} @endif @if($cash_book_transaction['type']=='CREDITED') {{ number_format($total_amount_stock_entries) }} {{--*/ $total += $amount /*--}} @endif     {{--*/ $amount = $stock_received_entry->price_per_item*$stock_received_entry->quantity /*--}} @if($cash_book_transaction['type']=='DEBITED') {{ number_format($amount)}} {{--*/ $total -= $amount /*--}} @endif @if($cash_book_transaction['type']=='CREDITED') {{ number_format($amount) }} {{--*/ $total += $amount /*--}} @endif {{ ($total > 0) ? number_format($total) : "( ".number_format(-1*$total)." )" }} {{--*/ $i++ /*--}}
{{\Carbon\Carbon::parse($cash_book_transaction['date'])->toFormattedDateString()}} JV#{{$cash_book_transaction->journalVoucher->id}} {{$cash_book_transaction['description']}} @if($cash_book_transaction['type']=='DEBITED') {{ number_format($amount)}} {{--*/ $total -= $amount /*--}} @endif @if($cash_book_transaction['type']=='CREDITED') {{ number_format($amount) }} {{--*/ $total += $amount /*--}} @endif {{ ($total > 0) ? number_format($total) : "( ".number_format(-1*$total)." )" }}
  {{ ($total > 0) ? number_format($total) : "( ".number_format(-1*$total)." )" }}