DBA Data[Home] [Help]

APPS.PO_INVOICES_SV2 dependencies on PO_INVOICES_SV2

Line 1: PACKAGE BODY po_invoices_sv2 AS

1: PACKAGE BODY po_invoices_sv2 AS
2: /* $Header: POXIVRPB.pls 120.26.12010000.8 2009/01/22 13:28:40 sadibhat ship $*/
3:
4: -- Read the profile option that enables/disables the debug log
5: -- g_asn_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('PO_RVCTP_ENABLE_TRACE'),'N');

Line 13: g_pkg_name CONSTANT VARCHAR2(20) := 'PO_INVOICES_SV2';

9:
10:
11: /* */
12: g_fetch_size CONSTANT NUMBER := 1000;
13: g_pkg_name CONSTANT VARCHAR2(20) := 'PO_INVOICES_SV2';
14:
15: /* For caching values */
16: g_old_tax_code_id AP_TAX_CODES.tax_id%TYPE := NULL;
17: /* */

Line 769: po_invoices_sv2.create_invoice_num(

765: /* Bug 7512542 Commenting call to create_invoice_num */
766: /* IF (X_curr_inv_process_flag = 'Y') THEN
767: BEGIN
768: X_curr_invoice_num :=
769: po_invoices_sv2.create_invoice_num(
770: x_org_id, -- SBI ENH
771: X_rcv_txns.default_pay_site_id, -- SBI ENH
772: X_rcv_txns.pay_on_receipt_summary_code,
773: X_curr_le_transaction_date, --Bug: 5344040

Line 941: po_invoices_sv2.create_invoice_num(

937: correspond to the RT record being invoiced */
938:
939: BEGIN
940: X_curr_invoice_num :=
941: po_invoices_sv2.create_invoice_num(
942: X_curr_org_id,
943: X_curr_pay_site_id,
944: X_curr_por_summary_code,
945: X_curr_le_transaction_date,

Line 1021: po_invoices_sv2.wrap_up_current_invoice(

1017: * Send the x_rcv_txns.shipment_type and
1018: * x_curr_shipment_type to wrap_up_current_invoice
1019: * procedure.
1020: */
1021: po_invoices_sv2.wrap_up_current_invoice(
1022: X_rcv_txns.vendor_id,
1023: X_rcv_txns.default_pay_site_id,
1024: X_rcv_txns.currency_code,
1025: X_rcv_txns.currency_conversion_type,

Line 1100: po_invoices_sv2.create_invoice_num(

1096:
1097: /* IF (X_curr_inv_process_flag = 'Y') THEN
1098: BEGIN
1099: X_curr_invoice_num :=
1100: po_invoices_sv2.create_invoice_num(
1101: x_org_id, -- SBI ENH
1102: X_rcv_txns.default_pay_site_id, -- SBI ENH
1103: X_rcv_txns.pay_on_receipt_summary_code,
1104: X_curr_le_transaction_date,--BUG 5344040: LE TIME ZONE

Line 1166: po_invoices_sv2.get_received_amount(X_rcv_txns.transaction_id,

1162: /* Get the adjusted quantity for invoice creation */
1163:
1164: IF X_rcv_txns.matching_basis = 'AMOUNT' THEN
1165: X_received_quantity := 0;
1166: po_invoices_sv2.get_received_amount(X_rcv_txns.transaction_id,
1167: X_rcv_txns.shipment_line_id,
1168: X_received_amount);
1169: ELSE
1170: X_received_amount := 0;

Line 1172: po_invoices_sv2.get_received_quantity(X_rcv_txns.transaction_id,

1168: X_received_amount);
1169: ELSE
1170: X_received_amount := 0;
1171: asn_debug.put_line('pparthasmatch_option '||x_rcv_txns.match_option);
1172: po_invoices_sv2.get_received_quantity(X_rcv_txns.transaction_id,
1173: X_rcv_txns.shipment_line_id,
1174: X_received_quantity,
1175: X_rcv_txns.match_option ); --5100177
1176: END IF;

Line 1202: po_invoices_sv2.create_invoice_distributions(

1198: end if;
1199:
1200:
1201: if (x_received_quantity <> 0 or x_received_amount <> 0) then
1202: po_invoices_sv2.create_invoice_distributions(
1203: X_curr_invoice_id,
1204: X_curr_currency_code,
1205: x_curr_currency_code,
1206: X_batch_id,

Line 1312: po_invoices_sv2.create_invoice_num(

1308: if (x_dist_count > 0 ) then
1309: BEGIN
1310:
1311: X_curr_invoice_num :=
1312: po_invoices_sv2.create_invoice_num(
1313: X_curr_org_id,
1314: X_curr_pay_site_id,
1315: X_curr_por_summary_code,
1316: X_curr_le_transaction_date,

Line 2607: l_consumption PO_INVOICES_SV2.consump_rec_type;

2603: IS
2604: l_api_version CONSTANT NUMBER := 1.0;
2605: l_api_name CONSTANT VARCHAR2(50) := 'create_use_invoices';
2606:
2607: l_consumption PO_INVOICES_SV2.consump_rec_type;
2608: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;
2609: l_curr PO_INVOICES_SV2.curr_condition_rec_type;
2610:
2611: l_commit_lower NUMBER;

Line 2608: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;

2604: l_api_version CONSTANT NUMBER := 1.0;
2605: l_api_name CONSTANT VARCHAR2(50) := 'create_use_invoices';
2606:
2607: l_consumption PO_INVOICES_SV2.consump_rec_type;
2608: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;
2609: l_curr PO_INVOICES_SV2.curr_condition_rec_type;
2610:
2611: l_commit_lower NUMBER;
2612: l_commit_upper NUMBER;

Line 2609: l_curr PO_INVOICES_SV2.curr_condition_rec_type;

2605: l_api_name CONSTANT VARCHAR2(50) := 'create_use_invoices';
2606:
2607: l_consumption PO_INVOICES_SV2.consump_rec_type;
2608: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;
2609: l_curr PO_INVOICES_SV2.curr_condition_rec_type;
2610:
2611: l_commit_lower NUMBER;
2612: l_commit_upper NUMBER;
2613: l_header_idx NUMBER := 0;

Line 2701: OPEN PO_INVOICES_SV2.c_consumption(l_cutoff_date);

2697: IF (g_asn_debug = 'Y') THEN
2698: ASN_DEBUG.put_line('Base Currency Code = ' || l_def_base_currency_code);
2699: END IF;
2700:
2701: OPEN PO_INVOICES_SV2.c_consumption(l_cutoff_date);
2702:
2703: IF (g_asn_debug = 'Y') THEN
2704: ASN_DEBUG.put_line('Using Bulk Collect. Limit = ' || g_fetch_size);
2705: END IF;

Line 2783: PO_INVOICES_SV2.reset_header_values(

2779:
2780: IF (g_asn_debug = 'Y') THEN
2781: ASN_DEBUG.put_line('invoice_desc = ' || l_invoice_desc);
2782: END IF;
2783: PO_INVOICES_SV2.reset_header_values(
2784: l_return_status,
2785: l_consumption,
2786: i,
2787: l_curr);

Line 2799: IF (PO_INVOICES_SV2.need_new_invoice(

2795: END IF;
2796:
2797: END IF; -- l_first_flag = FND_API.G_TRUE
2798:
2799: IF (PO_INVOICES_SV2.need_new_invoice(
2800: l_return_status,
2801: l_consumption,
2802: i,
2803: l_curr,

Line 2822: PO_INVOICES_SV2.store_header_info(

2818: END IF;
2819:
2820: l_progress := '065';
2821:
2822: PO_INVOICES_SV2.store_header_info(
2823: l_return_status,
2824: l_curr,
2825: l_invoice_desc,
2826: l_group_id,

Line 2842: PO_INVOICES_SV2.reset_header_values(

2838:
2839: l_distr_count := 0;
2840: l_invoice_count := l_invoice_count + 1;
2841:
2842: PO_INVOICES_SV2.reset_header_values(
2843: l_return_status,
2844: l_consumption,
2845: i,
2846: l_curr);

Line 2869: PO_INVOICES_SV2.create_invoice_hdr(

2865: IF (g_asn_debug = 'Y') THEN
2866: ASN_DEBUG.put_line('Bulk Insert into header interface');
2867: END IF;
2868:
2869: PO_INVOICES_SV2.create_invoice_hdr(
2870: l_return_status,
2871: l_ap_inv_header,
2872: 1,
2873: l_header_idx);

Line 2885: PO_INVOICES_SV2.create_invoice_distr(

2881: IF (g_asn_debug = 'Y') THEN
2882: ASN_DEBUG.put_line('Bulk Insert into line interface');
2883: END IF;
2884:
2885: PO_INVOICES_SV2.create_invoice_distr(
2886: l_return_status,
2887: l_consumption,
2888: l_commit_lower,
2889: l_commit_upper);

Line 2908: END IF; -- PO_INVOICES_SV2.need_new_invoice

2904: END IF;
2905:
2906: END IF; -- l_header_idx = p_commit_interval
2907:
2908: END IF; -- PO_INVOICES_SV2.need_new_invoice
2909:
2910: -- This if is to check the return value of need_new_invoice
2911: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2912: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2936: PO_INVOICES_SV2.calc_consumption_cost(

2932: 'Quantity to invoice = ' ||
2933: l_consumption.quantity_invoiced(i));
2934: END IF;
2935:
2936: PO_INVOICES_SV2.calc_consumption_cost(
2937: l_return_status,
2938: l_consumption.quantity_invoiced(i),
2939: l_consumption.unit_price(i),
2940: l_consumption.tax_code_id(i),

Line 2980: PO_INVOICES_SV2.create_invoice_distr(

2976: ASN_DEBUG.put_line('Insert remaining distributions from pl/sql table'
2977: || ' to lines interface table');
2978: END IF;
2979:
2980: PO_INVOICES_SV2.create_invoice_distr(
2981: l_return_status,
2982: l_consumption,
2983: l_commit_lower,
2984: l_commit_upper);

Line 3016: PO_INVOICES_SV2.store_header_info(

3012: ASN_DEBUG.put_line('# of headers created after last commit= ' ||
3013: l_header_idx);
3014: END IF;
3015:
3016: PO_INVOICES_SV2.store_header_info(
3017: l_return_status,
3018: l_curr,
3019: l_invoice_desc,
3020: l_group_id,

Line 3034: PO_INVOICES_SV2.create_invoice_hdr(

3030: IF (g_asn_debug = 'Y') THEN
3031: ASN_DEBUG.put_line('Insert remaining invoice headers');
3032: END IF;
3033:
3034: PO_INVOICES_SV2.create_invoice_hdr(
3035: l_return_status,
3036: l_ap_inv_header,
3037: 1,
3038: l_header_idx);

Line 3140: p_consumption IN PO_INVOICES_SV2.consump_rec_type,

3136: * FUNCTION need_new_invoice
3137: *******************************************************/
3138: FUNCTION need_new_invoice (
3139: x_return_status OUT NOCOPY VARCHAR2,
3140: p_consumption IN PO_INVOICES_SV2.consump_rec_type,
3141: p_index IN NUMBER,
3142: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3143: p_base_currency_code IN VARCHAR2) RETURN VARCHAR2
3144: IS

Line 3142: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,

3138: FUNCTION need_new_invoice (
3139: x_return_status OUT NOCOPY VARCHAR2,
3140: p_consumption IN PO_INVOICES_SV2.consump_rec_type,
3141: p_index IN NUMBER,
3142: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3143: p_base_currency_code IN VARCHAR2) RETURN VARCHAR2
3144: IS
3145: l_api_name VARCHAR2(50) := 'need_new_invoice';
3146: BEGIN

Line 3202: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,

3198: * PROCEDURE store_header_info
3199: *******************************************************/
3200: PROCEDURE store_header_info(
3201: x_return_status OUT NOCOPY VARCHAR2,
3202: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3203: p_invoice_desc IN VARCHAR2,
3204: p_group_id IN VARCHAR2,
3205: p_org_id IN VARCHAR2,
3206: x_ap_inv_header IN OUT NOCOPY PO_INVOICES_SV2.invoice_header_rec_type,

Line 3206: x_ap_inv_header IN OUT NOCOPY PO_INVOICES_SV2.invoice_header_rec_type,

3202: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3203: p_invoice_desc IN VARCHAR2,
3204: p_group_id IN VARCHAR2,
3205: p_org_id IN VARCHAR2,
3206: x_ap_inv_header IN OUT NOCOPY PO_INVOICES_SV2.invoice_header_rec_type,
3207: p_index IN NUMBER)
3208: IS
3209: l_api_name VARCHAR2(50) := 'store_header_info';
3210: BEGIN

Line 3218: PO_INVOICES_SV2.create_invoice_num(

3214: ASN_DEBUG.put_line('Storing header data into PL/SQL tables');
3215: END IF;
3216:
3217: x_ap_inv_header.invoice_num(p_index) :=
3218: PO_INVOICES_SV2.create_invoice_num(
3219: p_org_id, -- SBI ENH
3220: p_curr.pay_site_id, -- SBI ENH
3221: p_curr.inv_summary_code,
3222: p_curr.invoice_date,

Line 3258: p_next_consump IN PO_INVOICES_SV2.consump_rec_type,

3254: * PROCEDURE reset_header_values
3255: *******************************************************/
3256: PROCEDURE reset_header_values (
3257: x_return_status OUT NOCOPY VARCHAR2,
3258: p_next_consump IN PO_INVOICES_SV2.consump_rec_type,
3259: p_index IN NUMBER,
3260: x_curr OUT NOCOPY PO_INVOICES_SV2.curr_condition_rec_type)
3261: IS
3262: l_api_name VARCHAR2(50) := 'reset_header_values';

Line 3260: x_curr OUT NOCOPY PO_INVOICES_SV2.curr_condition_rec_type)

3256: PROCEDURE reset_header_values (
3257: x_return_status OUT NOCOPY VARCHAR2,
3258: p_next_consump IN PO_INVOICES_SV2.consump_rec_type,
3259: p_index IN NUMBER,
3260: x_curr OUT NOCOPY PO_INVOICES_SV2.curr_condition_rec_type)
3261: IS
3262: l_api_name VARCHAR2(50) := 'reset_header_values';
3263: BEGIN
3264: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3357: p_ap_inv_header IN PO_INVOICES_SV2.invoice_header_rec_type,

3353: * PROCEDURE create_invoice_hdr
3354: *******************************************************/
3355: PROCEDURE create_invoice_hdr(
3356: x_return_status OUT NOCOPY VARCHAR2,
3357: p_ap_inv_header IN PO_INVOICES_SV2.invoice_header_rec_type,
3358: p_from IN NUMBER,
3359: p_to IN NUMBER)
3360: IS
3361: l_api_name VARCHAR2(50) := 'create_invoice_hdr';

Line 3419: p_consumption IN PO_INVOICES_SV2.consump_rec_type,

3415: * PROCEDURE create_invoice_distr
3416: *******************************************************/
3417: PROCEDURE create_invoice_distr(
3418: x_return_status OUT NOCOPY VARCHAR2,
3419: p_consumption IN PO_INVOICES_SV2.consump_rec_type,
3420: p_from IN NUMBER,
3421: p_to IN NUMBER)
3422: IS
3423: l_api_name VARCHAR2(50) := 'create_invoice_distr';

Line 3559: END PO_INVOICES_SV2;

3555: END create_invoice_distr;
3556:
3557: /* */
3558:
3559: END PO_INVOICES_SV2;