@extends('backend.layout.main')
@section('content')
@if ($errors->has('title'))
{{ $errors->first('title') }}
@endif
@if (session()->has('message'))
{{ session()->get('message') }}
@endif
@if (session()->has('not_permitted'))
{{ session()->get('not_permitted') }}
@endif
Sales Table (Daily Sale)
| Date |
Reference Number |
Cashier |
Customer |
Grand Total |
@foreach($paymentOptions as $option)
{{ $option->name }} |
@endforeach
Due Amount |
@php
$tot_grand = 0;
$tot_due = 0;
// Initialize dynamic option totals
$option_totals = [];
foreach ($paymentOptions as $opt) {
$option_totals[$opt->id] = 0;
}
@endphp
@foreach ($sales_data as $sale)
| {{ $sale->date }} |
{{ $sale->reference_no }} |
{{ $sale->cashier }} |
{{ $sale->customer }} |
{{ number_format($sale->grand_total, 2) }} |
@foreach($paymentOptions as $option)
{{ number_format($sale->methods[$option->id] ?? 0, 2) }} |
@endforeach
{{ number_format($sale->due_amount, 2) }} |
@php
$tot_grand += $sale->grand_total;
$tot_due += $sale->due_amount;
// Accumulate dynamic option totals
foreach ($paymentOptions as $opt) {
$option_totals[$opt->id] += ($sale->methods[$opt->id] ?? 0);
}
@endphp
@endforeach
| Total |
{{ number_format($tot_grand, 2) }} |
@foreach($paymentOptions as $option)
{{ number_format($option_totals[$option->id], 2) }} |
@endforeach
{{ number_format($tot_due, 2) }} |
Credit Sale Collections
| Original Bill Date |
Reference Number |
Cashier |
Customer |
Grand Total |
Cash |
Card 1 |
Card 2 |
Card 3 |
Online Transfer |
Link Pay |
{{-- @foreach ($credit_data as $credit) --}}
{{-- @endforeach --}}
| Total |
0.00 |
0.00 |
0.00 |
0.00 |
0.00 |
0.00 |
0.00 |
Payment Method Summary
| Payment Option |
Sale Amount |
Received Amount |
Total Amount |
| Cash |
0.00 |
0.00 |
0.00 |
| Card 1 |
0.00 |
0.00 |
0.00 |
| Card 2 |
0.00 |
0.00 |
0.00 |
| Card 3 |
0.00 |
0.00 |
0.00 |
| Online Transfer |
0.00 |
0.00 |
0.00 |
| Link Pay |
0.00 |
0.00 |
0.00 |
| Grand Total |
0.00 |
0.00 |
0.00 |
@endsection
@push('scripts')
@endpush