Skip to content
Snippets Groups Projects
Commit 5c322cbc authored by elvanowen's avatar elvanowen
Browse files

Everything

parent fbd239e4
Branches
No related merge requests found
Pipeline #2767 skipped
...@@ -73,24 +73,15 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) { ...@@ -73,24 +73,15 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) {
$coefficient = $app->request->getJsonRawBody(); $coefficient = $app->request->getJsonRawBody();
$temp = array();
foreach ($coefficient as $coeff) { foreach ($coefficient as $coeff) {
$phql = "UPDATE KoefisienGolongan SET gaji_pokok = :gaji_pokok: WHERE golongan = :golongan: AND tahun = :tahun: AND subgolongan = :subgolongan:"; $phql = "UPDATE KoefisienGolongan SET gaji_pokok = :gaji_pokok: WHERE golongan = :golongan: AND tahun = :tahun: AND subgolongan = :subgolongan:";
$status = $app->modelsManager->executeQuery($phql, array( $status = $app->modelsManager->executeQuery($phql, array(
'golongan' => $coefficient->golongan, 'golongan' => $coeff->golongan,
'tahun' => $coefficient->tahun, 'tahun' => $coeff->tahun,
'subgolongan' => $coefficient->subgolongan, 'subgolongan' => $coeff->subgolongan,
'gaji_pokok' => $coefficient->koefisien 'gaji_pokok' => $coeff->koefisien
)); ));
$temp[] = array(
'golongan' => $coefficient->golongan,
'tahun' => $coefficient->tahun,
'subgolongan' => $coefficient->subgolongan,
'gaji_pokok' => $coefficient->koefisien
);
$response = new Response(); $response = new Response();
if ($status->success() != true) { if ($status->success() != true) {
...@@ -114,8 +105,7 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) { ...@@ -114,8 +105,7 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) {
$response = new Response(); $response = new Response();
$response->setJsonContent( $response->setJsonContent(
array( array(
'status' => 'OK', 'status' => 'OK'
'debug' => $coefficient
) )
); );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment