@extends('layouts.master') @section('css') @endsection @section('title') Stock Journal @endsection @section('content') @method('put') @csrf Edit Stock Journal Go Back Voucher Number @if (str_contains($inventoryVoucher->voucher_number, '-')) {{ explode('-', $inventoryVoucher->voucher_number)[0] }} @else @endif Voucher Type Select voucher type Voucher Date Remarks {{ $inventoryVoucher->remarks }} Note* : Extra consumptions/Buy products are added to be last and Extra consumptions only added after destination items. Source/Input Location Item Variant Qty Unit Price Total @if (count($sourceInventoryVoucherItems) > 0) @foreach ($sourceInventoryVoucherItems as $key => $inventoryVoucherItem) @php $key = $key + 1; @endphp Select location @foreach ($stockLocations as $stockLocation) stock_location_id == $stockLocation->id ? 'selected' : '' }}> {{ $stockLocation->name }} @endforeach Select item @foreach ($stockItems as $item) stock_item_id == $item->id ? 'selected' : '' }}> {{ $item->name }} @endforeach Select Variant @foreach ($inventoryVoucherItem->stockItem->variants as $variant) variant_id == $variant->id ? 'selected' : '' }}> {{ $variant->name }} @endforeach unit_id == $inventoryVoucherItem->unit->id ? 'selected' : '' }}> {{ $inventoryVoucherItem->unit->symbol }} @if ($inventoryVoucherItem->dest_id == null) @endif @endforeach @endif {{ number_format($sourceInventoryVoucherItems->sum('total'), 2) }} Add Destination/Output Location Item Variant Qty Unit Price Total @if (count($destinationInventoryVoucherItems) > 0) @foreach ($destinationInventoryVoucherItems as $key => $inventoryVoucherItem) @php $key = $key + 1; $hiddenQty = $inventoryVoucherItem->stockItem->baseStockItemUnit ->unit_qty; $manufacturersArray = []; $stockItemManufacturers = $inventoryVoucherItem->stockItem->stockItemManufacturers; foreach ($stockItemManufacturers as $manufacturer) { $manufacturersArray[] = $manufacturer->manufacturing_item_id; } $implodedString = implode(',', $manufacturersArray); @endphp Select location @foreach ($stockLocations as $stockLocation) stock_location_id == $stockLocation->id ? 'selected' : '' }}> {{ $stockLocation->name }} @endforeach Select item @foreach ($stockItems as $item) stock_item_id == $item->id ? 'selected' : '' }}> {{ $item->name }} @endforeach Select Variant @foreach ($inventoryVoucherItem->stockItem->variants as $variant) variant_id == $variant->id ? 'selected' : '' }}> {{ $variant->name }} @endforeach unit_id == $inventoryVoucherItem->unit->id ? 'selected' : '' }}> {{ $inventoryVoucherItem->unit->symbol }} @endforeach @endif {{ number_format($destinationInventoryVoucherItems->sum('total'), 2) }} Add Submit @endsection @section('script')
Note* : Extra consumptions/Buy products are added to be last and Extra consumptions only added after destination items.