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

Maag Form Details

Status: {{ ucfirst($maagForm->status) }} @if($maagForm->kharidForms->count() > 0) {{ $maagForm->kharidForms->count() }} Purchase Orders Created @endif @if($maagForm->jinsiForms->count() > 0) {{ $maagForm->jinsiForms->count() }} Jinsi Forms Created @endif
Basic Information
Form ID No:

{{ $maagForm->id_no }}

Date:

{{ $maagForm->date->format('F d, Y') }}

Year:

{{ $maagForm->year }}

Purpose:

{{ $maagForm->purpose ?? 'N/A' }}

Location Information
Ward:

{{ $maagForm->ward->name ?? 'N/A' }}

Municipality:

{{ $maagForm->municipality->name ?? 'N/A' }}

Ward Chairman:

{{ $maagForm->wardchairman->name ?? 'N/A' }}

Recommendation
Recommended By:

{{ $maagForm->recommended_by }}

Created By:

{{ $maagForm->user->name ?? 'N/A' }} ({{ $maagForm->created_at->format('F d, Y H:i') }})

Products List Total Items: {{ $maagForm->products->count() }}
@foreach($maagForm->products as $index => $product) @endforeach
# Product Name Specification Unit Quantity Purchased Qty Remaining Qty Status Remarks
{{ $index + 1 }} {{ $product->product_name }} {{ $product->specification ?? 'N/A' }} {{ $product->unit }} {{ number_format($product->qty, 2) }} {{ number_format($product->purchased_qty, 2) }} {{ number_format($product->remaining_qty, 2) }} {{ $product->status }} {{ $product->remarks ?? 'N/A' }}
Total Quantity: {{ number_format($maagForm->products->sum('qty'), 2) }} {{ number_format($maagForm->products->sum('purchased_qty'), 2) }} {{ number_format($maagForm->products->sum(fn($p) => $p->remaining_qty), 2) }}
@if($maagForm->kharidForms->count() > 0)
Related Kharid Forms (Purchase Orders) Total: {{ $maagForm->kharidForms->count() }}
@foreach($maagForm->kharidForms as $kharidForm) @endforeach
Kharif ID Purchase Date Shop Name Shop Address Phone Total Products Status Actions
{{ $kharidForm->id_no }} {{ $kharidForm->purchase_date->format('Y-m-d') }} {{ $kharidForm->shop_name }} {{ $kharidForm->shop_address }} {{ $kharidForm->shop_phone }} {{ $kharidForm->products->count() }} Items {{ $kharidForm->status }} View
@endif @if($maagForm->jinsiForms->count() > 0)
Related Jinsi Forms (Dispatch Records) Total: {{ $maagForm->jinsiForms->count() }}
@foreach($maagForm->jinsiForms as $jinsiForm) @endforeach
Jinsi ID Entry Date From Kharif ID Tax Applied Total Amount Status Actions
{{ $jinsiForm->id_no }} {{ $jinsiForm->entry_date->format('Y-m-d') }} {{ $jinsiForm->kharidForm->id_no ?? 'N/A' }} @if($jinsiForm->is_tax_applied) Tax Applied ({{ $jinsiForm->tax_amount }}%) @else No Tax @endif Rs. {{ number_format($jinsiForm->total_amount, 2) }} {{ $jinsiForm->status }} View
@endif
Timeline
Created At:

{{ $maagForm->created_at->format('F d, Y H:i:s') }}

{{ $maagForm->created_at->diffForHumans() }}
Last Updated:

{{ $maagForm->updated_at->format('F d, Y H:i:s') }}

{{ $maagForm->updated_at->diffForHumans() }}
@endsection