From e47f0a9a6c60d3882774a2f6f3ee4996ced74e16 Mon Sep 17 00:00:00 2001 From: Monique Hansma Date: Mon, 26 Jun 2023 12:42:44 +0200 Subject: [PATCH] last result --- application/controllers/monfin2/Bestemmingen.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/controllers/monfin2/Bestemmingen.php b/application/controllers/monfin2/Bestemmingen.php index 6478fe2..2e297c4 100644 --- a/application/controllers/monfin2/Bestemmingen.php +++ b/application/controllers/monfin2/Bestemmingen.php @@ -87,10 +87,10 @@ class Bestemmingen extends MY_Controller{ $bestemmingID = $this->clean_input("id"); $targetjaar = $this->Toewijzingen_model->getNextJaar($this->globorgid); $bestemmingjaar = $this->Finbestemmingen_model->get(['id'=>$bestemmingID], 'kalenderjaar', true); -// if ($targetjaar >= $bestemmingjaar){ + if ($targetjaar >= $bestemmingjaar){ $this->Finbestemmingen_model->update_record(['bedrag'=>$this->clean_input('bedrag')], $bestemmingID); -// } + } $record = $this->Finbestemmingen_model->get_record_by_id($bestemmingID); json_encode(['record'=>$record]); } @@ -100,9 +100,10 @@ class Bestemmingen extends MY_Controller{ $bestemmingID = $this->clean_input("id"); $targetjaar = $this->Toewijzingen_model->getNextJaar($this->globorgid); $bestemmingjaar = $this->Finbestemmingen_model->get(['id'=>$bestemmingID], 'kalenderjaar', true); -// if ($targetjaar >= $bestemmingjaar) { + if ($targetjaar >= $bestemmingjaar) { $this->Finbestemmingen_model->update_record(['budget' => $this->clean_input('budget')], $bestemmingID); -// } + echo $this->db->last_query(); + } }