DBA Data[Home] [Help]

APPS.JAI_CMN_ST_FORMS_PKG dependencies on JAI_AP_MATCH_INV_TAXES

Line 59: from JAI_AP_MATCH_INV_TAXES

55: cursor c_get_distrib_tax_details (p_invoice_id number, p_line_number number) IS /* p_distribution_no --uptake of ap_invoice_lines_all */
56: select tax_id, line_location_id, po_header_id, po_line_id, tax_amount,
57: parent_invoice_line_number --parent_invoice_distribution_id /* uptake of ap_invoice_lines_all */
58: ,recoverable_flag -- 5763527
59: from JAI_AP_MATCH_INV_TAXES
60: where invoice_id = p_invoice_id
61: and invoice_line_number = p_line_number; /* uptake of ap_invoice_lines_all */
62: /* and distribution_line_number = p_distribution_no;*/
63:

Line 71: lv_recoverable_flag JAI_AP_MATCH_INV_TAXES.recoverable_flag%type ;-- 5763527

67: from JAI_CMN_TAXES_ALL
68: where tax_id = p_tax_id;
69:
70: v_mod_cr_pctg JAI_CMN_TAXES_ALL.mod_cr_percentage%type ;-- 5763527
71: lv_recoverable_flag JAI_AP_MATCH_INV_TAXES.recoverable_flag%type ;-- 5763527
72:
73:
74: cursor c_get_ven_info(p_invoice_id number) is
75: select vendor_id, vendor_site_id, org_id

Line 159: v_po_line_location_id JAI_AP_MATCH_INV_TAXES.line_location_id%type;

155: Changed the variable declaration from reference to ja_in_po_st_forms_hdr.form_issue_id to JAI_CMN_STFORM_HDRS_ALL.st_hdr_id.
156: This was required as the table ja_in_po_st_forms_hdr has been obsoleted.
157: */
158: v_st_hdr_id JAI_CMN_STFORM_HDRS_ALL.st_hdr_id%type;
159: v_po_line_location_id JAI_AP_MATCH_INV_TAXES.line_location_id%type;
160: v_po_header_id JAI_AP_MATCH_INV_TAXES.po_header_id%type;
161: v_po_num po_headers_all.segment1%type;
162: v_po_line_id JAI_AP_MATCH_INV_TAXES.po_line_id%type;
163: v_tax_line_no JAI_PO_TAXES.tax_line_no%type;

Line 160: v_po_header_id JAI_AP_MATCH_INV_TAXES.po_header_id%type;

156: This was required as the table ja_in_po_st_forms_hdr has been obsoleted.
157: */
158: v_st_hdr_id JAI_CMN_STFORM_HDRS_ALL.st_hdr_id%type;
159: v_po_line_location_id JAI_AP_MATCH_INV_TAXES.line_location_id%type;
160: v_po_header_id JAI_AP_MATCH_INV_TAXES.po_header_id%type;
161: v_po_num po_headers_all.segment1%type;
162: v_po_line_id JAI_AP_MATCH_INV_TAXES.po_line_id%type;
163: v_tax_line_no JAI_PO_TAXES.tax_line_no%type;
164: v_match_option po_line_locations_all.match_option%type;

Line 162: v_po_line_id JAI_AP_MATCH_INV_TAXES.po_line_id%type;

158: v_st_hdr_id JAI_CMN_STFORM_HDRS_ALL.st_hdr_id%type;
159: v_po_line_location_id JAI_AP_MATCH_INV_TAXES.line_location_id%type;
160: v_po_header_id JAI_AP_MATCH_INV_TAXES.po_header_id%type;
161: v_po_num po_headers_all.segment1%type;
162: v_po_line_id JAI_AP_MATCH_INV_TAXES.po_line_id%type;
163: v_tax_line_no JAI_PO_TAXES.tax_line_no%type;
164: v_match_option po_line_locations_all.match_option%type;
165: v_ship_to_organization_id po_line_locations_all.ship_to_organization_id%type;
166: v_ship_to_location_id po_line_locations_all.ship_to_location_id%type;

Line 168: v_tax_amount JAI_AP_MATCH_INV_TAXES.tax_amount%type;

164: v_match_option po_line_locations_all.match_option%type;
165: v_ship_to_organization_id po_line_locations_all.ship_to_organization_id%type;
166: v_ship_to_location_id po_line_locations_all.ship_to_location_id%type;
167: v_type_lookup_code po_headers_all.type_lookup_code%type;
168: v_tax_amount JAI_AP_MATCH_INV_TAXES.tax_amount%type;
169: v_doc_type varchar2(10);
170: v_tax_target_amount number;
171: v_st_dtl_id number;
172: v_rcv_transaction_id ap_invoice_distributions_all.rcv_transaction_id%type;

Line 194: v_parent_invoice_line_number JAI_AP_MATCH_INV_TAXES.parent_invoice_line_number%type ;

