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.44.12020000.2 2013/02/28 10:37:40 gke 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 820: po_invoices_sv2.create_invoice_num(

816: /* Bug 7512542 Commenting call to create_invoice_num */
817: /* IF (X_curr_inv_process_flag = 'Y') THEN
818: BEGIN
819: X_curr_invoice_num :=
820: po_invoices_sv2.create_invoice_num(
821: x_org_id, -- SBI ENH
822: X_rcv_txns.default_pay_site_id, -- SBI ENH
823: X_rcv_txns.pay_on_receipt_summary_code,
824: X_curr_le_transaction_date, --Bug: 5344040

Line 998: po_invoices_sv2.create_invoice_num(

994: correspond to the RT record being invoiced */
995:
996: BEGIN
997: X_curr_invoice_num :=
998: po_invoices_sv2.create_invoice_num(
999: X_curr_org_id,
1000: X_curr_pay_site_id,
1001: X_curr_por_summary_code,
1002: X_curr_le_transaction_date,

Line 1078: po_invoices_sv2.wrap_up_current_invoice(

1074: * Send the x_rcv_txns.shipment_type and
1075: * x_curr_shipment_type to wrap_up_current_invoice
1076: * procedure.
1077: */
1078: po_invoices_sv2.wrap_up_current_invoice(
1079: X_rcv_txns.vendor_id,
1080: X_rcv_txns.default_pay_site_id,
1081: X_rcv_txns.currency_code,
1082: X_rcv_txns.currency_conversion_type,

Line 1157: po_invoices_sv2.create_invoice_num(

1153:
1154: /* IF (X_curr_inv_process_flag = 'Y') THEN
1155: BEGIN
1156: X_curr_invoice_num :=
1157: po_invoices_sv2.create_invoice_num(
1158: x_org_id, -- SBI ENH
1159: X_rcv_txns.default_pay_site_id, -- SBI ENH
1160: X_rcv_txns.pay_on_receipt_summary_code,
1161: X_curr_le_transaction_date,--BUG 5344040: LE TIME ZONE

Line 1223: po_invoices_sv2.get_received_amount(X_rcv_txns.transaction_id,

1219: /* Get the adjusted quantity for invoice creation */
1220:
1221: IF X_rcv_txns.matching_basis = 'AMOUNT' THEN
1222: X_received_quantity := 0;
1223: po_invoices_sv2.get_received_amount(X_rcv_txns.transaction_id,
1224: X_rcv_txns.shipment_line_id,
1225: X_received_amount);
1226: ELSE
1227: X_received_amount := 0;

Line 1229: po_invoices_sv2.get_received_quantity(X_rcv_txns.transaction_id,

1225: X_received_amount);
1226: ELSE
1227: X_received_amount := 0;
1228: asn_debug.put_line('pparthasmatch_option '||x_rcv_txns.match_option);
1229: po_invoices_sv2.get_received_quantity(X_rcv_txns.transaction_id,
1230: X_rcv_txns.shipment_line_id,
1231: X_received_quantity,
1232: X_rcv_txns.match_option ); --5100177
1233: END IF;

Line 1259: po_invoices_sv2.create_invoice_distributions(

1255: end if;
1256:
1257:
1258: if (x_received_quantity <> 0 or x_received_amount <> 0) then
1259: po_invoices_sv2.create_invoice_distributions(
1260: X_curr_invoice_id,
1261: X_curr_currency_code,
1262: x_curr_currency_code,
1263: X_batch_id,

Line 1376: po_invoices_sv2.create_invoice_num(

1372: if (x_dist_count > 0 ) then
1373: BEGIN
1374:
1375: X_curr_invoice_num :=
1376: po_invoices_sv2.create_invoice_num(
1377: X_curr_org_id,
1378: X_curr_pay_site_id,
1379: X_curr_por_summary_code,
1380: X_curr_le_transaction_date,

Line 2760: l_consumption PO_INVOICES_SV2.consump_rec_type;

2756: IS
2757: l_api_version CONSTANT NUMBER := 1.0;
2758: l_api_name CONSTANT VARCHAR2(50) := 'create_use_invoices';
2759:
2760: l_consumption PO_INVOICES_SV2.consump_rec_type;
2761: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;
2762: l_curr PO_INVOICES_SV2.curr_condition_rec_type;
2763:
2764: l_commit_lower NUMBER;

Line 2761: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;

2757: l_api_version CONSTANT NUMBER := 1.0;
2758: l_api_name CONSTANT VARCHAR2(50) := 'create_use_invoices';
2759:
2760: l_consumption PO_INVOICES_SV2.consump_rec_type;
2761: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;
2762: l_curr PO_INVOICES_SV2.curr_condition_rec_type;
2763:
2764: l_commit_lower NUMBER;
2765: l_commit_upper NUMBER;

Line 2762: l_curr PO_INVOICES_SV2.curr_condition_rec_type;

2758: l_api_name CONSTANT VARCHAR2(50) := 'create_use_invoices';
2759:
2760: l_consumption PO_INVOICES_SV2.consump_rec_type;
2761: l_ap_inv_header PO_INVOICES_SV2.invoice_header_rec_type;
2762: l_curr PO_INVOICES_SV2.curr_condition_rec_type;
2763:
2764: l_commit_lower NUMBER;
2765: l_commit_upper NUMBER;
2766: l_header_idx NUMBER := 0;

Line 2854: OPEN PO_INVOICES_SV2.c_consumption(l_cutoff_date);

2850: IF (g_asn_debug = 'Y') THEN
2851: ASN_DEBUG.put_line('Base Currency Code = ' || l_def_base_currency_code);
2852: END IF;
2853:
2854: OPEN PO_INVOICES_SV2.c_consumption(l_cutoff_date);
2855:
2856: IF (g_asn_debug = 'Y') THEN
2857: ASN_DEBUG.put_line('Using Bulk Collect. Limit = ' || g_fetch_size);
2858: END IF;

Line 2937: PO_INVOICES_SV2.reset_header_values(

2933:
2934: IF (g_asn_debug = 'Y') THEN
2935: ASN_DEBUG.put_line('invoice_desc = ' || l_invoice_desc);
2936: END IF;
2937: PO_INVOICES_SV2.reset_header_values(
2938: l_return_status,
2939: l_consumption,
2940: i,
2941: l_curr);

Line 2953: IF (PO_INVOICES_SV2.need_new_invoice(

2949: END IF;
2950:
2951: END IF; -- l_first_flag = FND_API.G_TRUE
2952:
2953: IF (PO_INVOICES_SV2.need_new_invoice(
2954: l_return_status,
2955: l_consumption,
2956: i,
2957: l_curr,

Line 2976: PO_INVOICES_SV2.store_header_info(

2972: END IF;
2973:
2974: l_progress := '065';
2975:
2976: PO_INVOICES_SV2.store_header_info(
2977: l_return_status,
2978: l_curr,
2979: l_invoice_desc,
2980: l_group_id,

Line 2996: PO_INVOICES_SV2.reset_header_values(

2992:
2993: l_distr_count := 0;
2994: l_invoice_count := l_invoice_count + 1;
2995:
2996: PO_INVOICES_SV2.reset_header_values(
2997: l_return_status,
2998: l_consumption,
2999: i,
3000: l_curr);

Line 3023: PO_INVOICES_SV2.create_invoice_hdr(

3019: IF (g_asn_debug = 'Y') THEN
3020: ASN_DEBUG.put_line('Bulk Insert into header interface');
3021: END IF;
3022:
3023: PO_INVOICES_SV2.create_invoice_hdr(
3024: l_return_status,
3025: l_ap_inv_header,
3026: 1,
3027: l_header_idx);

Line 3039: PO_INVOICES_SV2.create_invoice_distr(

3035: IF (g_asn_debug = 'Y') THEN
3036: ASN_DEBUG.put_line('Bulk Insert into line interface');
3037: END IF;
3038:
3039: PO_INVOICES_SV2.create_invoice_distr(
3040: l_return_status,
3041: l_consumption,
3042: l_commit_lower,
3043: l_commit_upper);

Line 3062: END IF; -- PO_INVOICES_SV2.need_new_invoice

3058: END IF;
3059:
3060: END IF; -- l_header_idx = p_commit_interval
3061:
3062: END IF; -- PO_INVOICES_SV2.need_new_invoice
3063:
3064: -- This if is to check the return value of need_new_invoice
3065: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3066: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 3090: PO_INVOICES_SV2.calc_consumption_cost(

3086: 'Quantity to invoice = ' ||
3087: l_consumption.quantity_invoiced(i));
3088: END IF;
3089:
3090: PO_INVOICES_SV2.calc_consumption_cost(
3091: l_return_status,
3092: l_consumption.quantity_invoiced(i),
3093: l_consumption.unit_price(i),
3094: l_consumption.tax_code_id(i),

Line 3134: PO_INVOICES_SV2.create_invoice_distr(

3130: ASN_DEBUG.put_line('Insert remaining distributions from pl/sql table'
3131: || ' to lines interface table');
3132: END IF;
3133:
3134: PO_INVOICES_SV2.create_invoice_distr(
3135: l_return_status,
3136: l_consumption,
3137: l_commit_lower,
3138: l_commit_upper);

Line 3170: PO_INVOICES_SV2.store_header_info(

3166: ASN_DEBUG.put_line('# of headers created after last commit= ' ||
3167: l_header_idx);
3168: END IF;
3169:
3170: PO_INVOICES_SV2.store_header_info(
3171: l_return_status,
3172: l_curr,
3173: l_invoice_desc,
3174: l_group_id,

Line 3188: PO_INVOICES_SV2.create_invoice_hdr(

3184: IF (g_asn_debug = 'Y') THEN
3185: ASN_DEBUG.put_line('Insert remaining invoice headers');
3186: END IF;
3187:
3188: PO_INVOICES_SV2.create_invoice_hdr(
3189: l_return_status,
3190: l_ap_inv_header,
3191: 1,
3192: l_header_idx);

Line 3294: p_consumption IN PO_INVOICES_SV2.consump_rec_type,

3290: * FUNCTION need_new_invoice
3291: *******************************************************/
3292: FUNCTION need_new_invoice (
3293: x_return_status OUT NOCOPY VARCHAR2,
3294: p_consumption IN PO_INVOICES_SV2.consump_rec_type,
3295: p_index IN NUMBER,
3296: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3297: p_base_currency_code IN VARCHAR2) RETURN VARCHAR2
3298: IS

Line 3296: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,

3292: FUNCTION need_new_invoice (
3293: x_return_status OUT NOCOPY VARCHAR2,
3294: p_consumption IN PO_INVOICES_SV2.consump_rec_type,
3295: p_index IN NUMBER,
3296: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3297: p_base_currency_code IN VARCHAR2) RETURN VARCHAR2
3298: IS
3299: l_api_name VARCHAR2(50) := 'need_new_invoice';
3300: BEGIN

Line 3356: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,

3352: * PROCEDURE store_header_info
3353: *******************************************************/
3354: PROCEDURE store_header_info(
3355: x_return_status OUT NOCOPY VARCHAR2,
3356: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3357: p_invoice_desc IN VARCHAR2,
3358: p_group_id IN VARCHAR2,
3359: p_org_id IN VARCHAR2,
3360: x_ap_inv_header IN OUT NOCOPY PO_INVOICES_SV2.invoice_header_rec_type,

Line 3360: x_ap_inv_header IN OUT NOCOPY PO_INVOICES_SV2.invoice_header_rec_type,

3356: p_curr IN PO_INVOICES_SV2.curr_condition_rec_type,
3357: p_invoice_desc IN VARCHAR2,
3358: p_group_id IN VARCHAR2,
3359: p_org_id IN VARCHAR2,
3360: x_ap_inv_header IN OUT NOCOPY PO_INVOICES_SV2.invoice_header_rec_type,
3361: p_index IN NUMBER)
3362: IS
3363: l_api_name VARCHAR2(50) := 'store_header_info';
3364: BEGIN

Line 3372: PO_INVOICES_SV2.create_invoice_num(

3368: ASN_DEBUG.put_line('Storing header data into PL/SQL tables');
3369: END IF;
3370:
3371: x_ap_inv_header.invoice_num(p_index) :=
3372: PO_INVOICES_SV2.create_invoice_num(
3373: p_org_id, -- SBI ENH
3374: p_curr.pay_site_id, -- SBI ENH
3375: p_curr.inv_summary_code,
3376: p_curr.invoice_date,

Line 3412: p_next_consump IN PO_INVOICES_SV2.consump_rec_type,

3408: * PROCEDURE reset_header_values
3409: *******************************************************/
3410: PROCEDURE reset_header_values (
3411: x_return_status OUT NOCOPY VARCHAR2,
3412: p_next_consump IN PO_INVOICES_SV2.consump_rec_type,
3413: p_index IN NUMBER,
3414: x_curr OUT NOCOPY PO_INVOICES_SV2.curr_condition_rec_type)
3415: IS
3416: l_api_name VARCHAR2(50) := 'reset_header_values';

Line 3414: x_curr OUT NOCOPY PO_INVOICES_SV2.curr_condition_rec_type)

3410: PROCEDURE reset_header_values (
3411: x_return_status OUT NOCOPY VARCHAR2,
3412: p_next_consump IN PO_INVOICES_SV2.consump_rec_type,
3413: p_index IN NUMBER,
3414: x_curr OUT NOCOPY PO_INVOICES_SV2.curr_condition_rec_type)
3415: IS
3416: l_api_name VARCHAR2(50) := 'reset_header_values';
3417: BEGIN
3418: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3511: p_ap_inv_header IN PO_INVOICES_SV2.invoice_header_rec_type,

3507: * PROCEDURE create_invoice_hdr
3508: *******************************************************/
3509: PROCEDURE create_invoice_hdr(
3510: x_return_status OUT NOCOPY VARCHAR2,
3511: p_ap_inv_header IN PO_INVOICES_SV2.invoice_header_rec_type,
3512: p_from IN NUMBER,
3513: p_to IN NUMBER)
3514: IS
3515: l_api_name VARCHAR2(50) := 'create_invoice_hdr';

Line 3577: p_consumption IN PO_INVOICES_SV2.consump_rec_type,

3573: * PROCEDURE create_invoice_distr
3574: *******************************************************/
3575: PROCEDURE create_invoice_distr(
3576: x_return_status OUT NOCOPY VARCHAR2,
3577: p_consumption IN PO_INVOICES_SV2.consump_rec_type,
3578: p_from IN NUMBER,
3579: p_to IN NUMBER)
3580: IS
3581: l_api_name VARCHAR2(50) := 'create_invoice_distr';

Line 3721: END PO_INVOICES_SV2;

3717: END create_invoice_distr;
3718:
3719: /* */
3720:
3721: END PO_INVOICES_SV2;