DBA Data[Home] [Help]

APPS.JAI_AP_MATCH_TAX_PKG dependencies on AP_INVOICES_ALL

Line 362: FROM ap_invoices_all

358: COMMIT;
359: -- get the invoice number for writing onto the log file.
360: SELECT invoice_num
361: INTO v_invoice_number
362: FROM ap_invoices_all
363: WHERE invoice_id = v_prev_invoice_id;
364:
365: Fnd_File.put_line(Fnd_File.LOG, ' Processed invoice number(id) : ' || v_invoice_number || '(' || v_prev_invoice_id || ')' );
366:

Line 443: FROM ap_invoices_all

439:
440: -- get the invoice number for writing onto the log file.
441: SELECT invoice_num
442: INTO v_invoice_number
443: FROM ap_invoices_all
444: WHERE invoice_id = c_rec.invoice_id;
445:
446:
447: Fnd_File.put_line(Fnd_File.LOG, v_error_mesg || ' FOR invoice number(id)/line id : ' || v_invoice_number

Line 473: FROM ap_invoices_all

469: COMMIT;
470: -- get the invoice number for writing onto the log file.
471: SELECT invoice_num
472: INTO v_invoice_number
473: FROM ap_invoices_all
474: WHERE invoice_id = v_prev_invoice_id;
475:
476: Fnd_File.put_line(Fnd_File.LOG, ' Processed invoice number(id) : ' || v_invoice_number || '(' || v_prev_invoice_id || ')' );
477:

Line 540: FROM ap_invoices_all

536: IS
537: CURSOR get_ven_info(v_invoice_id NUMBER) IS
538: SELECT vendor_id, vendor_site_id, org_id, cancelled_date, invoice_num, set_of_books_id, -- added for bug#3354932
539: legal_entity_id /* rallamse bug#4448789 */
540: FROM ap_invoices_all
541: WHERE invoice_id = v_invoice_id;
542:
543: Cursor get_discard_info (ln_invoice_id number) is /*Added by nprashar for bug # 12832424*/
544: Select nvl(discarded_flag,'N') from ap_invoice_lines_all

Line 699: FROM ap_invoices_all api,

695: api.created_by,
696: api.last_update_date,
697: api.last_updated_by,
698: api.invoice_date
699: FROM ap_invoices_all api,
700: ap_invoice_distributions_all apd,
701: po_distributions_all pod,
702: po_headers_all poh
703: WHERE apd.invoice_id = api.invoice_id

Line 937: FROM ap_invoices_all

933: WHERE tax_id = t_id;
934:
935: CURSOR c_inv(inv_id NUMBER) IS
936: SELECT batch_id,source
937: FROM ap_invoices_all
938: WHERE invoice_id = inv_id;
939:
940: CURSOR for_org_id(inv_id NUMBER) IS
941: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code

Line 942: FROM ap_invoices_all

938: WHERE invoice_id = inv_id;
939:
940: CURSOR for_org_id(inv_id NUMBER) IS
941: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code
942: FROM ap_invoices_all
943: WHERE invoice_id = inv_id;
944:
945: CURSOR for_acct_id(orgn_id NUMBER) IS
946: SELECT accts_pay_code_combination_id

Line 1177: from ap_invoices_all

1173: /*Bug 8866084 - Added cursor to fetch Source of Invoice*/
1174: cursor c_get_ap_invoice_src (p_inv_id NUMBER)
1175: is
1176: select source
1177: from ap_invoices_all
1178: where invoice_id = p_inv_id;
1179:
1180: ln_source VARCHAR2(50);
1181:

Line 1218: apccid ap_invoices_all.ACCTS_PAY_CODE_COMBINATION_ID%TYPE;

1214: v_functional_currency gl_sets_of_books.currency_code%type; -- bug#3354932
1215: v_batch_id NUMBER;
1216: c_tax_rec c_tax%ROWTYPE;
1217: v_source VARCHAR2(25);
1218: apccid ap_invoices_all.ACCTS_PAY_CODE_COMBINATION_ID%TYPE;
1219: shpmnt_ln_id rcv_shipment_lines.shipment_line_id%TYPE;
1220: cur_items_rec cur_items%ROWTYPE;
1221: caid gl_sets_of_books.chart_of_accounts_id%TYPE;
1222: from_po_distributions_rec from_po_distributions%ROWTYPE;

Line 1379: FROM ap_invoices_all aia

1375: -- Added by Jason Liu for retroactive price on 2008/01/09
1376: -----------------------------------------------------------
1377: CURSOR get_source_csr IS
1378: SELECT aia.source
1379: FROM ap_invoices_all aia
1380: WHERE aia.invoice_id = inv_id;
1381: lv_source ap_invoices_all.source%TYPE;
1382: -----------------------------------------------------------
1383: rec_max_ap_lines_all CUR_GET_MAX_AP_INV_LINE%ROWTYPE;

Line 1381: lv_source ap_invoices_all.source%TYPE;

1377: CURSOR get_source_csr IS
1378: SELECT aia.source
1379: FROM ap_invoices_all aia
1380: WHERE aia.invoice_id = inv_id;
1381: lv_source ap_invoices_all.source%TYPE;
1382: -----------------------------------------------------------
1383: rec_max_ap_lines_all CUR_GET_MAX_AP_INV_LINE%ROWTYPE;
1384:
1385: ln_max_lnno NUMBER;

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

1514: begin
1515:
1516: v_mrc_string := 'BEGIN AP_MRC_ENGINE_PKG.Maintain_MRC_Data (
1517: p_operation_mode => ''UPDATE'',
1518: p_table_name => ''AP_INVOICES_ALL'',
1519: p_key_value => :a,
1520: p_key_value_list => NULL,
1521: p_calling_sequence =>
1522: ''India Local Tax amount added to invoice header (jai_ap_match_tax_pkg.process_online procedure)''

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

1847: apportion_tax_pay_on_rect_f. Added code for the same.
1848:
1849: 29 07/01/2003 Aparajita for bug#3354932. Version#618.2
1850: When the invoice is in foreign currency, for ERS invoice, base_amount in
1851: ap_invoices_all should be updated to include the loc taxes as otherwise
1852: it is creating wrong accounting entries.
1853:
1854: This update needs to be done only for ERS invoices as other cases localization
1855: does not update the invoice header amounts. p_rematch = 'PAY_ON_RECEIPT'.

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

1905: 35 15/05/2004 Aparajita for bug#3624898. Version#619.2
1906: Whenever the tax lines are populated, if the invoice is already fully paid
1907: the paid amount is displayed wrongly to be including the tax amount.
1908:
1909: Fixed the problem by updating the payment_status_flag in ap_invoices_all and
1910: ap_payment_shedules_all to 'P' in case it was Y.
1911:
1912: 36 21/05/2004 Aparajita for bug#3632810. Version#115.1
1913:

Line 1960: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all

1956:
1957: 39. 01/11/2003 ssumaith - bug# 3127834 - file version 115.4
1958:
1959: currency precision was not used for rounding the tax amounts when inserting / updating
1960: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all
1961: tables. As a result the invoice was going into automatic hold because the invoice amount
1962: does not equal sum of distributions amount.
1963:
1964: This has been resolved in the bug by getting the currency precision for the invoice

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

2012: made accordingly.
2013:
2014: 46 10-Jun-2005 rallamse for bug# Version 116.2
2015: All inserts into JAI_AP_MATCH_INV_TAXES table now include legal_entity_id as
2016: part of R12 LE Initiative. The legal_entity_id is selected from ap_invoices_all in
2017: cursor get_ven_info.
2018:
2019: 47 23-Jun-2005 Brathod for Bug# 4445989, Version 120.0
2020: Issue: Impact uptake on IL Product for AP_INVOICE_LINES_ALL Uptake

Line 2526: FROM ap_invoices_all

2522: -- End: bug # 2805527
2523:
2524: SELECT accts_pay_code_combination_id
2525: INTO apccid
2526: FROM ap_invoices_all
2527: WHERE invoice_id = inv_id;
2528:
2529: -- Using pn_invoice_line_number instead of dist_line_no for Bug#4445989
2530: OPEN for_dist_insertion(inv_id,pn_invoice_line_number, ln_min_dist_line_num);

Line 4026: * Removed the update which is updating ap_invoices_all

4022:
4023: END LOOP;
4024:
4025: /* Bug 5358788. Added by Lakshmi Gopalsami
4026: * Removed the update which is updating ap_invoices_all
4027: * and ap_payment_schedules_all
4028: */
4029:
4030: /* Bug 8866084 - Start

Line 4031: * Added the update which is updating ap_invoices_all

4027: * and ap_payment_schedules_all
4028: */
4029:
4030: /* Bug 8866084 - Start
4031: * Added the update which is updating ap_invoices_all
4032: * and ap_payment_schedules_all
4033: * Needs to be updated for Invoices created from iSupplier
4034: */
4035:

Line 4051: UPDATE ap_invoices_all

4047: cum_tax_amt := cum_tax_amt + 1;
4048:
4049: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt);
4050:
4051: UPDATE ap_invoices_all
4052: SET invoice_amount = invoice_amount + cum_tax_amt,
4053: approved_amount = approved_amount + cum_tax_amt,
4054: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
4055: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 4061: update ap_invoices_all

