groepen: archiveerOS/activeerOS voegden altijd een lege rij in
insert_record() stond buiten de else (geen accolades), waardoor bij een bestaande koppeling een lege rij in tb_aantalxondersteuningsvorm kwam plus een warning over $data. activeerOS maakt een nieuwe koppeling nu actief aan (archief 'F'). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -332,13 +332,14 @@ class Groepen extends MY_Controller{
|
|||||||
$orgID = $this->clean_input('orgID');
|
$orgID = $this->clean_input('orgID');
|
||||||
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
||||||
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'T', "aantal"=> 0], $axovID);
|
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'T', "aantal"=> 0], $axovID);
|
||||||
else $data = [ 'organisatie_id' => $orgID,
|
else {
|
||||||
|
$data = [ 'organisatie_id' => $orgID,
|
||||||
'groep_id' => $groepID,
|
'groep_id' => $groepID,
|
||||||
'ondersteuningsvorm_id' => $vormID,
|
'ondersteuningsvorm_id' => $vormID,
|
||||||
'archief' => 'T',
|
'archief' => 'T',
|
||||||
'aantal' => 0];
|
'aantal' => 0];
|
||||||
|
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function activeerOS(){
|
function activeerOS(){
|
||||||
@@ -349,13 +350,14 @@ class Groepen extends MY_Controller{
|
|||||||
$orgID = $this->clean_input('orgID');
|
$orgID = $this->clean_input('orgID');
|
||||||
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
||||||
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'F'], $axovID);
|
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'F'], $axovID);
|
||||||
else $data = [ 'organisatie_id' => $orgID,
|
else {
|
||||||
'groep_id' => $groepID,
|
$data = [ 'organisatie_id' => $orgID,
|
||||||
'ondersteuningsvorm_id' => $vormID,
|
'groep_id' => $groepID,
|
||||||
'archief' => 'T',
|
'ondersteuningsvorm_id' => $vormID,
|
||||||
'aantal' => 0];
|
'archief' => 'F',
|
||||||
|
'aantal' => 0];
|
||||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function getwriter(){
|
function getwriter(){
|
||||||
$writer = false;
|
$writer = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user