display cost code
This commit is contained in:
@@ -25,21 +25,27 @@ class SRPController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function displayPayoutAmounts() {
|
public function displayPayoutAmounts() {
|
||||||
$shipTypes = array();
|
|
||||||
$payoutCodes = array();
|
|
||||||
$payouts = array();
|
$payouts = array();
|
||||||
|
$count = 0;
|
||||||
|
$shipType = SrpShipType::all();
|
||||||
|
$srpPayout = SrpPayout::all();
|
||||||
|
|
||||||
|
foreach($shipType as $ship) {
|
||||||
|
//Don't process if the code is None
|
||||||
|
if($ship->code != 'None') {
|
||||||
|
$tempCode = $ship->code;
|
||||||
|
$tempDescription = $ship->description;
|
||||||
|
$temp = SrpPayout::where(['code' => $ship->code])->get();
|
||||||
|
$tempPayout = $temp->payout;
|
||||||
|
|
||||||
$shipTypesTemp = SrpShipType::all();
|
$block = [
|
||||||
$payoutCodesTemp = SrpPayout::all();
|
'code' => $tempCode,
|
||||||
|
'description' => $tempDescription,
|
||||||
|
'payout' => $tempPayout,
|
||||||
|
];
|
||||||
|
|
||||||
foreach($shipTypesTemp as $type) {
|
array_push($payouts, $block);
|
||||||
$temp = [
|
}
|
||||||
'code' => $type->code,
|
|
||||||
'description' => $type->description,
|
|
||||||
'payout' => $payoutCodesTemp[$type->code],
|
|
||||||
];
|
|
||||||
|
|
||||||
array_push($payouts, $temp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('srp.payouts')->with('payouts', $payouts);
|
return view('srp.payouts')->with('payouts', $payouts);
|
||||||
|
|||||||
Reference in New Issue
Block a user