DBA Data[Home] [Help]

APPS.AP_INTEREST_INVOICE_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 1335: FROM ap_invoice_distributions_all AID --bug 9328384

1331: P_base_currency_code) prorated_dist_base_amt,
1332: dist_code_combination_id,
1333: type_1099,
1334: income_tax_region
1335: FROM ap_invoice_distributions_all AID --bug 9328384
1336: WHERE AID.invoice_id = P_invoice_id
1337: AND AID.line_type_lookup_code IN ('ITEM', 'IPV','ACCRUAL')
1338: ORDER BY AID.invoice_distribution_id;
1339:

Line 1403: INSERT INTO AP_INVOICE_DISTRIBUTIONS_ALL --bug 9328384

1399:
1400: debug_info := 'inserting tax distribution using system defined account in ap_system_parameters';
1401: l_inv_distribution_line_number :=
1402: NVL(l_inv_distribution_line_number,0) + 1;
1403: INSERT INTO AP_INVOICE_DISTRIBUTIONS_ALL --bug 9328384
1404: (INVOICE_ID,
1405: DIST_CODE_COMBINATION_ID,
1406: INVOICE_DISTRIBUTION_ID,
1407: INVOICE_LINE_NUMBER,

Line 1513: FROM ap_invoice_distributions_all AID --bug 9328384

1509:
1510: debug_info := 'Selecting distribution for proration';
1511: SELECT nvl(sum(AID.amount),0)
1512: INTO l_proration_divisor
1513: FROM ap_invoice_distributions_all AID --bug 9328384
1514: WHERE AID.invoice_id = P_invoice_id
1515: AND AID.line_type_lookup_code IN ('ITEM', 'IPV','ACCRUAL');
1516:
1517: debug_info := 'Opening the prorate cursor';

Line 1535: INSERT INTO AP_INVOICE_DISTRIBUTIONS_ALL --bug 9328384

1531: rec_prorate_int_inv.prorated_dist_base_amt;
1532:
1533:
1534: debug_info := 'Inserting invoice ditsributions';
1535: INSERT INTO AP_INVOICE_DISTRIBUTIONS_ALL --bug 9328384
1536: (INVOICE_ID,
1537: DIST_CODE_COMBINATION_ID,
1538: INVOICE_DISTRIBUTION_ID,
1539: INVOICE_LINE_NUMBER,

Line 1662: debug_info := 'Update AP_INVOICE_DISTRIBUTIONS_ALL (invoice_id = '||

1658:
1659: IF (p_interest_amount <> l_distribution_total OR
1660: p_interest_base_amount <> l_distribution_base_total ) THEN
1661:
1662: debug_info := 'Update AP_INVOICE_DISTRIBUTIONS_ALL (invoice_id = '||
1663: p_int_invoice_id||')';
1664:
1665:
1666: -- Perf Bug 5059000

Line 1667: UPDATE ap_invoice_distributions_all aid

1663: p_int_invoice_id||')';
1664:
1665:
1666: -- Perf Bug 5059000
1667: UPDATE ap_invoice_distributions_all aid
1668: set amount = amount - l_distribution_total + p_interest_amount,
1669: base_amount = base_amount - l_distribution_base_total
1670: + p_interest_base_amount
1671: WHERE aid.rowid =(

Line 1677: from ap_invoice_distributions_all aid3 --bug 9328384

1673: (
1674: select rowid row_id,
1675: rank() over(order by abs(aid3.amount) desc,
1676: aid3.distribution_line_number desc) r
1677: from ap_invoice_distributions_all aid3 --bug 9328384
1678: WHERE aid3.invoice_id = p_int_invoice_id
1679: )
1680: where r=1 )
1681: RETURNING aid.invoice_distribution_id