advansur
This commit is contained in:
@@ -61,15 +61,13 @@ class TunaiController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function UpdateTunai($kodcaw, $kodlaluan, Request $request)
|
||||
public function UpdateTunai($kodcaw, 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] ])->
|
||||
$updatetunai=Tunai::on($cawangan['mysql'])->where( [['tarikh','=', $current->toDateString()],['kodlaluan','=', $request->kodlaluan] ])->
|
||||
update(array(
|
||||
'tambah'=>$request->tambah,
|
||||
'kurang'=>$request->kurang,
|
||||
@@ -77,18 +75,16 @@ class TunaiController extends Controller
|
||||
));
|
||||
|
||||
return response()->json($updatetunai, 200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function UpdateTunaiGadaianTebus($kodcaw, $kodlaluan, Request $request)
|
||||
public function UpdateTunaiGadaianTebus($kodcaw, 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] ])->
|
||||
$updatetunai=Tunai::on($cawangan['mysql'])->where( [['tarikh','=', $current->toDateString()],['kodlaluan','=', $request->kodlaluan] ])->
|
||||
update(array(
|
||||
'keluar'=>$request->keluar,
|
||||
'masuk'=>$request->masuk,
|
||||
|
||||
Reference in New Issue
Block a user