DBA Data[Home] [Help]

APPS.AP_APPROVAL_MATCHED_PKG dependencies on PO_DISTRIBUTIONS

Line 299: po_distributions PD,

295: ,nvl(PLL.price_override,0) -- po_price
296: ,PLL.matching_basis -- matching basis./*Amount Based Matching*/
297: FROM ap_invoice_distributions D,
298: ap_invoices I,
299: po_distributions PD,
300: po_line_locations PLL,
301: po_lines PL,
302: rcv_transactions RTXN,
303: rcv_shipment_lines RSL,

Line 370: po_distributions PD,

366: FROM ap_invoice_distributions D, --retainage release inv dists
367: ap_invoice_distributions retain_D, --bug 9242891 retainage invoice dist
368: ap_invoices I, --retainage release invoice
369: ap_invoices retain_I, --bug 9242891 retainage invoice
370: po_distributions PD,
371: po_line_locations PLL,
372: po_lines PL,
373: rcv_transactions RTXN,
374: rcv_shipment_lines RSL

Line 1558: po_distributions_ap_v PD,

1554: ,RSL.item_id -- l_rtxn_item_id
1555: ,PL.unit_meas_lookup_code -- l_po_uom
1556: ,PLL.match_option -- l_match_option
1557: FROM ap_invoice_distributions D,
1558: po_distributions_ap_v PD,
1559: rcv_transactions RTXN,
1560: rcv_shipment_lines RSL,
1561: po_lines PL,
1562: po_line_locations PLL

Line 1831: po_distributions_ap_v PD,

1827: ,nvl(PD.amount_ordered,0)
1828: - nvl(PD.amount_cancelled,0) -- l_po_amt
1829: ,PLL.match_option -- l_match_option
1830: FROM ap_invoice_distributions D,
1831: po_distributions_ap_v PD,
1832: rcv_transactions RTXN,
1833: rcv_shipment_lines RSL,
1834: po_lines PL,
1835: po_line_locations PLL

Line 3924: FROM po_distributions_ap_v PD

3920: p_calling_sequence;
3921:
3922: SELECT ROUND(SUM(nvl(PD.quantity_delivered, 0)), 5)
3923: INTO p_qty_delivered
3924: FROM po_distributions_ap_v PD
3925: WHERE PD.line_location_id = p_line_location_id;
3926:
3927: EXCEPTION
3928: WHEN NO_DATA_FOUND THEN

Line 3970: FROM po_distributions_ap_v PD

3966: SET final_match_flag = p_final_match_flag
3967: WHERE AID.invoice_id = p_invoice_id -- Bug 3489536
3968: AND AID.po_distribution_id IN
3969: (SELECT PD.po_distribution_id
3970: FROM po_distributions_ap_v PD
3971: WHERE line_location_id = p_line_location_id);
3972:
3973: UPDATE ap_invoice_lines AIL
3974: SET final_match_flag = p_final_match_flag

Line 4095: po_distributions_ap_v PD,

4091: SELECT PD.line_location_id,
4092: 'CANT CLOSE PO'
4093: FROM ap_invoice_distributions AID,
4094: ap_holds AH,
4095: po_distributions_ap_v PD,
4096: po_line_locations PLL --Bug 3489536
4097: WHERE AH.invoice_id = p_invoice_id
4098: AND AH.hold_lookup_code = 'CANT CLOSE PO'
4099: AND AH.release_lookup_code IS NULL

Line 4111: po_distributions_ap_v PD,

4107: SELECT PD.line_location_id,
4108: 'CANT TRY PO CLOSE'
4109: FROM ap_invoice_distributions AID,
4110: ap_holds AH,
4111: po_distributions_ap_v PD,
4112: po_line_locations PLL --Bug 3489536
4113: WHERE AH.invoice_id = p_invoice_id
4114: AND AH.hold_lookup_code = 'CANT TRY PO CLOSE'
4115: AND AH.release_lookup_code IS NULL

Line 4140: FROM po_distributions_ap_v PD,

4136: DECODE(PD.po_release_id, NULL, PD.po_header_id,
4137: PD.po_release_id),
4138: PH.segment1,
4139: MAX(aid.accounting_date) Accounting_date
4140: FROM po_distributions_ap_v PD,
4141: ap_invoice_distributions AID,
4142: po_line_locations PLL,
4143: po_headers PH,
4144: po_releases PR

Line 5603: FROM po_distributions_ap_v PD

