Merge branch 'ujrah_master' of https://bitbucket.org/arrahn-pkb/api_arrahn into finadev
This commit is contained in:
@@ -82,11 +82,12 @@ class TebusController extends Controller
|
|||||||
|
|
||||||
$harga_tebus = $gadai_data['bakihargajualan'] - $rebet;
|
$harga_tebus = $gadai_data['bakihargajualan'] - $rebet;
|
||||||
|
|
||||||
$hargatebus = bcdiv(round($harga_tebus,2),1,1);
|
$hargatebus = round($harga_tebus,PHP_ROUND_HALF_UP);
|
||||||
$hargatebus = number_format($hargatebus,2);
|
// $hargatebus = bcdiv(round($harga_tebus,2),1,1);
|
||||||
if(strpos($hargatebus,',')){
|
// $hargatebus = number_format($hargatebus,2);
|
||||||
$hargatebus = str_replace(',','',$hargatebus);
|
// if(strpos($hargatebus,',')){
|
||||||
}
|
// $hargatebus = str_replace(',','',$hargatebus);
|
||||||
|
// }
|
||||||
|
|
||||||
return $hargatebus;
|
return $hargatebus;
|
||||||
}
|
}
|
||||||
@@ -2398,25 +2399,26 @@ class TebusController extends Controller
|
|||||||
$array_upah = $onepercentservices->kiraanKeuntunganSebenar($gadai_data['pinjaman'],$gadai_data['nilaimarhun'],$gadai_data['kadarupah'],$gadai_data['percentpinj']);
|
$array_upah = $onepercentservices->kiraanKeuntunganSebenar($gadai_data['pinjaman'],$gadai_data['nilaimarhun'],$gadai_data['kadarupah'],$gadai_data['percentpinj']);
|
||||||
$ujrah = $bilang_bln * $array_upah['ujrah'];
|
$ujrah = $bilang_bln * $array_upah['ujrah'];
|
||||||
$onepercent = $bilang_bln * $array_upah['onepercent'];
|
$onepercent = $bilang_bln * $array_upah['onepercent'];
|
||||||
|
$onepercent_semasa = $onepercent;
|
||||||
|
$ujrah_semasa = $ujrah;
|
||||||
|
|
||||||
|
// $ujrah_semasa_round = number_format($ujrah,2);
|
||||||
|
// if(strpos($ujrah_semasa_round,',')){
|
||||||
|
// $ujrah_semasa_round = str_replace(',','',$ujrah_semasa_round);
|
||||||
|
// }
|
||||||
|
// $ujrah_semasa = substr($ujrah_semasa_round, 0, -1);
|
||||||
|
// if(strpos($ujrah_semasa,',')){
|
||||||
|
// $ujrah_semasa = str_replace(',','',$ujrah_semasa);
|
||||||
|
// }
|
||||||
|
|
||||||
$ujrah_semasa_round = number_format($ujrah,2);
|
// $onepercent_semasa_round = number_format($onepercent,2);
|
||||||
if(strpos($ujrah_semasa_round,',')){
|
// if(strpos($onepercent_semasa_round,',')){
|
||||||
$ujrah_semasa_round = str_replace(',','',$ujrah_semasa_round);
|
// $onepercent_semasa_round = str_replace(',','',$onepercent_semasa_round);
|
||||||
}
|
// }
|
||||||
$ujrah_semasa = substr($ujrah_semasa_round, 0, -1);
|
// $onepercent_semasa = substr($onepercent_semasa_round, 0, -1);
|
||||||
if(strpos($ujrah_semasa,',')){
|
// if(strpos($onepercent_semasa,',')){
|
||||||
$ujrah_semasa = str_replace(',','',$ujrah_semasa);
|
// $onepercent_semasa = str_replace(',','',$onepercent_semasa);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$onepercent_semasa_round = number_format($onepercent,2);
|
|
||||||
if(strpos($onepercent_semasa_round,',')){
|
|
||||||
$onepercent_semasa_round = str_replace(',','',$onepercent_semasa_round);
|
|
||||||
}
|
|
||||||
$onepercent_semasa = substr($onepercent_semasa_round, 0, -1);
|
|
||||||
if(strpos($onepercent_semasa,',')){
|
|
||||||
$onepercent_semasa = str_replace(',','',$onepercent_semasa);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ['ujrah' => $ujrah_semasa, 'onepercent' => $onepercent_semasa];
|
return ['ujrah' => $ujrah_semasa, 'onepercent' => $onepercent_semasa];
|
||||||
}
|
}
|
||||||
@@ -2443,7 +2445,8 @@ class TebusController extends Controller
|
|||||||
$ujrah = $bilang_bln * $array_upah['ujrah'];
|
$ujrah = $bilang_bln * $array_upah['ujrah'];
|
||||||
$onepercent = $bilang_bln * $array_upah['onepercent'];
|
$onepercent = $bilang_bln * $array_upah['onepercent'];
|
||||||
|
|
||||||
$ujrah_semasa = round($ujrah,PHP_ROUND_HALF_UP);
|
$ujrah_semasa = $ujrah;
|
||||||
|
// $ujrah_semasa = round($ujrah,PHP_ROUND_HALF_UP);
|
||||||
// $ujrah_semasa_round = number_format($ujrah,2);
|
// $ujrah_semasa_round = number_format($ujrah,2);
|
||||||
// if(strpos($ujrah_semasa_round,',')){
|
// if(strpos($ujrah_semasa_round,',')){
|
||||||
// $ujrah_semasa_round = str_replace(',','',$ujrah_semasa_round);
|
// $ujrah_semasa_round = str_replace(',','',$ujrah_semasa_round);
|
||||||
@@ -2453,7 +2456,8 @@ class TebusController extends Controller
|
|||||||
// $ujrah_semasa = str_replace(',','',$ujrah_semasa);
|
// $ujrah_semasa = str_replace(',','',$ujrah_semasa);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$onepercent_semasa = round($onepercent,PHP_ROUND_HALF_UP);
|
$onepercent_semasa = $onepercent;
|
||||||
|
// $onepercent_semasa = round($onepercent,PHP_ROUND_HALF_UP);
|
||||||
// $onepercent_semasa_round = number_format($onepercent,2);
|
// $onepercent_semasa_round = number_format($onepercent,2);
|
||||||
// if(strpos($onepercent_semasa_round,',')){
|
// if(strpos($onepercent_semasa_round,',')){
|
||||||
// $onepercent_semasa_round = str_replace(',','',$onepercent_semasa_round);
|
// $onepercent_semasa_round = str_replace(',','',$onepercent_semasa_round);
|
||||||
|
|||||||
Reference in New Issue
Block a user