@extends('backend.partials.master') @section('title') Customer Purchase Price {{ !empty($old) ? 'Edit' : 'Create' }} @endsection @section('maincontent') @php $groupedProducts = !empty($old) ? $old->groupBy('product_id') : collect(); @endphp

{{ !empty($old) ? 'Edit' : 'Create' }} Customer Purchase Price

@csrf @if(!empty($old)) @method('PUT') @endif
@if(!empty($old)) @endif @error('lot_no'){{ $message }}@enderror
@foreach($customers as $customer) @endforeach @if(!empty($old)) @foreach($groupedProducts as $pIndex => $items) @php $first = $items->first(); @endphp {{-- CUSTOMER WISE SALE PRICE --}} @foreach($customers as $cIndex => $customer) @php $row = DB::table('customer_sale_prices') ->where('product_id',$first->product_id) ->where('customer_id',$customer->id) ->first(); @endphp @endforeach @endforeach @endif
Sr No Lot No Product Purchase Price Expense Commission % {{ $customer->fname }}
{{ $loop->iteration }} {{ $first->lot_no }} {{ $first->product_name }} {{ number_format($first->rate,2) }}
Cancel
@endsection @push('scripts') @endpush