4057: WHERE invoice_id = inv_id;
4058:
4059: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
4060: -- invoice currency is not the functional currency.
4061: update ap_invoices_all
4062: set base_amount = invoice_amount * exchange_rate
4063: where invoice_id = inv_id;
4064: end if;
4065:

Line 4963: UPDATE ap_invoices_all

4959:
4960: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
4961:
4962:
4963: UPDATE ap_invoices_all
4964: SET invoice_amount = invoice_amount + cum_tax_amt,
4965: approved_amount = approved_amount + cum_tax_amt,
4966: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
4967: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 4975: update ap_invoices_all

4971:
4972: -- start added for bug#3354932
4973: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
4974: -- invoice currency is not the functional currency.
4975: update ap_invoices_all
4976: set base_amount = invoice_amount * exchange_rate
4977: where invoice_id = inv_id;
4978: end if;
4979: -- end added for bug#3354932

Line 5866: UPDATE ap_invoices_all

5862:
5863:
5864: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
5865:
5866: UPDATE ap_invoices_all
5867: SET invoice_amount = invoice_amount + cum_tax_amt,
5868: approved_amount = approved_amount + cum_tax_amt,
5869: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
5870: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 5879: update ap_invoices_all

5875:
5876: -- start added for bug#3354932
5877: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
5878: -- invoice currency is not the functional currency.
5879: update ap_invoices_all
5880: set base_amount = invoice_amount * exchange_rate
5881: where invoice_id = inv_id;
5882: end if;
5883: -- end added for bug#3354932

