Cet article s’applique à Microsoft Dynamics NAV pour tous les pays et tous les paramètres régionaux de langue.
Symptômes
Lorsque vous créez un contrat de service (ne pas prépayé) et que vous modifiez la facture avant la validation dans Microsoft Dynamics NAV 2009, il existe des données incohérentes entre les écritures comptables service et grand livre. Ce problème se produit dans les produits suivants :
-
Microsoft Dynamics NAV 2009 R2
-
Microsoft Dynamics NAV 2009 Service Pack 1
Résolution
Informations sur le correctif
Un correctif pris en charge est désormais disponible auprès de Microsoft. Toutefois, il est conçu uniquement pour corriger le problème décrit dans cet article. Il s’applique uniquement aux systèmes rencontrant ce problème spécifique. Ce correctif peut subir des tests supplémentaires. Par conséquent, si vous n’êtes pas sérieusement concerné par ce problème, nous vous recommandons d’attendre le prochain service pack Microsoft Dynamics NAV 2009 ou la prochaine version de Microsoft Dynamics NAV qui comprendra ce correctif.
Remarque Dans certains cas, les frais généralement encourus pour la prise en charge des appels peuvent être annulés si un technicien du Support technique pour Microsoft Dynamics et les produits associés détermine qu’une mise à jour spécifique peut résoudre votre problème. Les coûts habituels du support technique s’appliqueront aux autres questions et problèmes qui ne relèvent pas de la mise à jour spécifique en question.
Informations sur l’installation
Microsoft fournit des exemples de programmation à titre d'illustration uniquement, sans garantie expresse ou implicite. Ceci inclut, mais n'est pas limité à, les garanties implicites de qualité marchande ou d'adéquation à un usage particulier. Cet article suppose que vous êtes familiarisé avec le langage de programmation présenté et les outils utilisés pour créer et déboguer des procédures. Les ingénieurs du support technique Microsoft peuvent aider à expliquer la fonctionnalité d'une procédure particulière. Toutefois, ils ne modifieront pas ces exemples pour fournir des fonctionnalités supplémentaires ou créer des procédures répondant à vos besoins spécifiques.
Remarque Avant d’installer ce correctif, vérifiez que tous les utilisateurs du client Microsoft Navision sont enregistrés sur le système. Cela inclut les utilisateurs du client Microsoft Navision Application Services (NAS). Vous devez être le seul utilisateur client connecté lors de l’implémentation de ce correctif.
Pour appliquer ce correctif, vous devez posséder une licence développeur.
Il est recommandé que le compte d’utilisateur dans la fenêtre Logins Windows ou dans la fenêtre Logins base de données est affecté à l’ID de rôle « SUPER ». Si le compte d’utilisateur ne peut pas être affecté à l’ID de rôle « SUPER », vous devez vérifier que le compte d’utilisateur dispose des autorisations suivantes :
-
L’autorisation de modification pour l’objet que vous allez modifier.
-
L’autorisation d’exécution pour l’objet ID objet système 5210 et pour l’objet ID objet système 9015 .
Remarque Vous n’êtes pas obligé de disposer des droits pour les banques de données excepté si vous devez réparer des données.
Modifications du code
Remarque Toujours tester le code des correctifs dans un environnement contrôlé, avant d'appliquer les correctifs à vos ordinateurs de production.
Pour résoudre ce problème, procédez comme suit :
-
Modifiez le code dans la table Analytique Document (357) comme suit :
Code existant 1... Text005@1009 : TextConst 'ENU=Canceled.';
Text006@1010 : TextConst 'ENU=You may have changed a dimension. Some lines are already shipped. When you post the line with the changed dimension to the general ledger, amounts on the Inventory Interim account will be out of balance when reported per dimension.\\Do you want to update the lines?';
PROCEDURE UpdateGlobalDimCode@25(GlobalDimCodeNo@1000 : Integer;"Table ID"@1001 : Integer;"Document Type"@1002 : Option;"Document No."@1003 : Code[20];"Line No."@1004 : Integer;NewDimValue@1005 : Code[20]);
...Code de substitution 1
... Text005@1009 : TextConst 'ENU=Canceled.';
Text006@1010 : TextConst 'ENU=You may have changed a dimension. Some lines are already shipped. When you post the line with the changed dimension to the general ledger, amounts on the Inventory Interim account will be out of balance when reported per dimension.\\Do you want to update the lines?';
Text007@1011 : TextConst 'ENU=You cannot change the dimension because the document is based on a service contract.';
PROCEDURE UpdateGlobalDimCode@25(GlobalDimCodeNo@1000 : Integer;"Table ID"@1001 : Integer;"Document Type"@1002 : Option;"Document No."@1003 : Code[20];"Line No."@1004 : Integer;NewDimValue@1005 : Code[20]);
...Code existant 2
... PROCEDURE VerifyLineDim@5(VAR DocDim@1000 : Record 357);
VAR
SalesLine@1001 : Record 37;
PurchaseLine@1002 : Record 39;
BEGIN
CASE "Table ID" OF
DATABASE::"Sales Line":
BEGIN
IF SalesLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
IF (SalesLine."Qty. Shipped Not Invoiced" <> 0) OR (SalesLine."Return Rcd. Not Invd." <> 0) THEN
IF NOT CONFIRM(Text004,TRUE,SalesLine.TABLECAPTION) THEN
ERROR(Text005)
END;
DATABASE::"Purchase Line":
BEGIN
IF PurchaseLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
IF (PurchaseLine."Qty. Rcd. Not Invoiced" <> 0) OR (PurchaseLine."Return Qty. Shipped Not Invd." <> 0) THEN
IF NOT CONFIRM(Text004,TRUE,PurchaseLine.TABLECAPTION) THEN
ERROR(Text005)
END;
END;
END;
...Code de substitution 2
... PROCEDURE VerifyLineDim@5(VAR DocDim@1000 : Record 357);
VAR
SalesLine@1001 : Record 37;
PurchaseLine@1002 : Record 39;
ServiceHeader@1003 : Record 5900;
ServiceLine@1004 : Record 5902;
BEGIN
CASE "Table ID" OF
DATABASE::"Sales Line":
BEGIN
IF SalesLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
IF (SalesLine."Qty. Shipped Not Invoiced" <> 0) OR (SalesLine."Return Rcd. Not Invd." <> 0) THEN
IF NOT CONFIRM(Text004,TRUE,SalesLine.TABLECAPTION) THEN
ERROR(Text005)
END;
DATABASE::"Purchase Line":
BEGIN
IF PurchaseLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
IF (PurchaseLine."Qty. Rcd. Not Invoiced" <> 0) OR (PurchaseLine."Return Qty. Shipped Not Invd." <> 0) THEN
IF NOT CONFIRM(Text004,TRUE,PurchaseLine.TABLECAPTION) THEN
ERROR(Text005)
END;
DATABASE::"Service Header":
IF ServiceHeader.GET(DocDim."Document Type",DocDim."Document No.") AND (ServiceHeader."Contract No." <> '') THEN
ERROR(Text007);
DATABASE::"Service Line":
IF ServiceLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
IF (ServiceLine."Contract No." <> '') THEN
ERROR(Text007);
END;
END;
... -
Modifiez le code dans la table ligne Service (5902) comme suit :
Code existant 1... IF (Quantity <> 0) AND ItemExists(xRec."No.") AND
(("Spare Part Action" = "Spare Part Action"::"Component Replaced") OR
("Spare Part Action" = "Spare Part Action"::"Component Installed") OR
("Spare Part Action" = "Spare Part Action"::" "))
THEN
ReserveServLine.VerifyChange(Rec,xRec);
END;
OnDelete=VAR
...Code de substitution 1
... IF (Quantity <> 0) AND ItemExists(xRec."No.") AND
(("Spare Part Action" = "Spare Part Action"::"Component Replaced") OR
("Spare Part Action" = "Spare Part Action"::"Component Installed") OR
("Spare Part Action" = "Spare Part Action"::" "))
THEN
ReserveServLine.VerifyChange(Rec,xRec);
IF "Document Type" = ServiceLine."Document Type"::Invoice THEN
IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN
ERROR(Text046);
END;
OnDelete=VAR
...Code existant 2
... { 5 ; ;Type ;Option ;OnValidate=BEGIN
GetServHeader;
TESTFIELD("Qty. Shipped Not Invoiced",0);
...Code de substitution 2
... { 5 ; ;Type ;Option ;OnValidate=BEGIN
IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN
ERROR(Text046);
GetServHeader;
...Code existant 3
... { 6 ; ;No. ;Code20 ;TableRelation=IF (Type=CONST(" ")) "Standard Text"
ELSE IF (Type=CONST(G/L Account)) "G/L Account"
ELSE IF (Type=CONST(Item)) Item
ELSE IF (Type=CONST(Resource)) Resource
ELSE IF (Type=CONST(Cost)) "Service Cost";
OnValidate=VAR
ShowLocMessage@1000 : Boolean;
BEGIN
TESTFIELD("Qty. Shipped Not Invoiced",0);
...Code de substitution 3
... { 6 ; ;No. ;Code20 ;TableRelation=IF (Type=CONST(" ")) "Standard Text"
ELSE IF (Type=CONST(G/L Account)) "G/L Account"
ELSE IF (Type=CONST(Item)) Item
ELSE IF (Type=CONST(Resource)) Resource
ELSE IF (Type=CONST(Cost)) "Service Cost";
OnValidate=VAR
ShowLocMessage@1000 : Boolean;
BEGIN
IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN
ERROR(Text046);
TESTFIELD("Qty. Shipped Not Invoiced",0);
...4 le code existant
... { 22 ; ;Unit Price ;Decimal ;OnValidate=BEGIN
GetServHeader;
IF ("Unit Price" > ServHeader."Max. Labor Unit Price") AND
...Code de remplacement 4
... { 22 ; ;Unit Price ;Decimal ;OnValidate=BEGIN
GetServHeader;
IF ("Appl.-to Service Entry" > 0) AND (CurrFieldNo <> 0) THEN
ERROR(Text046,FIELDCAPTION("Unit Price"));
IF ("Unit Price" > ServHeader."Max. Labor Unit Price") AND
...Code existant 5
... Text043@1097 : TextConst 'ENU=You cannot change the value of the %1 field manually if %2 for this line is %3';
Text044@1012 : TextConst 'ENU=Do you want to split the resource line and use it to create resource lines\for the other service items with divided amounts?';
Text045@1099 : TextConst 'ENU=You cannot delete this service line because one or more service entries exist for this line.';
...Code de remplacement 5
... Text043@1097 : TextConst 'ENU=You cannot change the value of the %1 field manually if %2 for this line is %3';
Text044@1012 : TextConst 'ENU=Do you want to split the resource line and use it to create resource lines\for the other service items with divided amounts?';
Text045@1099 : TextConst 'ENU=You cannot delete this service line because one or more service entries exist for this line.';
Text046@1100 : TextConst 'ENU=You cannot modify the document because it is based on a service contract.';
...
Conditions préalables
Vous devez disposer d’un des produits suivants est installé pour appliquer ce correctif :
-
Microsoft Dynamics NAV 2009 R2
-
Microsoft Dynamics NAV 2009 Service Pack 1
Informations sur la suppression
Vous ne pouvez pas supprimer ce correctif.
État
Microsoft a confirmé l'existence de ce problème dans les produits Microsoft répertoriés dans la section « S'applique à ».
Remarque Il s’agit d’un article de « Dernière minute » créé directement à partir de l’organisation de support technique de Microsoft. Les informations contenues dans ce document sont fournies en l'état, en réponse à des problèmes nouveaux. En raison de la rapidité de leur mise à disposition, les documents peuvent contenir des erreurs typographiques et peuvent être révisés à tout moment sans préavis. Consultez les Conditions d’utilisation pour d’autres considérations.