Même lorsque vous n’êtes pas l’autorisé à utiliser cartera en cours dans la version espagnole de Microsoft Dynamics NAV 2009, vous pouvez appliquer un paiement et une nomenclature à partir des écritures comptables client ou fournisseur. Le problème est que la facture reste « open » dans les documents de comptes clients ou fournisseurs cartera en cours lorsque vous « sans les autorisations de Cartera » appliquer ces documents (paiement et nomenclature). Cela entraîne des incohérences dans la base de données. Ce problème se produit dans le produit suivant :
-
La version espagnole de Microsoft Dynamics NAV 2009 R2
-
La version espagnole de Microsoft Dynamics NAV 2009 SP1
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 Dynamics NAV sont déconnectés sur le système. Ceci comprend les services de Microsoft Dynamics NAV Application Server (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' ID objet système 9015
objet.
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 Testez toujours les correctifs de code dans un environnement contrôlé avant d’appliquer les correctifs à vos ordinateurs de production. Avant d’appliquer la modification, veuillez importer toutes les mises à jour SEPA.
Pour résoudre ce problème, procédez comme suit :
-
Modifiez le code dans la Variablesin Global Gen-Valider ligne Codeunit (12) comme suit :
Code existant...Text1100010@1100016 : TextConst 'ENU=Remove it from its payment order and try again.;ESP=B¢rrelo de la orden de pago e int‚ntelo de nuevo.';
Text1100011@1100021 : TextConst 'ENU=Document Type is " " in Line %1. This posting will not realize the VAT, do you want to proceed?;ESP=El tipo de documento es " " en la l¡nea %1. Esta contabilizaci¢n no tendr en cuenta el IVA, ¨desea continuar?';
Text1100012@1100022 : TextConst 'ENU=The posting process has been cancelled by the user.;ESP=El proceso de registro ha sido cancelado por el usuario.';
AppliedAmountLCY2@1100053 : Decimal;
AppliesToDocType@1100023 : Integer;
PROCEDURE GetGLReg@10(VAR NewGLReg@1000 : Record 45);
BEGIN
NewGLReg := GLReg;
END;
...Code de remplacement
...Text1100010@1100016 : TextConst 'ENU=Remove it from its payment order and try again.;ESP=B¢rrelo de la orden de pago e int‚ntelo de nuevo.';
Text1100011@1100021 : TextConst 'ENU=Document Type is " " in Line %1. This posting will not realize the VAT, do you want to proceed?;ESP=El tipo de documento es " " en la l¡nea %1. Esta contabilizaci¢n no tendr en cuenta el IVA, ¨desea continuar?';
Text1100012@1100022 : TextConst 'ENU=The posting process has been cancelled by the user.;ESP=El proceso de registro ha sido cancelado por el usuario.';
AppliedAmountLCY2@1100053 : Decimal;
AppliesToDocType@1100023 : Integer;
// Add the following line.
Text1100013@1100026 : TextConst 'ENU=You do not have permissions to apply or unapply documents in the Cartera Module.';
// End of the added line.
PROCEDURE GetGLReg@10(VAR NewGLReg@1000 : Record 45);
BEGIN
NewGLReg := GLReg;
END;
... -
Modifiez le code dans ApplyCustLedgEntryfonction dans la feuille compta.-Valider ligne Codeunit (12) comme suit :
Code existant 1...OldCustLedgEntry.SETRANGE("Bill No.",NewCVLedgEntryBuf."Applies-to Bill No.");
OldCustLedgEntry.SETRANGE("Customer No.",NewCVLedgEntryBuf."CV No.");
OldCustLedgEntry.SETRANGE(Open,TRUE);
OldCustLedgEntry.FINDFIRST;
OldCustLedgEntry.TESTFIELD(Positive,NOT NewCVLedgEntryBuf.Positive);
IF AppManagement.AccessToCartera THEN
DocPost.CheckAppliedReceivableDoc(
OldCustLedgEntry,GenJnlLine."System-Created Entry");
...Code de substitution 1
...OldCustLedgEntry.SETRANGE("Bill No.",NewCVLedgEntryBuf."Applies-to Bill No.");
OldCustLedgEntry.SETRANGE("Customer No.",NewCVLedgEntryBuf."CV No.");
OldCustLedgEntry.SETRANGE(Open,TRUE);
OldCustLedgEntry.FINDFIRST;
// Add the following line.
CheckCarteraAccessPermissions(OldCustLedgEntry."Document Situation");
// End of the added line.
OldCustLedgEntry.TESTFIELD(Positive,NOT NewCVLedgEntryBuf.Positive);
IF AppManagement.AccessToCartera THEN
DocPost.CheckAppliedReceivableDoc(
OldCustLedgEntry,GenJnlLine."System-Created Entry");
...Code existant 2
...// Check Cust Ledger Entry and add to Temp.
IF SalesSetup."Appln. between Currencies" = SalesSetup."Appln. between Currencies"::None THEN
OldCustLedgEntry.SETRANGE("Currency Code",NewCVLedgEntryBuf."Currency Code");
IF OldCustLedgEntry.FINDSET(FALSE,FALSE) THEN
// Delete the following lines.
REPEAT
IF GenJnlApply.CheckAgainstApplnCurrency(
NewCVLedgEntryBuf."Currency Code",
OldCustLedgEntry."Currency Code",
GenJnlLine."Account Type"::Customer,
FALSE)
THEN BEGIN
IF (OldCustLedgEntry."Posting Date" > ApplyingDate) AND (OldCustLedgEntry."Applies-to ID" <> '') THEN
ApplyingDate := OldCustLedgEntry."Posting Date";
TempOldCustLedgEntry := OldCustLedgEntry;
TempOldCustLedgEntry.INSERT;
END;
UNTIL OldCustLedgEntry.NEXT=0;
// End of the deleted lines.
TempOldCustLedgEntry.SETRANGE(Positive,NewCVLedgEntryBuf."Remaining Amount" > 0);
IF TempOldCustLedgEntry.FIND('-') THEN BEGIN
...Code de substitution 2
...// Check Cust Ledger Entry and add to Temp.
IF SalesSetup."Appln. between Currencies" = SalesSetup."Appln. between Currencies"::None THEN
OldCustLedgEntry.SETRANGE("Currency Code",NewCVLedgEntryBuf."Currency Code");
IF OldCustLedgEntry.FINDSET(FALSE,FALSE) THEN
// Add the following lines.
REPEAT
CheckCarteraAccessPermissions(OldCustLedgEntry."Document Situation");
IF GenJnlApply.CheckAgainstApplnCurrency(
NewCVLedgEntryBuf."Currency Code",
OldCustLedgEntry."Currency Code",
GenJnlLine."Account Type"::Customer,
FALSE)
THEN BEGIN
IF (OldCustLedgEntry."Posting Date" > ApplyingDate) AND (OldCustLedgEntry."Applies-to ID" <> '') THEN
ApplyingDate := OldCustLedgEntry."Posting Date";
TempOldCustLedgEntry := OldCustLedgEntry;
TempOldCustLedgEntry.INSERT;
END;
UNTIL OldCustLedgEntry.NEXT=0;
// End of the added lines.
TempOldCustLedgEntry.SETRANGE(Positive,NewCVLedgEntryBuf."Remaining Amount" > 0);
IF TempOldCustLedgEntry.FIND('-') THEN BEGIN... -
Modifiez le code dans la fonction UnapplyCustLedgEntry dans la feuille compta.-Valider ligne Codeunit (12) comme suit :
Code existant...DtldCustLedgEntry2.SETRANGE("Customer No.",DtldCustLedgEntry."Customer No.");
DtldCustLedgEntry2.SETFILTER("Entry Type",'>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");
UnapplyVATEntries := FALSE;
DtldCustLedgEntry2.FINDSET;
REPEAT
DtldCustLedgEntry2.TESTFIELD(Unapplied,FALSE);
IF (DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::"Payment Discount (VAT Adjustment)") OR
(DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::"Payment Tolerance (VAT Adjustment)") OR
(DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::"Payment Discount Tolerance (VAT Adjustment)")
THEN
...Code de remplacement
...DtldCustLedgEntry2.SETRANGE("Customer No.",DtldCustLedgEntry."Customer No.");
DtldCustLedgEntry2.SETFILTER("Entry Type",'>%1',DtldCustLedgEntry."Entry Type"::"Initial Entry");
UnapplyVATEntries := FALSE;
DtldCustLedgEntry2.FINDSET;
REPEAT
// Add the following line.
CheckCarteraAccessPermissions(DtldCustLedgEntry2."Document Situation");
// End of the added line.
DtldCustLedgEntry2.TESTFIELD(Unapplied,FALSE);
IF (DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::"Payment Discount (VAT Adjustment)") OR
(DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::"Payment Tolerance (VAT Adjustment)") OR
(DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::"Payment Discount Tolerance (VAT Adjustment)")
THEN
... -
Modifiez le code dans la fonction ApplyVendLedgEntry dans la feuille compta.-Valider ligne Codeunit (12) comme suit :
Code existant 1...OldVendLedgEntry.SETRANGE("Document Type",GenJnlLine."Applies-to Doc. Type");
OldVendLedgEntry.SETRANGE("Bill No.",NewCVLedgEntryBuf."Applies-to Bill No.");
OldVendLedgEntry.SETRANGE("Vendor No.",NewCVLedgEntryBuf."CV No.");
OldVendLedgEntry.SETRANGE(Open,TRUE);
OldVendLedgEntry.FINDFIRST;
OldVendLedgEntry.TESTFIELD(Positive,NOT NewCVLedgEntryBuf.Positive);
IF AppManagement.AccessToCartera THEN
DocPost.CheckAppliedPayableDoc(
OldVendLedgEntry,GenJnlLine."System-Created Entry");
...Code de substitution 1
...OldVendLedgEntry.SETRANGE("Document Type",GenJnlLine."Applies-to Doc. Type");
OldVendLedgEntry.SETRANGE("Bill No.",NewCVLedgEntryBuf."Applies-to Bill No.");
OldVendLedgEntry.SETRANGE("Vendor No.",NewCVLedgEntryBuf."CV No.");
OldVendLedgEntry.SETRANGE(Open,TRUE);
OldVendLedgEntry.FINDFIRST;
// Add the following line.
CheckCarteraAccessPermissions(OldVendLedgEntry."Document Situation");
// End of the added line.
OldVendLedgEntry.TESTFIELD(Positive,NOT NewCVLedgEntryBuf.Positive);
IF AppManagement.AccessToCartera THEN
DocPost.CheckAppliedPayableDoc(
OldVendLedgEntry,GenJnlLine."System-Created Entry");
...Code existant 2
...//Check and Move Ledger Entries to Temp
IF PurchSetup."Appln. between Currencies" = PurchSetup."Appln. between Currencies"::None THEN
OldVendLedgEntry.SETRANGE("Currency Code",NewCVLedgEntryBuf."Currency Code");
IF OldVendLedgEntry.FINDSET(FALSE,FALSE) THEN
REPEAT
IF GenJnlApply.CheckAgainstApplnCurrency(
NewCVLedgEntryBuf."Currency Code",
OldVendLedgEntry."Currency Code",
GenJnlLine."Account Type"::Vendor,
FALSE)
...Code de substitution 2
...//Check and Move Ledger Entries to Temp
IF PurchSetup."Appln. between Currencies" = PurchSetup."Appln. between Currencies"::None THEN
OldVendLedgEntry.SETRANGE("Currency Code",NewCVLedgEntryBuf."Currency Code");
IF OldVendLedgEntry.FINDSET(FALSE,FALSE) THEN
REPEAT
// Add the following line.
CheckCarteraAccessPermissions(OldVendLedgEntry."Document Situation");
// End of the added line.
IF GenJnlApply.CheckAgainstApplnCurrency(
NewCVLedgEntryBuf."Currency Code",
OldVendLedgEntry."Currency Code",
GenJnlLine."Account Type"::Vendor,
FALSE)
... -
Modifiez le code dans la fonction UnapplyVendLedgEntry dans la feuille compta.-Valider ligne Codeunit (12) comme suit :
Code existant...DtldVendLedgEntry2.SETCURRENTKEY("Transaction No.","Vendor No.","Entry Type");
DtldVendLedgEntry2.SETRANGE("Transaction No.",DtldVendLedgEntry."Transaction No.");
DtldVendLedgEntry2.SETRANGE("Vendor No.",DtldVendLedgEntry."Vendor No.");
DtldVendLedgEntry2.SETFILTER("Entry Type",'>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
DtldVendLedgEntry2.FINDSET;
UnapplyVATEntries := FALSE;
REPEAT
IF (DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::"Payment Discount (VAT Adjustment)") OR
(DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::"Payment Tolerance (VAT Adjustment)") OR
(DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::"Payment Discount Tolerance (VAT Adjustment)")
...Code de remplacement
...DtldVendLedgEntry2.SETCURRENTKEY("Transaction No.","Vendor No.","Entry Type");
DtldVendLedgEntry2.SETRANGE("Transaction No.",DtldVendLedgEntry."Transaction No.");
DtldVendLedgEntry2.SETRANGE("Vendor No.",DtldVendLedgEntry."Vendor No.");
DtldVendLedgEntry2.SETFILTER("Entry Type",'>%1',DtldVendLedgEntry."Entry Type"::"Initial Entry");
DtldVendLedgEntry2.FINDSET;
// Add the following line.
CheckCarteraAccessPermissions(DtldVendLedgEntry2."Document Situation");
// End of the added line.
UnapplyVATEntries := FALSE;
REPEAT
IF (DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::"Payment Discount (VAT Adjustment)") OR
(DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::"Payment Tolerance (VAT Adjustment)") OR
(DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::"Payment Discount Tolerance (VAT Adjustment)")
... -
Modifiez le code dans la fonction CheckCarteraAccessPermissions dans la feuille compta.-Valider ligne Codeunit (12) comme suit :
Code existant...CLEAR(GenJnlLine2);
EXIT(IsOK);
END;
BEGIN
END.
}
}
...Code de remplacement
...CLEAR(GenJnlLine2);
EXIT(IsOK);
END;
// Add the following lines.
LOCAL PROCEDURE CheckCarteraAccessPermissions@1100024(DocumentSituation@1170001 : ' ,Posted BG/PO,Closed BG/PO,BG/PO,Cartera,Closed Documents');
BEGIN
IF (DocumentSituation <> DocumentSituation::" ") AND (NOT AppManagement.AccessToCartera) THEN
ERROR(Text1100013);
END;
// End of the added lines.
BEGIN
END.
}
}
...
Conditions préalables
Vous devez disposer d’un des produits suivants est installé pour appliquer ce correctif :
-
La version espagnole de Microsoft Dynamics NAV 2009 R2
-
La version espagnole de Microsoft Dynamics NAV 2009 SP1
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’utilisationpour d’autres considérations.