@extends('admin.layouts.app') @section('content')

Kharid Forms (Purchase Orders) Create New Kharid Form

Reset
Total Purchase Orders

{{ $totalForms ?? $kharidForms->total() }}

Total Shops

{{ $uniqueShops ?? $kharidForms->unique('shop_name')->count() }}

Total Products

{{ $totalProducts ?? $kharidForms->sum(fn($f) => $f->products->count()) }}

This Month

{{ $thisMonthForms ?? $kharidForms->where('purchase_date', '>=', now()->startOfMonth())->count() }}

@if($kharidForms->count() > 0)
@foreach($kharidForms as $index => $form) @endforeach
# Kharif ID Purchase Date Shop Name Address Phone Products Status Maag Form Actions
{{ $kharidForms->firstItem() + $index }} {{ $form->id_no }} @if($form->jinsiForms->count() > 0)
{{ $form->jinsiForms->count() }} Dispatches @endif
{{ $form->purchase_date->format('Y-m-d') }} {{ $form->shop_name }} @if($form->tax_no)
Tax No: {{ $form->tax_no }} @endif
{{ $form->shop_address }} {{ $form->shop_phone }} {{ $form->products->count() }} Items
Total: Rs. {{ number_format($form->products->sum('total'), 2) }}
{{ ucfirst($form->status) }} {{ $form->maagForm->id_no }}
{{ $kharidForms->appends(request()->query())->links() }}
@else
No Kharid Forms found. Create your first Kharid Form
@endif
@push('scripts') @endpush @endsection