@push('title') Sale Details - {{ $sale->invoice_no }} @endpush
Sale Details: {{ $sale->invoice_no }}
Back Print Receipt
@if($sale->sale_status == \App\Models\Sale::SALE_STATUS_RETURNED)
@endif
Product Items
Total Items: {{ $sale->items->count() }}
@foreach($sale->items as $item) @endforeach
Product / Barcode Batch Type Cost (LKR) Price (LKR) Qty Disc (LKR) Total (LKR) Profit (LKR)
{{ $item->product->name }}
{{ $item->variation->barcode ?? $item->product->code }}
@if($item->variation) Variation: {{ $item->variation->variationType->name ?? 'Default' }} @endif
{{ $item->batch->batch_no ?? 'N/A' }} @if($item->sale_type == 'wholesale') Wholesale @else Retail @endif {{ number_format($item->unit_cost_price, 2) }} @if(!$item->product->isSingle())
Cost : {{ $item->sale_type == 'wholesale' ? number_format($item->variation->price_wholesale, 2) : number_format($item->variation->price_retail ?? 0, 2) }}
@else
Cost : {{ $item->sale_type == 'wholesale' ? number_format($item->product->singleVariation->price_wholesale, 2) : number_format($item->product->singleVariation->price_retail ?? 0, 2) }}
@endif
Billed : {{ number_format($item->net_unit_price, 2) }}
{{ number_format($item->qty, 0) }} {{ number_format($item->discount_amount, 2) }} {{ number_format($item->total, 2) }} {{ number_format($item->profit, 2) }}
Sale Notes:

{{ $sale->notes ?? 'No notes available.' }}

Payment History
@forelse($sale->payments as $payment) @empty @endforelse
Date Method Note / Ref Recorded By Amount
{{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }} {{ $payment->payment_method ?? 'Cash' }} {{ $payment->note ?? '-' }} {{ $payment->creator->name ?? 'System' }} LKR {{ number_format($payment->amount, 2) }}
No payments recorded yet.
Transaction Summary
Sub Total {{ number_format($sale->sub_total, 2) }}
Tax / Discount {{ number_format($sale->order_tax - $sale->order_discount, 2) }}{{ $sale->order_discount_type == 'percent' ? ' %' : ' LKR' }}
Grand Total
LKR {{ number_format($sale->grand_total, 2) }}
@if($sale->redeemed_points > 0)
Points Discount - LKR {{ number_format($sale->redeemed_points * ($setting->loyalty_point_value ?? 0), 2) }}
@endif @if($sale->wallet_amount_used > 0)
Wallet Payment - LKR {{ number_format($sale->wallet_amount_used, 2) }}
@endif
Bill Total
LKR {{ number_format($sale->grand_total, 2) }}
Net Profit
LKR {{ number_format($sale->net_profit, 2) }}
Cash Given LKR {{ number_format($sale->cash_given, 2) }}
Paid (Cash + Wallet) LKR {{ number_format($sale->paid_amount, 2) }}
Change Balance LKR {{ number_format($sale->balance, 2) }}
Remaining Due LKR {{ number_format($sale->due_amount, 2) }}
Status & Information
@if($sale->payment_status == 2) Full Paid @elseif($sale->payment_status == 1)
Partial @can('update_sale_management') @endcan
@else
Unpaid @can('update_sale_management') @endcan
@endif
{{ $sale->payment_type == 1 ? 'Cash Payment' : 'Credit Account' }}
{{ $sale->warehouse->name }}
{{ $sale->creator->name ?? 'N/A' }}
{{ $sale->created_at->format('M d, Y h:i A') }}
@if($settings->enable_loyalty_points) @if($sale->earned_points > 0 || $sale->redeemed_points > 0 || $sale->wallet_amount_added > 0 || $sale->wallet_amount_used > 0)
Loyalty & Rewards
@if($sale->earned_points > 0)
Points Earned +{{ $sale->earned_points }} Pts
@endif @if($sale->wallet_amount_added > 0)
Added to Wallet + LKR {{ number_format($sale->wallet_amount_added, 2) }}
@endif @if($sale->redeemed_points > 0)
Points Redeemed - {{ $sale->redeemed_points }} Pts
@endif @if($sale->wallet_amount_used > 0)
Wallet Paid - LKR {{ number_format($sale->wallet_amount_used, 2) }}
@endif
@endif @endif
Customer Details
@if($sale->customer)
{{ $sale->customer->name }}
Tel: {{ $sale->customer->phone }}
Addr: {{ Str::limit($sale->customer->address, 50) }}
@else
Walk-in Customer
@endif