FIX_COMMISSION_RELRATED

This commit is contained in:
velz 2025-12-11 14:58:41 +05:30
parent 305b005caf
commit 5df8478663
2 changed files with 12 additions and 3 deletions

View File

@ -176,7 +176,7 @@ class DeployController extends AdminController
public function fedeploy()
{
$request = $this->request;
echo 'HI';die();
// Single zip file: <input type="file" name="zip_file">
$file = $request->getFile('zip_file');
@ -186,7 +186,7 @@ class DeployController extends AdminController
'message' => 'No valid zip file uploaded',
]);
}
echo 'cool';die();
// Read scalar form values
$zipFolder = (string) $request->getPost('zip_folder') ?: 'web/';
$s3Bucket = (string) $request->getPost('s3_bucket') ?: '';
@ -283,4 +283,10 @@ class DeployController extends AdminController
$this->loadLayout('fedeploy');
}
public function fetest()
{
echo 'Hello from DeployController fetest!';
}
}

View File

@ -10,6 +10,7 @@ class InsuranceCommissionController extends AdminController
use ResponseTrait;
private $rules = [];
private $myLogger;
public function __construct()
{
@ -66,7 +67,7 @@ class InsuranceCommissionController extends AdminController
$folderName = $month . $year; // SEP2025
$insurerId = $input['insurer_id']; // 5
$department = ucfirst(strtolower($input['department'])); // Motor, Health, Fire
$department = (strtolower($input['department'])); // Motor, Health, Fire
// Final Path: WRITEPATH/rules/SEP2025/5_Motor.json
$rulesPath = WRITEPATH . "uploads/commission/rules/{$folderName}/{$insurerId}_{$department}.json";
@ -183,6 +184,8 @@ class InsuranceCommissionController extends AdminController
private function compareValues($actual, string $operator, $expected): bool
{
$actual = strtolower($actual);
$expected = strtolower($expected);
switch ($operator) {
case '==':
return $actual == $expected;