供应商层和地点层的付款方法

1、供应商地点默认付款方法

代码为:

SELECT aps.segment1 AS vendor_number, aps.vendor_name, /*--the same as hzp.party_name,*/ apss.vendor_site_code, ieppm.payment_method_code, ipm.payment_method_name, apss.payment_method_lookup_code, apss.org_id FROM iby.iby_external_payees_all iep, ap.ap_supplier_sites_all apss, ap.ap_suppliers aps, /*--the same as ar.hz_parties hzp,*/ iby.iby_ext_party_pmt_mthds ieppm, iby_payment_methods_vl ipm WHERE iep.party_site_id = apss.party_site_id --这个用来过滤费用员工供应商,貌似做完员工费用报表,系统自动生成一个员工供应商,但界面查询不到 AND iep.supplier_site_id = apss.vendor_site_id AND iep.payee_party_id = aps.party_id /*--the same as iep.payee_party_id = hzp.party_id*/ AND iep.ext_payee_id = ieppm.ext_pmt_party_id(+) AND ieppm.payment_method_code = ipm.payment_method_code(+) --AND iep.org_id = p_org_id ORDER BY aps.vendor_name, apss.vendor_site_code
2、供应商层的付款方法和发票汇总层
代码为:

select pv.SEGMENT1 vendor_code, pv.VENDOR_NAME, pvsa.VENDOR_SITE_CODE, assa.pay_on_code, plc.displayed_field, plc.description, assa.pay_on_receipt_summary_code, plc2.displayed_field displayed_field, plc2.description description2 from po_vendors pv, po_vendor_sites_all pvsa, ap_supplier_sites_all assa, po_lookup_codes plc, po_lookup_codes plc2 where pv.VENDOR_ID = pvsa.VENDOR_ID and pvsa.ORG_ID = 82 and pv.VENDOR_ID = assa.vendor_id and pvsa.VENDOR_SITE_ID = assa.vendor_site_id and assa.org_id = pvsa.ORG_ID and plc.lookup_code(+) = assa.pay_on_code and plc.lookup_type(+) = 'ERS PAY_ON_CODE' and plc2.lookup_code(+) = assa.pay_on_receipt_summary_code and plc2.lookup_type(+) = 'ERS INVOICE_SUMMARY'

你可能感兴趣的:(ext,报表,methods,payment)