@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) @endisset
@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

Note* : Extra consumptions/Buy products are added to be last and Extra consumptions only added after destination items.

Source/Input
@if (Auth::user()->company_profile->show_item_code_in_sales) @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif @php $sourceTabIndex = 0; $destinationTabIndex = 0; $i=0; @endphp @isset($sourceInventoryVoucherItems) @if (count($sourceInventoryVoucherItems) > 0) @foreach ($sourceInventoryVoucherItems as $key => $inventoryVoucherItem) @php $key = $key + 1; @endphp @if (Auth::user()->company_profile->show_item_code_in_sales) @php $i = 1; @endphp @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif @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
LocationItem CodeItemBatchQty Unit Price Total
{{ isset($sourceInventoryVoucherItems) ? number_format($sourceInventoryVoucherItems->sum('total'), 2) : '0.00' }}
Destination/Output
@if (Auth::user()->company_profile->show_item_code_in_sales) @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif @isset($destinationInventoryVoucherItems) @if (count($destinationInventoryVoucherItems) > 0) @foreach ($destinationInventoryVoucherItems as $key => $inventoryVoucherItem) @php $key = $key + 1; @endphp @if (Auth::user()->company_profile->show_item_code_in_sales) @if (Auth::user()->company_profile->show_item_code_in_sales) @endif @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif @endforeach @endif @endisset @if (Auth::user()->company_profile->show_item_code_in_sales) @endif @if(Auth::user()->company_profile->enable_batch == 1) @endif
LocationItem CodeItemBatchQty Unit Cost Total
{{ isset($destinationInventoryVoucherItems) ? number_format($destinationInventoryVoucherItems->sum('total'), 2) : '0.00' }}
@endsection @section('script')