From d849bd41ff1ef8177e166ae2a3905a6976081f96 Mon Sep 17 00:00:00 2001 From: Nethma-Yasith Date: Fri, 3 Jul 2026 15:57:30 +0530 Subject: [PATCH] Update index.blade.php Print Button --- Resources/views/index.blade.php | 540 ++++++++++++++++---------------- 1 file changed, 270 insertions(+), 270 deletions(-) diff --git a/Resources/views/index.blade.php b/Resources/views/index.blade.php index 7c4fc76..e180289 100644 --- a/Resources/views/index.blade.php +++ b/Resources/views/index.blade.php @@ -1,299 +1,299 @@ @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 + @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 -
-
-
- -
-

Daily Sale Payment Report

-
+
+
+
+ +
+

Daily Sale Payment Report

+
-
-
-
- -
- + +
+
+ +
+ +
+
+
+
-
- -
-
- -
-
- -
- -
-
- - - - +
- -

Sales Table (Daily Sale)

-
- - - - - - - - - @foreach($paymentOptions as $option) - +
+ +
+
+ + + + +
+
+ + +

Sales Table (Daily Sale)

+
+
DateReference NumberCashierCustomerGrand Total{{ $option->name }}
+ + + + + + + + @foreach($paymentOptions as $option) + + @endforeach + + + + + @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) + + + + + + + + @foreach($paymentOptions as $option) + + @endforeach + + + + + @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 - - - - - @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) - - - - - - + @foreach($paymentOptions as $option) + + @endforeach - @foreach($paymentOptions as $option) - - @endforeach - - - - - @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 - - - - - - - @foreach($paymentOptions as $option) - - @endforeach - - - - -
DateReference NumberCashierCustomerGrand Total{{ $option->name }}Due Amount
{{ $sale->date }}{{ $sale->reference_no }}{{ $sale->cashier }}{{ $sale->customer }}{{ number_format($sale->grand_total, 2) }}{{ number_format($sale->methods[$option->id] ?? 0, 2) }}{{ number_format($sale->due_amount, 2) }}
Due Amount
Total{{ number_format($tot_grand, 2) }}
{{ $sale->date }}{{ $sale->reference_no }}{{ $sale->cashier }}{{ $sale->customer }}{{ number_format($sale->grand_total, 2) }}{{ number_format($option_totals[$option->id], 2) }}{{ number_format($sale->methods[$option->id] ?? 0, 2) }}{{ number_format($sale->due_amount, 2) }}
Total{{ number_format($tot_grand, 2) }}{{ number_format($option_totals[$option->id], 2) }}{{ number_format($tot_due, 2) }}
+ {{ number_format($tot_due, 2) }} + + + +
-
-
- -

Credit Sale Collections

-
- - - - - - - - - @foreach ($paymentOptions as $option) - +
+ +

Credit Sale Collections

+
+
Original Bill DateReference NumberCashierCustomerGrand Total{{ $option->name }}
+ + + + + + + + @foreach ($paymentOptions as $option) + + @endforeach + + + + @foreach ($creditCollections as $row) + + + + + + + @foreach ($paymentOptions as $option) + + @endforeach + @endforeach - - - - @foreach ($creditCollections as $row) - - - - - - - @foreach ($paymentOptions as $option) - - @endforeach - - @endforeach - - - - - - @foreach ($paymentOptions as $option) - - @endforeach - - -
Original Bill DateReference NumberCashierCustomerGrand Total{{ $option->name }}
{{ \Carbon\Carbon::parse($row['date'])->format('Y-m-d') }}{{ $row['reference'] }}{{ $row['cashier'] }}{{ $row['customer'] }}{{ number_format($row['grand_total'], 2) }}{{ number_format($row['methods'][$option->id] ?? 0, 2) }}
{{ \Carbon\Carbon::parse($row['date'])->format('Y-m-d') }}{{ $row['reference'] }}{{ $row['cashier'] }}{{ $row['customer'] }}{{ number_format($row['grand_total'], 2) }}{{ number_format($row['methods'][$option->id] ?? 0, 2) }}
Total0.000.00
+ + + + Total + 0.00 + @foreach ($paymentOptions as $option) + 0.00 + @endforeach + + + +
-
-
- -

Payment Method Summary

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Payment OptionSale AmountReceived AmountTotal Amount
Cash0.000.000.00
Card 10.000.000.00
Card 20.000.000.00
Card 30.000.000.00
Online Transfer0.000.000.00
Link Pay0.000.000.00
Grand Total0.000.000.00
+
+ +

Payment Method Summary

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Payment OptionSale AmountReceived AmountTotal Amount
Cash0.000.000.00
Card 10.000.000.00
Card 20.000.000.00
Card 30.000.000.00
Online Transfer0.000.000.00
Link Pay0.000.000.00
Grand Total0.000.000.00
+
-
-
+
- + table { + border-collapse: collapse !important; + } + @endsection @push('scripts') - + @endpush \ No newline at end of file