SELECT C.SETID , C.VENDOR_ID , C.LANGUAGE_CD , C.VENDOR_NAME_SHORT FROM PS_VOUCHER A , PS_PYMNT_VCHR_XREF B , PS_VENDOR_LANG C WHERE A.VOUCHER_STYLE NOT IN ('PPAY', 'TMPL') AND (A.PROCESS_MAN_CLOSE = 'N' OR A.CLOSE_STATUS <> 'C') AND A.VENDOR_SETID = C.SETID AND A.VENDOR_ID = C.VENDOR_ID AND A.VOUCHER_ID = B.VOUCHER_ID AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND B.PYMNT_SELCT_STATUS NOT IN ('P', 'X', 'S') AND (B.NET_SELCT_STATUS <> 'S' OR B.NET_TXN_STATUS <> 'N') AND CASE WHEN A.ENTRY_STATUS <> 'X' THEN CASE WHEN B.DUE_DT IS NULL THEN 1 ELSE 2 END ELSE 3 END > 0
|