@extends('layouts.layout-horizontal') @section('title', 'Edit Purchase Bill') @section('css') @endsection @section('content')
@csrf @method('PUT') @if($isOverseasPurchase ?? false) @endif {{-- Compact header bar --}}
{{-- Left: back + party + date + bill no + mode --}}
+
@error('party_id')
{{ $message }}
@enderror
{{-- Right: mode badge + bill no display --}}
@if ($mode == 'cash') Cash Mode @else Bill Mode @endif Purchase # {{ $purchase->bill_no }}
@include('partials._party-details')
Document
{{ ($isOverseasPurchase ?? false) ? 'Overseas Purchase' : 'Purchase Bill' }}
{{ ($isOverseasPurchase ?? false) ? 'Edit foreign invoice entry' : 'Edit existing supplier entry' }}
Selected Mode
{{ strtoupper($mode) }}
{{ $mode === 'cash' ? 'Cash-company purchase entry' : 'Bill-company purchase entry' }}
Current Company
{{ currentCompany()?->name ?? 'Current Company' }}
{{ $mode === 'cash' ? 'Transfer to bill from view page' : 'Posting stays in active company' }}
Purchase #
{{ $purchase->bill_no ?: 'Draft' }}
Supplier bill reference
@if($mode !== 'cash') {{-- E-way — collapsed compact strip --}}
E-way Bill
@endif @if($isOverseasPurchase ?? false)
@endif
{{-- Items table --}}
Line Items
New Product
@if($isOverseasPurchase ?? false) @endif @if($mode !== 'cash') @endif
# Product HSN Unit QtyFgn Rate ConvRateTax% Rate
(Incl. Tax)
Total
(Excl. Tax)
Total
{{-- Sticky bottom bar --}}
{{-- Row 1: P&F --}}
P&F
Amt
@if($mode === 'cash') @else
GST%
Tax
@endif
{{-- Row 2: Totals + Actions --}}
Amount
@if($mode === 'cash') @else
Tax
@endif
Roundoff
Grand Total
{{-- Actions --}}
Cancel
{{-- Spacer so content not hidden behind sticky bar --}}
@endsection @push('scripts') @endpush