fix tebus separuh dan tambah pinjaman
This commit is contained in:
@@ -38,7 +38,13 @@ class TebusController extends Controller
|
||||
|
||||
$harga_tebus = $gadai_data['bakihargajualan'] - $rebet;
|
||||
|
||||
return response()->json($harga_tebus);
|
||||
$hargatebus = bcdiv(round($harga_tebus,2),1,1);
|
||||
$hargatebus = number_format($hargatebus,2);
|
||||
if(strpos($hargatebus,',')){
|
||||
$hargatebus = str_replace(',','',$hargatebus);
|
||||
}
|
||||
|
||||
return response()->json($hargatebus);
|
||||
}
|
||||
|
||||
public function kiraupahTawarruq($kodcaw,$norujukan){
|
||||
@@ -86,6 +92,13 @@ class TebusController extends Controller
|
||||
return response()->json(number_format($upah_semasa,2));
|
||||
}
|
||||
|
||||
public function upahRebetTawarruq($kodcaw,$norujukan){
|
||||
|
||||
$upah_rebet = $this->kiraUpahRebet($kodcaw,$norujukan);
|
||||
|
||||
return response()->json(number_format($upah_rebet,2));
|
||||
}
|
||||
|
||||
public function tebusSeparuhTawarruq($kodcaw,$norujukan,Request $request){
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')
|
||||
@@ -269,7 +282,8 @@ class TebusController extends Controller
|
||||
|
||||
$rebet_raw =$gadai_data['upah12'] - $transaction_keuntungan - $upah_rebet;
|
||||
|
||||
$rebet_round = number_format($rebet_raw,2);
|
||||
$rebet_round = bcdiv(round($rebet_raw,2),1,1);
|
||||
$rebet_round = number_format($rebet_round,2);
|
||||
|
||||
if(strpos($rebet_round,',')){
|
||||
$rebet_round = str_replace(',','',$rebet_round);
|
||||
|
||||
Reference in New Issue
Block a user