@extends('layouts.app') @section('title', 'Sales') @section('content')

Sales

Manage all sales records

+ New Sale
{{-- ========================================================= --}} {{-- SUCCESS MESSAGE --}} {{-- ========================================================= --}} @if(session('success')) @endif {{-- ========================================================= --}} {{-- INFO MESSAGE --}} {{-- ========================================================= --}} @if(session('info')) @endif {{-- ========================================================= --}} {{-- SALES TABLE --}} {{-- ========================================================= --}}
Sales Records
{{-- Action --}} @forelse($sales as $sale) {{-- ================================================= --}} {{-- Serial Number --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- Sale Number --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- Customer --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- Sale Date --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- Invoice Number --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- Grand Total --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- Payment Status --}} {{-- ================================================= --}} {{-- ================================================= --}} {{-- ACTIONS --}} {{-- ================================================= --}} @empty @endforelse
# Sale No Customer Sale Date Invoice No Grand Total Payment Status Action
{{ $sales->firstItem() + $loop->index }} {{ $sale->sale_no }} @if($sale->customer_name) {{ $sale->customer_name }} @else Walk-in Customer @endif @if($sale->customer_phone)
{{ $sale->customer_phone }}
@endif
{{ $sale->sale_date ? \Carbon\Carbon::parse($sale->sale_date)->format('d-m-Y') : '-' }} {{ $sale->invoice_no ?? '-' }} ₹{{ number_format((float) $sale->grand_total, 2) }} @if($sale->payment_status === 'Paid') Paid @elseif($sale->payment_status === 'Partial') Partial @else Unpaid @endif
{{-- ----------------------------------------- --}} {{-- View - Owner + Staff --}} {{-- ----------------------------------------- --}} View {{-- ----------------------------------------- --}} {{-- Edit - Owner + Staff --}} {{-- ----------------------------------------- --}} Edit {{-- ----------------------------------------- --}} {{-- Delete - Owner Only --}} {{-- ----------------------------------------- --}} @if(auth()->user()->role === 'owner')
@csrf @method('DELETE')
@endif
No Sales Found

You haven't added any sale yet.

Create Your First Sale
{{-- ================================================= --}} {{-- PAGINATION --}} {{-- ================================================= --}} @if($sales->hasPages())
{{ $sales->links() }}
@endif
@endsection