注册 登录
壹佰网|ERP100 - 企业信息化知识门户 返回首页

的个人空间 https://www.erp100.com/?0 [收藏] [复制] [RSS]

日志

AP月结检查脚本

已有 1594 次阅读2008/3/12 09:46

我经常用,省时省力。

--Check receipt but Pay on Receipt not run

SELECT DISTINCT rcv.organization_id, poh.segment1, rsh.receipt_num
           FROM apps.rcv_transactions rcv,
                apps.po_headers_all poh,
                apps.rcv_shipment_headers rsh
          WHERE rcv.destination_type_code = 'RECEIVING'
            AND rcv.invoice_status_code <> 'INVOICED'
            AND rcv.po_header_id = poh.po_header_id
            AND rsh.shipment_header_id = rcv.shipment_header_id
            AND poh.pay_on_code = 'RECEIPT'
            --AND rcv.transaction_type <> 'RETURN TO VENDOR'
            AND rcv.transaction_type = 'RECEIVE' ---modified line
            AND.....
            
           
--AP Interface Error
select invoice_num, ORG_ID, status from apps.ap_invoices_interface where status='REJECTED' and ....


--Unposted Invoice Distributions
select distinct invoice_id, accounting_date,
period_name, posted_flag, org_id, set_of_books_id
from apps.ap_invoice_distributions_all
where posted_flag = 'N'
and ...

--Unposted Payment Distributions
select invoice_id, accounting_date,
period_name, posted_flag, org_id, set_of_books_id
from apps.ap_invoice_payments_all
where posted_flag = 'N'
and org_id= ....

--Untransfered Journal Entries
select accounting_event_id, accounting_date, org_id,
PERIOD_NAME, gl_transfer_flag, set_of_books_id
from apps.ap_ae_headers_all
where gl_transfer_flag <> 'Y'
and ....

--Unconfirmed Payment Batch
select checkrun_name, org_id
from apps.ap_inv_selection_criteria_all
where STATUS NOT IN ('CONFIRMED','CANCELED','QUICKCHECK'  )
and (org_id is null) and ....

--AP bill qty <> Receipt Qty
SELECT distinct poh.segment1, poh.org_id
FROM apps.po_headers_all poh, apps.po_lines_all pol, apps.po_line_locations_all poll, apps.rcv_shipment_headers rsh, apps.rcv_transactions trx
WHERE poh.po_header_id = pol.po_header_id AND pol.po_line_id = poll.po_line_id
AND trx.po_header_id = poh.po_header_id AND trx.transaction_type = 'RETURN TO VENDOR'
AND trx.shipment_header_id = rsh.shipment_header_id
AND poll.quantity_received < poll.quantity_billed AND ...

--Ungenerated Intercompany AP
select rah.interface_header_attribute4, rah.trx_number from apps.ra_customer_trx_all rah
where rah.interface_header_context='INTERCOMPANY' and rah.trx_number not in (
select invoice_num from apps.AP_EXPENSE_REPORT_HEADERS_ALL) and rah.customer_trx_id in
(select distinct customer_trx_id from apps.ra_customer_trx_lines_all where EXTENDED_AMOUNT<>0)
and .....

评论 (0 个评论)

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 03:53 , Processed in 0.006677 second(s), 12 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部