5599: nvl(PD.amount_billed,0)
5600: )
5601: )
5602: INTO p_ship_trx_amt_var
5603: FROM po_distributions_ap_v PD
5604: WHERE PD.line_location_id = p_line_location_id;
5605:
5606: p_ship_trx_amt_var := p_ship_trx_amt_var - l_po_total;
5607:

Line 5619: po_distributions_all POD

5615: SELECT nvl(sum(nvl(AIDF.amount,0)),0)
5616: INTO l_freight_total
5617: FROM ap_invoice_distributions AIDF,
5618: ap_invoice_distributions AIDI,
5619: po_distributions_all POD
5620: WHERE AIDF.charge_applicable_to_dist_id = AIDI.invoice_distribution_id
5621: AND AIDF.line_type_lookup_code = 'FREIGHT'
5622: AND AIDI.line_type_lookup_code = 'ITEM'
5623: AND AIDI.po_distribution_id = POD.po_distribution_id

Line 5860: FROM ap_invoice_distributions D, po_distributions_ap_v PD

5856: END IF;
5857:
5858: SELECT SUM( NVL(D.base_amount, 0))
5859: INTO p_rate_amt_var
5860: FROM ap_invoice_distributions D, po_distributions_ap_v PD
5861: WHERE D.po_distribution_id = PD.po_distribution_id
5862: AND PD.line_location_id = p_line_location_id
5863: AND D.invoice_id = p_invoice_id
5864: AND D.line_type_lookup_code = 'ERV';

Line 6001: FROM po_distributions_ap_v PD

5997: SELECT SUM((NVL(PD.quantity_ordered, 0) -
5998: NVL(PD.quantity_cancelled, 0)) * p_po_price
5999: * DECODE(p_inv_curr_code, p_base_curr_code,1, PD.rate))
6000: INTO l_po_total
6001: FROM po_distributions_ap_v PD
6002: WHERE PD.line_location_id = p_line_location_id;
6003:
6004: --Bug6824860 this SQl should not consider lines which are not matched, but
6005: --have PO dist ID stamped,

Line 6016: , po_distributions_ap_v PD

6012: nvl(D.base_amount,D.amount/*,(D.amount * DECODE(I.exchange_rate, null,
6013: PD.rate, I.exchange_rate))*/))) /*commented in bug: 14726598 as additional fix*/
6014: INTO p_ship_base_amt_var
6015: FROM ap_invoice_distributions D
6016: , po_distributions_ap_v PD
6017: , ap_invoices I
6018: , ap_invoice_lines L --Bug6824860
6019: WHERE D.po_distribution_id = PD.po_distribution_id
6020: AND PD.line_location_id = p_line_location_id

Line 6059: FROM po_distributions_ap_v PD

6055: NVL(PD.amount_cancelled, 0))
6056: * DECODE(p_inv_curr_code, p_base_curr_code,1,
6057: PD.rate))
6058: INTO l_po_total
6059: FROM po_distributions_ap_v PD
6060: WHERE PD.line_location_id = p_line_location_id;
6061:
6062: --Bug6824860 this SQl should not consider lines which are not matched, but
6063: --have PO dist ID stamped,

Line 6074: , po_distributions_ap_v PD

6070: nvl(D.base_amount,D.amount/*,(D.amount * DECODE(I.exchange_rate, null,
6071: PD.rate, I.exchange_rate))*/))) /*commented in bug: 14726598 as additional fix*/
6072: INTO p_ship_base_amt_var
6073: FROM ap_invoice_distributions D
6074: , po_distributions_ap_v PD
6075: , ap_invoices I
6076: , ap_invoice_lines L --Bug6824860
6077: WHERE D.po_distribution_id = PD.po_distribution_id
6078: AND PD.line_location_id = p_line_location_id

Line 6555: l_distribution_type PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE ;

6551: l_return_status VARCHAR2(1);
6552: l_msg_count NUMBER;
6553: l_msg_data varchar2(2000);
6554:
6555: l_distribution_type PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE ;
6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;
6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;

Line 6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;

6552: l_msg_count NUMBER;
6553: l_msg_data varchar2(2000);
6554:
6555: l_distribution_type PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE ;
6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;
6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;

Line 6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;

6553: l_msg_data varchar2(2000);
6554:
6555: l_distribution_type PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE ;
6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;
6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;

Line 6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;

6554:
6555: l_distribution_type PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE ;
6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;
6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;

Line 6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;

6555: l_distribution_type PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE ;
6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;
6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;

