@extends('layouts.app') @section('title', 'Purchase Invoice') @section('content')

Your Company Name

123 Business Street
City, State 12345
Phone: (123) 456-7890
Email: info@yourcompany.com

PURCHASE INVOICE

Invoice #: {{ $bill->bill_no }}
Date: {{ $bill->bill_date->format('F d, Y') }}
Month: {{ $bill->bill_month }}
@if($bill->provider_invoice)
Provider Invoice: {{ $bill->provider_invoice }}
@endif

Bill To:

{{ $bill->provider->name }}
@if($bill->contact_person) Contact: {{ $bill->contact_person }}
@endif @if($bill->provider->contact_email) Email: {{ $bill->provider->contact_email }}
@endif @if($bill->provider->contact_phone) Phone: {{ $bill->provider->contact_phone }}
@endif @if($bill->provider->address) {{ $bill->provider->address }} @endif

Payment Information:

Status: {{ ucfirst($bill->status) }}
@if($bill->payment_due)
Due Date: {{ $bill->payment_due->format('F d, Y') }}
@endif

Invoice Details:

@if($bill->items && $bill->items->count() > 0) @foreach($bill->items as $item) @endforeach @else @endif @if($bill->discount_amount > 0) @endif
Description Qty Rate VAT% Total VAT Amount
{{ $item->item_name ?: 'Bandwidth Service' }} @if($item->description)
{{ $item->description }} @endif @if($item->from_date && $item->to_date)
Period: {{ \Carbon\Carbon::parse($item->from_date)->format('M d, Y') }} - {{ \Carbon\Carbon::parse($item->to_date)->format('M d, Y') }} @endif
{{ $item->quantity }} BDT {{ number_format($item->rate, 2) }} {{ $item->vat_percentage ?? 0 }}% BDT {{ number_format($item->total_vat ?? 0, 2) }} BDT {{ number_format($item->total_amount, 2) }}
Bandwidth Services
Monthly bandwidth charges for {{ $bill->bill_month }} @if($bill->notes)
{{ $bill->notes }} @endif
- - - - BDT {{ number_format($bill->bill_amount, 2) }}
Discount @if($bill->discount_type)
({{ ucfirst($bill->discount_type) }}: {{ $bill->discount_value }}{{ $bill->discount_type === 'percentage' ? '%' : 'BDT' }}) @endif
-BDT {{ number_format($bill->discount_amount, 2) }}
@if($bill->notes)
Notes:

{{ $bill->notes }}

@endif
@if($bill->discount_amount > 0) @endif
Subtotal: BDT {{ number_format($bill->bill_amount, 2) }}
Discount: -BDT {{ number_format($bill->discount_amount, 2) }}
Total Amount: BDT {{ number_format($bill->subtotal_after_discount ?: $bill->bill_amount, 2) }}
Paid Amount: BDT {{ number_format($bill->paid_amount, 2) }}
Due Amount: BDT {{ number_format($bill->due_amount, 2) }}
@endsection