DBA Data[Home] [Help]

APPS.PA_TRX_IMPORT dependencies on AP_INVOICE_DISTRIBUTIONS

Line 7061: -- We allow good ap invoice distributions to interface in a expenditure

7057: END IF;
7058:
7059: -- BUG:4748305 DFHC.D4:PRC INTERFACE SUPPLIER COST NOT INTERFACING
7060: -- VALID INVOICE DISTRIBUTIONS
7061: -- We allow good ap invoice distributions to interface in a expenditure
7062: -- and do not reject all the expenditure items in expenditure
7063: -- This is only done for VI items.
7064:
7065: IF ( (NOT REJECT_EXP ) AND (v_calling_module <> 'PAAPIMP' OR record_count > 0)) OR /* Bug 8709614 */

Line 7287: -- We allow good ap invoice distributions to interface in a expenditure

7283: END IF;
7284:
7285: -- BUG:4748305 DFHC.D4:PRC INTERFACE SUPPLIER COST NOT INTERFACING
7286: -- VALID INVOICE DISTRIBUTIONS
7287: -- We allow good ap invoice distributions to interface in a expenditure
7288: -- and do not reject all the expenditure items in expenditure
7289: -- This is only done for VI items.
7290:
7291: UPDATE pa_transaction_interface

Line 7536: from ap_invoice_distributions_all apd

7532:
7533: cursor c_invdist is
7534: select parent_reversal_id
7535: into l_parent_dist_id
7536: from ap_invoice_distributions_all apd
7537: where invoice_distribution_id = NVL(l_SysRef5Tab(p_indx),0)
7538: and nvl(reversal_flag,'N') = 'Y';
7539:
7540: /* Self Assessed Tax Changes*/

Line 8970: -- We allow good ap invoice distributions to interface in a expenditure

8966: ELSE
8967:
8968: -- BUG:4748305 DFHC.D4:PRC INTERFACE SUPPLIER COST NOT INTERFACING
8969: -- VALID INVOICE DISTRIBUTIONS
8970: -- We allow good ap invoice distributions to interface in a expenditure
8971: -- and do not reject all the expenditure items in expenditure
8972: -- This is only done for VI items.
8973: IF v_calling_module = 'PAAPIMP' and
8974: TrxBatch.system_linkage_function = 'VI' THEN

Line 10408: -- Second Union all is used to fetch PO records relieved while interfacing AP invoice distributions

10404: and b.expenditure_item_id = c.expenditure_item_id
10405: and b.transaction_source = p_calling_mode;
10406:
10407: -- Cursor to fetch AP INVOICE/AP NRTAX records
10408: -- Second Union all is used to fetch PO records relieved while interfacing AP invoice distributions
10409: -- Eg : AP matched to CWK PO , AP matched to accrue on receipt
10410: cursor rcpt_acc_ap_pkts(p_calling_mode in varchar2) is
10411: select a.packet_id ,
10412: a.document_header_id ,

Line 10441: ap_invoice_distributions c,

10437: a.budget_line_id ,
10438: a.budget_version_id
10439: from pa_bc_packets a,
10440: pa_transaction_interface b, -- moac changes
10441: ap_invoice_distributions c,
10442: po_distributions d
10443: where a.txn_interface_id = b.txn_interface_id
10444: and a.document_header_id = d.po_header_id
10445: and a.document_distribution_id = d.po_distribution_id

Line 10927: from ap_invoice_distributions_all inv, pa_transaction_interface_all pti

