added penyelarasan table to remove bakilelong hardcode and put in untungrugiterkumpul
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -225,16 +225,12 @@ class LelongController extends Controller
|
||||
|
||||
$rugitotal=$rugilelong + $ansrugi;
|
||||
|
||||
if($kodcaw == 'APM')
|
||||
// $bakilelong += 4498.1;
|
||||
$bakilelong += 1228.07;
|
||||
|
||||
if($kodcaw == '010617')
|
||||
$rugitotal -= 6.1;
|
||||
|
||||
if($kodcaw == '011229'){
|
||||
$rugitotal -= 919.7;
|
||||
$bakilelong -= 144;
|
||||
}
|
||||
|
||||
if($kodcaw == '011412')
|
||||
@@ -242,31 +238,13 @@ class LelongController extends Controller
|
||||
|
||||
if($kodcaw == '020303')
|
||||
{
|
||||
$bakilelong -= 542.6;
|
||||
$rugitotal += 0.01;
|
||||
}
|
||||
|
||||
if($kodcaw === '011232')
|
||||
{
|
||||
$bakilelong += 6;
|
||||
}
|
||||
|
||||
if($kodcaw === 'ARP'){
|
||||
$rugitotal += 119;
|
||||
}
|
||||
|
||||
if($kodcaw == '020301'){
|
||||
$bakilelong -= 719.50;
|
||||
}
|
||||
|
||||
if($kodcaw == '011227'){
|
||||
$bakilelong -= 896.65;
|
||||
}
|
||||
|
||||
if($kodcaw == 'GC'){
|
||||
$bakilelong += 2135.75;
|
||||
$bakilelong -= 3; //added 15/10/2024 sebab ada kemusykilan 3 ringgit daripada rugi lelong
|
||||
}
|
||||
|
||||
$arraylelong = ['bakilelong' => $bakilelong, 'rugilelong' => $rugitotal];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user