@extends('layouts.cashier') @section('content')

Sale Details - {{ $sale->sale_code }}

Date: {{ $sale->created_at->format('M d, Y h:i A') }}
Cashier: @if($sale->cashier_id) {{ $sale->cashier->name }} @elseif($sale->admin_id) {{ $sale->admin->name }} @else System @endif
Status: {{ $sale->status }}
@if($sale->customer)

Customer Information

Name: {{ $sale->customer->name }}
@if($sale->customer->phone)
Phone: {{ $sale->customer->phone }}
@endif @if($sale->customer->email)
Email: {{ $sale->customer->email }}
@endif @if($sale->customer->loyalty_points)
Loyalty Points: {{ number_format($sale->customer->loyalty_points) }}
@endif
@endif

Items Sold

@foreach($sale->items as $item) @endforeach
Product Type Quantity/Weight Unit Price Total
{{ $item->product->product_name }} {{ $item->product->product_type }} @if($item->product->product_type === 'Loose Weight' && $item->weight) {{ number_format($item->weight, 2) }} kg @else {{ $item->quantity }} @endif Rs.{{ number_format($item->unit_price, 2) }} Rs.{{ number_format($item->total_price, 2) }}
Subtotal: Rs.{{ number_format($sale->subtotal, 2) }}
@if($sale->discount > 0)
Discount: -Rs.{{ number_format($sale->discount, 2) }}
@endif @if($sale->tax > 0)
Tax: Rs.{{ number_format($sale->tax, 2) }}
@endif
Total: Rs.{{ number_format($sale->total, 2) }}
Payment Method: {{ $sale->payment_method }}
Payment Status: {{ $sale->payment_status }}
@if($sale->notes)

Notes

{{ $sale->notes }}

@endif
@endsection