82: X_Calling_Sequence IN VARCHAR2);
83:
84: --Global Variables
85:
86: g_vendor_id ap_invoices.vendor_id%TYPE;
87: g_vendor_site_id ap_invoices.vendor_site_id%TYPE;
88: g_invoice_date ap_invoices.invoice_date%TYPE;
89: g_batch_id ap_batches.batch_id%TYPE;
90: g_max_invoice_line_number ap_invoice_lines.line_number%TYPE;
83:
84: --Global Variables
85:
86: g_vendor_id ap_invoices.vendor_id%TYPE;
87: g_vendor_site_id ap_invoices.vendor_site_id%TYPE;
88: g_invoice_date ap_invoices.invoice_date%TYPE;
89: g_batch_id ap_batches.batch_id%TYPE;
90: g_max_invoice_line_number ap_invoice_lines.line_number%TYPE;
91: g_invoice_currency_code ap_invoices.invoice_currency_code%TYPE;
84: --Global Variables
85:
86: g_vendor_id ap_invoices.vendor_id%TYPE;
87: g_vendor_site_id ap_invoices.vendor_site_id%TYPE;
88: g_invoice_date ap_invoices.invoice_date%TYPE;
89: g_batch_id ap_batches.batch_id%TYPE;
90: g_max_invoice_line_number ap_invoice_lines.line_number%TYPE;
91: g_invoice_currency_code ap_invoices.invoice_currency_code%TYPE;
92: g_exchange_rate ap_invoices.exchange_rate%TYPE;
87: g_vendor_site_id ap_invoices.vendor_site_id%TYPE;
88: g_invoice_date ap_invoices.invoice_date%TYPE;
89: g_batch_id ap_batches.batch_id%TYPE;
90: g_max_invoice_line_number ap_invoice_lines.line_number%TYPE;
91: g_invoice_currency_code ap_invoices.invoice_currency_code%TYPE;
92: g_exchange_rate ap_invoices.exchange_rate%TYPE;
93: g_base_currency_code ap_system_parameters.base_currency_code%TYPE;
94: g_accounting_date ap_invoices.gl_date%TYPE;
95: g_period_name gl_period_statuses.period_name%TYPE;
88: g_invoice_date ap_invoices.invoice_date%TYPE;
89: g_batch_id ap_batches.batch_id%TYPE;
90: g_max_invoice_line_number ap_invoice_lines.line_number%TYPE;
91: g_invoice_currency_code ap_invoices.invoice_currency_code%TYPE;
92: g_exchange_rate ap_invoices.exchange_rate%TYPE;
93: g_base_currency_code ap_system_parameters.base_currency_code%TYPE;
94: g_accounting_date ap_invoices.gl_date%TYPE;
95: g_period_name gl_period_statuses.period_name%TYPE;
96: g_set_of_books_id ap_invoices.set_of_books_id%TYPE;
90: g_max_invoice_line_number ap_invoice_lines.line_number%TYPE;
91: g_invoice_currency_code ap_invoices.invoice_currency_code%TYPE;
92: g_exchange_rate ap_invoices.exchange_rate%TYPE;
93: g_base_currency_code ap_system_parameters.base_currency_code%TYPE;
94: g_accounting_date ap_invoices.gl_date%TYPE;
95: g_period_name gl_period_statuses.period_name%TYPE;
96: g_set_of_books_id ap_invoices.set_of_books_id%TYPE;
97: g_type_1099 po_vendors.type_1099%TYPE;
98: g_income_tax_region ap_system_parameters.income_tax_region%TYPE;
92: g_exchange_rate ap_invoices.exchange_rate%TYPE;
93: g_base_currency_code ap_system_parameters.base_currency_code%TYPE;
94: g_accounting_date ap_invoices.gl_date%TYPE;
95: g_period_name gl_period_statuses.period_name%TYPE;
96: g_set_of_books_id ap_invoices.set_of_books_id%TYPE;
97: g_type_1099 po_vendors.type_1099%TYPE;
98: g_income_tax_region ap_system_parameters.income_tax_region%TYPE;
99: g_allow_pa_override VARCHAR2(1);
100: g_pa_expenditure_date_default VARCHAR2(50);
102: g_asset_book_type_code fa_book_controls.book_type_code%TYPE;
103: g_transfer_flag ap_system_parameters.transfer_desc_flex_flag%TYPE;
104: g_user_id number;
105: g_login_id number;
106: g_trx_business_category ap_invoices.trx_business_category%TYPE;
107: G_Org_Id ap_invoices.org_id%TYPE;
108: G_intended_use zx_lines_det_factors.line_intended_use%type;
109: G_product_type zx_lines_det_factors.product_type%type;
110: G_product_category zx_lines_det_factors.product_category%type;
103: g_transfer_flag ap_system_parameters.transfer_desc_flex_flag%TYPE;
104: g_user_id number;
105: g_login_id number;
106: g_trx_business_category ap_invoices.trx_business_category%TYPE;
107: G_Org_Id ap_invoices.org_id%TYPE;
108: G_intended_use zx_lines_det_factors.line_intended_use%type;
109: G_product_type zx_lines_det_factors.product_type%type;
110: G_product_category zx_lines_det_factors.product_category%type;
111: G_product_fisc_class zx_lines_det_factors.product_fisc_classification%type;
161: current_calling_sequence := 'AP_OTHR_CHRG_MATCH_PKG.othr_chrg_match <-'
162: || X_calling_sequence;
163:
164:
165: --Retreive certain information from ap_invoices table and
166: --ap_system_parameters
167:
168: l_debug_info := 'Select information from ap_invoices';
169:
164:
165: --Retreive certain information from ap_invoices table and
166: --ap_system_parameters
167:
168: l_debug_info := 'Select information from ap_invoices';
169:
170: Get_Info(X_Invoice_Id => x_invoice_id,
171: X_Calling_Sequence => current_calling_sequence);
172:
218: BEGIN
219:
220: Select invoice_type_lookup_code
221: Into l_invoice_type_lookup_code
222: From ap_invoices_all ai
223: Where ai.invoice_id = x_invoice_id;
224:
225: EXCEPTION
226: When Others then
281: APPL_SHORT_NAME => 'SQLAP',
282: FUNC_SHORT_NAME => 'NONE',
283: p_calling_sequence => 'AP_OTHR_CHRG_MATCH_PKG',
284: p_event_class_code => l_invoice_type_lookup_code,
285: p_entity_code => 'AP_INVOICES',
286: p_application_id => 200,
287: p_internal_organization_id => g_org_id);
288:
289: l_debug_info := 'calling the Get_PO_Tax_Attributes API';
439: g_approval_workflow_flag,
440: g_transfer_flag,
441: g_trx_business_category,
442: g_org_id
443: FROM ap_invoices_all ai, --bug 5056051
444: ap_system_parameters asp,
445: ap_suppliers pv, --bug 5056051
446: ap_supplier_sites pvs --bug 5056051
447: WHERE ai.invoice_id = x_invoice_id