Programa da Oracle

Este forum é dedicado a códigos errados que se encontram por aí, ou seja, coisas que não se deve fazer de jeito nenhum! Não coloque neste forum dúvidas! (apenas situações bizarras do nosso dia a dia :-)
Responder
Avatar do usuário
dr_gori
Moderador
Moderador
Mensagens: 5024
Registrado em: Seg, 03 Mai 2004 3:08 pm
Localização: Portland, OR USA
Contato:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Esse é de uma package CORE do Oracle EBS: ( PACKAGE JL_ZZ_TAX )

Selecionar tudo

--========================================================================
-- 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É ???

Como podemos ver pela data, essa package está assim desde 1997 :-D
(Tirado o nome dos autores e colocado AAAAAA)
DanielNN
Moderador
Moderador
Mensagens: 641
Registrado em: Seg, 03 Set 2007 3:26 pm
Localização: Fortaleza - CE
att,

Daniel N.N.

SENSACIONAL......
pior que fui conferir e é mesmo.
Tem até isso aqui:

Selecionar tudo

 fnd_message.set_token('GENERIC_TEXT',
        'EXCEPTION(OTHERS): jl_zz_tax.calculate '||to_char(err_num)||' '
                                                 ||err_msg);
Ele converte para char o err_num mas o TEXTÃO NUMÉRICO do err_msg está lá, heheheheh.
Responder
  • Informação
  • Quem está online

    Usuários navegando neste fórum: Nenhum usuário registrado e 11 visitantes