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

Kharid Form Details

Status: {{ ucfirst($kharidForm->status) }} @if($kharidForm->jinsiForms->count() > 0) {{ $kharidForm->jinsiForms->count() }} Jinsi Forms Created @endif
Purchase Information
Kharid ID No:

{{ $kharidForm->id_no }}

Purchase Date:

{{ $kharidForm->purchase_date->format('F d, Y') }}

Created By:

{{ $kharidForm->user->name ?? 'N/A' }}

Shop Information
Shop Name:

{{ $kharidForm->shop_name }}

Shop Address:

{{ $kharidForm->shop_address }}

Phone Number:

{{ $kharidForm->shop_phone }}

Tax Number:

{{ $kharidForm->tax_no ?? 'N/A' }}

Purchased Products Total Items: {{ $kharidForm->products->count() }}
@foreach($kharidForm->products as $index => $product) @php $issuedQty = $product->jinsiFormProducts->sum('remaining_qty'); $remainingQty = $product->maagFormProduct->qty - $issuedQty; @endphp @endforeach
# Product Name Specification Unit Unit Price (Rs.) Total Amount (Rs.) Issued Qty Remaining Qty Remarks
{{ $index + 1 }} {{ $product->maagFormProduct->product_name }} {{ $product->maagFormProduct->specification ?? 'N/A' }} {{ $product->maagFormProduct->unit }} {{ number_format($product->amount, 2) }} Rs. {{ number_format($product->total, 2) }} {{ number_format($issuedQty, 2) }} {{ number_format($remainingQty, 2) }} {{ $product->remarks ?? 'N/A' }}
Grand Total: Rs. {{ number_format($kharidForm->products->sum('total'), 2) }}
@if($kharidForm->jinsiForms->count() > 0)
Related Jinsi Forms (Dispatch Records) Total: {{ $kharidForm->jinsiForms->count() }}
@foreach($kharidForm->jinsiForms as $jinsiForm) @endforeach
Jinsi ID Entry Date Tax Applied Tax Amount Other Exp Total Amount Status Actions
{{ $jinsiForm->id_no }} {{ $jinsiForm->entry_date->format('Y-m-d') }} @if($jinsiForm->is_tax_applied) Yes ({{ $jinsiForm->tax_amount }}%) @else No @endif Rs. {{ number_format($jinsiForm->tax_amount, 2) }} Rs. {{ number_format($jinsiForm->other_exp, 2) }} Rs. {{ number_format($jinsiForm->total_amount, 2) }} {{ $jinsiForm->status }} View
Total Dispatched Value: Rs. {{ number_format($kharidForm->jinsiForms->sum('total_amount'), 2) }}
@endif
Remarks

{{ $kharidForm->remarks ?? 'No remarks provided.' }}

Timeline
Created At:

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

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

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

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