Line 7230: FROM ap_invoices_all

7226: SELECT vendor_id, vendor_site_id, org_id, cancelled_date -- cancelled date added by bug#3206083
7227: ,set_of_books_id -- added for bug#3354932
7228: ,legal_entity_id -- added rallamse for bug#
7229: ,invoice_num -- added by pramasub FP
7230: FROM ap_invoices_all
7231: WHERE invoice_id = v_invoice_id;
7232:
7233: CURSOR c_functional_currency(p_sob NUMBER) IS -- cursor added for bug#3354932
7234: SELECT currency_code

Line 7263: FROM ap_invoices_all api,

7259: api.created_by,
7260: api.last_update_date,
7261: api.last_updated_by,
7262: api.invoice_date
7263: FROM ap_invoices_all api,
7264: ap_invoice_distributions_all apd,
7265: po_distributions_all pod,
7266: po_headers_all poh
7267: WHERE api.invoice_id = inv_id

Line 7331: FROM ap_invoices_all

7327: WHERE tax_id = t_id;
7328:
7329: CURSOR c_inv(inv_id NUMBER) IS
7330: SELECT batch_id,source
7331: FROM ap_invoices_all
7332: WHERE invoice_id = inv_id;
7333:
7334: CURSOR for_org_id(inv_id NUMBER) IS
7335: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code

Line 7336: FROM ap_invoices_all

