@@ -1101,7 +1101,7 @@ class LelongController extends Controller
|
||||
$lelong_to_be_inserted->hargaasas = $index['hargaasas'];
|
||||
$lelong_to_be_inserted->hargajual = $index['hargajual'];
|
||||
$lelong_to_be_inserted->glcode = "1000/010";
|
||||
$lelong_to_be_inserted->t_jual = $index['t_lelong'];
|
||||
$lelong_to_be_inserted->t_jual = $index['t_jual'];
|
||||
$lelong_to_be_inserted->nopembeli = $no_pembeli_data;
|
||||
$lelong_to_be_inserted->jbg = $index['jbg'];
|
||||
$lelong_to_be_inserted->kadarupah = $index['kadarupah'];
|
||||
@@ -1668,10 +1668,38 @@ class LelongController extends Controller
|
||||
// }
|
||||
|
||||
public function kiraupahUjrahOnePercentRebate($kodcaw,$norujukan){
|
||||
$master = new MasterServices($kodcaw);
|
||||
$response = $master->kiraupahUjrahOnePercentRebate($kodcaw,$norujukan);
|
||||
// $master = new MasterServices($kodcaw);
|
||||
// $response = $master->kiraupahUjrahOnePercentRebate($kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
// return $response;
|
||||
$cawangan = Cawangan::on('mysql7')
|
||||
->where('kodcaw','=',$kodcaw)
|
||||
->first();
|
||||
|
||||
$onepercentservices = new Calculation();
|
||||
|
||||
// $cawangan = $kodcaw;
|
||||
|
||||
$gadai_data = Gadai::on($cawangan['mysql'])
|
||||
->where('norujukan','=',$norujukan)
|
||||
->first();
|
||||
|
||||
if($gadai_data['tempoh'] >= 12.0){
|
||||
$tempoh = 12;
|
||||
}else{
|
||||
$tempoh = $gadai_data['tempoh'];
|
||||
}
|
||||
|
||||
$bilang_bln = $tempoh - $gadai_data['tempohbayar'];
|
||||
$array_upah = $onepercentservices->kiraanKeuntunganRebet($gadai_data['bakipjm'],$gadai_data['nilaimarhun'],$gadai_data['kadarupah'],$gadai_data['margin_semasa']);
|
||||
// $ujrah_rounded = $onepercentservices->getRoundedMethod($array_upah['ujrah']);
|
||||
// $keuntungan_rounded = $onepercentservices->getRoundedMethod($array_upah['onepercent']);
|
||||
$ujrah = $bilang_bln * $array_upah['ujrah'];
|
||||
$onepercent = $bilang_bln * $array_upah['onepercent'];
|
||||
$ujrah = $onepercentservices->getRoundedMethod($ujrah);
|
||||
$onepercent = $onepercentservices->getRoundedMethod($onepercent);
|
||||
|
||||
return ['ujrah' => $ujrah, 'onepercent' => $onepercent];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user