SELECT a.business_unit , sec.oprid , a.voucher_id , D.PYMNT_CNT , BUL.LANGUAGE_CD , b.vendor_id , BUL.descrshort , VL.vendor_name_short , VL.name1 , TL.descrshort FROM PS_VOUCHER a , ps_vendor b , ps_vendor_LANG VL , ps_vendor_user sec , ps_pymnt_vchr_xref d , ps_bus_unit_tbl_fs bu , ps_bus_unit_LANG BUL , ps_pymt_trms_hdr t , ps_pymt_tr_HD_LANG TL , ps_set_cntrl_group gp WHERE sec.setid = a.vendor_setid AND sec.vendor_id = a.vendor_id AND a.vendor_setid = b.setid AND a.vendor_id = b.vendor_id AND a.business_unit = d.business_unit AND a.voucher_id = d.voucher_id AND a.business_unit = bu.business_unit AND gp.setcntrlvalue = a.business_unit AND BUL.business_unit = bu.business_unit AND VL.setid = b.setid AND VL.vendor_id = b.vendor_id AND t.setid = TL.setid AND TL.pymnt_terms_cd = t.pymnt_terms_cd AND gp.rec_group_id = 'FS_14' AND t.setid = gp.setid AND a.pymnt_terms_cd = t.pymnt_terms_cd AND (( a.process_man_close = 'N' OR a.close_status <> 'C') OR ( a.process_man_close <> 'N' AND a.close_status = 'C' AND d.pymnt_selct_status='E' ) ) AND a.entry_status <> 'X' AND d.pymnt_type <> 'W' AND d.pymnt_selct_status <> 'X' AND d.due_dt IS NOT NULL AND ((a.VOUCHER_STYLE='PPAY' AND d.PREPAID_STATUS='P' ) OR a.VOUCHER_STYLE<>'PPAY')
|