DBA Data[Home] [Help]

APPS.AP_IMPORT_UTILITIES_PKG dependencies on AP_INVOICE_LINES

Line 3610: /* 1. Insert into ap_invoice_lines with the validated interface lines */

3606: /*=========================================================================*/
3607: /* */
3608: /* Function Insert_Ap_Invoices_lines */
3609: /* Program Flow: */
3610: /* 1. Insert into ap_invoice_lines with the validated interface lines */
3611: /* data */
3612: /* 2. Bulk select primary key of lines */
3613: /* Parameters */
3614: /* p_base_invoice_id */

Line 3623: FUNCTION insert_ap_invoice_lines(

3619: /* p_calling_sequence - for debug purpose */
3620: /* */
3621: /*=========================================================================*/
3622:
3623: FUNCTION insert_ap_invoice_lines(
3624: p_base_invoice_id IN NUMBER,
3625: p_invoice_lines_tab IN
3626: AP_IMPORT_INVOICES_PKG.t_lines_table,
3627: p_set_of_books_id IN NUMBER,

Line 3639: l_generate_dists AP_INVOICE_LINES.generate_dists%TYPE := 'Y';

3635: IS
3636: debug_info VARCHAR2(500);
3637: current_calling_sequence VARCHAR2(2000);
3638: i BINARY_INTEGER := 0;
3639: l_generate_dists AP_INVOICE_LINES.generate_dists%TYPE := 'Y';
3640: l_wfapproval_status AP_INVOICE_LINES.wfapproval_status%TYPE := NULL;
3641: l_key_value_list gl_ca_utility_pkg.r_key_value_arr;
3642:
3643: l_inv_code VARCHAR2(50); -- BUG 6785691

Line 3640: l_wfapproval_status AP_INVOICE_LINES.wfapproval_status%TYPE := NULL;

3636: debug_info VARCHAR2(500);
3637: current_calling_sequence VARCHAR2(2000);
3638: i BINARY_INTEGER := 0;
3639: l_generate_dists AP_INVOICE_LINES.generate_dists%TYPE := 'Y';
3640: l_wfapproval_status AP_INVOICE_LINES.wfapproval_status%TYPE := NULL;
3641: l_key_value_list gl_ca_utility_pkg.r_key_value_arr;
3642:
3643: l_inv_code VARCHAR2(50); -- BUG 6785691
3644:

Line 3668: current_calling_sequence := 'insert_ap_invoice_lines<-'||P_calling_sequence;

3664:
3665: BEGIN
3666: -- Update the calling sequence
3667:
3668: current_calling_sequence := 'insert_ap_invoice_lines<-'||P_calling_sequence;
3669:
3670: -----------------------------------------------------------------------------
3671: -- Step 1
3672: -- Initialize the work flow approval flag

Line 3675: debug_info := '(Insert ap invoice lines step 1) - populate the '||

3671: -- Step 1
3672: -- Initialize the work flow approval flag
3673: -----------------------------------------------------------------------------
3674:
3675: debug_info := '(Insert ap invoice lines step 1) - populate the '||
3676: 'wfapproval_status_flag';
3677:
3678: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3679: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

Line 3701: -- Insert into the ap_invoice_lines table

3697: -- BUG 6785691. END
3698:
3699: -----------------------------------------------------------------------------
3700: -- Step 2
3701: -- Insert into the ap_invoice_lines table
3702: -----------------------------------------------------------------------------
3703:
3704: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';
3705:

Line 3704: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';

3700: -- Step 2
3701: -- Insert into the ap_invoice_lines table
3702: -----------------------------------------------------------------------------
3703:
3704: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';
3705:
3706: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3707: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3708: END IF;

Line 3737: ap_invoice_lines as user is importing DFF's also while importing invoice.

3733: OR (p_invoice_lines_tab(i).line_type_lookup_code = 'TAX'
3734: and nvl(p_tax_only_flag, 'N') <> 'Y'
3735: and nvl(p_tax_only_rcv_matched_flag, 'N') <> 'Y')) THEN */
3736: /* commented for 6010950 as all the lines we first need to insert into
3737: ap_invoice_lines as user is importing DFF's also while importing invoice.
3738: So if we are copying the tax line from zx_lines_summary instead of inserting
3739: the Tax line first in ap_invoice_lines then we are loosing DFF information. */
3740:
3741: --Bug 7427463/7379883 project_id, code_combination information is not populate

Line 3739: the Tax line first in ap_invoice_lines then we are loosing DFF information. */

3735: and nvl(p_tax_only_rcv_matched_flag, 'N') <> 'Y')) THEN */
3736: /* commented for 6010950 as all the lines we first need to insert into
3737: ap_invoice_lines as user is importing DFF's also while importing invoice.
3738: So if we are copying the tax line from zx_lines_summary instead of inserting
3739: the Tax line first in ap_invoice_lines then we are loosing DFF information. */
3740:
3741: --Bug 7427463/7379883 project_id, code_combination information is not populate
3742: --at ap_exp_report_lines_all table. We are allowing expense reports, payment requests
3743: --to generate distribution without checking any values.

