@extends('layouts.app') @section('title', 'Sales') @section('content')
Manage all sales records
| # | Sale No | Customer | Sale Date | Invoice No | Grand Total | Payment Status | {{-- Action --}}Action |
|---|---|---|---|---|---|---|---|
| {{ $sales->firstItem() + $loop->index }} | {{-- ================================================= --}} {{-- Sale Number --}} {{-- ================================================= --}}{{ $sale->sale_no }} | {{-- ================================================= --}} {{-- Customer --}} {{-- ================================================= --}}
@if($sale->customer_name)
{{ $sale->customer_name }}
@else
Walk-in Customer
@endif
@if($sale->customer_phone)
{{ $sale->customer_phone }}
@endif
|
{{-- ================================================= --}}
{{-- Sale Date --}}
{{-- ================================================= --}}
{{ $sale->sale_date ? \Carbon\Carbon::parse($sale->sale_date)->format('d-m-Y') : '-' }} | {{-- ================================================= --}} {{-- Invoice Number --}} {{-- ================================================= --}}{{ $sale->invoice_no ?? '-' }} | {{-- ================================================= --}} {{-- Grand Total --}} {{-- ================================================= --}}₹{{ number_format((float) $sale->grand_total, 2) }} | {{-- ================================================= --}} {{-- Payment Status --}} {{-- ================================================= --}}@if($sale->payment_status === 'Paid') Paid @elseif($sale->payment_status === 'Partial') Partial @else Unpaid @endif | {{-- ================================================= --}} {{-- ACTIONS --}} {{-- ================================================= --}}
{{-- ----------------------------------------- --}}
{{-- View - Owner + Staff --}}
{{-- ----------------------------------------- --}}
View
{{-- ----------------------------------------- --}}
{{-- Edit - Owner + Staff --}}
{{-- ----------------------------------------- --}}
Edit
{{-- ----------------------------------------- --}}
{{-- Delete - Owner Only --}}
{{-- ----------------------------------------- --}}
@if(auth()->user()->role === 'owner')
@endif
|