DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_PROCESSING_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 151: FROM ap_invoice_distributions_all a, ap_invoices_all b

147: a.distribution_line_number, a.prepay_distribution_id,
148: a.amount, a.reversal_flag, a.parent_reversal_id, a.accounting_event_id, a.posted_flag, a.org_id,
149: a.accounting_date, b.invoice_amount, b.amount_paid, b.cancelled_date, b.invoice_type_lookup_code invoice_type,
150: a.creation_date, a.po_distribution_id
151: FROM ap_invoice_distributions_all a, ap_invoices_all b
152: WHERE a.invoice_id = b.invoice_id
153: AND invoice_distribution_id = cp_invoice_distribution_id;
154:
155: CURSOR c_invoice_payment(cp_invoice_payment_id IN NUMBER) IS

Line 170: CURSOR c_parent_distribution_id( p_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE ) IS

166: p_po_distribution_id IN NUMBER,
167: p_rcv_transaction_id IN NUMBER
168: ) RETURN NUMBER IS
169:
170: CURSOR c_parent_distribution_id( p_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE ) IS
171: SELECT invoice_distribution_id
172: FROM ap_invoice_distributions_all
173: WHERE invoice_id = p_invoice_id
174: AND (p_rcv_transaction_id IS NULL OR rcv_transaction_id = p_rcv_transaction_id)

Line 172: FROM ap_invoice_distributions_all

168: ) RETURN NUMBER IS
169:
170: CURSOR c_parent_distribution_id( p_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE ) IS
171: SELECT invoice_distribution_id
172: FROM ap_invoice_distributions_all
173: WHERE invoice_id = p_invoice_id
174: AND (p_rcv_transaction_id IS NULL OR rcv_transaction_id = p_rcv_transaction_id)
175: AND po_distribution_id = p_po_distribution_id
176: AND line_type_lookup_code = p_line_type_lookup_code--rchandan for bug#4428980

Line 179: ln_item_distribution_id AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE;

175: AND po_distribution_id = p_po_distribution_id
176: AND line_type_lookup_code = p_line_type_lookup_code--rchandan for bug#4428980
177: AND parent_reversal_id IS NULL; -- CHK
178:
179: ln_item_distribution_id AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE;
180:
181: BEGIN
182:
183: OPEN c_parent_distribution_id('ITEM');

Line 873: ap_invoice_distributions_all aid

869: ai.source
870: FROM xla_ae_headers xah ,
871: xla_transaction_entities xte,
872: ap_invoices_all ai,
873: ap_invoice_distributions_all aid
874: WHERE xah.je_category_name = cp_ae_category
875: AND xah.ledger_id = cp_sob_id
876: AND xah.application_id =200
877: and xah.entity_id = xte.entity_id

Line 902: FROM ap_invoice_distributions_all

898: amount ,
899: reversal_flag ,
900: parent_reversal_id ,
901: org_id
902: FROM ap_invoice_distributions_all
903: WHERE org_id = p_org_id
904: AND line_type_lookup_code = jai_constants.prepay_line
905: AND invoice_id IN ( SELECT invoice_id
906: FROM ap_invoice_distributions_all

Line 906: FROM ap_invoice_distributions_all

902: FROM ap_invoice_distributions_all
903: WHERE org_id = p_org_id
904: AND line_type_lookup_code = jai_constants.prepay_line
905: AND invoice_id IN ( SELECT invoice_id
906: FROM ap_invoice_distributions_all
907: WHERE po_distribution_id IN ( SELECT pda.po_distribution_id
908: FROM po_line_locations_all pll,
909: po_distributions_all pda,
910: jai_po_line_locations jpll

Line 930: FROM ap_invoice_distributions_all a, jai_rgm_trx_refs b /* second table is used for join just to take IL records */

926: CURSOR c_invoice_distributions(cp_invoice_id IN NUMBER) IS
927: SELECT a.invoice_id, a.invoice_distribution_id, a.distribution_line_number, a.dist_match_type,
928: a.invoicE_line_number, /* INVOICE LINES UPTAKE */
929: a.parent_reversal_id, a.reversal_flag, a.rcv_transaction_id, a.po_distribution_id
930: FROM ap_invoice_distributions_all a, jai_rgm_trx_refs b /* second table is used for join just to take IL records */
931: WHERE a.invoice_id = cp_invoice_id
932: AND a.line_type_lookup_code = jai_constants.misc_line -- <> 'PREPAY'
933: AND b.source = jai_constants.source_ap
934: and b.invoice_id = a.invoice_id

Line 1003: FROM ap_invoice_distributions_all

999: ORDER BY invoice_payment_id;
1000:
1001: CURSOR c_previous_prepayments(cp_invoice_id IN NUMBER, cp_start_date IN DATE) IS
1002: SELECT invoice_distribution_id, reversal_flag, parent_reversal_id, amount, org_id
1003: FROM ap_invoice_distributions_all
1004: WHERE invoice_id = cp_invoice_id
1005: AND creation_date < cp_start_date
1006: ORDER BY invoice_distribution_id;
1007:

Line 1034: ap_invoice_distributions_all ainvd ,

1030: apinvp.org_id
1031: FROM
1032: ap_invoice_payments_all apinvp,
1033: ap_checks_all apc ,
1034: ap_invoice_distributions_all ainvd ,
1035: jai_rgm_trx_refs jrtr /* second table is used for join just to take IL records */
1036: WHERE
1037: apinvp.org_id = p_org_id
1038: AND apinvp.check_id = apc.check_id

Line 1044: FROM ap_invoice_distributions_all

1040: AND apinvp.accounting_date/*Commented by nprashar for bug #6636517
1041: v_today*/ BETWEEN cp_start_date AND cp_till_date
1042: AND ainvd.invoice_id IN
1043: ( SELECT invoice_id
1044: FROM ap_invoice_distributions_all
1045: WHERE org_id = p_org_id
1046: AND po_distribution_id in
1047: (SELECT pda.po_distribution_id
1048: FROM po_line_locations_all pll,

Line 1106: ln_item_line_id NUMBER(15); -- Incase of AP -> AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE;

1102: r_parent_dist c_invoice_distribution%ROWTYPE;
1103:
1104: r_tax_dist_dtl c_tax_dist_dtl%ROWTYPE;
1105:
1106: ln_item_line_id NUMBER(15); -- Incase of AP -> AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE;
1107: ln_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
1108: ln_reference_id JAI_RGM_TRX_REFS.reference_id%TYPE;
1109: ln_parent_reference_id JAI_RGM_TRX_REFS.parent_reference_id%TYPE;
1110: ln_taxable_basis NUMBER;