Käesolev artikkel kehtib Microsoft Dynamics NAV Portugali (pt) keele locale.
Sümptomid
Oletagem, et määrata Allahindluse tüüp väärtuseks arvutamine makse ketas. RidadePearaamatu seadistamine dialoogiboksis Portugali versioonis Microsoft Dynamics nav-i 2009. Määrake arve hinnaalandi ostuarve, millel on rohkem kui ühe rea kümnendkohaga. Ostuarve statistika arvutamiseks arve hinnaalandi summa on arvutatud valesti.
See probleem ilmneb järgmiste toodetega:-
Portugali versioonis Microsoft Dynamics nav-i 2009 R2
-
Portugali versioonis Microsoft Dynamics nav-i 2009 Service Pack 1 (SP1)
Lahendus
Kiirparanduse teave
Lasknud välja toetatava käigultparanduse on nüüd Microsoftilt saadaval. Aga see on ette nähtud ainult selles artiklis kirjeldatud probleemi kõrvaldamiseks. Rakendage seda ainult süsteemides, kus ilmneb see konkreetne probleem. Seda käigultparandust võidakse täiendavalt testida. Kui see probleem teie tööd tõsiselt ei kahjusta, soovitame oodata järgmist hoolduspaketti Microsoft Dynamics nav-i 2009 või järgmise Microsoft Dynamics nav-i versiooni, mis sisaldab seda kiirparandust.
Märkus. Erijuhtudel kulud, mis tekivad teatud palub tühistada saab kui tehniline toetus Professional Microsoft Dynamics ja nendega seotud toodete leiab, et mõni konkreetne värskendus lahendab teie probleemi. Tavaline tugiteenuste kohaldatakse täiendavat tugiteenust vajavatele küsimustele ning probleemidele, mis pole lahendatavad konkreetse värskenduse installimisega.Installiteave
Microsoft pakub programmeerimisnäiteid ainult artikli illustreerimiseks ilma igasuguse otsese või kaudse garantiita. See hõlmab, kuid ei piirdu kaudseid garantiisid turustatavuse või kindlaks otstarbeks sobivusega. See artikkel eeldab, et olete demonstreeritava programmeerimiskeelega programmeerimise keel ning luua protseduuride ja silumiseks kasutatavate tööriistadega tuttav. Microsofti tugitehnikud võivad aidata mõne konkreetse protseduuri talitlust selgitada. Siiski ei muuda nad neid näiteid lisafunktsioonide pakkumiseks ega Koosta vastavaid protseduure teie konkreetsetele nõuetele.
Märkus. Enne selle kiirparanduse installimist veenduge, et kõik Microsoft Dynamics nav-i kliendi kasutajat sisse loginud süsteem välja. See hõlmab Microsoft Dynamics nav-i rakenduste Server (NAS) teenuseid. Peaks olema ainult kliendi kasutaja on sisse logitud, kui otsustate seda käigultparandust. Selle kiirparanduse rakendamiseks peab teil olema arendaja litsentsi. Soovitame Windowsi sisselogimise aken või aken andmebaasi logimine kasutajakonto määrata "SUPER" rolli ID. Kui "SUPER" rolli ID-d ei saa määratud kasutajakonto, peate veenduma, et kasutaja konto on järgmised õigused:-
Sa muutuvad objekti Muuda õigusi.
-
Käivita luba süsteemi objekti ID 5210 objekti ja süsteemi objekti ID 9015
objekti.
Märkus. Teil pole õigust andmeid talletab enne, kui olete andmete parandamiseks.
Koodi muudatusi
Märkus. Alati test koodi lahendab kontrollitavas keskkonnas enne rakendamist tootmine arvutite parandused.
Selle probleemi lahendamiseks toimige järgmiselt.-
Muuta koodi CalculateInvoiceDiscount funktsiooni müügi arvutamine allahindluse koodiplokk (60) järgmiselt:
Kood 1...GLAcc@1110002 : Record 15;
BEGIN ...Kood 1
...GLAcc@1110002 : Record 15;
// Add the following lines. TempSalesLineRemainder@1110000 : Record 37; TotRoundedInvDiscAmt@1110001 : Decimal; TotRoundedPmtDiscAmt@1110003 : Decimal; // End of the added lines. BEGIN ...Kood 2
...GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
// Delete the following lines. SalesLine2."Inv. Discount Amount" := ROUND(SalesLine2."Line Amount" * CustInvDisc."Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.", GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": SalesLine2."Inv. Discount Amount" := ROUND( (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount" ) * CustInvDisc."Discount %" / 100,0.01); END; // End of the deleted lines. IF GLSetup."Payment Discount Type" = ...Asendamine kood 2
...GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
// Add the following lines. BEGIN TempSalesLineRemainder."Inv. Discount Amount" += SalesLine2."Line Amount" * CustInvDisc."Discount %" / 100; SalesLine2."Inv. Discount Amount" := CalcRoundedAmt(TempSalesLineRemainder."Inv. Discount Amount",TotRoundedInvDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.", GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": BEGIN TempSalesLineRemainder."Inv. Discount Amount" += (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount" ) * CustInvDisc."Discount %" / 100; SalesLine2."Inv. Discount Amount" := CalcRoundedAmt(TempSalesLineRemainder."Inv. Discount Amount",TotRoundedInvDiscAmt,0.01); END; END; // End of the added lines. IF GLSetup."Payment Discount Type" = ...Kood 3
...GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.":
// Delete the following lines. SalesLine2."Pmt. Disc. Given Amount" := ROUND( (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount") * SalesHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": SalesLine2."Pmt. Disc. Given Amount" := ROUND( (SalesLine2."Line Amount" - SalesLine2."Inv. Discount Amount") * SalesHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.": SalesLine2."Pmt. Disc. Given Amount" := ROUND( (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount") * SalesHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.": SalesLine2."Pmt. Disc. Given Amount" := ROUND( (SalesLine2."Line Amount" - SalesLine2."Inv. Discount Amount") * SalesHeader."Payment Discount %" / 100,0.01); // End of the deleted lines. END; ...Asendamine kood 3
...GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.":
// Add the following lines. BEGIN TempSalesLineRemainder."Pmt. Disc. Given Amount" += (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount" ) * SalesHeader."Payment Discount %" / 100; SalesLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempSalesLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": BEGIN TempSalesLineRemainder."Pmt. Disc. Given Amount" += (SalesLine2."Line Amount" - SalesLine2."Line Discount Amount" ) * SalesHeader."Payment Discount %" / 100; SalesLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempSalesLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.": BEGIN TempSalesLineRemainder."Pmt. Disc. Given Amount" += (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount" ) * SalesHeader."Payment Discount %" / 100; SalesLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempSalesLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.": BEGIN TempSalesLineRemainder."Pmt. Disc. Given Amount" += (SalesLine2."Line Amount" - SalesLine2."Line Discount Amount" ) * SalesHeader."Payment Discount %" / 100; SalesLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempSalesLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; // End of the added lines. END; ... -
Looge funktsiooni müügi arvutamine allahindluse koodiplokk (60) järgmiselt:
PROCEDURE CalcRoundedAmt@1110000(TotAmt@1110000 : Decimal;VAR TotAmtRnded@1110001 : Decimal;AmountRoundingPrecision@1110002 : Decimal) RndAmt : Decimal;BEGIN
RndAmt := ROUND(TotAmt,AmountRoundingPrecision) - TotAmtRnded; TotAmtRnded := TotAmtRnded + RndAmt; END; -
Muuta koodi CalculateInvoiceDiscount funktsiooni Purch.-Calc.Discount koodiplokk (70) järgmiselt:
Kood 1...GLAcc@1110002 : Record 15;
BEGIN ...Kood 1
...GLAcc@1110002 : Record 15;
// Add the following lines. TempPurchLineRemainder@1110000 : Record 39; TotRoundedInvDiscAmt@1110001 : Decimal; TotRoundedPmtDiscAmt@1110004 : Decimal; // End of the added lines. BEGIN ...Kood 2
...GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
// Delete the following lines. PurchLine2."Inv. Discount Amount" := ROUND(PurchLine2."Line Amount" * VendInvDisc."Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.", GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": PurchLine2."Inv. Discount Amount" := ROUND( (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount" ) * VendInvDisc."Discount %" / 100,0.01); // End of the deleted lines. END; ...Asendamine kood 2
...GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
// Add the following lines. BEGIN TempPurchLineRemainder."Inv. Discount Amount" += PurchLine2."Line Amount" * VendInvDisc."Discount %" / 100; PurchLine2."Inv. Discount Amount" := CalcRoundedAmt(TempPurchLineRemainder."Inv. Discount Amount",TotRoundedInvDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.", GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": BEGIN TempPurchLineRemainder."Inv. Discount Amount" += (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount" ) * VendInvDisc."Discount %" / 100; PurchLine2."Inv. Discount Amount" := CalcRoundedAmt(TempPurchLineRemainder."Inv. Discount Amount",TotRoundedInvDiscAmt,0.01); END; // End of the added lines. END; ...Kood 3
...GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.":
// Delete the following lines. PurchLine2."Pmt. Disc. Rcd. Amount" := ROUND( (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount") * PurchHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": PurchLine2."Pmt. Disc. Rcd. Amount" := ROUND( (PurchLine2."Line Amount" - PurchLine2."Inv. Discount Amount") * PurchHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.": PurchLine2."Pmt. Disc. Rcd. Amount" := ROUND( (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount") * PurchHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.": PurchLine2."Pmt. Disc. Rcd. Amount" := ROUND( (PurchLine2."Line Amount" - PurchLine2."Inv. Discount Amount") * PurchHeader."Payment Discount %" / 100,0.01); // End of the deleted lines. END; ...Asendamine kood 3
...GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.":
// Add the following lines. BEGIN TempPurchLineRemainder."Pmt. Disc. Rcd. Amount" += (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount" ) * PurchHeader."Payment Discount %" / 100; PurchLine2."Pmt. Disc. Rcd. Amount" := CalcRoundedAmt(TempPurchLineRemainder."Pmt. Disc. Rcd. Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": BEGIN TempPurchLineRemainder."Pmt. Disc. Rcd. Amount" += (PurchLine2."Line Amount" - PurchLine2."Line Discount Amount" ) * PurchHeader."Payment Discount %" / 100; PurchLine2."Pmt. Disc. Rcd. Amount" := CalcRoundedAmt(TempPurchLineRemainder."Pmt. Disc. Rcd. Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.": BEGIN TempPurchLineRemainder."Pmt. Disc. Rcd. Amount" += (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount" ) * PurchHeader."Payment Discount %" / 100; PurchLine2."Pmt. Disc. Rcd. Amount" := CalcRoundedAmt(TempPurchLineRemainder."Pmt. Disc. Rcd. Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.": BEGIN TempPurchLineRemainder."Pmt. Disc. Rcd. Amount" += (PurchLine2."Line Amount" - PurchLine2."Line Discount Amount" ) * PurchHeader."Payment Discount %" / 100; PurchLine2."Pmt. Disc. Rcd. Amount" := CalcRoundedAmt(TempPurchLineRemainder."Pmt. Disc. Rcd. Amount",TotRoundedPmtDiscAmt,0.01); END; // End of the added lines. END; ... -
Looge funktsiooni ost.-Calc.Discount koodiplokk (70) järgmiselt:
PROCEDURE CalcRoundedAmt@1110000(TotAmt@1110000 : Decimal;VAR TotAmtRnded@1110001 : Decimal;AmountRoundingPrecision@1110002 : Decimal) RndAmt : Decimal;BEGIN
RndAmt := ROUND(TotAmt,AmountRoundingPrecision) - TotAmtRnded; TotAmtRnded := TotAmtRnded + RndAmt; END; -
Muuda koodi CalculateInvoiceDiscount funktsioon teenuse arvutamine allahindluse koodiplokk (5950) järgmiselt:
Kood 1...GLAcc@1110002 : Record 15;
BEGIN ...Kood 1
...GLAcc@1110002 : Record 15;
// Add the following lines. TempServLineRemainder@1110000 : Record 5902; TotRoundedInvDiscAmt@1110001 : Decimal; TotRoundedPmtDiscAmt@1110003 : Decimal; // End of the added lines. BEGIN ...Kood 2
...GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
// Delete the following lines. ServiceLine2."Inv. Discount Amount" := ROUND(ServiceLine2."Line Amount" * CustInvDisc."Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.", GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": ServiceLine2."Inv. Discount Amount" := ROUND( (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount" ) * CustInvDisc."Discount %" / 100,0.01); END; // End of the deleted lines. IF GLSetup."Payment Discount Type" = ...Asendamine kood 2
...GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
// Add the following lines. BEGIN TempServLineRemainder."Inv. Discount Amount" += ServiceLine2."Line Amount" * CustInvDisc."Discount %" / 100; ServiceLine2."Inv. Discount Amount" := CalcRoundedAmt(TempServLineRemainder."Inv. Discount Amount",TotRoundedInvDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.", GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": BEGIN TempServLineRemainder."Inv. Discount Amount" += (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount" ) * CustInvDisc."Discount %" / 100; ServiceLine2."Inv. Discount Amount" := CalcRoundedAmt(TempServLineRemainder."Inv. Discount Amount",TotRoundedInvDiscAmt,0.01); END; END; // End of the added lines. IF GLSetup."Payment Discount Type" = ...Kood 3
...GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.":
// Delete the following lines. ServiceLine2."Pmt. Disc. Given Amount" := ROUND( (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount") * ServHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": ServiceLine2."Pmt. Disc. Given Amount" := ROUND( (ServiceLine2."Line Amount" - ServiceLine2."Inv. Discount Amount") * ServHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.": ServiceLine2."Pmt. Disc. Given Amount" := ROUND( (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount") * ServHeader."Payment Discount %" / 100,0.01); GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.": ServiceLine2."Pmt. Disc. Given Amount" := ROUND( (ServiceLine2."Line Amount" - ServiceLine2."Inv. Discount Amount") * ServHeader."Payment Discount %" / 100,0.01); // End of the deleted lines. END;Asendamine kood 3
...GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.":
// Add the following lines. BEGIN TempServLineRemainder."Pmt. Disc. Given Amount" += (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount" ) * ServHeader."Payment Discount %" / 100; ServiceLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempServLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.": BEGIN TempServLineRemainder."Pmt. Disc. Given Amount" += (ServiceLine2."Line Amount" - ServiceLine2."Line Discount Amount" ) * ServHeader."Payment Discount %" / 100; ServiceLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempServLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.": BEGIN TempServLineRemainder."Pmt. Disc. Given Amount" += (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount" ) * ServHeader."Payment Discount %" / 100; ServiceLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempServLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.": BEGIN TempServLineRemainder."Pmt. Disc. Given Amount" += (ServiceLine2."Line Amount" - ServiceLine2."Line Discount Amount" ) * ServHeader."Payment Discount %" / 100; ServiceLine2."Pmt. Disc. Given Amount" := CalcRoundedAmt(TempServLineRemainder."Pmt. Disc. Given Amount",TotRoundedPmtDiscAmt,0.01); END; // End of the added lines. END; ... -
Looge funktsiooni teenuse arvutamine allahindluse koodiplokk (5950) järgmiselt:
PROCEDURE CalcRoundedAmt@1110000(TotAmt@1110000 : Decimal;VAR TotAmtRnded@1110001 : Decimal;AmountRoundingPrecision@1110002 : Decimal) RndAmt : Decimal;BEGIN
RndAmt := ROUND(TotAmt,AmountRoundingPrecision) - TotAmtRnded; TotAmtRnded := TotAmtRnded + RndAmt; END;
Eeltingimused
Teil peab olema üks selle kiirparanduse installinud järgmisi tooteid:
-
Portugali versioonis Microsoft Dynamics nav-i 2009 R2
-
Portugali versioonis Microsoft Dynamics nav-i 2009 Service Pack 1
Eemaldamise teave
See käigultparandus ei saa eemaldada.
Olek
Microsoft on kinnitanud, et see probleem esineb jaotises "Kehtib järgmiste toodete kohta" loetletud Microsofti toodetel.
Märkus. See on "Kiire avaldamise" artikli loonud otse Microsofti tugiteenuse pakkujalt. Siintoodud teave on esitatud lähtudes-olemasoleval kujul vastusena ilmnenud probleemidele. Kiire avaldamise materjalides esineda trükivigu ja võidakse muuta ette teatamata. Vaadake Kasutustingimusedmuid kaalutlusi.