Iniciar sessão com a Microsoft
Iniciar sessão ou criar uma conta.
Olá,
Selecione uma conta diferente.
Tem várias contas
Selecione a conta com a qual pretende iniciar sessão.

Movimentos registados estão incorrectos na tabela Entrada de inversão (179) ao reverter um pagamento liquidado na versão italiana do Microsoft Dynamics NAV 2009. Este problema persiste depois de implementar a correcção 2802054. Siga os passos na secção de alterações de código para resolver este problema. Este problema ocorre nos seguintes produtos:

  • A versão italiana do Microsoft Dynamics NAV 2009 R2

  • A versão italiana do Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

Resolução

Informações sobre correção

Agora tem uma correcção suportada disponível na Microsoft. Contudo, destina-se apenas a corrigir o problema descrito neste artigo. Aplique-a apenas em sistemas que tenham este problema específico. Esta correcção poderá ser submetida a testes adicionais. Por conseguinte, se não estiver a ser gravemente afectado por este problema, recomendamos que aguarde o próximo service pack do Microsoft Dynamics NAV 2009 ou a próxima versão do Microsoft Dynamics NAV que contenha esta correcção.

Nota Em casos especiais, os custos normalmente inerentes para suporte chamadas poderão ser anuladas se um técnico de suporte técnico do Microsoft Dynamics e produtos relacionados determina que uma actualização específica resolverá o problema. Os custos de normais do suporte serão aplicados a questões de suporte adicionais e problemas que não se enquadrem na atualização específica em questão.

Informações de instalação

A Microsoft fornece exemplos de programação apenas a título ilustrativo, sem garantia expressa ou implícita. Isto inclui, mas não está limitado a, garantias implícitas de comercialização ou adequação a um fim específico. Este artigo pressupõe que está familiarizado com a linguagem de programação que está a ser demonstrada e com as ferramentas que são utilizadas para criar e depurar procedimentos. Técnicos de suporte da Microsoft podem ajudar a explicar a funcionalidade de um determinado procedimento. No entanto, não modificarão estes exemplos para proporcionarem funcionalidades adicionais nem criarão procedimentos adaptados às necessidades específicas do utilizador.

Nota Antes de instalar esta correcção, certifique-se de que todos os utilizadores de cliente do Microsoft Dynamics NAV são registados no sistema. Isto inclui os serviços de servidor de aplicações (NAS) do Microsoft Dynamics NAV. Deve ser o único usuário do cliente que tem sessão iniciada quando implementar esta correcção.

Para implementar esta correcção, tem de ter uma licença de desenvolvedor.

Recomendamos que a conta de utilizador na janela Logins do Windows ou na janela Logins de base de dados seja atribuída a ID de função "SUPER". Se a conta de utilizador não é possível atribuir o ID de função "SUPER", tem de verificar que a conta de utilizador tem as seguintes permissões:

  • A permissão Modificar para o objecto que estará a alterar.

  • A permissão executar para o objecto 5210 de ID de objecto de sistema e para o 9015 de ID de objecto de sistema

    objecto.

Nota Não tem de ter direitos para os arquivos de dados, excepto se tiver de efectuar a reparação de dados.

Alterações de código

Nota Sempre o código de ensaio corrige num ambiente controlado antes de aplicar as correcções para os computadores de produção.

