scripts added

This commit is contained in:
2026-08-28 12:28:39 +02:00
parent 45e62fda5f
commit c30efbc8d9
237 changed files with 7310 additions and 1 deletions
@@ -0,0 +1,34 @@
// last execution: Fri Dec 04 2020 15:16:08 GMT+0100 (Midden-Europese standaardtijd)
logAdd(log);
$ids = Record\FindMany('HandmatigeNascholing', 'name', 'asc');
$n = array\length($ids);
logAdd(log, 'info', '#handmatige nascholingen=', $n);
logAdd(log, 'info', 'ja');
$i = 0;
while($i < $n,
$id = array\at($ids, $i);
$nascholing = entity\get('HandmatigeNascholing', $id);
$nascholingstotalen = Entity\GetRelated($nascholing, 'nascholingstotaalen', 1000);
$m = array\length($nascholingstotalen);
$j = 0;
while($j < $m,
$totaal = array\at($nascholingstotalen, $j);
$totaal_id = attr($totaal, 'id');
$contact_id = attr($totaal, 'contactId');
$contact = entity\get('Contact', $contact_id);
logAdd(log, 'info', 'gerelateerd aan:', $id, ' - ', attr($totaal, 'jaar'), ' van ', attr($contact, 'name'));
record\relate('Nascholingstotaal', $totaal_id, 'nascholingen1', $id);
$j = $j + 1;
);
$i = $i + 1;
);