audit di kaunter
This commit is contained in:
@@ -192,20 +192,23 @@ class KhazanahController extends Controller
|
||||
return view('khazanah.menu',compact('cawangan_info','api_url','gadai','listserah','countmodal','countserahan'));
|
||||
}
|
||||
|
||||
public function pendahuluanserahandaftar()
|
||||
public function pendahuluanserahandaftar(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
$listgldetail = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/listgldetail/'. $auth_user['cawangan'])->json();
|
||||
// $listgldetail = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/listgldetail/'. $auth_user['cawangan'])->json();
|
||||
$listgldetail = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/listgldetail/'. $auth_user['cawangan'],['name' => $auth_user['name']])->json();
|
||||
|
||||
|
||||
$denominasi=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/DenominasiController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
// dd($denominasi);
|
||||
if(sizeof($denominasi) == 0)
|
||||
{
|
||||
$denominasi=Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/api/DenominasiCreate/'.$auth_user['cawangan'])->json();
|
||||
$denominasi=Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/api/DenominasiCreate/'.$auth_user['cawangan'],['name' => $auth_user['name']])->json();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,6 +218,48 @@ class KhazanahController extends Controller
|
||||
return view('khazanah.pendahuluanserahanmain',compact('cawangan_info','listgldetail','denominasi'));
|
||||
}
|
||||
|
||||
// public function pendahuluanserahandaftar(Request $request)
|
||||
// {
|
||||
// // Get authenticated user
|
||||
// $auth_user = Auth::user();
|
||||
|
||||
// // Retrieve hidden input data if necessary
|
||||
// $submitted_user_id = $request->input('auth_user');
|
||||
|
||||
// // API URL from config
|
||||
// $api_url = config('api.url');
|
||||
|
||||
// // Fetch branch information
|
||||
// $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
// ->get($api_url . '/api/cawangan/' . $auth_user['cawangan'])
|
||||
// ->json();
|
||||
|
||||
// // Fetch GL details
|
||||
// $listgldetail = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
// ->get($api_url . '/api/listgldetail/' . $auth_user['cawangan'], [
|
||||
// 'name' => $auth_user['name']
|
||||
// ])
|
||||
// ->json();
|
||||
// // dd($listgldetail);
|
||||
|
||||
// // Fetch or create denominasi data
|
||||
// $denominasi = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
// ->get($api_url . '/api/DenominasiController/' . $auth_user['cawangan'])
|
||||
// ->json();
|
||||
|
||||
// if (sizeof($denominasi) == 0) {
|
||||
// $denominasi = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
// ->post($api_url . '/api/DenominasiCreate/' . $auth_user['cawangan'])
|
||||
// ->json();
|
||||
// } else {
|
||||
// $denominasi = $denominasi[0];
|
||||
// }
|
||||
|
||||
// // Return the view with compacted data
|
||||
// return view('khazanah.pendahuluanserahanmain', compact('cawangan_info', 'listgldetail', 'denominasi'));
|
||||
// }
|
||||
|
||||
|
||||
public function dashboard()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
@@ -738,7 +783,8 @@ class KhazanahController extends Controller
|
||||
$data_request = $request->except('_token');
|
||||
|
||||
$updatepanjar = Http::withOptions(['verify' => config('app.api_verify')])->post( config('api.url') .'/api/panjar/createpanjar/'. $auth_user['cawangan'],$data_request)->json();
|
||||
|
||||
// $updatepanjar = Http::withOptions(['verify' => config('app.api_verify')])->post( config('api.url') .'/api/panjar/createpanjar/'. $auth_user['cawangan'],['name' => $auth_user['name']],$data_request)->json();
|
||||
// dd($updatepanjar);
|
||||
if($updatepanjar['result'] == 'success')
|
||||
{
|
||||
if($request->jenismodal === 'perubatan')
|
||||
@@ -2103,7 +2149,7 @@ class KhazanahController extends Controller
|
||||
'dtacct' => $request->dtacct,
|
||||
'ktacct' => $request->ktacct
|
||||
])->json();
|
||||
|
||||
|
||||
$amaun=$request->amaun;
|
||||
|
||||
$peti_besi_terkini=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
@@ -733,8 +733,9 @@ class PenebusanController extends Controller
|
||||
'hubungan' => $request->hubungan,
|
||||
'alamat' => $request->alamat,
|
||||
'telefon' => $request->telefon,
|
||||
'nota' => $request->nota
|
||||
|
||||
'nota' => $request->nota,
|
||||
'teller' => $auth_user['name']
|
||||
|
||||
])->json();
|
||||
|
||||
if($createwakil)
|
||||
|
||||
Reference in New Issue
Block a user