Para resolver este problema, siga estes passos:

  1. Altere o código na variáveis globais na tabela Entrada de inversão (179) do seguinte modo:
    Código existente

    ...PostApplied@1029 : Boolean;
    Text012@1028 : TextConst 'ENU=You cannot reverse register No. %1 because it contains customer or vendor ledger entries that have been posted and applied in the same transaction.\\You must reverse each transaction in register No. %1 separately.;ITA=Impossibile stornare il registro Nr. %1 perch‚ contiene movimenti contabili clienti o fornitori che sono stati registrati e collegati nella stessa transazione.\\Ô necessario stornare separatamente ogni transazione nel registro Nr. %1.';

    PROCEDURE ReverseTransaction@8(TransactionNo@1000 : Integer);
    ...

    Código de substituição

    ...PostApplied@1029 : Boolean;
    Text012@1028 : TextConst 'ENU=You cannot reverse register No. %1 because it contains customer or vendor ledger entries that have been posted and applied in the same transaction.\\You must reverse each transaction in register No. %1 separately.;ITA=Impossibile stornare il registro Nr. %1 perch‚ contiene movimenti contabili clienti o fornitori che sono stati registrati e collegati nella stessa transazione.\\Ô necessario stornare separatamente ogni transazione nel registro Nr. %1.';

    // Add the following line.
    Text013@1039 : TextConst 'ENU=You cannot reverse %1 No. %2 because the entry has an associated Realized Gain/Loss entry.';

    PROCEDURE ReverseTransaction@8(TransactionNo@1000 : Integer);
    ...
  2. Altere o código na função InsertReversalEntry da tabela de entrada de inversão (179) do seguinte modo:
    Código existente 1

    ...DtldCustLedgEntry.SETFILTER(
    DtldCustLedgEntry."Entry Type",'<>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");

    // Delete the following lines.
    IF DtldCustLedgEntry.FIND('-') THEN BEGIN
    IF RevType = RevType::Register THEN
    ERROR(Text012,Number);
    CLEAR(DtldCustLedgEntry);
    DtldCustLedgEntry.SETCURRENTKEY("Cust. Ledger Entry No.");
    DtldCustLedgEntry.SETRANGE("Cust. Ledger Entry No.",CustLedgEntry."Entry No.");
    DtldCustLedgEntry.SETRANGE(Unapplied,TRUE);
    IF DtldCustLedgEntry.FIND('-') THEN BEGIN
    REPEAT
    TempRevertTransactionNo.Number := DtldCustLedgEntry."Transaction No.";
    IF TempRevertTransactionNo.INSERT THEN;
    UNTIL DtldCustLedgEntry.NEXT = 0;
    END;
    END;
    // End of the deleted lines.

    UNTIL CustLedgEntry.NEXT = 0;
    ...

    Código de substituição 1

    ...DtldCustLedgEntry.SETFILTER(
    DtldCustLedgEntry."Entry Type",'<>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");

    // Add the following lines.
    IF NOT DtldCustLedgEntry.ISEMPTY THEN
    IF RevType = RevType::Register THEN
    ERROR(Text012,Number);
    CheckDtldCustLedgEntry(CustLedgEntry);
    // End of the added lines.

    UNTIL CustLedgEntry.NEXT = 0;
    ...

    Código existente 2

    ...DtldVendLedgEntry.SETFILTER(
    DtldVendLedgEntry."Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");

    // Delete the following lines.
    IF DtldVendLedgEntry.FIND('-') THEN BEGIN
    IF RevType = RevType::Register THEN
    ERROR(Text012,Number);
    CLEAR(DtldVendLedgEntry);
    DtldVendLedgEntry.SETCURRENTKEY("Vendor Ledger Entry No.");
    DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.",VendLedgEntry."Entry No.");
    DtldVendLedgEntry.SETRANGE(Unapplied,TRUE);
    IF DtldVendLedgEntry.FIND('-') THEN BEGIN
    REPEAT
    TempRevertTransactionNo.Number := DtldVendLedgEntry."Transaction No.";
    IF TempRevertTransactionNo.INSERT THEN;
    UNTIL DtldVendLedgEntry.NEXT = 0;
    END;
    END;
    // End of the deleted lines.

    UNTIL VendLedgEntry.NEXT = 0;
    ...

    Código de substituição 2

    ...DtldVendLedgEntry.SETFILTER(
    DtldVendLedgEntry."Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");

    // Add the following lines.
    IF NOT DtldVendLedgEntry.ISEMPTY THEN
    IF RevType = RevType::Register THEN
    ERROR(Text012,Number);
    CheckDtldVendLedgEntry(VendLedgEntry);
    // End of the added lines.

    UNTIL VendLedgEntry.NEXT = 0;
    ...
  3. Altere o código na função CheckDtldCustLedgEntry da tabela de entrada de inversão (179) do seguinte modo:
    Código existente

    ...DtldCustLedgEntry@1001 : Record 379;
    BEGIN

    // Delete the following lines.
    DtldCustLedgEntry.SETCURRENTKEY("Cust. Ledger Entry No.");
    DtldCustLedgEntry.SETRANGE("Cust. Ledger Entry No.",CustLedgEntry."Entry No.");
    IF DtldCustLedgEntry.FIND('-') THEN
    REPEAT
    IF (DtldCustLedgEntry."Entry Type" <> DtldCustLedgEntry."Entry Type"::"Initial Entry") AND
    (NOT DtldCustLedgEntry.Unapplied)
    THEN
    ERROR(
    Text000,CustLedgEntry.TABLECAPTION,CustLedgEntry."Entry No.");
    UNTIL DtldCustLedgEntry.NEXT = 0;
    // End of the deleted lines.

    END;
    ...

    Código de substituição

    ...DtldCustLedgEntry@1001 : Record 379;
    BEGIN

    // Add the following lines.
    DtldCustLedgEntry.SETCURRENTKEY("Cust. Ledger Entry No.","Entry Type");
    DtldCustLedgEntry.SETRANGE("Cust. Ledger Entry No.",CustLedgEntry."Entry No.");
    DtldCustLedgEntry.SETFILTER("Entry Type",'<>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");
    DtldCustLedgEntry.SETRANGE(Unapplied,FALSE);
    IF NOT DtldCustLedgEntry.ISEMPTY THEN
    ERROR(Text000,CustLedgEntry.TABLECAPTION,CustLedgEntry."Entry No.");

    DtldCustLedgEntry.SETRANGE(Unapplied);
    DtldCustLedgEntry.SETFILTER("Entry Type",'%1|%2',
    DtldCustLedgEntry."Entry Type"::"Realized Gain",DtldCustLedgEntry."Entry Type"::"Realized Loss");
    IF NOT DtldCustLedgEntry.ISEMPTY THEN
    ERROR(Text013,CustLedgEntry.TABLECAPTION,CustLedgEntry."Entry No.");
    // End of the added lines.

    END;
    ...
  4. Altere o código na função CheckDtldVendLedgEntry da tabela de entrada de inversão (179) do seguinte modo:
    Código existente

    ...DtldVendLedgEntry@1001 : Record 380;
    BEGIN

    // Delete the following lines.
    DtldVendLedgEntry.SETCURRENTKEY("Vendor Ledger Entry No.");
    DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.",VendLedgEntry."Entry No.");
    IF DtldVendLedgEntry.FIND('-') THEN
    REPEAT
    IF (DtldVendLedgEntry."Entry Type" <> DtldVendLedgEntry."Entry Type"::"Initial Entry") AND
    (NOT DtldVendLedgEntry.Unapplied)
    THEN
    ERROR(
    Text000,VendLedgEntry.TABLECAPTION,VendLedgEntry."Entry No.");
    UNTIL DtldVendLedgEntry.NEXT = 0;
    // End of the deleted lines.

    END;
    ...

    Código de substituição

    ...DtldVendLedgEntry@1001 : Record 380;
    BEGIN

    // Add the following lines.
    DtldVendLedgEntry.SETCURRENTKEY("Vendor Ledger Entry No.","Entry Type");
    DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.",VendLedgEntry."Entry No.");
    DtldVendLedgEntry.SETFILTER("Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
    DtldVendLedgEntry.SETRANGE(Unapplied,FALSE);
    IF NOT DtldVendLedgEntry.ISEMPTY THEN
    ERROR(Text000,VendLedgEntry.TABLECAPTION,VendLedgEntry."Entry No.");

    DtldVendLedgEntry.SETRANGE(Unapplied);
    DtldVendLedgEntry.SETFILTER("Entry Type",'%1|%2',
    DtldVendLedgEntry."Entry Type"::"Realized Gain",DtldVendLedgEntry."Entry Type"::"Realized Loss");
    IF NOT DtldVendLedgEntry.ISEMPTY THEN
    ERROR(Text013,VendLedgEntry.TABLECAPTION,VendLedgEntry."Entry No.");
    // End of the added lines.

    END;
    ...


Pré-requisitos

Tem de ter um dos seguintes produtos instalado para aplicar esta correcção:

  • A versão italiana do Microsoft Dynamics NAV 2009 R2

  • A versão italiana do Microsoft Dynamics NAV 2009 SP1

Informações de remoção

Não é possível remover esta correcção.

Estado

A Microsoft confirmou que este é um problema nos produtos da Microsoft listados na secção "Aplica-se a".

Nota Este é um artigo "Publicação rápida" criado diretamente a partir da organização de suporte da Microsoft. As informações contidas neste documento são fornecidas como-se em resposta a questões emergentes. Como resultado da urgência na sua disponibilização, os materiais podem incluir erros tipográficos e podem ser revistos em qualquer altura sem aviso prévio. Para outras considerações, consulte os Termos de utilização.

Precisa de mais ajuda?

Quer mais opções?

Explore os benefícios da subscrição, navegue em cursos de formação, saiba como proteger o seu dispositivo e muito mais.

As comunidades ajudam-no a colocar e a responder perguntas, a dar feedback e a ouvir especialistas com conhecimentos abrangentes.

Estas informações foram úteis?

Quão satisfeito está com a qualidade do idioma?
O que afetou a sua experiência?
Ao selecionar submeter, o seu feedback será utilizado para melhorar os produtos e serviços da Microsoft. O seu administrador de TI poderá recolher estes dados. Declaração de Privacidade.

Obrigado pelo seu feedback!

×