VCHR_SRCH_CLOSE(SQL View) |
Index Back |
---|---|
Vouchers eligible to be closedThis is a view of those vouchers that are eligible to be closed. |
SELECT a.business_unit , a.voucher_id , a.invoice_id , a.vendor_setid , b.vendor_name_short , b.vendor_id , b.name1 , a.close_status FROM PS_VOUCHER a , ps_vendor b WHERE a.vendor_setid = b.setid AND a.vendor_id = b.vendor_id AND a.process_man_close IN ('Y','N') AND a.post_status_ap = 'P' AND a.in_process_flg = 'N' AND A.VCHR_SRC IN ('AMLS','ARCR','BILL','CNTR','CONS','CUST','EDI','FRE','MTCH','NERS','ONL','PAYR','PBIL','PERS','PPAY','PROC','QUCK','RBCR','RETL','RPOV','RTV','SAD','SPRO','SSI','TRPM','XML','XLS','PRQ','DCM','EXL') AND EXISTS ( SELECT 'x' FROM ps_pymnt_vchr_xref c WHERE a.business_unit = c.business_unit AND a.voucher_id = c.voucher_id AND (( c.pymnt_selct_status = 'N' AND c.PYMNT_TYPE <> 'W') OR (C.PYMNT_SELCT_STATUS = 'X' AND A.VOUCHER_STYLE = 'CLBK'))) AND NOT EXISTS ( SELECT 'X' FROM PS_VCHR_PPAY_XREF D WHERE A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.VOUCHER_ID = D.VOUCHER_ID AND D.PREPAID_STATUS IN ('A','F')) AND NOT EXISTS ( SELECT 'X' FROM PS_PYMNT_VCHR_XREF G WHERE A.BUSINESS_UNIT = G.BUSINESS_UNIT AND A.VOUCHER_ID = G.VOUCHER_ID AND ((G.PYMNT_TYPE = 'W' AND G.PYMNT_SELCT_STATUS <> 'X') OR G.NET_SELCT_STATUS = 'S')) AND NOT EXISTS ( SELECT 'X' FROM PS_KK_SHDR_APVCHR K WHERE K.BUSINESS_UNIT = A.BUSINESS_UNIT AND K.VOUCHER_ID = A.VOUCHER_ID AND K.KK_PROCESS_STATUS = 'I') |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL |
Business Unit
Default Value: OPR_DEF_TBL_FS.BUSINESS_UNIT Prompt Table: SP_BU_AP_NONVW |
2 | VOUCHER_ID | Character(8) | VARCHAR2(8) NOT NULL | Voucher ID |
3 | INVOICE_ID | Character(30) | VARCHAR2(30) NOT NULL | Invoice Number |
4 | SETID | Character(5) | VARCHAR2(5) NOT NULL | SetID |
5 | VENDOR_NAME_SHORT | Character(14) | VARCHAR2(14) NOT NULL | Short Vendor Name |
6 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
7 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
8 | CLOSE_STATUS | Character(1) | VARCHAR2(1) NOT NULL |
Close Status Indicator
C=Closed O=Open Default Value: O |