added penyelarasan table to remove bakilelong hardcode and put in untungrugiterkumpul

This commit is contained in:
hafifierahman
2025-07-05 02:28:55 +08:00
parent 9255991a1d
commit 7ccca55b71
4 changed files with 72 additions and 22 deletions
@@ -62,6 +62,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use App\Jobs\AccountCheckJob;
use App\Penyelarasan;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Cache;
@@ -3789,6 +3790,10 @@ class AdminPageController extends Controller
if($kodcaw == 'KB2')
$total -= 64.8;
$total += Penyelarasan::on('mysql7')
->where('kodcaw', $kodcaw)
->sum(DB::raw('rugilelong + bakilelong + `lain-lain`'));
return response()->json($total,200);
}