@foreach ($inventoryVouchers as $inventoryVoucher ) @foreach ($inventoryVoucher->items()->where('flow', 0)->get() as $key => $item) @if($key == 0) @php $sellingPrice = \App\Models\StockItemUnits::where('stock_item_id', $item->stock_item_id)->where('unit_id', $item->unit_id)->first()->unit_selling_price; @endphp @else @php $sellingPrice = \App\Models\StockItemUnits::where('stock_item_id', $item->stock_item_id)->where('unit_id', $item->unit_id)->first()->unit_selling_price; @endphp @endif @endforeach @endforeach
Voucher Date Voucher Number Voucher Type Amount Source Destination Item Stock Group Qty Unit Selling Price Purchase Price Total
{{ $inventoryVoucher->voucher_date }} {{ $inventoryVoucher->voucher_number }} {{ $inventoryVoucher->voucherType->name }} {{ $inventoryVoucher->amount }} {{ $inventoryVoucher->sourceLocation->name }} {{ $inventoryVoucher->destinationLocation->name }}{{ $item->stockItem->name }} {{ $item->stockItem->stockGroup ? $item->stockItem->stockGroup->name : '--' }} {{ $item->quantity }} {{ $item->unit->symbol }}{{ $sellingPrice }} {{ $item->price }} {{ $item->total }}
{{ $item->stockItem->name }} {{ $item->stockItem->stockGroup ? $item->stockItem->stockGroup->name : '--' }} {{ $item->quantity }} {{ $item->unit->symbol }}{{ $sellingPrice }} {{ $item->price }} {{ $item->total }}