--========================================================================
-- PUBLIC FUNCTION
-- calculate
--
-- DESCRIPTION
-- This routine calculates the tax amount for the transaction line or
-- sales order line that is recorded in the global structure
-- ZX_PRODUCT_INTEGRATION_PKG.tax_info_rec
--
-- PARAMETERS
-- tax_info_rec
--
-- RETURNS
-- tax_info_rec updated with tax_rate, amount, global_attributes and
-- other information
--
-- CALLED FROM
-- ZX_PRODUCT_INTEGRATION_PKG.calculate
--
-- HISTORY
-- 02-OCT-97 AAAAAAAAAAAA Return values for global flexfield just
-- for AR
-- 09-SEP-97 AAAAAAAAAAAA in calculate function, first check
-- if ZX_PRODUCT_INTEGRATION_PKG.TAX_INFO_REC.TAX_AMOUNT is not null, if
-- it's not null then does not perform anything as it
-- does not use the audit trail, avoiding error
-- during delete
-- 20-NOV-97 AAAAAAAAAAAA debug messages
-- 22-APR-98 AAAAAAAAAAAA bug #660025 reset the value of global_attribute8
-- and global_attribute9 to null in the beginning
-- of the calculate_latin_tax procedure. Also,
-- for base amount reduction, <= 0 condition
-- replaced with < 0.
-- 08-FEB-99 AAAAAAAAAAAA Used ZX_PRODUCT_INTEGRATION_PKG.tax_info_rec.usern7 to determine
-- the calling view name. Changed for bug number
-- 807588. Following is the mapping for usern7.
-- 1 TAX_LINES_DELETE_VBR
-- 2 TAX_LINES_CREATE_VBR
-- 3 TAX_LINES_INVOICE_IMPORT_VBR
-- 4 TAX_LINES_RECURR_INVOICE_VBR
-- 5 TAX_ADJUSTMENTS_VBR
-- 6 SO_TAX_LINES_CREDIT_CHECK_VBR
-- 7 SO_TAX_LINES_SUMMARY_VBR
-- 8 TAX_LINES_RMA_IMPORT_VBR
--========================================================================
--Bug fix 2367111
FUNCTION calculate
(p_org_id IN NUMBER) RETURN VARCHAR2 IS
err_num NUMBER;
err_msg NUMBER; -----> NUMERO ?????
v_rule_id NUMBER;
v_tax_amount NUMBER;
.
.
.
WHEN OTHERS THEN
err_num := SQLCODE;
err_msg := SUBSTR(SQLERRM,1,100); ---> E AGORA JOSÉ ???
(Tirado o nome dos autores e colocado AAAAAA)