DBA Data[Home] [Help]

APPS.AP_CALC_WITHHOLDING_PKG dependencies on AP_INVOICE_DISTRIBUTIONS

Line 390: FROM ap_invoice_distributions AID

386: line_type_lookup_code,
387: related_id,
388: accounting_event_id,
389: NVL(historical_flag, 'N') historical_flag
390: FROM ap_invoice_distributions AID
391: WHERE aid.invoice_id = p_invoice_id
392: --Bug 7217385 modified the below line
393: --AND aid.line_type_lookup_code NOT IN ('AWT','PREPAY')
394: AND aid.line_type_lookup_code <> 'AWT'

Line 411: FROM ap_invoice_distributions_all aid,

407: -- result in 0 liability
408: --
409: CURSOR c_sum_per_event(p_acct_event_id NUMBER) IS
410: SELECT SUM(amount), count(1)
411: FROM ap_invoice_distributions_all aid,
412: xla_events evnt,
413: xla_ae_headers xah,
414: ap_system_parameters_all asp
415: WHERE aid.accounting_event_id = p_acct_event_id

Line 520: FROM ap_invoice_distributions AID

516: SELECT SUM(NVL(AID.amount,0)),
517: SUM(NVL(NVL(AID.base_amount,aid.amount),0))
518: INTO l_proration_divisor,
519: l_proration_base_divisor
520: FROM ap_invoice_distributions AID
521: WHERE aid.invoice_id = Invoiceid
522: --Bug 7217385 modified the below line
523: --AND aid.line_type_lookup_code NOT IN ('AWT','PREPAY')
524: AND aid.line_type_lookup_code <> 'AWT'

Line 565: FROM ap_invoice_distributions_all aid

561: IF l_dist_count_per_event > 0 AND l_sum_per_event = 0 THEN
562:
563: SELECT count(*)
564: INTO l_dist_grp_count
565: FROM ap_invoice_distributions_all aid
566: WHERE aid.invoice_id = InvoiceId
567: AND aid.accounting_event_id = rec_prorate_awt_lines.accounting_event_id
568: AND aid.historical_flag = 'Y'
569: AND ((aid.awt_group_id IS NOT NULL

Line 1105: gl_period_name ap_invoice_distributions.period_name%TYPE;

1101: invoice_number ap_invoices.invoice_num%TYPE;
1102: supplier_id ap_invoices.vendor_id%TYPE;
1103: supplier_site_id ap_invoices.vendor_site_id%TYPE;
1104: NUMBER_of_awt_groups integer := 0;
1105: gl_period_name ap_invoice_distributions.period_name%TYPE;
1106: gl_awt_date DATE;
1107:
1108: max_gl_dist_date DATE; /* Added for bug#6605368 */
1109: max_gl_date_period gl_period_statuses.period_name%TYPE; /* Added for bug#6605368 */

Line 1802: from ap_invoice_distributions_all aid

1798:
1799: --bug14530757, added cursor to get the gross amount for INVOICE period type when invoice is partially paid
1800: CURSOR c_gross_amount_to_date_invoice(p_invoice_id number, p_group_id number) IS
1801: select nvl(sum(awt_gross_amount), 0) gross_amount_to_date
1802: from ap_invoice_distributions_all aid
1803: where line_type_lookup_code = 'AWT'
1804: --get the gross amount from minimum awt_related_id when multiple ranges are applied from a tax code
1805: and aid.awt_related_id =
1806: (

Line 1807: select min(aidx.awt_related_id) from ap_invoice_distributions_all aidx

1803: where line_type_lookup_code = 'AWT'
1804: --get the gross amount from minimum awt_related_id when multiple ranges are applied from a tax code
1805: and aid.awt_related_id =
1806: (
1807: select min(aidx.awt_related_id) from ap_invoice_distributions_all aidx
1808: where aidx.invoice_id = aid.invoice_id
1809: and aidx.awt_origin_group_id = aid.awt_origin_group_id
1810: and aidx.awt_invoice_payment_id = aid.awt_invoice_payment_id
1811: )

Line 1815: select min(aidx.withholding_tax_code_id) from ap_invoice_distributions_all aidx

1811: )
1812: --get the gross amount from minimum tax code id when multiple tax codes are applied in a tax group
1813: and aid.withholding_tax_code_id =
1814: (
1815: select min(aidx.withholding_tax_code_id) from ap_invoice_distributions_all aidx
1816: where aidx.invoice_id = aid.invoice_id
1817: and aidx.awt_origin_group_id = aid.awt_origin_group_id
1818: and aidx.awt_invoice_payment_id = aid.awt_invoice_payment_id
1819: )

Line 2175: from ap_invoice_distributions_all AID,ap_system_parameters_all AIP

2171: FROM (select DECODE(AIP.create_awt_dists_type,'BOTH',decode(p_calling_module,'AUTOAPPROVAL',
2172: AID.awt_group_id,AID.pay_awt_group_id),
2173: 'PAYMENT',AID.pay_awt_group_id,AID.awt_group_id) group_id,
2174: AID.amount,AID.base_amount,AID.line_type_lookup_code, AID.accounting_date /* Added AID.accounting_date for bug#6605368 */
2175: from ap_invoice_distributions_all AID,ap_system_parameters_all AIP
2176: where AID.invoice_id = InvId
2177: AND AID.org_id = AIP.org_id ) D,
2178: ap_awt_groups G
2179: where D.group_id = G.group_id(+)