7332: WHERE invoice_id = inv_id;
7333:
7334: CURSOR for_org_id(inv_id NUMBER) IS
7335: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code
7336: FROM ap_invoices_all
7337: WHERE invoice_id = inv_id;
7338:
7339: /*CURSOR for_acct_id(orgn_id NUMBER) IS
7340: SELECT accts_pay_code_combination_id

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

7761:
7762: v_mrc_string := 'BEGIN AP_MRC_ENGINE_PKG.Maintain_MRC_Data
7763: (
7764: p_operation_mode => ''UPDATE'',
7765: p_table_name => ''AP_INVOICES_ALL'',
7766: p_key_value => :a,
7767: p_key_value_list => NULL,
7768: p_calling_sequence =>
7769: ''India Local Tax amount added to invoice header (jai_ap_match_tax_pkg.process_batch_record procedure)''

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

7844: not getting populated, have done the same changes for that scenario.
7845:
7846: 8. 16/12/2002 cbabu for bug# 2713601, FileVersion # 615.6
7847: AP_PAYMENTS_SCHEDULES_ALL is not getting updated with the tax amount
7848: as soon as AP_INVOICES_ALL isgetting updated. Update statement for
7849: ap_payment_schedules_all is written for scenario where rcv_transaction_id
7850: in ap_invoice_distributions_all is NULL. Thsi happens in PO matching
7851: setup for ERS invoices.
7852:

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

7967: apportion_tax_pay_on_rect_f. Added code for the same.
7968:
7969: 29 07/01/2003 Aparajita for bug#3354932. Version#618.2
7970: When the invoice is in foreign currency, for ERS invoice, base_amount in
7971: ap_invoices_all should be updated to include the loc taxes as otherwise
7972: it is creating wrong accounting entries.
7973:
7974: This update needs to be done only for ERS invoices as other cases
7975: localization does not update the

Line 8057: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all

8053:
8054: 37. 01/11/2003 ssumaith - bug# 3127834 - file version 115.2
8055:
8056: currency precision was not used for rounding the tax amounts when inserting / updating
8057: records into ap_invoices_all , ap_invoices_distributions_all , ap_payment_Schedules_all
8058: tables. As a result the invoice was going into automatic hold because the invoice amount
8059: does not equal sum of distributions amount.
8060:
8061: This has been resolved in the bug by getting the currency precision for the invoice

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

8101: made accordingly.
8102:
8103: 43. 10-Jun-2005 rallamse for bug# Version 116.2
8104: All inserts into JAI_AP_MATCH_INV_TAXES table now include legal_entity_id as
8105: part of R12 LE Initiative. The legal_entity_id is selected from ap_invoices_all in
8106: cursor get_ven_info.
8107:
8108: 44 23-Jun-2005 Brathod for Bug# 4445989, Version 120.0
8109: Issue: Impact uptake on IL Product for AP_INVOICE_LINES_ALL Uptake

Line 9202: UPDATE ap_invoices_all

9198:
9199: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
9200:
9201: -- cum_tax_amt := round(cum_Tax_amt,ln_precision);
9202: UPDATE ap_invoices_all
9203: SET invoice_amount = invoice_amount + cum_tax_amt,
9204: approved_amount = approved_amount + cum_tax_amt,
9205: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
9206: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 9213: update ap_invoices_all

9209:
9210: -- start added for bug#3354932
9211: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
9212: -- invoice currency is not the functional currency.
9213: update ap_invoices_all
9214: set base_amount = invoice_amount * exchange_rate
9215: where invoice_id = inv_id;
9216: end if;
9217: -- end added for bug#3354932

Line 10067: UPDATE ap_invoices_all

10063:
10064: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- added by bug 321978.
10065:
10066: -- cum_tax_amt := round(cum_tax_amt,ln_precision);
10067: UPDATE ap_invoices_all
10068: SET invoice_amount = invoice_amount + cum_tax_amt,
10069: approved_amount = approved_amount + cum_tax_amt,
10070: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
10071: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 10077: update ap_invoices_all

10073: WHERE invoice_id = inv_id;
10074:
10075: -- start added for bug#3354932
10076: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
10077: update ap_invoices_all
10078: set base_amount = invoice_amount * exchange_rate
10079: where invoice_id = inv_id;
10080: end if;
10081: -- end added for bug#3354932

Line 10934: UPDATE ap_invoices_all

10930: v_statement_no := '66';
10931:
10932: v_update_payment_schedule:=update_payment_schedule(cum_tax_amt); -- bug#3218978
10933: -- cum_tax_amt := round(cum_Tax_amt,ln_precision);
10934: UPDATE ap_invoices_all
10935: SET invoice_amount = invoice_amount + cum_tax_amt,
10936: approved_amount = approved_amount + cum_tax_amt,
10937: pay_curr_invoice_amount = pay_curr_invoice_amount + cum_tax_amt,
10938: amount_applicable_to_discount = amount_applicable_to_discount + cum_tax_amt,

Line 10946: update ap_invoices_all

10942:
10943: -- start added for bug#3354932
10944: if for_org_id_rec.invoice_currency_code <> v_functional_currency then
10945: -- invoice currency is not the functional currency.
10946: update ap_invoices_all
10947: set base_amount = invoice_amount * exchange_rate
10948: where invoice_id = inv_id;
10949: end if;
10950: -- end added for bug#3354932