to view
This commit is contained in:
27
Entities/PaymentOption.php
Normal file
27
Entities/PaymentOption.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\DailySalePaymentReportModule\Entities;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
|
||||||
|
class PaymentOption extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'account_id',
|
||||||
|
'is_active',
|
||||||
|
'percentage',
|
||||||
|
'type',
|
||||||
|
'status',
|
||||||
|
'approved_by',
|
||||||
|
'approved_at'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected static function newFactory()
|
||||||
|
{
|
||||||
|
return \Modules\DailySalePaymentReportModule\Database\factories\PaymentOptionFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ namespace Modules\DailySalePaymentReportModule\Http\Controllers;
|
|||||||
use Illuminate\Contracts\Support\Renderable;
|
use Illuminate\Contracts\Support\Renderable;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Routing\Controller;
|
use Illuminate\Routing\Controller;
|
||||||
|
use Modules\DailySalePaymentReportModule\Entities\PaymentOption;
|
||||||
|
|
||||||
class DailySalePaymentReportModuleController extends Controller
|
class DailySalePaymentReportModuleController extends Controller
|
||||||
{
|
{
|
||||||
@@ -14,7 +15,13 @@ class DailySalePaymentReportModuleController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return view('dailysalepaymentreportmodule::index');
|
$paymentOptions = PaymentOption::where('is_active', 1)
|
||||||
|
->orderBy('id')
|
||||||
|
->get(['id', 'name']);
|
||||||
|
|
||||||
|
return view('dailysalepaymentreportmodule::index', [
|
||||||
|
'paymentOptions' => $paymentOptions,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
@extends('backend.layout.main')
|
@extends('backend.layout.main')
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
@if ($errors->has('title'))
|
@if ($errors->has('title'))
|
||||||
<div class="alert alert-danger alert-dismissible text-center">
|
<div class="alert alert-danger alert-dismissible text-center">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
|
||||||
aria-hidden="true">×</span></button>{{ $errors->first('title') }}
|
aria-hidden="true">×</span></button>{{ $errors->first('title') }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if (session()->has('message'))
|
@if (session()->has('message'))
|
||||||
<div class="alert alert-success alert-dismissible text-center">
|
<div class="alert alert-success alert-dismissible text-center">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>{{ session()->get('message') }}
|
</button>{{ session()->get('message') }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if (session()->has('not_permitted'))
|
@if (session()->has('not_permitted'))
|
||||||
<div class="alert alert-danger alert-dismissible text-center">
|
<div class="alert alert-danger alert-dismissible text-center">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>{{ session()->get('not_permitted') }}
|
</button>{{ session()->get('not_permitted') }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div style="border-radius: 30px;" class="card pb-4 ">
|
<div style="border-radius: 30px;" class="card pb-4 ">
|
||||||
<link rel="stylesheet" href="{{ asset('public/css/cloudma.css') }}">
|
<link rel="stylesheet" href="{{ asset('public/css/cloudma.css') }}">
|
||||||
@@ -124,28 +124,22 @@
|
|||||||
<th>Cashier</th>
|
<th>Cashier</th>
|
||||||
<th>Customer</th>
|
<th>Customer</th>
|
||||||
<th>Grand Total</th>
|
<th>Grand Total</th>
|
||||||
<th>Cash</th>
|
@foreach ($paymentOptions as $option)
|
||||||
<th>Card 1</th>
|
<th>{{ $option->name }}</th>
|
||||||
<th>Card 2</th>
|
@endforeach
|
||||||
<th>Card 3</th>
|
<th>Due Amount</th>
|
||||||
<th>Online Transfer</th>
|
|
||||||
<th>Link Pay</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{-- @foreach ($credit_data as $credit) --}}
|
|
||||||
<!-- Data rows will come here -->
|
|
||||||
{{-- @endforeach --}}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot style="background-color: #cdd4da; font-weight: bold;">
|
<tfoot style="background-color: #cdd4da; font-weight: bold;">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" class="text-right">Total</td>
|
<td colspan="4" class="text-right">Total</td>
|
||||||
<td>0.00</td>
|
<td>0.00</td>
|
||||||
|
@foreach ($paymentOptions as $option)
|
||||||
<td>0.00</td>
|
<td>0.00</td>
|
||||||
<td>0.00</td>
|
@endforeach
|
||||||
<td>0.00</td>
|
|
||||||
<td>0.00</td>
|
|
||||||
<td>0.00</td>
|
|
||||||
<td>0.00</td>
|
<td>0.00</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
@@ -217,9 +211,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.bootstrap-select.form-control,
|
.bootstrap-select.form-control,
|
||||||
.form-control,
|
.form-control,
|
||||||
.input-group-text {
|
.input-group-text {
|
||||||
@@ -242,12 +236,12 @@
|
|||||||
table {
|
table {
|
||||||
border-collapse: collapse !important;
|
border-collapse: collapse !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$.ajaxSetup({
|
$.ajaxSetup({
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
@@ -264,5 +258,5 @@
|
|||||||
|
|
||||||
window.location.href = exportUrl;
|
window.location.href = exportUrl;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
Reference in New Issue
Block a user