DBA Data[Home] [Help]

APPS.JAI_AP_MATCH_TAX_PKG dependencies on AP_INVOICES_ALL

Line 319: FROM ap_invoices_all

315: COMMIT;
316: -- get the invoice number for writing onto the log file.
317: SELECT invoice_num
318: INTO v_invoice_number
319: FROM ap_invoices_all
320: WHERE invoice_id = v_prev_invoice_id;
321:
322: Fnd_File.put_line(Fnd_File.LOG, ' Processed invoice number(id) : ' || v_invoice_number || '(' || v_prev_invoice_id || ')' );
323:

Line 400: FROM ap_invoices_all

396:
397: -- get the invoice number for writing onto the log file.
398: SELECT invoice_num
399: INTO v_invoice_number
400: FROM ap_invoices_all
401: WHERE invoice_id = c_rec.invoice_id;
402:
403:
404: Fnd_File.put_line(Fnd_File.LOG, v_error_mesg || ' FOR invoice number(id)/line id : ' || v_invoice_number

Line 430: FROM ap_invoices_all

426: COMMIT;
427: -- get the invoice number for writing onto the log file.
428: SELECT invoice_num
429: INTO v_invoice_number
430: FROM ap_invoices_all
431: WHERE invoice_id = v_prev_invoice_id;
432:
433: Fnd_File.put_line(Fnd_File.LOG, ' Processed invoice number(id) : ' || v_invoice_number || '(' || v_prev_invoice_id || ')' );
434:

Line 497: FROM ap_invoices_all

493: IS
494: CURSOR get_ven_info(v_invoice_id NUMBER) IS
495: SELECT vendor_id, vendor_site_id, org_id, cancelled_date, invoice_num, set_of_books_id, -- added for bug#3354932
496: legal_entity_id /* rallamse bug#4448789 */
497: FROM ap_invoices_all
498: WHERE invoice_id = v_invoice_id;
499:
500: CURSOR c_functional_currency(p_sob NUMBER) IS -- cursor added for bug#3354932
501: SELECT currency_code

Line 539: FROM ap_invoices_all api,

535: api.created_by,
536: api.last_update_date,
537: api.last_updated_by,
538: api.invoice_date
539: FROM ap_invoices_all api,
540: ap_invoice_distributions_all apd,
541: po_distributions_all pod,
542: po_headers_all poh
543: WHERE apd.invoice_id = api.invoice_id

Line 680: FROM ap_invoices_all

676: WHERE tax_id = t_id;
677:
678: CURSOR c_inv(inv_id NUMBER) IS
679: SELECT batch_id,source
680: FROM ap_invoices_all
681: WHERE invoice_id = inv_id;
682:
683: CURSOR for_org_id(inv_id NUMBER) IS
684: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code

Line 685: FROM ap_invoices_all

681: WHERE invoice_id = inv_id;
682:
683: CURSOR for_org_id(inv_id NUMBER) IS
684: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code
685: FROM ap_invoices_all
686: WHERE invoice_id = inv_id;
687:
688: CURSOR for_acct_id(orgn_id NUMBER) IS
689: SELECT accts_pay_code_combination_id

Line 922: apccid ap_invoices_all.ACCTS_PAY_CODE_COMBINATION_ID%TYPE;

918: v_functional_currency gl_sets_of_books.currency_code%type; -- bug#3354932
919: v_batch_id NUMBER;
920: c_tax_rec c_tax%ROWTYPE;
921: v_source VARCHAR2(25);
922: apccid ap_invoices_all.ACCTS_PAY_CODE_COMBINATION_ID%TYPE;
923: shpmnt_ln_id rcv_shipment_lines.shipment_line_id%TYPE;
924: cur_items_rec cur_items%ROWTYPE;
925: caid gl_sets_of_books.chart_of_accounts_id%TYPE;
926: from_po_distributions_rec from_po_distributions%ROWTYPE;

Line 1062: FROM ap_invoices_all aia

1058: -- Added by Jason Liu for retroactive price on 2008/01/09
1059: -----------------------------------------------------------
1060: CURSOR get_source_csr IS
1061: SELECT aia.source
1062: FROM ap_invoices_all aia
1063: WHERE aia.invoice_id = inv_id;
1064: lv_source ap_invoices_all.source%TYPE;
1065: -----------------------------------------------------------
1066: rec_max_ap_lines_all CUR_GET_MAX_AP_INV_LINE%ROWTYPE;

Line 1064: lv_source ap_invoices_all.source%TYPE;

1060: CURSOR get_source_csr IS
1061: SELECT aia.source
1062: FROM ap_invoices_all aia
1063: WHERE aia.invoice_id = inv_id;
1064: lv_source ap_invoices_all.source%TYPE;
1065: -----------------------------------------------------------
1066: rec_max_ap_lines_all CUR_GET_MAX_AP_INV_LINE%ROWTYPE;
1067:
1068: ln_max_lnno NUMBER;

Line 1199: p_table_name => ''AP_INVOICES_ALL'',

1195: begin
1196:
1197: v_mrc_string := 'BEGIN AP_MRC_ENGINE_PKG.Maintain_MRC_Data (
1198: p_operation_mode => ''UPDATE'',
1199: p_table_name => ''AP_INVOICES_ALL'',
1200: p_key_value => :a,
1201: p_key_value_list => NULL,
1202: p_calling_sequence =>
1203: ''India Local Tax amount added to invoice header (jai_ap_match_tax_pkg.process_online procedure)''

Line 1524: ap_invoices_all should be updated to include the loc taxes as otherwise

1520: apportion_tax_pay_on_rect_f. Added code for the same.
1521:
1522: 29 07/01/2003 Aparajita for bug#3354932. Version#618.2
1523: When the invoice is in foreign currency, for ERS invoice, base_amount in
1524: ap_invoices_all should be updated to include the loc taxes as otherwise
1525: it is creating wrong accounting entries.
1526:
1527: This update needs to be done only for ERS invoices as other cases localization
1528: does not update the invoice header amounts. p_rematch = 'PAY_ON_RECEIPT'.

Line 1582: Fixed the problem by updating the payment_status_flag in ap_invoices_all and

1578: 35 15/05/2004 Aparajita for bug#3624898. Version#619.2
1579: Whenever the tax lines are populated, if the invoice is already fully paid
1580: the paid amount is displayed wrongly to be including the tax amount.
1581:
1582: Fixed the problem by updating the payment_status_flag in ap_invoices_all and
1583: ap_payment_shedules_all to 'P' in case it was Y.
1584:
1585: 36 21/05/2004 Aparajita for bug#3632810. Version#115.1
1586:

Line 1633: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all

1629:
1630: 39. 01/11/2003 ssumaith - bug# 3127834 - file version 115.4
1631:
1632: currency precision was not used for rounding the tax amounts when inserting / updating
1633: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all
1634: tables. As a result the invoice was going into automatic hold because the invoice amount
1635: does not equal sum of distributions amount.
1636:
1637: This has been resolved in the bug by getting the currency precision for the invoice

Line 1689: part of R12 LE Initiative. The legal_entity_id is selected from ap_invoices_all in

1685: made accordingly.
1686:
1687: 46 10-Jun-2005 rallamse for bug# Version 116.2
1688: All inserts into JAI_AP_MATCH_INV_TAXES table now include legal_entity_id as
1689: part of R12 LE Initiative. The legal_entity_id is selected from ap_invoices_all in
1690: cursor get_ven_info.
1691:
1692: 47 23-Jun-2005 Brathod for Bug# 4445989, Version 120.0
1693: Issue: Impact uptake on IL Product for AP_INVOICE_LINES_ALL Uptake

Line 1906: FROM ap_invoices_all

1902: -- End: bug # 2805527
1903:
1904: SELECT accts_pay_code_combination_id
1905: INTO apccid
1906: FROM ap_invoices_all
1907: WHERE invoice_id = inv_id;
1908:
1909: -- Using pn_invoice_line_number instead of dist_line_no for Bug#4445989
1910: OPEN for_dist_insertion(inv_id,pn_invoice_line_number, ln_min_dist_line_num);

Line 2971: * Removed the update which is updating ap_invoices_all

2967: end loop ;--> for line in 1 to ln_lines_to_insert Brathod, 5763527
2968: END LOOP;
2969:
2970: /* Bug 5358788. Added by Lakshmi Gopalsami
2971: * Removed the update which is updating ap_invoices_all
2972: * and ap_payment_schedules_all
2973: */
2974:
2975: ELSIF p_rematch = 'PAY_ON_RECEIPT' THEN

Line 3821: UPDATE ap_invoices_all

3817:
3818: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
3819:
3820:
3821: UPDATE ap_invoices_all
3822: SET invoice_amount = invoice_amount + cum_tax_amt,
3823: approved_amount = approved_amount + cum_tax_amt,
3824: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
3825: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 3833: update ap_invoices_all

3829:
3830: -- start added for bug#3354932
3831: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
3832: -- invoice currency is not the functional currency.
3833: update ap_invoices_all
3834: set base_amount = invoice_amount * exchange_rate
3835: where invoice_id = inv_id;
3836: end if;
3837: -- end added for bug#3354932

Line 4692: UPDATE ap_invoices_all

4688:
4689:
4690: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
4691:
4692: UPDATE ap_invoices_all
4693: SET invoice_amount = invoice_amount + cum_tax_amt,
4694: approved_amount = approved_amount + cum_tax_amt,
4695: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
4696: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 4705: update ap_invoices_all

4701:
4702: -- start added for bug#3354932
4703: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
4704: -- invoice currency is not the functional currency.
4705: update ap_invoices_all
4706: set base_amount = invoice_amount * exchange_rate
4707: where invoice_id = inv_id;
4708: end if;
4709: -- end added for bug#3354932

Line 5681: FROM ap_invoices_all

5677: SELECT vendor_id, vendor_site_id, org_id, cancelled_date -- cancelled date added by bug#3206083
5678: ,set_of_books_id -- added for bug#3354932
5679: ,legal_entity_id -- added rallamse for bug#
5680: ,invoice_num -- added by pramasub FP
5681: FROM ap_invoices_all
5682: WHERE invoice_id = v_invoice_id;
5683:
5684: CURSOR c_functional_currency(p_sob NUMBER) IS -- cursor added for bug#3354932
5685: SELECT currency_code

Line 5714: FROM ap_invoices_all api,

5710: api.created_by,
5711: api.last_update_date,
5712: api.last_updated_by,
5713: api.invoice_date
5714: FROM ap_invoices_all api,
5715: ap_invoice_distributions_all apd,
5716: po_distributions_all pod,
5717: po_headers_all poh
5718: WHERE api.invoice_id = inv_id

Line 5781: FROM ap_invoices_all

5777: WHERE tax_id = t_id;
5778:
5779: CURSOR c_inv(inv_id NUMBER) IS
5780: SELECT batch_id,source
5781: FROM ap_invoices_all
5782: WHERE invoice_id = inv_id;
5783:
5784: CURSOR for_org_id(inv_id NUMBER) IS
5785: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code

Line 5786: FROM ap_invoices_all

5782: WHERE invoice_id = inv_id;
5783:
5784: CURSOR for_org_id(inv_id NUMBER) IS
5785: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code
5786: FROM ap_invoices_all
5787: WHERE invoice_id = inv_id;
5788:
5789: /*CURSOR for_acct_id(orgn_id NUMBER) IS
5790: SELECT accts_pay_code_combination_id

Line 6211: p_table_name => ''AP_INVOICES_ALL'',

6207:
6208: v_mrc_string := 'BEGIN AP_MRC_ENGINE_PKG.Maintain_MRC_Data
6209: (
6210: p_operation_mode => ''UPDATE'',
6211: p_table_name => ''AP_INVOICES_ALL'',
6212: p_key_value => :a,
6213: p_key_value_list => NULL,
6214: p_calling_sequence =>
6215: ''India Local Tax amount added to invoice header (jai_ap_match_tax_pkg.process_batch_record procedure)''

Line 6294: as soon as AP_INVOICES_ALL isgetting updated. Update statement for

6290: not getting populated, have done the same changes for that scenario.
6291:
6292: 8. 16/12/2002 cbabu for bug# 2713601, FileVersion # 615.6
6293: AP_PAYMENTS_SCHEDULES_ALL is not getting updated with the tax amount
6294: as soon as AP_INVOICES_ALL isgetting updated. Update statement for
6295: ap_payment_schedules_all is written for scenario where rcv_transaction_id
6296: in ap_invoice_distributions_all is NULL. Thsi happens in PO matching
6297: setup for ERS invoices.
6298:

Line 6417: ap_invoices_all should be updated to include the loc taxes as otherwise

6413: apportion_tax_pay_on_rect_f. Added code for the same.
6414:
6415: 29 07/01/2003 Aparajita for bug#3354932. Version#618.2
6416: When the invoice is in foreign currency, for ERS invoice, base_amount in
6417: ap_invoices_all should be updated to include the loc taxes as otherwise
6418: it is creating wrong accounting entries.
6419:
6420: This update needs to be done only for ERS invoices as other cases
6421: localization does not update the

Line 6503: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all

6499:
6500: 37. 01/11/2003 ssumaith - bug# 3127834 - file version 115.2
6501:
6502: currency precision was not used for rounding the tax amounts when inserting / updating
6503: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all
6504: tables. As a result the invoice was going into automatic hold because the invoice amount
6505: does not equal sum of distributions amount.
6506:
6507: This has been resolved in the bug by getting the currency precision for the invoice

Line 6551: part of R12 LE Initiative. The legal_entity_id is selected from ap_invoices_all in

6547: made accordingly.
6548:
6549: 43. 10-Jun-2005 rallamse for bug# Version 116.2
6550: All inserts into JAI_AP_MATCH_INV_TAXES table now include legal_entity_id as
6551: part of R12 LE Initiative. The legal_entity_id is selected from ap_invoices_all in
6552: cursor get_ven_info.
6553:
6554: 44 23-Jun-2005 Brathod for Bug# 4445989, Version 120.0
6555: Issue: Impact uptake on IL Product for AP_INVOICE_LINES_ALL Uptake

Line 7630: UPDATE ap_invoices_all

7626:
7627: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
7628:
7629: -- cum_tax_amt := round(cum_Tax_amt,ln_precision);
7630: UPDATE ap_invoices_all
7631: SET invoice_amount = invoice_amount + cum_tax_amt,
7632: approved_amount = approved_amount + cum_tax_amt,
7633: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
7634: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 7641: update ap_invoices_all

7637:
7638: -- start added for bug#3354932
7639: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
7640: -- invoice currency is not the functional currency.
7641: update ap_invoices_all
7642: set base_amount = invoice_amount * exchange_rate
7643: where invoice_id = inv_id;
7644: end if;
7645: -- end added for bug#3354932

Line 8483: UPDATE ap_invoices_all

8479:
8480: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- added by bug 321978.
8481:
8482: -- cum_tax_amt := round(cum_tax_amt,ln_precision);
8483: UPDATE ap_invoices_all
8484: SET invoice_amount = invoice_amount + cum_tax_amt,
8485: approved_amount = approved_amount + cum_tax_amt,
8486: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
8487: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 8493: update ap_invoices_all

8489: WHERE invoice_id = inv_id;
8490:
8491: -- start added for bug#3354932
8492: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
8493: update ap_invoices_all
8494: set base_amount = invoice_amount * exchange_rate
8495: where invoice_id = inv_id;
8496: end if;
8497: -- end added for bug#3354932

Line 9331: UPDATE ap_invoices_all

9327: v_statement_no := '66';
9328:
9329: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
9330: -- cum_tax_amt := round(cum_Tax_amt,ln_precision);
9331: UPDATE ap_invoices_all
9332: SET invoice_amount = invoice_amount + cum_tax_amt,
9333: approved_amount = approved_amount + cum_tax_amt,
9334: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
9335: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 9343: update ap_invoices_all

9339:
9340: -- start added for bug#3354932
9341: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
9342: -- invoice currency is not the functional currency.
9343: update ap_invoices_all
9344: set base_amount = invoice_amount * exchange_rate
9345: where invoice_id = inv_id;
9346: end if;
9347: -- end added for bug#3354932