Line 6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;

6556: l_accrue_on_receipt_flag PO_DISTRIBUTIONS_ALL.accrue_on_receipt_flag%TYPE ;
6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;

Line 6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;

6557: l_code_combination_id PO_DISTRIBUTIONS_ALL.code_combination_id%TYPE ;
6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;
6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;

Line 6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;

6558: l_budget_account_id PO_DISTRIBUTIONS_ALL.budget_account_id%TYPE ;
6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;
6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;
6566: l_amount_billed PO_DISTRIBUTIONS_ALL.amount_billed%TYPE ;

Line 6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;

6559: l_partial_funded_flag PO_DISTRIBUTIONS_ALL.partial_funded_flag%TYPE ;
6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;
6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;
6566: l_amount_billed PO_DISTRIBUTIONS_ALL.amount_billed%TYPE ;
6567: l_matching_basis PO_LINE_LOCATIONS.matching_basis%TYPE;

Line 6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;

6560: l_funded_value PO_DISTRIBUTIONS_ALL.funded_value%TYPE ;
6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;
6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;
6566: l_amount_billed PO_DISTRIBUTIONS_ALL.amount_billed%TYPE ;
6567: l_matching_basis PO_LINE_LOCATIONS.matching_basis%TYPE;
6568: l_quantity_received PO_LINE_LOCATIONS.quantity_received%TYPE;

Line 6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;

6561: l_quantity_funded PO_DISTRIBUTIONS_ALL.quantity_funded%TYPE ;
6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;
6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;
6566: l_amount_billed PO_DISTRIBUTIONS_ALL.amount_billed%TYPE ;
6567: l_matching_basis PO_LINE_LOCATIONS.matching_basis%TYPE;
6568: l_quantity_received PO_LINE_LOCATIONS.quantity_received%TYPE;
6569: l_amount_received PO_LINE_LOCATIONS.amount_received%TYPE;

Line 6566: l_amount_billed PO_DISTRIBUTIONS_ALL.amount_billed%TYPE ;

6562: l_amount_funded PO_DISTRIBUTIONS_ALL.amount_funded%TYPE ;
6563: l_quantity_delivered PO_DISTRIBUTIONS_ALL.quantity_delivered%TYPE ;
6564: l_amount_delivered PO_DISTRIBUTIONS_ALL.amount_delivered%TYPE ;
6565: l_quantity_billed PO_DISTRIBUTIONS_ALL.quantity_billed%TYPE ;
6566: l_amount_billed PO_DISTRIBUTIONS_ALL.amount_billed%TYPE ;
6567: l_matching_basis PO_LINE_LOCATIONS.matching_basis%TYPE;
6568: l_quantity_received PO_LINE_LOCATIONS.quantity_received%TYPE;
6569: l_amount_received PO_LINE_LOCATIONS.amount_received%TYPE;
6570: l_hold_name VARCHAR2(30);

Line 6572: l_quantity_cancelled PO_DISTRIBUTIONS_ALL.quantity_cancelled%TYPE ;

6568: l_quantity_received PO_LINE_LOCATIONS.quantity_received%TYPE;
6569: l_amount_received PO_LINE_LOCATIONS.amount_received%TYPE;
6570: l_hold_name VARCHAR2(30);
6571: l_unit_meas_lookup_code PO_LINE_LOCATIONS_ALL.unit_meas_lookup_code%TYPE;
6572: l_quantity_cancelled PO_DISTRIBUTIONS_ALL.quantity_cancelled%TYPE ;
6573: l_amount_cancelled PO_DISTRIBUTIONS_ALL.amount_cancelled%TYPE ;
6574: l_po_header_id ap_invoice_lines_all.po_header_id%TYPE;
6575:
6576:

Line 6573: l_amount_cancelled PO_DISTRIBUTIONS_ALL.amount_cancelled%TYPE ;

6569: l_amount_received PO_LINE_LOCATIONS.amount_received%TYPE;
6570: l_hold_name VARCHAR2(30);
6571: l_unit_meas_lookup_code PO_LINE_LOCATIONS_ALL.unit_meas_lookup_code%TYPE;
6572: l_quantity_cancelled PO_DISTRIBUTIONS_ALL.quantity_cancelled%TYPE ;
6573: l_amount_cancelled PO_DISTRIBUTIONS_ALL.amount_cancelled%TYPE ;
6574: l_po_header_id ap_invoice_lines_all.po_header_id%TYPE;
6575:
6576:
6577: BEGIN