@extends('layouts.admin') @push('styles') @endpush @section('content') Purchase Voucher Update Purchase List @csrf @method('PUT') Entry Date: * @error('purDate') {{ $message }} @enderror Supplier: * Select Suppliers @foreach ($suppliers as $v) supplier_id == $v->id ? 'selected' : '' }}> {{ $v->supplier_name }} @endforeach @error('supplier_id2') {{ $message }} @enderror Purchase Type * pur_type == 0 ? 'selected' : '' }}> Local Purchase pur_type == 1 ? 'selected' : '' }}> Import @error('pur_type') {{ $message }} @enderror Pur. Date: * @error('billDate') {{ $message }} @enderror Bill NO: * @error('billNo') {{ $message }} @enderror Sl Product Qty (stock : ) Unit Rate Tax(%) Tax Amount Amount Action 1 Select Product @foreach ($products as $v) {{ $v->product_name }}-({{ $v->product_code }}) @endforeach Add Loading... @if (!empty($purDetails)) @php $sl = 1; $total_amt = 0; $purItem['puritem'] = []; @endphp @foreach ($purDetails as $v) @php $product_id = $v->product_id; $quantity = $v->quantity; $price = $v->rate; $tax_rate = $v->tax_rate; $tax_amt = $v->tax_amt; $total = $v->total; $unit_name = $v->unit_name; $pname = $v->product_name; $total_amt = $total_amt + $total; $sl = $sl + 1; $purItem['puritem'][$product_id] = [ 'product_id' => $product_id, 'quantity' => $quantity, 'price' => $price, 'tax_rate' => $tax_rate, 'tax_amt' => $tax_amt, 'total' => $total, 'unit_name' => $unit_name, 'pname' => $pname, ]; @endphp {{ $sl }} {{ $pname }} {{ $quantity }} {{ $unit_name }} {{ $price }} {{ $tax_rate }} {{ $tax_amt }} {{ $total }} Edit Delete @endforeach @php session(['puritem' => $purItem]); Request::session()->save(); @endphp Total: {{ $total_amt }} @endif Purchase Note: {{ $purchase->vendorNote }} Transport Cost: @endsection @push('scripts') @endpush