SELECT H.BUSINESS_UNIT , D.INVOICE_ID , D.INVOICE_LINE , D.WORK_ORDER_ID , L1.LANGUAGE_CD , L1.DESCRSHORT , L2.DESCR , L3.DESCR FROM PS_SPF_INVOICE_HDR H , PS_SPF_INVOICE_DTL D , PS_PYMT_TR_HD_LANG L1 , PS_VNDR_ADDRSCR_LG L2 , PS_VNDR_ADDRSCR_LG L3 WHERE H.BUSINESS_UNIT = D.BUSINESS_UNIT AND H.INVOICE_ID = D.INVOICE_ID AND L1.SETID = ( SELECT R.SETID FROM PS_SET_CNTRL_GROUP R WHERE R.SETCNTRLVALUE = H.BUSINESS_UNIT AND R.REC_GROUP_ID = 'FS_14') AND H.PYMNT_TERMS_CD = L1.PYMNT_TERMS_CD AND L1.LANGUAGE_CD = L2.LANGUAGE_CD AND H.VENDOR_ID = L2.VENDOR_ID AND H.ADDRESS_SEQ_NUM = L2.ADDRESS_SEQ_NUM AND L2.SETID = ( SELECT S.SETID FROM PS_SET_CNTRL_GROUP S WHERE S.SETCNTRLVALUE = H.BUSINESS_UNIT AND S.REC_GROUP_ID = 'FS_38') AND L2.SETID = L3.SETID AND L2.LANGUAGE_CD = L3.LANGUAGE_CD AND L3.VENDOR_ID = H.REMIT_VENDOR AND L3.ADDRESS_SEQ_NUM = H.REMIT_ADDR_SEQ_NUM
|