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);