@extends('backend.partials.master') @section('title') Return Material @endsection @section('maincontent') Return Material @csrf @if(!empty($returnmaterial)) @method('PUT') @endif Record Number * @error('invoice_no') {{ $message }} @enderror Customer * Select Customer @foreach($customers as $customer) customer_id ?? '') == $customer->id ? 'selected' : '' }}> {{ $customer->name }} @endforeach @error('customer_id') {{ $message }} @enderror Consumption No. Select Sale Invoice No. @if(!empty($returnmaterial->consumption_no)) {{ $returnmaterial->consumption_no }} @endif @error('consumption_no') {{ $message }} @enderror Firm * Select Firm @foreach($firms as $firm) firm ?? '') == $firm->id ? 'selected' : '' }}> {{ $firm->name }} @endforeach @error('firm') {{ $message }} @enderror Date * @error('idate') {{ $message }} @enderror Consumption Date * @error('consumption_date') {{ $message }} @enderror Product * HSN * Quantity * Serial No(s) MAC Id(s) Rejected Qty* @php $i = 0; @endphp @if(!empty($returnmaterialdetails)) @foreach($returnmaterialdetails as $detail) @php $i++; @endphp Select Product @foreach($products as $product) product_id == $product->id ? 'selected' : '' }}> {{ $product->name }} @endforeach @php $product = $products->find($detail->product_id); $hasSerial = strtolower($product->serial) === 'yes' ? '1' : '0'; @endphp @php $serials = explode(',', $detail->serial_no); $macs = explode(',', $detail->mac_id); $product = $products->firstWhere('id', $detail->product_id); @endphp @if($product && $product->serial == 'yes') @foreach($serials as $serial) @endforeach @endif @if($product && $product->serial == 'yes') @foreach($macs as $mac) @endforeach @endif @endforeach @endif {{ !empty($returnmaterial) ? 'Update' : 'Create' }} Cancel @endsection @section('scripts') @endsection