@extends('layout.layout') @section('content') @if ($errors->any())

Please correct the following errors:

@endif {{-- The form action is set to the 'update' route and includes the $purchase ID. @method('PUT') is used to override the POST request method to PUT/PATCH. --}}
@csrf @method('PUT')
Edit Purchase Order #{{ $purchase->purchase_number }}

Order Information 📝

@error('purchase_number')

{{ $message }}

@enderror
@error('name')

{{ $message }}

@enderror
{{-- Ensure date format is Y-m-d for HTML input type="date" --}}

Vendor Details 🚚

# Vendor Name Phone Actions
No vendors have been added for this purchase order.

Item(s) Details 🛒

# Serial Number Category Product Unit Price Tax % Qty Total Amount Actions
Subtotal 0.00 EGP
Tax 0.00 EGP
TOTAL COST 0.00 EGP

Attachments 📎

Attach supporting documents for the purchase order.

Accepted: PDF, JPG, PNG — up to 5 files

@if (!empty($purchase->attachments))
@foreach ($purchase->attachments as $file)
@php $path = $file->file_path; $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); $isImage = in_array($ext, ['jpg', 'jpeg', 'png', 'gif', 'webp']); @endphp @if ($isImage) Attachment @else
@endif

{{ str_replace('uploads/purchases/', '', $file->file_path) }}

@endforeach
@endif
Cancel
@endsection