190: v_not_processed_inv_cnt number;
191:
192: lv_lt_lookup_code ap_invoice_distributions_all.line_type_lookup_code%type ;
193: lv_lt_inclu_lookup_code ap_invoice_distributions_all.line_type_lookup_code%type ; -- Added by Jia for Bug#9535954
194: v_parent_invoice_line_number JAI_AP_MATCH_INV_TAXES.parent_invoice_line_number%type ;
195:
196:
197: function getSTformsTaxBaseAmount /* uptake of ap_invoice_lines_all*/
198: (

Line 258: from jai_ap_match_inv_taxes

254:
255: /*Cursor Added by nprashar for bug # 12561167 */
256: cursor c_get_po_details_rcv (p_invoice_id_match number) is
257: select distinct po_header_id, po_line_id, line_location_id
258: from jai_ap_match_inv_taxes
259: where invoice_id = p_invoice_id_match
260: and parent_invoice_line_number = v_line_number;
261:
262: -- precedences are always available in po taxes only (receipt taxes does not have it)

Line 300: from JAI_AP_MATCH_INV_TAXES jmit

296: from ap_invoice_lines_all
297: where invoice_id = p_invoice_id
298: and line_number =
299: ( select jmit.invoice_line_number
300: from JAI_AP_MATCH_INV_TAXES jmit
301: where jmit.invoice_id = p_invoice_id
302: and jmit.po_header_id = p_po_header_id
303: and jmit.po_line_id = p_po_line_id
304: and jmit.line_location_id = p_line_location_id

Line 333: from jai_ap_match_inv_taxes

329: c_line_location_id NUMBER,
330: c_po_distribution_id NUMBER)
331: IS
332: select SUM(base_amount)
333: from jai_ap_match_inv_taxes
334: where invoice_id = c_invoice_id
335: and parent_invoice_distribution_id = c_invoice_distribution_id
336: and po_header_id = c_po_header_id
337: and po_line_id = c_po_line_id

Line 401: IF nvl(v_tax_base_amt_loop,0) = 0 Then /*Tax id present in JAI_AP_MATCH_INV_TAXES

397: v_po_line_location_id, v_po_distribution_id,v_line_number);
398: Fetch c_get_non_zero_precedence_amt into v_tax_base_amt_loop;
399: Close c_get_non_zero_precedence_amt;
400:
401: IF nvl(v_tax_base_amt_loop,0) = 0 Then /*Tax id present in JAI_AP_MATCH_INV_TAXES
402: is not present in jai_po_taxes*/
403: Begin /*Added Begin End section for bug # 12561167 */
404: select jamit.tax_amount into v_tax_base_amt_loop
405: from JAI_AP_MATCH_INV_TAXES jamit

Line 405: from JAI_AP_MATCH_INV_TAXES jamit

401: IF nvl(v_tax_base_amt_loop,0) = 0 Then /*Tax id present in JAI_AP_MATCH_INV_TAXES
402: is not present in jai_po_taxes*/
403: Begin /*Added Begin End section for bug # 12561167 */
404: select jamit.tax_amount into v_tax_base_amt_loop
405: from JAI_AP_MATCH_INV_TAXES jamit
406: , jai_cmn_taxes_all jcta -- for bug 14183827 by anupgupt
407: Where jamit.invoice_id = p_invoice_id
408: and jamit.po_header_id = v_po_header_id
409: and jamit.po_line_id = v_po_line_id

Line 581: from JAI_AP_MATCH_INV_TAXES

577: or
578: (p_vendor_site_id is not null and vendor_site_id = p_vendor_site_id)
579: )
580: and exists (select '1'
581: from JAI_AP_MATCH_INV_TAXES
582: where invoice_id = a.invoice_id
583: and tax_id in (select tax_id from JAI_CMN_TAXES_ALL where stform_type is not null)
584: ) -- to ensure that loc taxes exists for the invoice and are of st forms type.
585:

Line 733: from JAI_AP_MATCH_INV_TAXES

729: ) -- to ensure that the line is not processed twice.
730: -- This should not happen as the invoice is already checked for prior processing.
731: and exists
732: (select '1'
733: from JAI_AP_MATCH_INV_TAXES
734: where invoice_id = b.invoice_id
735: --and distribution_line_number = b.distribution_line_number
736: and invoice_line_number = b.line_number
737: and tax_id in (select tax_id from JAI_CMN_TAXES_ALL where stform_type is not null)

Line 758: from JAI_AP_MATCH_INV_TAXES

754: and invoice_line_number = b.line_number
755: and issue_receipt_flag = 'I')
756: and exists
757: (select '1'
758: from JAI_AP_MATCH_INV_TAXES
759: where invoice_id = b.invoice_id
760: and invoice_line_number = b.line_number
761: and tax_id in
762: (select tax_id

Line 777: -- get the tax id for the distribution line from table JAI_AP_MATCH_INV_TAXES

773:
774:
775: begin
776:
777: -- get the tax id for the distribution line from table JAI_AP_MATCH_INV_TAXES
778:
779: v_tax_id := null;
780: v_tax_type := null;
781: v_tax_rate := null;