@php // Read permissions once so the invoice actions stay easy to follow. $canCreateInvoice = \App\Support\AdminAccess::canAction('invoices', 'create'); $canViewInvoice = \App\Support\AdminAccess::canAction('invoices', 'view'); $canEditInvoice = \App\Support\AdminAccess::canAction('invoices', 'edit'); $canDeleteInvoice = \App\Support\AdminAccess::canAction('invoices', 'delete'); @endphp
{{ __('Invoice Management') }}
@if($canCreateInvoice) {{ __('New Sale') }} @endif
@forelse($invoices as $invoice) @empty @endforelse
{{ __('Invoice #') }} {{ __('Customer') }} {{ __('Date') }} {{ __('Total Amount') }} {{ __('Paid') }} {{ __('Change') }} {{ __('Freight') }} {{ __('Status') }} {{ __('Actions') }}
#{{ $invoice->invoice_number }} {{ $invoice->customer->display_name ?? __('Walking Customer') }} {{ $invoice->invoice_date?->format('d M, Y') ?? $invoice->created_at->format('d M, Y') }} Rs. {{ number_format($invoice->total, 0) }} Rs. {{ number_format($invoice->paid_amount, 0) }} Rs. {{ number_format((float) ($invoice->change_amount ?? 0), 0) }} Rs. {{ number_format($this->getInvoiceCutAmount($invoice), 0) }} @php($invoiceDisplayStatus = $this->resolveInvoiceDisplayStatus($invoice)) @if($invoiceDisplayStatus == 'paid') {{ __('Fully Paid') }} @elseif($invoiceDisplayStatus == 'unpaid') {{ __('Unpaid') }} @else {{ __('Partial') }} @endif
@if($canViewInvoice) @endif @if($canEditInvoice) @endif @if($canEditInvoice) @endif @if($canDeleteInvoice) @endif

Koi invoice nahi mili.

@if($showViewModal && $selectedInvoice)
{{ __('Invoice Number') }}
#{{ $selectedInvoice->invoice_number }}
{{ __('Date:') }} {{ $selectedInvoice->invoice_date?->format('d M, Y') ?? $selectedInvoice->created_at->format('d M, Y') }}
{{ __('Time:') }} {{ $selectedInvoice->created_at->format('h:i A') }}
{{ __('Customer') }}
{{ $selectedInvoice->customer->display_name ?? __('Walk-in Customer') }}
{{ $selectedInvoice->customer->phone ?? __('Phone not available') }}
{{ $selectedInvoice->customer->address ?? __('Address not available') }}
{{ __('Payment Account') }}
{{ $selectedInvoice->account->account_name ?? __('No account selected') }}
{{ $selectedInvoice->account->account_type ?? __('N/A') }}
{{ __('Reference:') }} {{ $selectedInvoice->reference ?: __('N/A') }}
@forelse($selectedInvoice->items as $item) @empty @endforelse
{{ __('Product') }} {{ __('Qty') }} {{ __('Price') }} {{ __('Total') }}
{{ $item->product_name }} {{ number_format($item->qty, 2) }} Rs. {{ number_format($item->price, 2) }} Rs. {{ number_format($item->total, 2) }}
{{ __('No invoice items found.') }}
{{ __('Payment Status') }}
@php($selectedInvoiceStatus = $this->resolveInvoiceDisplayStatus($selectedInvoice)) @if($selectedInvoiceStatus === 'paid') {{ __('Fully Paid') }} @elseif($selectedInvoiceStatus === 'unpaid') {{ __('Unpaid') }} @else {{ __('Partial Payment') }} @endif
{{ __('This invoice was generated from the POS checkout screen.') }}
{{ __('Sub Total') }} Rs. {{ number_format($selectedInvoice->subtotal, 2) }}
{{ __('Discount') }} Rs. {{ number_format($selectedInvoice->discount, 2) }}
{{ __('Other Charges') }} Rs. {{ number_format((float) ($selectedInvoice->other_charges_total ?? 0), 2) }}
@foreach($selectedInvoice->charges as $charge)
+ {{ $charge->name }} Rs. {{ number_format((float) $charge->amount, 2) }}
@endforeach
{{ __('Paid Amount') }} Rs. {{ number_format($selectedInvoice->paid_amount, 2) }}
@if((float) ($selectedInvoice->change_amount ?? 0) > 0)
{{ __('Change') }} Rs. {{ number_format((float) $selectedInvoice->change_amount, 2) }}
@endif @if((float) ($selectedInvoice->opening_balance_adjustment ?? 0) > 0)
{{ __('Due Adjustment') }} Rs. {{ number_format((float) $selectedInvoice->opening_balance_adjustment, 2) }}
@endif
{{ __('Freight Amount') }} Rs. {{ number_format($this->getInvoiceCutAmount($selectedInvoice), 2) }}
{{ __('Remaining Balance') }} Rs. {{ number_format($this->getOutstandingAmount($selectedInvoice), 2) }}
{{ __('Grand Total') }} Rs. {{ number_format($selectedInvoice->total, 2) }}
@endif @if($showCutModal && $selectedCutInvoice) @endif