{{-- ===================================================== HEADER ====================================================== --}}
{{-- COMPANY DETAILS --}}
@if (!empty($branchInfo['logo'])) Logo @else N/A @endif

{{ $branchInfo['name'] ?? 'N/A' }}

@if(!empty($branchInfo['address'])) {{ $branchInfo['address'] }}
@endif @if(!empty($branchInfo['phone'])) Mobile: {{ $branchInfo['phone'] }}
@endif @if(!empty($branchInfo['gstin'])) GSTIN: {{ $branchInfo['gstin'] }}
@endif @if(!empty($branchInfo['pan'])) PAN Number: {{ $branchInfo['pan'] }}
@endif @if(!empty($branchInfo['email'])) Email: {{ $branchInfo['email'] }} @endif
{{-- PURCHASE DETAILS --}}

PURCHASE

Purchase No : {{ $myPurchase->invoice_number ?? '-' }}
Purchase Date : @if($myPurchase->purchase_date) {{ \Carbon\Carbon::parse( $myPurchase->purchase_date )->format('d/m/Y') }} @else - @endif
{{-- ===================================================== PARTY DETAILS ====================================================== --}} @php /* |-------------------------------------------------------------------------- | IMPORTANT |-------------------------------------------------------------------------- | Your purchase list already uses: | | $party->customer_name | | So use the same field here. */ $party = $myPurchase->purchaseParty; $partyName = $party->customer_name ?? 'N/A'; $partyAddress = $party->address ?? null; $partyPhone = $party->phone_number ?? null; $partyGstin = $party->gst_number ?? null; @endphp
{{-- BILL FROM --}}
BILL FROM
{{-- PARTY NAME --}}
Supplier
:
{{ $partyName }}
{{-- ADDRESS --}} @if(!empty($partyAddress))
Address
:
{{ $partyAddress }}
@endif {{-- PHONE --}} @if(!empty($partyPhone))
Mobile
:
{{ $partyPhone }}
@endif {{-- GSTIN --}} @if(!empty($partyGstin))
GSTIN
:
{{ $partyGstin }}
@endif
{{-- SHIP FROM --}}
SHIP FROM
{{-- PARTY NAME --}}
Supplier
:
{{ $partyName }}
{{-- ADDRESS --}} @if(!empty($partyAddress))
Address
:
{{ $partyAddress }}
@endif {{-- PHONE --}} @if(!empty($partyPhone))
Mobile
:
{{ $partyPhone }}
@endif {{-- GSTIN --}} @if(!empty($partyGstin))
GSTIN
:
{{ $partyGstin }}
@endif
{{-- ===================================================== ITEMS ====================================================== --}}
ITEMS
@php $subTotal = 0; @endphp @forelse($myPurchase->items as $item) @php $quantity = (float) ( $item->quantity ?? 0 ); $rate = (float) ( $item->purchase_price ?? 0 ); $amount = $quantity * $rate; $subTotal += $amount; $product = $item->product; @endphp {{-- ITEM --}} {{-- QTY --}} {{-- RATE --}} {{-- AMOUNT --}} @empty @endforelse
ITEMS QTY. RATE AMOUNT
{{ $product->title ?? $product->name ?? 'N/A' }} {{-- ITEM CODE --}} @if(!empty($product->item_code))
Item Code: {{ $product->item_code }}
@endif {{-- HSN CODE --}} @if(!empty($product->actual_hsn_code))
HSN: {{ $product->actual_hsn_code }}
@elseif(!empty($product->hsn_code))
HSN: {{ $product->hsn_code }}
@endif {{-- IMEI --}} @if(!empty($item->imei))
IMEI: {{ $item->imei }}
@endif
{{ number_format($quantity, 0) }} {{ $item->unit ?? 'PCS' }} ₹{{ number_format($rate, 2) }} ₹{{ number_format($amount, 2) }}
No purchase items found.
{{-- ================================================= SUBTOTAL ================================================== --}}
SUBTOTAL
₹{{ number_format($subTotal, 2) }}
{{-- ===================================================== BOTTOM SECTION ====================================================== --}}
{{-- TERMS --}}

TERMS AND CONDITIONS

1. PRICE : ABOVE PRICES ARE INCLUSIVE OF ALL TAXES 2. PAYMENT : 100% AGAINST ON ORDER 3. WARRANTY : MANUFACTURER'S WARRANTY ONLY APPLICABLE 4. VISIT THE AUTHORIZED SERVICE CENTER WITHIN THE ONE-YEAR WARRANTY PERIOD FOR DEFECT REPAIRS 5. JURISDICTION : SUBJECT TO ERODE JURISDICTION 6. ON SALES : GOODS ONCE SOLD WILL NOT BE TAKEN BACK
{{-- PAYMENT DETAILS --}}
Payment Details
@php /* |-------------------------------------------------------------------------- | TOTAL |-------------------------------------------------------------------------- */ $totalAmount = (float) ( $myPurchase->total_amount ?? $subTotal ); @endphp

Total Amount ₹{{ number_format( $totalAmount, 2 ) }}


{{-- AMOUNT IN WORDS --}}

Total Amount (in words)

@php try { $numberFormatter = \NumberFormatter::create( 'en_IN', \NumberFormatter::SPELLOUT ); $amountInWords = $numberFormatter->format( round($totalAmount) ); $amountInWords = ucwords( $amountInWords ); } catch (\Throwable $e) { $amountInWords = ''; } @endphp {{ $amountInWords }} @if($amountInWords) Rupees @endif
{{-- FOOTER --}}