laporan ansuran panjaran
This commit is contained in:
@@ -2032,7 +2032,7 @@ class KhazanahController extends Controller
|
||||
$split_date = explode('-',$request->datetimepicker1);
|
||||
$tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
$tebus = Http::get(config('api.url'). '/api/ansuran/laporan/'. $auth_user['cawangan'] .'/'. $tebus_date)->json();
|
||||
$tebus = Http::get(config('api.url'). '/api/ansuran/laporan/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json();
|
||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
// dd($gadai);
|
||||
@@ -3085,6 +3085,49 @@ class KhazanahController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function laporan_Perbelanjaan(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
|
||||
return view('khazanah.laporan.perbelanjaan', compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
public function cetaklaporan_Perbelanjaan(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$mula_date = '2017-01-01';
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$hingga_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
$perbelanjaan = Http::get(config('api.url'). '/api/SenaraiPanjar/' . $auth_user['cawangan'] . '/' . $mula_date . '/' . $hingga_date)->json();
|
||||
|
||||
$cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
return view('print.laporan_perbelanjaan', compact('perbelanjaan','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function RequestPembatalan(Request $request)
|
||||
{
|
||||
$kodcaw = $request->kodcaw;
|
||||
|
||||
Reference in New Issue
Block a user