@extends('layouts.app') @section('title', 'Sales Invoice') @section('content')
123 Business Street
City, State 12345
Phone: (123) 456-7890
Email: info@yourcompany.com
Invoice No: {{ $invoice->invoice_no }}
@if($invoice->customer_invoice)Customer Invoice: {{ $invoice->customer_invoice }}
@endifDate: {{ $invoice->invoice_date->format('M d, Y') }}
@if($invoice->payment_due)Due Date: {{ $invoice->payment_due->format('M d, Y') }}
@endif{{ $invoice->customer_name ?? ($invoice->customer ? $invoice->customer->name : 'N/A') }}
@if($invoice->customer_email){{ $invoice->customer_email }}
@endif @if($invoice->customer_phone){{ $invoice->customer_phone }}
@endif @if($invoice->customer_address){{ $invoice->customer_address }}
@endif @if($invoice->contact_person)Contact Person: {{ $invoice->contact_person }}
@endif| # | Item Description | Unit | Quantity | Rate | VAT % | VAT Amount | Period | Total |
|---|---|---|---|---|---|---|---|---|
| Connection Type: {{ $connectionTypeName }}@if($connectionTypeNote) - {{ $connectionTypeNote }}@endif | ||||||||
| {{ $rowNumber }} |
{{ $item->item_name ?? 'Custom Item' }}
@if($item->description)
{{ $item->description }} @endif |
{{ $item->unit ?? '-' }} | {{ number_format($item->quantity, 2) }} | BDT {{ number_format($item->rate, 2) }} | {{ number_format($item->vat_percentage, 2) }}% | BDT {{ number_format($item->total_vat, 2) }} | @if($item->from_date && $item->to_date) {{ $item->from_date->format('M d') }} - {{ $item->to_date->format('M d, Y') }} @elseif($item->from_date) From {{ $item->from_date->format('M d, Y') }} @elseif($item->to_date) Until {{ $item->to_date->format('M d, Y') }} @else - @endif | BDT {{ number_format($item->total_amount, 2) }} |
| Subtotal: | BDT {{ number_format($invoice->invoice_amount + $invoice->discount_amount, 2) }} |
| Discount ({{ $invoice->discount_type ?? 'Amount' }}): | -BDT {{ number_format($invoice->discount_amount, 2) }} |
| Total Amount: | BDT {{ number_format($invoice->invoice_amount, 2) }} |
| Paid Amount: | BDT {{ number_format($invoice->paid_amount ?? 0, 2) }} |
| Due Amount: | BDT {{ number_format($invoice->due_amount, 2) }} |
| # | Reference Number | Amount | Remaining | Payment Method | Payment Date | Status | Created By | Description |
|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $advancePayment->reference_number }}
|
BDT {{ number_format($advancePayment->amount, 2) }} | BDT {{ number_format($advancePayment->remaining_amount, 2) }} | {{ $advancePayment->payment_method }} | {{ $advancePayment->payment_date->format('M d, Y') }} | @if($advancePayment->status === 'active') Active @elseif($advancePayment->status === 'used') Used @elseif($advancePayment->status === 'expired') Expired @endif | {{ $advancePayment->createdBy->name ?? 'System' }} | {{ Str::limit($advancePayment->description, 50) }} |
| Total Advance Payments: | BDT {{ number_format($advancePayments->sum('amount'), 2) }} | BDT {{ number_format($advancePayments->sum('remaining_amount'), 2) }} | ||||||
| # | Transaction Type | Payment Method | Account Holder | Account Name | Bank Account | Account Number | Received By | Received Amount | Transaction Date |
|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ ucfirst($transaction->transaction_type) }} | {{ $transaction->payment_method ?? 'N/A' }} | {{ optional($transaction->accountHolderInfo)->name ?? 'N/A' }} | {{ $transaction->bankAccountInfo->account_name ?? 'N/A' }} | {{ $transaction->bankAccountInfo->bank_name ?? ($transaction->bank_account ?? 'N/A') }} |
@if($transaction->bankAccountInfo && $transaction->bankAccountInfo->account_number)
{{ $transaction->bankAccountInfo->account_number }}
@else
N/A
@endif
|
{{ $transaction->received_by ?? 'N/A' }} | BDT {{ number_format($transaction->amount, 2) }} | {{ $transaction->transaction_date->format('M d, Y') }} |
| Total Payments: | BDT {{ number_format($paymentTransactions->where('transaction_type', 'payment')->sum('amount'), 2) }} | ||||||||
{{ $invoice->notes }}