masuk aging

This commit is contained in:
hafifierahman
2021-01-31 08:33:26 +08:00
parent aaf1679c6c
commit 428a41dae1
4 changed files with 56 additions and 3 deletions
+19
View File
@@ -81,6 +81,25 @@ class TunaiController extends Controller
}
public function UpdateTunaiGadaianTebus($kodcaw, $kodlaluan, Request $request)
{
$current = Carbon::now();
$current = new Carbon();
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$updatetunai=Tunai::on($cawangan['mysql'])->where( [['tarikh','=', $current->toDateString()],['kodlaluan','=', $kodlaluan] ])->
update(array(
'keluar'=>$request->keluar,
'masuk'=>$request->masuk,
'baki'=>$request->bakiakhir
));
return response()->json($updatetunai, 200);
}