AP_CHECKS_ALL 与AP_INVOICE_PAYMENTS_ALL

AP_CHECKS_ALL表存储着关于供应商付款与供应商退款的信息,记录中的每一行都记录着供应商付款或供应商退款,ORACLE应付应用为了审计目的,记录着供应商的名称与银行帐号的信息。如果您修改了手工付款或快速付款的供应商付款地址,您的Oracle应付账款应用程序维护在此表中新的地址信息。您的Oracle应付账款应用程序使用BANK_ACCOUNT_NUM,BANK_NUM,和BANK_ACCOUNT_TYPE来记录供货商的银行信息。您的Oracle应付应用程序为退款记录了CHECK_STOCK_ID虚值。
AP_INVOICE_PAYMENTS_ALL存储着为供应商做的付款发票信息,一行就是一笔付款的发票。
以下是别人的成果:
AP_INVOICES_ALL stores all of the invoices recorded in the system.

AP_INVOICE_PAYMENTS_ALL stores the records of all of the payments recorded against the invoices in AP_INVOICES_ALL

AP_CHECKS_ALL stores the records of all the checks paidinthe system

One of the functions of AP_INVOICE_PAYMENTS_ALL is that it presents the cross-reference between an invoice and a check. While, hopefully, an invoice is only paid once, a check can pay more than one invoice.

Anothrr way of stating it is that each check can have multiple invoice_payments. Each invoice could also have multiple invoice payments if you allow partial payments of invoices or if an invoice payment has been voided.

AP_INVOICES_ALL joins to AP_INVOICE_PAYMENTS_ALL via invoice_id. AP_CHECKS_ALL joins to AP_INVOICE_PAYMENTS_ALL via check_id.

With regard to your date range issue, the question of which date arises. Are you interested in invoice date or date entered into the system.

Processed is a bit of a vague term. If you mean entered in A/P, then you can mereley select count(*) from ap_invocies_all. Each invoice appears in this table only once.

With reference to total amount paid are you interested in invoice currency, ledger currency or payment currency? The amount_paid field in ap_invoices_all provides a reasonable representation of this value but you do need to consider currency so you dont add dollars to euros.

total number of invoices paid could also potentially be obtained from ap_invoices_all by select count(*) from ap_invoices_all where amount_paid = invoice_amount. This should give you a count of fully paid invoices. You could also try selecting count(distinct(invoice_id)) from ap_invoice_payments_all

There are a number of other issues to consider, including the effects of voids and stops and how they are reflected in each table

你可能感兴趣的:(check)