Skip to content
Snippets Groups Projects
Commit 208c3156 authored by elvanowen's avatar elvanowen
Browse files

Everything

parent 2cb2ec62
No related merge requests found
Pipeline #2763 skipped
...@@ -73,6 +73,8 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) { ...@@ -73,6 +73,8 @@ $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(
...@@ -82,6 +84,13 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) { ...@@ -82,6 +84,13 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) {
'gaji_pokok' => $coefficient->koefisien 'gaji_pokok' => $coefficient->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) {
...@@ -102,6 +111,8 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) { ...@@ -102,6 +111,8 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) {
} }
} }
var_dump($temp);
$response = new Response(); $response = new Response();
$response->setJsonContent( $response->setJsonContent(
array( array(
......
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