added denominasi

This commit is contained in:
hafifierahman
2024-11-04 01:19:10 +08:00
parent 3a7259a64c
commit 9443075afd
3 changed files with 12 additions and 3 deletions
@@ -19,6 +19,14 @@ class DenominasiController extends Controller
return response()->json($response); return response()->json($response);
} }
public function test2($kodcaw,Request $request){
$teller = new TellerServices($kodcaw);
$response = $teller->CashWithdrawals($request);
return response()->json($response);
}
public function listdenominasi($kodcaw) public function listdenominasi($kodcaw)
{ {
$current = Carbon::now(); $current = Carbon::now();
+3 -3
View File
@@ -328,8 +328,8 @@ class TellerServices
'tarikh' => $current->toDateString(), 'tarikh' => $current->toDateString(),
'kodcaw'=> $this->cawangan, 'kodcaw'=> $this->cawangan,
'kodlaluan'=>$request->teller, 'kodlaluan'=>$request->teller,
'tambah'=>$request->amt, 'tambah'=>0,
'kurang'=> 0, 'kurang'=> $request->amt,
'nota'=>$request->nota, 'nota'=>$request->nota,
'created_at'=>$current 'created_at'=>$current
]); ]);
@@ -347,7 +347,7 @@ class TellerServices
} }
$total_teller_deposit = $tunai['kurang'] + $request->amt; $total_teller_deposit = $tunai['kurang'] + $request->amt;
$remaining_teller_cashflow = $tunai['baki'] + $request->amt; $remaining_teller_cashflow = $tunai['baki'] - $request->amt;
Tunai::on($cawangan['mysql'])->where( [['tarikh','=', $current->toDateString()],['kodlaluan','=', $request->teller] ])-> Tunai::on($cawangan['mysql'])->where( [['tarikh','=', $current->toDateString()],['kodlaluan','=', $request->teller] ])->
update(array( update(array(
+1
View File
@@ -648,6 +648,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
$router->get('/cawangan/bycawnotisperingatan/{kodcaw}/{notisid}',['uses'=>'CawanganCallCenterController@bycawnotisperingatan']); $router->get('/cawangan/bycawnotisperingatan/{kodcaw}/{notisid}',['uses'=>'CawanganCallCenterController@bycawnotisperingatan']);
$router->post('test/updatetunai/{kodcaw}',['uses'=>'DenominasiController@test']); $router->post('test/updatetunai/{kodcaw}',['uses'=>'DenominasiController@test']);
$router->post('test/serahantunai/{kodcaw}',['uses'=>'DenominasiController@test2']);
}); });