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');
|
||||
$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);
|
||||
else $data = [ 'organisatie_id' => $orgID,
|
||||
else {
|
||||
$data = [ 'organisatie_id' => $orgID,
|
||||
'groep_id' => $groepID,
|
||||
'ondersteuningsvorm_id' => $vormID,
|
||||
'archief' => 'T',
|
||||
'aantal' => 0];
|
||||
|
||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
}
|
||||
}
|
||||
|
||||
function activeerOS(){
|
||||
@@ -349,13 +350,14 @@ class Groepen extends MY_Controller{
|
||||
$orgID = $this->clean_input('orgID');
|
||||
$axovID =$this->Aantalxondersteuningsvorm_model->get_fieldvalue(["ondersteuningsvorm_id"=> $vormID, "groep_id" => $groepID], "id");
|
||||
if ($axovID) $this->Aantalxondersteuningsvorm_model->update_record(["archief"=> 'F'], $axovID);
|
||||
else $data = [ 'organisatie_id' => $orgID,
|
||||
'groep_id' => $groepID,
|
||||
'ondersteuningsvorm_id' => $vormID,
|
||||
'archief' => 'T',
|
||||
'aantal' => 0];
|
||||
|
||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
else {
|
||||
$data = [ 'organisatie_id' => $orgID,
|
||||
'groep_id' => $groepID,
|
||||
'ondersteuningsvorm_id' => $vormID,
|
||||
'archief' => 'F',
|
||||
'aantal' => 0];
|
||||
$newid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||
}
|
||||
}
|
||||
function getwriter(){
|
||||
$writer = false;
|
||||
|
||||
Reference in New Issue
Block a user