payout codes display
This commit is contained in:
@@ -24,6 +24,27 @@ class SRPController extends Controller
|
||||
$this->middleware('role:User');
|
||||
}
|
||||
|
||||
public function displayPayoutAmounts() {
|
||||
$shipTypes = array();
|
||||
$payoutCodes = array();
|
||||
$payouts = array();
|
||||
|
||||
$shipTypesTemp = SrpShipType::all();
|
||||
$payoutCodesTemp = SrpPayout::all();
|
||||
|
||||
foreach($shipTypesTemp as $type) {
|
||||
$temp = [
|
||||
'code' => $type->code,
|
||||
'description' => $type->description,
|
||||
'payout' => $payoutCodesTemp[$type->code],
|
||||
];
|
||||
|
||||
array_push($payouts, $temp);
|
||||
}
|
||||
|
||||
return view('srp.payouts')->with('payouts', $payouts);
|
||||
}
|
||||
|
||||
public function displaySrpForm() {
|
||||
$shipTypes = array();
|
||||
$fleetTypes = array();
|
||||
|
||||
30
resources/views/srp/payouts.blade.php
Normal file
30
resources/views/srp/payouts.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@extends('layouts.b4')
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>SRP Payout</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cost Code</th>
|
||||
<th>Description</th>
|
||||
<th>Payout %</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payouts as $payout)
|
||||
<tr>
|
||||
<td>{{ $payout['code'] }}</td>
|
||||
<td>{{ $payout['description'] }}</td>
|
||||
<td>{{ $payout['payout'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user