Este artigo aplica-se à Microsoft para todos os países e regiões de idioma.
Sintomas
Suponha que publica uma fatura de uma nota de encomenda no Microsoft Dynamics NAV 2009. Em seguida, fatura uma linha de custos de itens com um valor de quantidade especificado para a nota de encomenda. Nesta situação, quando vê a entrada do livro razão do item para a nota de encomenda, o valor de quantidade da linha de encargos do item não é registado. Este problema ocorre nos seguintes produtos:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 Service Pack 1
Resolução
Informações sobre o hotfix
Uma correção suportada está agora disponível na Microsoft. No entanto, destina-se apenas a corrigir o problema descrito neste artigo. Aplique-o apenas a sistemas com este problema específico. Esta correção pode receber testes adicionais. Por conseguinte, se não for gravemente afetado por este problema, recomendamos que aguarde pelo próximo service pack do Microsoft Dynamics NAV 2009 ou pela próxima versão do Microsoft Dynamics NAV que contém esta correção.
Nota Em casos especiais, os custos normalmente incorridos para chamadas de suporte poderão ser cancelados se um Profissional de Suporte Técnico do Microsoft Dynamics e produtos relacionados determinar que uma atualização específica irá resolve o seu problema. Os custos de suporte em geral aplicam-se a questões e problemas de suporte adicionais 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 para ilustração, sem garantia expressa ou implícita. Isso inclui, mas não se limita a, as garantias implícitas de comercialização ou adequação a uma finalidade específica. Este artigo pressupõe que você esteja familiarizado com a linguagem de programação que está sendo demonstrada e com as ferramentas usadas para criar e depurar procedimentos. Os engenheiros de suporte da Microsoft podem ajudá-lo, fornecendo a explicação da funcionalidade de determinado procedimento, mas não modificarão estes exemplos para fornecer funcionalidade adicional nem criarão procedimentos específicos para atender às suas necessidades específicas.
Nota Antes de instalar esta correção, verifique se todos os utilizadores cliente do Microsoft Navision têm sessão iniciada no sistema. Isto inclui utilizadores cliente do Microsoft Navision Application Services (NAS). Deve ser o único utilizador cliente com sessão iniciada quando implementa esta correção.
Para implementar esta correção, tem de ter uma licença de programador.
Recomendamos que a conta de utilizador na janela Inícios de Sessão do Windows ou na janela Inícios de Sessão da Base de Dados seja atribuída ao ID da função "SUPER". Se não for possível atribuir à conta de utilizador o ID de função "SUPER", tem de verificar se a conta de utilizador tem as seguintes permissões:
- A permissão Modificar para o objeto que irá alterar.
- A permissão Executar para o objeto ID de Objeto de Sistema 5210 e para o objeto ID de Objeto do Sistema 9015.
Nota Não tem de ter direitos sobre os arquivos de dados, a menos que tenha de efetuar a reparação de dados.
Alterações de código
Nota Teste sempre as correções de código num ambiente controlado antes de aplicar as correções aos seus computadores de produção.
Para resolver este problema, execute as seguintes etapas:
Altere o código no acionador OnRun no Sales-Post codeunit (80) da seguinte forma:
Código existente 1... TempPrePmtAmtToDeduct@1003 : Decimal; TransactionLogEntryNo@1024 : Integer; BEGIN IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN ...Código de substituição 1
... TempPrePmtAmtToDeduct@1003 : Decimal; TransactionLogEntryNo@1024 : Integer; // Add the following line. SalesLineForCharge@1025 : Record 37; BEGIN IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN ...Código existente 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type"); // Delete the following line. TempItemChargeAssgntSales.SETFILTER("Applies-to Doc. Type",'<>%1',"Document Type"); TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No."); IF TempItemChargeAssgntSales.FINDSET THEN ...Código de substituição 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type"); TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No."); IF TempItemChargeAssgntSales.FINDSET THEN ...Código existente 3
... CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment: // Delete the following lines. PostItemChargePerShpt(SalesLine); TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt": PostItemChargePerRetRcpt(SalesLine); END; TempItemChargeAssgntSales.MARK(TRUE); // End of the lines. UNTIL TempItemChargeAssgntSales.NEXT = 0; END; END; ...Código de substituição 3
... CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment: // Add the following line BEGIN PostItemChargePerShpt(SalesLine); TempItemChargeAssgntSales.MARK(TRUE); END; TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt": BEGIN PostItemChargePerRetRcpt(SalesLine); TempItemChargeAssgntSales.MARK(TRUE); END; TempItemChargeAssgntSales."Applies-to Doc. Type"::Order, TempItemChargeAssgntSales."Applies-to Doc. Type"::Invoice: BEGIN IF SalesLineForCharge.GET( TempItemChargeAssgntSales."Applies-to Doc. Type", TempItemChargeAssgntSales."Applies-to Doc. No.", TempItemChargeAssgntSales."Applies-to Doc. Line No.") THEN IF (SalesLineForCharge."Qty. to Ship (Base)" = 0) AND (SalesLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text054); END; TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Order", TempItemChargeAssgntSales."Applies-to Doc. Type"::"Credit Memo": BEGIN IF SalesLineForCharge.GET( TempItemChargeAssgntSales."Applies-to Doc. Type", TempItemChargeAssgntSales."Applies-to Doc. No.", TempItemChargeAssgntSales."Applies-to Doc. Line No.") THEN IF (SalesLineForCharge."Return Qty. to Receive (Base)" = 0) AND (SalesLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text054); END; END; // End of the lines. UNTIL TempItemChargeAssgntSales.NEXT = 0; END; END; ...Código existente 4
... Text052@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text053@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); BEGIN ...Código de substituição 4
... Text052@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text053@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; // Add the following line. Text054@1102601002 : TextConst 'ENU=The order line that the item charge has originally been assigned to has been partially or fully posted. You must reassign the item charge to the posted receipt or shipment instead.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); BEGIN ...Altere o código no acionador OnRun no codeunit Purch.-Post (90) da seguinte forma:
Código existente 1... ICInboxPurchHdr@1012 : Record 436; SalesHeader@1041 : Record 36; UpdateAnalysisView@1002 : Codeunit 410; UpdateItemAnalysisView@1008 : Codeunit 7150; ...Código de substituição 1
... ICInboxPurchHdr@1012 : Record 436; SalesHeader@1041 : Record 36; // Add the following line. PurchLineForCharge@1042 : Record 39; UpdateAnalysisView@1002 : Codeunit 410; UpdateItemAnalysisView@1008 : Codeunit 7150; ...Código existente 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntPurch.SETCURRENTKEY("Applies-to Doc. Type"); // Delete the following line. TempItemChargeAssgntPurch.SETFILTER("Applies-to Doc. Type",'<>%1',"Document Type"); TempItemChargeAssgntPurch.SETRANGE("Document Line No.",PurchLine."Line No."); IF TempItemChargeAssgntPurch.FINDSET THEN ...Código de substituição 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntPurch.SETCURRENTKEY("Applies-to Doc. Type"); TempItemChargeAssgntPurch.SETRANGE("Document Line No.",PurchLine."Line No."); IF TempItemChargeAssgntPurch.FINDSET THEN ...Código existente 3
... CASE TempItemChargeAssgntPurch."Applies-to Doc. Type" OF TempItemChargeAssgntPurch."Applies-to Doc. Type"::Receipt: // Delete the following lines. PostItemChargePerRcpt(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt": PostItemChargePerTransfer(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment": PostItemChargePerRetShpt(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment": PostItemChargePerSalesShpt(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt": PostItemChargePerRetRcpt(PurchLine); END; TempItemChargeAssgntPurch.MARK(TRUE); // End of the lines. UNTIL TempItemChargeAssgntPurch.NEXT = 0; END; END; ...Código de substituição 3
... CASE TempItemChargeAssgntPurch."Applies-to Doc. Type" OF TempItemChargeAssgntPurch."Applies-to Doc. Type"::Receipt: // Add the following lines. BEGIN PostItemChargePerRcpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt": BEGIN PostItemChargePerTransfer(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment": BEGIN PostItemChargePerRetShpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment": BEGIN PostItemChargePerSalesShpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt": BEGIN PostItemChargePerRetRcpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::Order, TempItemChargeAssgntPurch."Applies-to Doc. Type"::Invoice: BEGIN IF PurchLineForCharge.GET( TempItemChargeAssgntPurch."Applies-to Doc. Type", TempItemChargeAssgntPurch."Applies-to Doc. No.", TempItemChargeAssgntPurch."Applies-to Doc. Line No.") THEN IF (PurchLineForCharge."Qty. to Receive (Base)" = 0) AND (PurchLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text061); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Order", TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Credit Memo": BEGIN IF PurchLineForCharge.GET( TempItemChargeAssgntPurch."Applies-to Doc. Type", TempItemChargeAssgntPurch."Applies-to Doc. No.", TempItemChargeAssgntPurch."Applies-to Doc. Line No.") THEN IF (PurchLineForCharge."Return Qty. to Ship (Base)" = 0) AND (PurchLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text061); END; END; // End of the lines. UNTIL TempItemChargeAssgntPurch.NEXT = 0; END; END; ...Código existente 4
... Text059@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text060@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); ...Código de substituição 4
... Text059@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text060@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; // Add the following line. Text061@1102601002 : TextConst 'ENU=The order line that the item charge has originally been assigned to has been partially or fully posted. You must reassign the item charge to the posted receipt or shipment instead.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); ...
Pré-requisitos
Tem de ter um dos seguintes produtos instalados para aplicar esta correção:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 Service Pack 1
Informações sobre remoção
Não é possível remover esta correção.
Status
A Microsoft confirmou que este é um problema nos produtos da Microsoft listados na seção "Aplica-se a".
Observação Este é um artigo "FAST PUBLISH" criado diretamente na organização de suporte da Microsoft. As informações contidas aqui são fornecidas como resposta aos problemas possíveis. Como resultado da prontidão de disponibilizá-lo, os materiais pode conter erros tipográficos e podem ser revisados a qualquer momento são aviso prévio. Consulte Termos de Uso para obter outras considerações.