@extends('layout.app') @section('title', 'Create Stock Inward') @push('header_script') @endpush @section('content')
{!! Form::model($stockInward, ['route' => ['stock-inward.update', $stockInward->id], 'method' => 'PUT', 'id' => 'stockInwardForm']) !!} {{-- Purchase Details Card --}}
Purchase Details
{!! Form::select('purchase_voucher_id', ['' => '--Select--'] + $purchaseVouchers, null, ['class' => 'form-control select2', 'id' => 'purchase_voucher_id', 'style' => 'width: 100%;', 'required']) !!}
{{ $errors->first('purchase_voucher_id') }}
{{ $errors->first('party_account_ledger_id') }}
{{ $errors->first('invoice_no') }}
{{ $errors->first('invoice_date') }}
{{ $errors->first('remarks') }}
{{-- Item Entry Card --}}
Item Entry
@foreach($stockInward->details as $detail) @php $brandName = $detail->item && $detail->item->brand ? $detail->item->brand->brand_name : '-'; $u = $detail->item && $detail->item->units ? (string)$detail->item->units : ''; $unitName = $u ? ucfirst($u) : '—'; $pvDetail = $stockInward->purchaseVoucher ? $stockInward->purchaseVoucher->voucherDetails->where('product_id', $detail->item_id)->first() : null; $maxQty = $pvDetail ? $pvDetail->qty : $detail->quantity; @endphp @endforeach
ITEM NAME SKU CODE BATCH NO. (optional) BRAND QTY UNIT PURCHASE RATE AMOUNT
{{ $detail->item ? $detail->item->product_name : '' }}
{{ $brandName }}
{{ $unitName }} ₹{{ number_format($detail->amount, 2) }}
Total Quantity 0
Total Amount ₹0.00
Cancel
{!! Form::close() !!}
@endsection @push('footer_script') @endpush