Add Operations section

This commit is contained in:
ivarsbariss
2026-03-05 13:57:41 +01:00
parent bef4ad8400
commit a20bd77860
53 changed files with 2860 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
SELECT COALESCE(wo.wo_number || '-' || wo.wo_subnumber, '-') AS wo,
item_descrip1 AS descrip,
comment_user AS user,
comment_text AS comment,
comment_date AS date
FROM wo
JOIN comment ON wo_id = comment_source_id AND comment_source = 'W' AND comment_cmnttype_id = 23
JOIN itemsite ON wo_itemsite_id = itemsite_id
JOIN item on item_id = itemsite_item_id
WHERE wo_status = 'I'
AND NOT EXISTS (
SELECT 1
FROM comment c2
WHERE c2.comment_source_id = wo.wo_id
AND c2.comment_source = 'W'
AND c2.comment_cmnttype_id = 23
AND c2.comment_text LIKE '%Done%'
)
ORDER BY comment_date