10923: (select po_header_id, po_distribution_id
10924: from po_distributions_all
10925: where po_distribution_id in
10926: (select po_distribution_id
10927: from ap_invoice_distributions_all inv, pa_transaction_interface_all pti
10928: where inv.invoice_id = pti.cdl_system_reference2
10929: and inv.invoice_distribution_id = pti.cdl_system_reference5 /*REL12 : AP Lines Uptake changes*/
10930: and pti.transaction_source = p_calling_mode
10931: and pti.transaction_status_code = 'R'

Line 11019: l_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE;

11015: l_base_qv NUMBER;
11016: l_base_av NUMBER;
11017: l_period_year pa_bc_packets.period_year%type; --REL12
11018: l_inv_type ap_invoices_all.invoice_type_lookup_code%TYPE;
11019: l_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE;
11020:
11021: -- R12 AP lines uptake : Prepayment changes :Cursor to fetch AP related details.
11022: CURSOR C_ap_details (p_invoice_id NUMBER,
11023: p_invoice_distribution_id NUMBER) IS

Line 11030: FROM ap_invoice_distributions dist,

11026: nvl(dist.base_quantity_variance,0), --PA.M QV and AV
11027: NVL(dist.base_amount_variance,0),
11028: inv.invoice_type_lookup_code,
11029: dist.line_type_lookup_code
11030: FROM ap_invoice_distributions dist,
11031: ap_invoices inv
11032: WHERE dist.invoice_id = p_invoice_id
11033: AND dist.invoice_distribution_id = p_invoice_distribution_id
11034: AND inv.invoice_id = dist.invoice_id

Line 11214: amt variance from ap_invoice_distributions*/

11210:
11211: --PA.M QV and AV
11212: /*REL12 : AP Lines uptake changes */
11213: /*Call to AP_PA_API_PKG.Get_Inv_Amount_Var is deleted and introduced logic to fetch
11214: amt variance from ap_invoice_distributions*/
11215:
11216: IF PG_DEBUG = 'Y' THEN
11217: log_message('log_message: ' || 'Po Dist = ' || l_po_dist_id);
11218: log_message('log_message: ' || ' Base QV = ' || l_base_qv );

Line 12638: ap_invoice_distributions_all apd

12634: -- ====================================================================================
12635: CURSOR c_get_disc_amount is
12636: SELECT NVL(b.invoice_dist_base_amount , b.invoice_dist_amount) amount
12637: from ap_payment_hist_dists b,
12638: ap_invoice_distributions_all apd
12639: where b.invoice_payment_id = p_sys_ref4
12640: and b.invoice_distribution_id = p_sys_ref5
12641: and b.pay_dist_lookup_code = 'DISCOUNT'
12642: and apd.invoice_distribution_id = b.invoice_distribution_id

Line 13050: FROM ap_invoice_distributions

13046: FROM dual;
13047:
13048: CURSOR c_get_po_dist_id IS
13049: SELECT po_distribution_id
13050: FROM ap_invoice_distributions
13051: WHERE invoice_id = p_sys_ref2
13052: AND invoice_distribution_id = p_sys_ref5
13053: union /*Self Assessed Tax Changes*/
13054: SELECT po_distribution_id

Line 13066: FROM ap_invoices_all A, ap_invoice_distributions_all aid

13062: WHERE po_distribution_id = p_po_dist_id;
13063:
13064: CURSOR c_get_vendor_id IS
13065: SELECT a.vendor_id
13066: FROM ap_invoices_all A, ap_invoice_distributions_all aid
13067: WHERE A.invoice_id = aid.invoice_id
13068: AND A.invoice_id = p_sys_ref2
13069: AND aid.invoice_distribution_id = p_sys_ref5
13070: UNION /* Added for bug 13859614 */

Line 13188: l_po_dist_id ap_invoice_distributions.po_distribution_id%TYPE;

13184:
13185: l_rec_bc_comm_exists VARCHAR2(1); -- Variable to identify whether commitment record exists in pa_bc_commitments
13186: l_rec_pkt_comm_exists VARCHAR2(1); -- Variable to identify whether commitment record exists in pa_bc_packets
13187: L_RAW_BC_PACKET_ID NUMBER;
13188: l_po_dist_id ap_invoice_distributions.po_distribution_id%TYPE;
13189: l_po_line_id po_distributions_all.po_line_id%TYPE;
13190: l_vendor_id ap_invoices_all.vendor_id%TYPE; /*bug 13601768*/
13191:
13192: CURSOR c_curr_raw_pkt IS

Line 13963: FROM ap_invoice_distributions

13959: FROM dual;
13960:
13961: CURSOR c_get_po_dist_id IS
13962: SELECT po_distribution_id
13963: FROM ap_invoice_distributions
13964: WHERE invoice_id = p_sys_ref2
13965: AND invoice_distribution_id = p_sys_ref5
13966: union /*Self Assessed Tax Changes*/
13967: SELECT po_distribution_id

Line 13968: FROM ap_invoice_distributions

13964: WHERE invoice_id = p_sys_ref2
13965: AND invoice_distribution_id = p_sys_ref5
13966: union /*Self Assessed Tax Changes*/
13967: SELECT po_distribution_id
13968: FROM ap_invoice_distributions
13969: WHERE invoice_id = p_sys_ref2
13970: AND invoice_distribution_id = p_sys_ref5 ;
13971:
13972: CURSOR c_get_po_LINE_id (p_po_dist_id NUMBER) IS

Line 13980: FROM ap_invoices_all A, ap_invoice_distributions_all aid

13976:
13977: /*bug 13601768*/
13978: CURSOR c_get_vendor_id IS
13979: SELECT a.vendor_id
13980: FROM ap_invoices_all A, ap_invoice_distributions_all aid
13981: WHERE A.invoice_id = aid.invoice_id
13982: AND A.invoice_id = p_sys_ref2
13983: AND aid.invoice_distribution_id = p_sys_ref5
13984: UNION /* Added for bug 13859614 */

Line 14067: l_po_dist_id ap_invoice_distributions.po_distribution_id%TYPE;

14063:
14064: l_rec_bc_comm_exists VARCHAR2(1); -- Variable to identify whether commitment record exists in pa_bc_commitments
14065: l_rec_pkt_comm_exists VARCHAR2(1); -- Variable to identify whether commitment record exists in pa_bc_packets
14066: l_Raw_Bc_Packet_Id pa_bc_packets.bc_packet_id%TYPE;
14067: l_po_dist_id ap_invoice_distributions.po_distribution_id%TYPE;
14068: l_po_line_id po_distributions_all.po_line_id%TYPE;
14069: l_vendor_id ap_invoices_all.vendor_id%TYPE; /*bug 13601768*/
14070:
14071: BEGIN