fix ujrah

This commit is contained in:
Afiq Zakwan
2023-12-17 11:11:46 +08:00
parent 6ab25db913
commit 32b91e9e61
3 changed files with 16 additions and 5 deletions
@@ -360,7 +360,12 @@ class TransactionOnlineController extends Controller
if(sizeof($gadai) != 0){
foreach($gadai as $gad)
{
$result = (new TebusController)->kiraupahTawarruq($gad['kodcaw'],$gad['norujukan']);
if($gad['tagbaru'] == 1){
$jenis = 'onepercent';
}else{
$jenis = 'asal';
}
$result = (new TebusController)->kiraupahTawarruq($gad['kodcaw'],$gad['norujukan'],$jenis);
$gad['keuntungan'] = $result;
array_push($gadai_all,$gad);
+1 -1
View File
@@ -37,7 +37,7 @@ class OnePercent extends MasterServices
public function getUpahSebenar($norujukan){
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
$response = $gadai->kiraupahOnePercent($this->kodcaw,$norujukan);
$response = $gadai->kiraupahOnePercent($norujukan);
return $response;
}
+8 -2
View File
@@ -149,10 +149,16 @@ class Penebusan
$keuntungan_semasa = $onepercentservices->getRoundedMethod($bilang_bln * $upah['onepercent']);
$ujrah_semasa = $onepercentservices->getRoundedMethod($bilang_bln * $upah['ujrah']);
$upahsemasa_raw = $onepercentservices->getRoundedMethod($upahsemasa_raw);
$keuntungan_1bln = $onepercentservices->getRoundedMethod((1 * $upah['keuntungan'])+(1 * $upah['ujrah']));
$array_upah = ['pendapatan' => $upahsemasa_raw,
$array_upah =
[
'keuntungan_1bln' => $keuntungan_1bln,
'pendapatan' => $upahsemasa_raw,
'keuntungan' => $keuntungan_semasa,
'ujrah' => $ujrah_semasa];
'ujrah' => $ujrah_semasa
];
return $array_upah;
}