From 7fba0099782a7f246583a0041a95d8c0598e9b97 Mon Sep 17 00:00:00 2001 From: SUM2046 Date: Fri, 3 Jul 2026 12:37:30 +0530 Subject: [PATCH] to view --- Entities/PaymentOption.php | 27 + ...DailySalePaymentReportModuleController.php | 9 +- Resources/views/index.blade.php | 480 +++++++++--------- 3 files changed, 272 insertions(+), 244 deletions(-) create mode 100644 Entities/PaymentOption.php diff --git a/Entities/PaymentOption.php b/Entities/PaymentOption.php new file mode 100644 index 0000000..b0352df --- /dev/null +++ b/Entities/PaymentOption.php @@ -0,0 +1,27 @@ +orderBy('id') + ->get(['id', 'name']); + + return view('dailysalepaymentreportmodule::index', [ + 'paymentOptions' => $paymentOptions, + ]); } /** diff --git a/Resources/views/index.blade.php b/Resources/views/index.blade.php index 8cbf819..fdf98b2 100644 --- a/Resources/views/index.blade.php +++ b/Resources/views/index.blade.php @@ -1,268 +1,262 @@ @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 ($sales_data as $sale) --}} - - {{-- @endforeach --}} - - - - - - - - - - - - - - -
DateReference NumberCashierCustomerGrand TotalCashCard 1Card 2Card 3Online TransferLink PayDue Amount
Total0.000.000.000.000.000.000.000.00
+
+ +
+
+ + + +
-
- -

Credit Sale Collections

-
- - - - - - - - - - - - - - - - - - {{-- @foreach ($credit_data as $credit) --}} - - {{-- @endforeach --}} - - - - - - - - - - - - - -
Original Bill DateReference NumberCashierCustomerGrand TotalCashCard 1Card 2Card 3Online TransferLink Pay
Total0.000.000.000.000.000.000.00
-
+ +

Sales Table (Daily Sale)

+
+ + + + + + + + + + + + + + + + + + + {{-- @foreach ($sales_data as $sale) --}} + + {{-- @endforeach --}} + + + + + + + + + + + + + + +
DateReference NumberCashierCustomerGrand TotalCashCard 1Card 2Card 3Online TransferLink PayDue Amount
Total0.000.000.000.000.000.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
-
+
+ +

Credit Sale Collections

+
+ + + + + + + + + @foreach ($paymentOptions as $option) + + @endforeach + + + + + + + + + + + @foreach ($paymentOptions as $option) + + @endforeach + + + +
Original Bill DateReference NumberCashierCustomerGrand Total{{ $option->name }}Due Amount
Total0.000.000.00
-
+
- + .btn-primary:hover { + background-color: #0068e3; + } + + table { + border-collapse: collapse !important; + } + @endsection @push('scripts') - + }); + + // මුළු රිපෝට් එකම එක්ස්පෝර්ට් කරන්න හදපු Function එක + function exportFullReport(exportType) { + var selectedDate = $('#report_date').val(); + + // ඔයාගේ Controller එකේ export route එකට මේක හරවන්න ඕනේ. + // උදාහරණයක් විදිහට: url('/dailysalepaymentreportmodule/export') + var exportUrl = "{{ url('/dailysalepaymentreportmodule/export') }}" + "?date=" + selectedDate + "&type=" + exportType; + + window.location.href = exportUrl; + } + @endpush \ No newline at end of file