Index: APPS/Halux/PPS/TBXZaag/impl/LijstHelperVoorTBX.cls.xml =================================================================== diff -u -r29059 -r33339 --- APPS/Halux/PPS/TBXZaag/impl/LijstHelperVoorTBX.cls.xml (.../LijstHelperVoorTBX.cls.xml) (revision 29059) +++ APPS/Halux/PPS/TBXZaag/impl/LijstHelperVoorTBX.cls.xml (.../LijstHelperVoorTBX.cls.xml) (revision 33339) @@ -17,12 +17,18 @@ union - Select BatchID || '||' || isnull(SubBatch,'') as BatchKey, 'L ' || BatchID || ' ' || isnull(SubBatch,'') as BatchOms,'LBX ' || BatchID || ' ' || isnull(SubBatch,'') || ' - nog ' || sum(case Zaagstatus when 'W' then 1 else 0 end) || ' van ' || count(*) as BatchLangeOms - from APPS_Halux_PPS_Activiteit_impl_common_dto.HoffmannZaagUitvoeringInfo - join APPS_Halux_common_impl.BatchImpl As B on B.ID = BatchID - where (isnull(SubBatch,'')='' or SubBatch='Herwerk' or :All=1) - and B.IsActief=1 - group by BatchID,SubBatch]]> + SELECT BatchID || '||' || isnull(SubBatch,'') as BatchKey, 'L ' || BatchID || ' ' || isnull(SubBatch,'') as BatchOms,'LBX ' || BatchID || ' ' || isnull(SubBatch,'') || ' - nog ' || sum(case Zaagstatus when 'W' then 1 else 0 end) || ' van ' || count(HZUI.ID) as BatchLangeOms + FROM APPS_Halux_PPS_Activiteit_impl_common_dto.HoffmannZaagUitvoeringInfo As HZUI + WHERE (isnull(SubBatch,'')='' or SubBatch='Herwerk' or :All=1) + AND HZUI.BatchID IN + ( + SELECT B.ID FROM APPS_Halux_common_impl.BatchImpl As B + JOIN APPS_Halux_common_impl.BatchImpl_ToeleveringenIndex As BTI on BTI.BatchImpl = B.ID + JOIN Flow_Toelev.Hoofding As Toelev on Toelev.ToeleveringsNr = BTI.element_key + WHERE B.Status = 'Gestart' + GROUP BY B.ID + ) + GROUP BY BatchID,SubBatch]]>