@extends('layouts.layout-horizontal') @section('title', 'Create Purchase Bill') @section('css') @endsection @section('content')
@csrf @if($isOverseasPurchase ?? false) @endif {{-- Compact header bar --}}
{{-- Left: back + party + date + bill no + mode --}}
+
@error('party_id')
{{ $message }}
@enderror
{{-- Right: mode badge + "New" label --}}
@if ($mode == 'cash') Cash Mode @else Bill Mode @endif Purchase # New
@include('partials._party-details')
Document
{{ ($isOverseasPurchase ?? false) ? 'Overseas Purchase' : 'Purchase Bill' }}
{{ ($isOverseasPurchase ?? false) ? 'Foreign invoice entry' : 'Create supplier entry fast' }}
Selected Mode
{{ strtoupper($mode) }}
{{ ($isOverseasPurchase ?? false) ? 'Cash overseas purchase entry' : ($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 #
New
Supplier bill no stays manual
@if($mode !== 'cash') {{-- E-way — collapsed compact strip --}}
@endif @if($isOverseasPurchase ?? false)
@endif @if($prefill && !empty($prefill['items']))
From {{ $prefill['po_ref'] ?? 'Purchase Order' }} @foreach($prefill['items'] as $prefillItem) @if(($prefillItem['conversion_status'] ?? 'Pending') !== 'Pending') {{ $prefillItem['product_name'] ?? 'Item' }}: {{ $prefillItem['conversion_status'] }} @endif @endforeach
@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 --}}
{{-- Spacer so content not hidden behind sticky bar --}}
@endsection @push('scripts') @endpush