production

This commit is contained in:
e.arrahn
2021-05-07 16:59:48 +08:00
parent 1921006635
commit 9601a2c500
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -2337,6 +2337,7 @@ class GadaiController extends Controller
public function updateJBGsemasa(){
$cawangan = Cawangan::on('mysql7')->get();
$current = Carbon::now();
foreach($cawangan as $cawangan_mysql){
$all_gadai = Gadai::on($cawangan_mysql['mysql'])->whereNotIn('sttebus',['L','T'])->get();
foreach($all_gadai as $gadai){
@@ -2345,7 +2346,7 @@ class GadaiController extends Controller
}else{
$tarikh_update = Carbon::parse($gadai['t_update'].' 00:00:00' );
}
$tarikh_gadai = Carbon::parse($gadai['t_gadai'].' '. $gadai['masa']);
$tarikh_gadai = Carbon::parse($gadai['t_gadai']. ' 00:00:00');
$diff_gadai = date_diff($tarikh_gadai,$current);
$year_gadai = $diff_gadai->format("%y") * 12;
@@ -2381,4 +2382,4 @@ class GadaiController extends Controller
}
return response()->json('successful',200);
}
}
}