DBA Data[Home] [Help]

APPS.AP_IMPORT_UTILITIES_PKG dependencies on AP_INVOICE_LINES

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

4306: /*=========================================================================*/
4307: /* */
4308: /* Function Insert_Ap_Invoices_lines */
4309: /* Program Flow: */
4310: /* 1. Insert into ap_invoice_lines with the validated interface lines */
4311: /* data */
4312: /* 2. Bulk select primary key of lines */
4313: /* Parameters */
4314: /* p_base_invoice_id */

Line 4323: FUNCTION insert_ap_invoice_lines(

4319: /* p_calling_sequence - for debug purpose */
4320: /* */
4321: /*=========================================================================*/
4322:
4323: FUNCTION insert_ap_invoice_lines(
4324: p_base_invoice_id IN NUMBER,
4325: p_invoice_lines_tab IN OUT NOCOPY AP_IMPORT_INVOICES_PKG.LINES_TABLE, --bug 15862708
4326: p_set_of_books_id IN NUMBER,
4327: p_approval_workflow_flag IN VARCHAR2,

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

4334: IS
4335: debug_info VARCHAR2(500);
4336: current_calling_sequence VARCHAR2(2000);
4337: i BINARY_INTEGER := 0;
4338: l_generate_dists AP_INVOICE_LINES.generate_dists%TYPE := 'Y';
4339: l_wfapproval_status AP_INVOICE_LINES.wfapproval_status%TYPE := NULL;
4340: l_key_value_list gl_ca_utility_pkg.r_key_value_arr;
4341:
4342: l_inv_code VARCHAR2(50); -- BUG 6785691

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

4335: debug_info VARCHAR2(500);
4336: current_calling_sequence VARCHAR2(2000);
4337: i BINARY_INTEGER := 0;
4338: l_generate_dists AP_INVOICE_LINES.generate_dists%TYPE := 'Y';
4339: l_wfapproval_status AP_INVOICE_LINES.wfapproval_status%TYPE := NULL;
4340: l_key_value_list gl_ca_utility_pkg.r_key_value_arr;
4341:
4342: l_inv_code VARCHAR2(50); -- BUG 6785691
4343:

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

4366: --bug 15862708
4367: BEGIN
4368: -- Update the calling sequence
4369:
4370: current_calling_sequence := 'insert_ap_invoice_lines<-'||P_calling_sequence;
4371:
4372:
4373: -----------------------------------------------------------------------------
4374: -- Step 2

Line 4375: -- Insert into the ap_invoice_lines table

4371:
4372:
4373: -----------------------------------------------------------------------------
4374: -- Step 2
4375: -- Insert into the ap_invoice_lines table
4376: -----------------------------------------------------------------------------
4377:
4378: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';
4379:

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

4374: -- Step 2
4375: -- Insert into the ap_invoice_lines table
4376: -----------------------------------------------------------------------------
4377:
4378: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';
4379:
4380: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4381: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4382: END IF;

Line 4399: INSERT INTO ap_invoice_lines_all

4395: p_invoice_lines_tab(i).invoice_id := p_base_invoice_id;
4396: END LOOP;
4397:
4398: FORALL i IN p_invoice_lines_tab.FIRST..p_invoice_lines_tab.LAST
4399: INSERT INTO ap_invoice_lines_all
4400: VALUES p_invoice_lines_tab(i);
4401: END; -- end of insert
4402:
4403: RETURN( TRUE );

Line 4419: END insert_ap_invoice_lines;

4415: END IF;
4416:
4417: RETURN (FALSE);
4418:
4419: END insert_ap_invoice_lines;
4420:
4421: /*=========================================================================*/
4422: /* */
4423: /* Private Function Create_Lines */

Line 4526: IF ( insert_ap_invoice_lines(

4522: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4523: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4524: END IF;
4525:
4526: IF ( insert_ap_invoice_lines(
4527: p_base_invoice_id => p_base_invoice_id,
4528: p_invoice_lines_tab => p_invoice_lines_tab,
4529: p_set_of_books_id => p_set_of_books_id,
4530: p_approval_workflow_flag => p_approval_workflow_flag,

Line 4547: -- ap_invoice_lines core transaction table

4543:
4544: --------------------------------------------------------------------------
4545: -- Step 2
4546: -- Call API to do base amount rounding for x_base_invoice_id in
4547: -- ap_invoice_lines core transaction table
4548: --------------------------------------------------------------------------
4549:
4550: debug_info := '(Create lines 2) Call Utility function to round the line '||
4551: ' before create distributions';

Line 4580: FROM AP_INVOICE_LINES

4576: IF l_rounded_amt <> 0 THEN
4577: -- get the existing base amount for the selected line
4578: select base_amount
4579: INTO l_base_amt
4580: FROM AP_INVOICE_LINES
4581: WHERE invoice_id = p_base_invoice_id
4582: AND line_number = l_round_inv_line_numbers(i);
4583:
4584: -- get the calculated adjusted base amount and rounding amount

Line 4592: UPDATE AP_INVOICE_LINES

4588: p_rounding_amt => l_modified_line_rounding_amt,
4589: p_next_line_rounding_amt => l_rounded_amt);
4590:
4591: -- update the calculatd base amount, rounding amount
4592: UPDATE AP_INVOICE_LINES
4593: SET base_amount = l_base_amt,
4594: rounding_amt = ABS( NVL(l_modified_line_rounding_amt, 0) ),
4595: last_update_date = SYSDATE,
4596: last_updated_by = FND_GLOBAL.user_id,

Line 4859: FROM ap_invoice_lines_interface

4855:
4856: BEGIN
4857: SELECT 'N'
4858: INTO l_tax_only_rcv_matched_flag
4859: FROM ap_invoice_lines_interface
4860: WHERE invoice_id = p_invoice_id
4861: AND (line_type_lookup_code <> 'TAX' OR
4862: (line_type_lookup_code = 'TAX' AND
4863: rcv_transaction_id IS NULL AND

Line 4916: FROM ap_invoice_lines_interface

4912:
4913: BEGIN
4914: SELECT 'N'
4915: INTO l_tax_only_flag
4916: FROM ap_invoice_lines_interface
4917: WHERE invoice_id = p_invoice_id
4918: AND line_type_lookup_code <> 'TAX'
4919: AND ROWNUM = 1;
4920: