@extends('layouts.dashboard.superadminapp') @section('title', 'Purchase Order Details') @section('content')

Purchase Invoice Details

Vendor Invoice No:
{{ $purchase->vendor_invoice_no ?? '-' }}
Purchase Invoice No:
{{ $purchase->purchase_no ?? '-' }}
Purchase Date:
{{ $purchase->purchase_date ? \Carbon\Carbon::parse($purchase->purchase_date)->format('d/m/Y') : '-' }}
Purchase Order No:
{{ $purchase->purchase_order_no ?? '-' }}
Purchase Order Date:
{{ $purchase->purchase_order_date ? \Carbon\Carbon::parse($purchase->purchase_order_date)->format('d/m/Y') : '-' }}
Vendor:
{{ $purchase->company_name ?? '-' }}
Vendor Ref No:
{{ $purchase->vendor_ref_no ?? '-' }}
Vendor GSTN:
{{ $purchase->company_gstn ?? '-' }}
Vendor Phone:
{{ $purchase->company_phone ?? '-' }}
Vendor Email:
{{ $purchase->company_email ?? '-' }}
Billing Address:
{{ $purchase->bill_address ?? '-' }}
Shipping Address:
{{ $purchase->ship_address ?? '-' }}
Status:
@php $status = $purchase->status ?? 'pending'; $statusClass = 'badge-secondary'; switch ($status) { case 'approved': $statusClass = 'badge-success'; break; case 'rejected': $statusClass = 'badge-danger'; break; case 'pending': default: $statusClass = 'badge-warning'; break; } @endphp {{ ucfirst($status) }}
Payment Terms:
{{ ucfirst($purchase->payment_terms ?? '-') }}
Payment Status:
{{ ucfirst($purchase->payment_status ?? 'unpaid') }}
Payment Method:
{{ $purchase->payment_method ?? '-' }}
Payment Reference No:
{{ $purchase->payment_reference_no ?? '-' }}
Payment Delay Reason:
{{ $purchase->payment_delay_reason ?? '-' }}
Description:
{{ $purchase->description ?? '-' }}
Delivery Terms:
{{ $purchase->delivery_terms ?? '-' }}
Note:
{{ $purchase->note ?? '-' }}
Attached Files
@if($purchase->files && count($purchase->files) > 0)
@foreach($purchase->files as $file) {{ $file->file_name }} @endforeach
@else

No files attached.

@endif
Items
@forelse($purchase->items as $idx => $item) @empty @endforelse
# Item Name Description UOM Quantity Unit Rate Discount Value SGST CGST IGST TDS Amount
{{ $idx + 1 }} {{ $item->stock_item_name ?? ($item->stockItem->name ?? '-') }} {{ $item->description ?? '-' }} {{ $item->uom ?? '-' }} {{ $item->quantity ?? 0 }} ₹{{ number_format($item->unit_rate ?? 0, 2) }} {{ $item->discount ?? 0 }}% ₹{{ number_format($item->value ?? 0, 2) }} {{ $item->sgst ?? 0 }}% {{ $item->cgst ?? 0 }}% {{ $item->igst ?? 0 }}% {{ $item->tds ?? 0 }}% ₹{{ number_format($item->amount ?? 0, 2) }}
No items found.
Subtotal: ₹{{ number_format($purchase->subtotal ?? 0, 2) }}
SGST Amount: ₹{{ number_format($purchase->sgst_amount ?? 0, 2) }}
CGST Amount: ₹{{ number_format($purchase->cgst_amount ?? 0, 2) }}
IGST Amount: ₹{{ number_format($purchase->igst_amount ?? 0, 2) }}
Additional Charges: ₹{{ number_format($purchase->additional_charges ?? 0, 2) }}
TDS Amount: ₹{{ number_format($purchase->tds_amount ?? 0, 2) }}
Net Payable Amount: ₹{{ number_format($purchase->net_payable_amount ?? 0, 2) }}
Grand Total: ₹{{ number_format($purchase->grand_total ?? 0, 2) }}
Paid Amount: ₹{{ number_format($purchase->paid_amount ?? 0, 2) }}
Balance Amount: ₹{{ number_format($purchase->balance_amount ?? 0, 2) }}
Amount in Words: {{ $purchase->inr_in_words ?? '-' }}
@if($purchase->creditNotes && count($purchase->creditNotes) > 0)
Associated Credit Notes
@foreach($purchase->creditNotes as $creditNote) @endforeach
Credit Note No Date Amount Reason Description
{{ $creditNote->credit_note_no }} {{ \Carbon\Carbon::parse($creditNote->date)->format('d/m/Y') }} ₹{{ number_format($creditNote->amount, 2) }} {{ $creditNote->reason }} {{ $creditNote->description ?? '-' }}
@endif
@endsection