tambah baik laporan SA by sag
This commit is contained in:
@@ -4121,9 +4121,13 @@ class KhazanahController extends Controller
|
||||
|
||||
if($request->radaktif === 'aktif')
|
||||
{
|
||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],
|
||||
// $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],
|
||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhasbynorujukan/aktif/'. $auth_user['cawangan'],
|
||||
['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
$stokaudit = collect($stokaudit)->sortByDesc('norujukan')->values()->all();
|
||||
// dd($stokaudit);
|
||||
// return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
return view('print.laporan_stokauditkhasbysag', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4141,11 +4145,13 @@ class KhazanahController extends Controller
|
||||
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
|
||||
// $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhasbynorujukan/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
$stokaudit = collect($stokaudit)->sortByDesc('norujukan')->values()->all();
|
||||
if($request->type == 'excel')
|
||||
{
|
||||
return view('excel.excel_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
// return view('excel.excel_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
return view('excel.excel_stokauditkhasbysag', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
}
|
||||
elseif($request->type == 'whatsapp')
|
||||
{
|
||||
@@ -4164,8 +4170,11 @@ class KhazanahController extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
return view('pdf.pdf_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
// $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhasbynorujukan/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||
$stokaudit = collect($stokaudit)->sortByDesc('norujukan')->values()->all();
|
||||
// return view('pdf.pdf_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
return view('pdf.pdf_stokauditkhasbysag', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user