added box komen on teller and added audit trail and added endpoints for laporan
This commit is contained in:
@@ -26,6 +26,7 @@ use Carbon\Carbon;
|
||||
use App\imbangdugalama;
|
||||
use App\Services\Reports\ImbangDugaService;
|
||||
use App\Services\Reports\Account\GeneralLedger;
|
||||
use App\Mohonid;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -1698,4 +1699,47 @@ $date = new Carbon($request->tarikh);
|
||||
|
||||
return response()->json($array_imbangduga,200);
|
||||
}
|
||||
|
||||
public function getLaporanKelulusan(Request $request){
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
||||
|
||||
$laporan_kelulusan = Mohonid::on($cawangan['mysql'])
|
||||
->whereBetween('tarikh', [$request->mula, $request->akhir])
|
||||
->when($request->mohon, function($query, $mohon) {
|
||||
return $query->where('mohon', $mohon);
|
||||
})
|
||||
->get();
|
||||
|
||||
if($laporan_kelulusan->isEmpty()){
|
||||
return response()->json(['message' => 'No data found'], 404);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Laporan kelulusan retrieved successfully',
|
||||
'data' => $laporan_kelulusan,
|
||||
'count' => $laporan_kelulusan->count(),
|
||||
'timestamp' => Carbon::now()->toISOString()
|
||||
], 200);
|
||||
}
|
||||
|
||||
public function getListofKelulusan(Request $request){
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
||||
|
||||
$laporan_kelulusan = Mohonid::on($cawangan['mysql'])
|
||||
->groupBy('mohon')
|
||||
->pluck('mohon');
|
||||
|
||||
if($laporan_kelulusan->isEmpty()){
|
||||
return response()->json(['message' => 'No data found'], 404);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'List of Type Kelulusan retrieved successfully',
|
||||
'data' => $laporan_kelulusan,
|
||||
'count' => $laporan_kelulusan->count(),
|
||||
'timestamp' => Carbon::now()->toISOString()
|
||||
], 200);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user