instrumenten koppelen in beheer

This commit is contained in:
Monique
2022-04-26 16:16:20 +02:00
parent 4230646bd4
commit d26974e69f
5 changed files with 182 additions and 31 deletions
+8 -4
View File
@@ -26,16 +26,20 @@ class Modules_model extends MY_Model{
}
function getallmodulesmetcluster(){
$this->sql =" SELECT M.id, M.sysnr, M.naam AS instrument, COALESCE(C.naam, 'geen') AS cluster,
COALESCE(C.naam, 'aaaa') AS ordening, instrument_type,
COALESCE(C.naam, 'aaaa') AS ordening, instrument_type, COALESCE(SOP.id, 0 ) AS sopID,
CASE WHEN SOP.id IS NULL THEN
'F'
ELSE
'T'
ELSE
CASE WHEN SOP.in_sop = 'F' THEN
'F'
ELSE
'T'
END
END AS insop,
SOP.sopnaam, SOP.blokjesnaam
FROM tb_modules M
LEFT JOIN tb_cluster C ON M.cluster_id = C.id,
LEFT JOIN tb_cluster C ON M.cluster_id = C.id
LEFT JOIN tb_compactsoponderdelen SOP on M.sysnr = SOP.module_nr
WHERE instrument_type <> 'GEENSOP'
ORDER BY ordening, instrument";