Line 3767: INSERT INTO ap_invoice_lines_all(

3763: -- Insert only non-tax lines
3764: -- tax lines will be created after calling import_document_with_tax
3765: -- or calculate tax in the case of tax only lines matched to receipts
3766:
3767: INSERT INTO ap_invoice_lines_all(
3768: INVOICE_ID,
3769: LINE_NUMBER,
3770: LINE_TYPE_LOOKUP_CODE,
3771: REQUESTER_ID,

Line 4312: END insert_ap_invoice_lines;

4308: END IF;
4309:
4310: RETURN (FALSE);
4311:
4312: END insert_ap_invoice_lines;
4313:
4314: /*=========================================================================*/
4315: /* */
4316: /* Private Function Create_Lines */

Line 4388: IF ( insert_ap_invoice_lines(

4384: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4385: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4386: END IF;
4387:
4388: IF ( insert_ap_invoice_lines(
4389: p_base_invoice_id => p_base_invoice_id,
4390: p_invoice_lines_tab => p_invoice_lines_tab,
4391: p_set_of_books_id => p_set_of_books_id,
4392: p_approval_workflow_flag => p_approval_workflow_flag,

Line 4409: -- ap_invoice_lines core transaction table

4405:
4406: --------------------------------------------------------------------------
4407: -- Step 2
4408: -- Call API to do base amount rounding for x_base_invoice_id in
4409: -- ap_invoice_lines core transaction table
4410: --------------------------------------------------------------------------
4411:
4412: debug_info := '(Create lines 2) Call Utility function to round the line '||
4413: ' before create distributions';

Line 4442: FROM AP_INVOICE_LINES

4438: IF l_rounded_amt <> 0 THEN
4439: -- get the existing base amount for the selected line
4440: select base_amount
4441: INTO l_base_amt
4442: FROM AP_INVOICE_LINES
4443: WHERE invoice_id = p_base_invoice_id
4444: AND line_number = l_round_inv_line_numbers(i);
4445:
4446: -- get the calculated adjusted base amount and rounding amount

Line 4454: UPDATE AP_INVOICE_LINES

4450: p_rounding_amt => l_modified_line_rounding_amt,
4451: p_next_line_rounding_amt => l_rounded_amt);
4452:
4453: -- update the calculatd base amount, rounding amount
4454: UPDATE AP_INVOICE_LINES
4455: SET base_amount = l_base_amt,
4456: rounding_amt = ABS( NVL(l_modified_line_rounding_amt, 0) ),
4457: last_update_date = SYSDATE,
4458: last_updated_by = FND_GLOBAL.user_id,

Line 4721: FROM ap_invoice_lines_interface

4717:
4718: BEGIN
4719: SELECT 'N'
4720: INTO l_tax_only_rcv_matched_flag
4721: FROM ap_invoice_lines_interface
4722: WHERE invoice_id = p_invoice_id
4723: AND (line_type_lookup_code <> 'TAX' OR
4724: (line_type_lookup_code = 'TAX' AND
4725: rcv_transaction_id IS NULL AND

Line 4778: FROM ap_invoice_lines_interface

4774:
4775: BEGIN
4776: SELECT 'N'
4777: INTO l_tax_only_flag
4778: FROM ap_invoice_lines_interface
4779: WHERE invoice_id = p_invoice_id
4780: AND line_type_lookup_code <> 'TAX'
4781: AND ROWNUM = 1;
4782: