fix permohonan
This commit is contained in:
@@ -3578,5 +3578,49 @@ class KhazanahController extends Controller
|
||||
return view('khazanah.status', compact('cawangan_info','api_url','permohonan','getdescription'));
|
||||
|
||||
}
|
||||
|
||||
public function CITPermohonan(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
|
||||
$resitname = time().'.'.$request->resit->extension();
|
||||
$resitdata = base64_encode($request->resit->get());
|
||||
|
||||
$invoicename = time().'.'.$request->invoice->extension();
|
||||
$invoicedata = base64_encode($request->invoice->get());
|
||||
|
||||
$updatelulus = Http::accept('application/'.$request->resit->extension() . ',application/'.$request->invoice->extension())->post(config('api.url') . '/admin/permohonan/tagcit',[
|
||||
'resitcit' => $request->noresit,
|
||||
'bank' => $request->selectedbank,
|
||||
'mohonid' => $request->mohonid,
|
||||
'dataresit' => $resitdata,
|
||||
'datainvoice' => $invoicedata,
|
||||
'resittype' => $request->resit->extension(),
|
||||
'invoicetype' => $request->invoice->extension(),
|
||||
'resitname' => $resitname,
|
||||
'invoicename' => $invoicename,
|
||||
|
||||
])->json();
|
||||
|
||||
if($updatelulus)
|
||||
return redirect()->back()->with('message', 'Berjaya mengemaskini CIT Permohonan!');
|
||||
else
|
||||
return redirect()->back()->with('error', 'Ralat dalam menjana sebarang kemaskini!');
|
||||
|
||||
}
|
||||
|
||||
public function DownloadFiles(Request $request){
|
||||
|
||||
$download = Http::get(config('api.url').'/admin/permohonan/viewfiles',[
|
||||
'files_id' => $request->files_id
|
||||
])->json();
|
||||
|
||||
return response(base64_decode($download['data']), 200, [
|
||||
'Content-type' => 'application/' . $download['type'],
|
||||
'Content-Disposition' => 'inline; filename='.$download['filename']
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user