You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ "SELECT n.`NOTIFICATION_ID` FROM rm_erp_notification n "
1790
-
+ " LEFT JOIN rm_shipment_linking s ON s.SHIPMENT_LINKING_ID=n.SHIPMENT_LINKING_ID "
1791
-
+ " WHERE n.`ACTIVE` AND s.ACTIVE AND n.`ADDRESSED`=0 AND s.`PROGRAM_ID` IN (" + programIds + ") GROUP BY n.`NOTIFICATION_ID` ) AS a;";
1790
+
+ " LEFT JOIN rm_shipment_linking sl ON sl.SHIPMENT_LINKING_ID=n.SHIPMENT_LINKING_ID "
1791
+
+ " left join rm_shipment s on s.SHIPMENT_ID=sl.CHILD_SHIPMENT_ID "
1792
+
+ " left join rm_shipment_trans st on st.SHIPMENT_ID=s.SHIPMENT_ID and st.VERSION_ID=s.MAX_VERSION_ID "
1793
+
+ " left join rm_program_planning_unit ppu on ppu.PROGRAM_ID = sl.PROGRAM_ID AND ppu.PLANNING_UNIT_ID=st.PLANNING_UNIT_ID "
1794
+
+ " WHERE n.`ACTIVE` AND sl.ACTIVE AND n.`ADDRESSED`=0 AND sl.`PROGRAM_ID` IN (" + programIds + ") and ppu.PROGRAM_PLANNING_UNIT_ID IS NOT NULL and ppu.ACTIVE GROUP BY n.`NOTIFICATION_ID` ) AS a;";
0 commit comments