Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CASE
- WHEN (c.docstatus <> ALL (ARRAY['CL'::bpchar, 'VO'::bpchar])) AND cl.qtydelivered >= cl.qtyordered AND cl.qtyinvoiced < cl.qtyordered THEN 'Outstanding Invoice'::text
- WHEN (c.docstatus <> ALL (ARRAY['CL'::bpchar, 'VO'::bpchar])) AND (cl.kst_etadate IS NULL OR cl.kst_etddate IS NULL) AND cl.qtydelivered < cl.qtyordered THEN 'Outstanding Delivery'::text
- WHEN (c.docstatus <> ALL (ARRAY['CL'::bpchar, 'VO'::bpchar])) AND (cl.kst_etadate IS NULL OR cl.kst_etddate IS NULL) THEN 'Outstanding PI'::text
- ELSE ''::text
- END AS status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement