@extends('admin.layouts.wholesale-live') @section('page-title', 'Wholesale Invoice') @push('scripts')@endpush @section('wholesale-actions') Invoice List @if($invoice->paidAmount() < $invoice->total && auth()->user()->hasPermission('wholesale.payments'))Receive Payment@endif @if(auth()->user()->hasPermission('wholesale.ledger'))Party Ledger@endif @endsection @section('wholesale-content')
{{ $brand['name'] }}

Wholesale Invoice

{{ $invoice->code() }} · {{ $invoice->invoice_date->format('d M Y') }}

{{ $invoice->party_name }}{{ $invoice->party_contact }}{{ $invoice->party_phone }}{{ $invoice->party_address }}
{{ ['paid' => 'Paid', 'partial' => 'Part paid', 'unpaid' => 'Unpaid'][$invoice->paymentStatus()] }}Due date: {{ $invoice->due_date?->format('d M Y') ?? 'Not specified' }}
@foreach($lines as $line)@endforeach
Product / SKUColour / SizeQuantityRate (BDT)Total (BDT)Stock before → after
{{ $line->product_name }}{{ $line->product_code }} · {{ $line->sku }}{{ $line->colour ?: 'Default' }} / {{ $line->size ?: 'Default' }}{{ $line->quantity }}{{ number_format($line->unit_price / 100, 2) }}{{ number_format($line->line_total / 100, 2) }}{{ $line->stock_before }} → {{ $line->stock_after }}
@foreach(['subtotal' => 'Subtotal', 'discount' => 'Discount', 'delivery' => 'Delivery', 'total' => 'Invoice total', 'received' => 'Received with invoice'] as $field => $label)
{{ $label }}
BDT {{ number_format($invoice->{$field} / 100, 2) }}
@endforeach
Later collections
BDT {{ number_format(($invoice->paidAmount() - $invoice->received) / 100, 2) }}
Invoice due
BDT {{ number_format(($invoice->total - $invoice->paidAmount()) / 100, 2) }}
@endsection