@extends('layouts.master') @section('css') @endsection @section('title') Stock Journal @endsection @section('content') @isset($inventoryVoucher) @method('put') @else @endisset @csrf @isset($inventoryVoucher) Edit Stock Journal @else Add Stock Journal @endisset @isset($inventoryVoucher) Go Back @endisset Voucher Number @isset($inventoryVoucher) @if (str_contains($inventoryVoucher->voucher_number, '-')) {{ explode('-', $inventoryVoucher->voucher_number)[0] }} @else @endif @else @if ($voucherType->prefix != null) {{ $voucherType->prefix }} @else @endif @endisset Voucher Type Select voucher type Voucher Date Remarks {{ isset($inventoryVoucher) ? $inventoryVoucher->remarks : '' }} Note* : Extra consumptions/Buy products are added to be last and Extra consumptions only added after destination items. Source/Input Location @if (Auth::user()->company_profile->show_item_code_in_sales) Item Code @endif Item @if(Auth::user()->company_profile->enable_batch == 1) Batch @endif Qty Unit Price Total @php $sourceTabIndex = 0; $destinationTabIndex = 0; $i=0; @endphp @isset($sourceInventoryVoucherItems) @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 @if (Auth::user()->company_profile->show_item_code_in_sales) @php $i = 1; @endphp @endif Select item {{ $inventoryVoucherItem->stockItem->name }} @if(Auth::user()->company_profile->enable_batch == 1) Select batch @if($inventoryVoucherItem->batch_id != null) {{ $inventoryVoucherItem->batch->name }} @endif @endif unit_id == $inventoryVoucherItem->unit->id ? 'selected' : '') : '' }}> {{ $inventoryVoucherItem->unit->symbol }} @php $sourceTabIndex += 5 + $i; @endphp @endforeach @endif @endisset @if (Auth::user()->company_profile->show_item_code_in_sales) @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif {{ isset($sourceInventoryVoucherItems) ? number_format($sourceInventoryVoucherItems->sum('total'), 2) : '0.00' }} Add Destination/Output Location @if (Auth::user()->company_profile->show_item_code_in_sales) Item Code @endif Item @if(Auth::user()->company_profile->enable_batch == 1) Batch @endif Qty Unit Cost Total @isset($destinationInventoryVoucherItems) @if (count($destinationInventoryVoucherItems) > 0) @foreach ($destinationInventoryVoucherItems as $key => $inventoryVoucherItem) @php $key = $key + 1; @endphp Select location @foreach ($stockLocations as $stockLocation) stock_location_id == $stockLocation->id ? 'selected' : '') : '' }}> {{ $stockLocation->name }} @endforeach @if (Auth::user()->company_profile->show_item_code_in_sales) @if (Auth::user()->company_profile->show_item_code_in_sales) @endif @endif Select item {{ $inventoryVoucherItem->stockItem->name }} @if(Auth::user()->company_profile->enable_batch == 1) Select batch @if($inventoryVoucherItem->batch_id != null) {{ $inventoryVoucherItem->batch->name }} @endif @endif unit_id == $inventoryVoucherItem->unit->id ? 'selected' : '') : '' }}> {{ $inventoryVoucherItem->unit->symbol }} @endforeach @endif @endisset @if (Auth::user()->company_profile->show_item_code_in_sales) @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif {{ isset($destinationInventoryVoucherItems) ? number_format($destinationInventoryVoucherItems->sum('total'), 2) : '0.00' }} Add Submit Create Batch @csrf Batch @endsection @section('script')
Note* : Extra consumptions/Buy products are added to be last and Extra consumptions only added after destination items.