Denne artikkelen gjelder for Microsoft Microsoft Dynamics for alle land og alle språkinnstillinger.
Symptomer
Anta at du oppretter en salgsfaktura, en kjøpsfaktura eller en tjenestefaktura som har en linjerabatt på 100 prosent i Microsoft Dynamics NAV 2009. Når du legger inn fakturaen, får du følgende feilmelding:
Obs!
Transaksjonen kan ikke fullføres fordi det vil føre til inkonsekvenser i tabellen Finanspost.
Kontroller hvor og hvordan CONSISTENT-funksjonen brukes i transaksjonen for å finne årsaken til feilen.
Kontakt systemansvarlig.
Tabeller kan merkes som inkonsekvente under omfattende aktiviteter, for eksempel postering. Dette hindrer at data oppdateres feil.
Dette problemet oppstår i følgende produkter:
- Microsoft Dynamics NAV 2009 Service Pack 1
- Microsoft Dynamics NAV 2009
Oppløsning
Hurtigreparasjonsinformasjon
En støttet hurtigreparasjon er nå tilgjengelig fra Microsoft. Det er imidlertid bare ment å rette opp problemet som er beskrevet i denne artikkelen. Bruk den bare på systemer som opplever dette spesifikke problemet. Denne hurtigreparasjonen kan få ytterligere testing. Hvis du ikke er alvorlig påvirket av dette problemet, anbefaler vi derfor at du venter på den neste Microsoft Dynamics NAV 2009-oppdateringspakken eller den neste Microsoft Dynamics NAV-versjonen som inneholder denne hurtigreparasjonen.
Obs! I spesielle tilfeller kan kostnader som vanligvis påløper for støtteanrop, bli avbrutt hvis en technical support professional for Microsoft Dynamics og relaterte produkter bestemmer at en bestemt oppdatering vil løse problemet. De vanlige støttekostnadene gjelder for ytterligere støttespørsmål og problemer som ikke kvalifiserer for den aktuelle oppdateringen.
Installasjonsinformasjon
Microsoft tilbyr programmeringseksempler bare for illustrasjon, uten garanti enten uttrykt eller underforstått. Dette omfatter, men er ikke begrenset til, de underforståtte garantiene om salgbarhet eller egnethet for et bestemt formål. Denne artikkelen antar at du er kjent med programmeringsspråket som demonstreres, og med verktøyene som brukes til å opprette og feilsøke prosedyrer. Microsoft kundestøtteteknikere kan bidra til å forklare funksjonaliteten til en bestemt prosedyre, men de vil ikke endre disse eksemplene for å gi ekstra funksjonalitet eller konstruere prosedyrer for å oppfylle dine spesifikke krav.
Obs! Før du installerer denne hurtigreparasjonen, må du kontrollere at alle Microsoft Navision-klientbrukere er logget av systemet. Dette inkluderer microsoft Navision Application Services (NAS)-klientbrukere. Du bør være den eneste klientbrukeren som er logget på når du implementerer denne hurtigreparasjonen.
Hvis du vil implementere denne hurtigreparasjonen, må du ha en utviklerlisens.
Vi anbefaler at brukerkontoen i Windows-påloggingsvinduet eller i vinduet Pålogginger for database tilordnes rolle-ID-en SUPER. Hvis brukerkontoen ikke kan tilordnes rolle-IDen SUPER, må du kontrollere at brukerkontoen har følgende tillatelser:
- Endre-tillatelsen for objektet du skal endre.
- Execute-tillatelsen for Objektet System Object ID 5210 og systemobjekt-ID 9015-objektet.
Vær oppmerksom på at du ikke trenger å ha rettigheter til datalagrene med mindre du må utføre datareparasjon.
Kodeendringer
Obs! Test alltid kodeløsninger i et kontrollert miljø før du bruker løsningene på produksjonsdatamaskinene.
Følg disse trinnene for å løse dette problemet:
Endre koden i DivideAmount-funksjonen i Sales-Post kodeenhet (80) på følgende måte:
Eksisterende kode 1… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); END; "Amount Including VAT" := ROUND(TempVATAmountLineRemainder."Amount Including VAT",Currency."Amount Rounding Precision"); Amount := ROUND("Amount Including VAT",Currency."Amount Rounding Precision") - …Erstatningskode 1
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); END; IF "Line Discount %" <> 100 THEN "Amount Including VAT" := ROUND(TempVATAmountLineRemainder."Amount Including VAT",Currency."Amount Rounding Precision") ELSE "Amount Including VAT" := 0; Amount := ROUND("Amount Including VAT",Currency."Amount Rounding Precision") - …Eksisterende kode 2
… END ELSE BEGIN IF "VAT Calculation Type" = "VAT Calculation Type"::"Full VAT" THEN BEGIN "Amount Including VAT" := "Line Amount" - "Inv. Discount Amount"; Amount := 0; "VAT Base Amount" := 0; END ELSE BEGIN …Erstatningskode 2
… END ELSE BEGIN IF "VAT Calculation Type" = "VAT Calculation Type"::"Full VAT" THEN BEGIN IF "Line Discount %" <> 100 THEN "Amount Including VAT" := "Line Amount" - "Inv. Discount Amount" ELSE "Amount Including VAT" := 0; Amount := 0; "VAT Base Amount" := 0; END ELSE BEGIN …Eksisterende kode 3
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); "Amount Including VAT" := Amount + ROUND(TempVATAmountLineRemainder."VAT Amount",Currency."Amount Rounding Precision"); TempVATAmountLineRemainder."VAT Amount" := TempVATAmountLineRemainder."VAT Amount" - "Amount Including VAT" + Amount; END; …Erstatningskode 3
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); IF "Line Discount %" <> 100 THEN "Amount Including VAT" := Amount + ROUND(TempVATAmountLineRemainder."VAT Amount",Currency."Amount Rounding Precision") ELSE "Amount Including VAT" := 0; TempVATAmountLineRemainder."VAT Amount" := TempVATAmountLineRemainder."VAT Amount" - "Amount Including VAT" + Amount; END; …Endre koden i DivideAmount-funksjonen i Purch.-Post codeunit (90) som følger:
Eksisterende kode 1… (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); END; "Amount Including VAT" := ROUND(TempVATAmountLineRemainder."Amount Including VAT",Currency."Amount Rounding Precision"); Amount := ROUND("Amount Including VAT",Currency."Amount Rounding Precision") - …Erstatningskode 1
… (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); END; IF "Line Discount %" <> 100 THEN "Amount Including VAT" := ROUND(TempVATAmountLineRemainder."Amount Including VAT",Currency."Amount Rounding Precision") ELSE "Amount Including VAT" := 0; Amount := ROUND("Amount Including VAT",Currency."Amount Rounding Precision") - …Eksisterende kode 2
… END ELSE BEGIN IF "VAT Calculation Type" = "VAT Calculation Type"::"Full VAT" THEN BEGIN "Amount Including VAT" := "Line Amount" - "Inv. Discount Amount"; Amount := 0; "VAT Base Amount" := 0; END ELSE BEGIN …Erstatningskode 2
… END ELSE BEGIN IF "VAT Calculation Type" = "VAT Calculation Type"::"Full VAT" THEN BEGIN IF "Line Discount %" <> 100 THEN "Amount Including VAT" := "Line Amount" - "Inv. Discount Amount" ELSE "Amount Including VAT" := 0; Amount := 0; "VAT Base Amount" := 0; END ELSE BEGIN …Eksisterende kode 3
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); "Amount Including VAT" := Amount + ROUND(TempVATAmountLineRemainder."VAT Amount",Currency."Amount Rounding Precision"); TempVATAmountLineRemainder."VAT Amount" := TempVATAmountLineRemainder."VAT Amount" - "Amount Including VAT" + Amount; END; …Erstatningskode 3
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); IF "Line Discount %" <> 100 THEN "Amount Including VAT" := Amount + ROUND(TempVATAmountLineRemainder."VAT Amount",Currency."Amount Rounding Precision") ELSE "Amount Including VAT" := 0; TempVATAmountLineRemainder."VAT Amount" := TempVATAmountLineRemainder."VAT Amount" - "Amount Including VAT" + Amount; END; …Endre koden i DivideAmount-funksjonen i Serv-Post Mgt. codeunit (5986) på følgende måte:
Eksisterende kode 1… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); END; "Amount Including VAT" := ROUND(TempVATAmountLineRemainder."Amount Including VAT",Currency."Amount Rounding Precision"); Amount := ROUND("Amount Including VAT",Currency."Amount Rounding Precision") - …Erstatningskode 1
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); END; IF "Line Discount %" <> 100 THEN "Amount Including VAT" := ROUND(TempVATAmountLineRemainder."Amount Including VAT",Currency."Amount Rounding Precision") ELSE "Amount Including VAT" := 0; Amount := ROUND("Amount Including VAT",Currency."Amount Rounding Precision") - …Eksisterende kode 2
… END ELSE BEGIN IF "VAT Calculation Type" = "VAT Calculation Type"::"Full VAT" THEN BEGIN "Amount Including VAT" := "Line Amount" - "Inv. Discount Amount"; Amount := 0; "VAT Base Amount" := 0; END ELSE BEGIN …Erstatningskode 2
… END ELSE BEGIN IF "VAT Calculation Type" = "VAT Calculation Type"::"Full VAT" THEN BEGIN IF "Line Discount %" <> 100 THEN "Amount Including VAT" := "Line Amount" - "Inv. Discount Amount" ELSE "Amount Including VAT" := 0; Amount := 0; "VAT Base Amount" := 0; END ELSE BEGIN …Eksisterende kode 3
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); "Amount Including VAT" := Amount + ROUND(TempVATAmountLineRemainder."VAT Amount",Currency."Amount Rounding Precision"); TempVATAmountLineRemainder."VAT Amount" := TempVATAmountLineRemainder."VAT Amount" - "Amount Including VAT" + Amount; END; …Erstatningskode 3
… ("Line Amount" - "Inv. Discount Amount") / (TempVATAmountLine."Line Amount" - TempVATAmountLine."Invoice Discount Amount"); IF "Line Discount %" <> 100 THEN "Amount Including VAT" := Amount + ROUND(TempVATAmountLineRemainder."VAT Amount",Currency."Amount Rounding Precision") ELSE "Amount Including VAT" := 0; TempVATAmountLineRemainder."VAT Amount" := TempVATAmountLineRemainder."VAT Amount" - "Amount Including VAT" + Amount; END; …
Forutsetninger
Du må ha ett av følgende produkter installert for å bruke denne hurtigreparasjonen:
- Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
- Microsoft Dynamics NAV 2009
Informasjon om fjerning
Du kan ikke fjerne denne hurtigreparasjonen.
Status
Microsoft har bekreftet at dette er et problem i Microsoft-produktene som er oppført i delen «Gjelder for».
Obs! Dette er en «FAST PUBLISH»-artikkel som er opprettet direkte fra Microsofts støtteorganisasjon. Informasjonen i dette er angitt som svar på nye problemer. Som et resultat av hastigheten på å gjøre det tilgjengelig, kan materialene inkludere typografiske feil og kan bli revidert når som helst uten varsel. Se vilkår for bruk for andre hensyn.