Väljad Saldo ja Makse hinnaaland summa vormil Kliendikannete rakendamine ja Vormil Hankija kannete rakendamine kuvatakse valed väärtused, kui rakendate makse mitmele avatud dokumendile rakenduses Microsoft Dynamics NAV

Rakenduskoht
Dynamics NAV 2009 Dynamics NAV 2009 Service Pack 1 Microsoft Dynamics NAV 5.0 Microsoft Dynamics NAV 5.0 Service Pack 1

See artikkel kehtib Microsoft Dynamics NAV-i kohta kõigis riikides ja kõigis keele lokaadides.

Sümptomid

Kui rakendate makse mitmele avatud dokumendile rakenduses Microsoft Dynamics NAV, kuvatakse valed väärtused väljade Saldo ja Makse hinnaaland. Summa vormil Kliendikannete rakendamine (232) ja vormil Seo hankija kanded (233).
See probleem ilmneb järgmistes toodetes:

  • Microsoft Dynamics NAV 2009 Service Pack 1
  • Microsoft Dynamics NAV 2009
  • Microsoft Dynamics NAV 5.0 Service Pack 1
  • Microsoft Dynamics NAV 5.0

Lahendus

Kiirparanduse teave

Microsoftilt on nüüd saadaval toetatud kiirparandus. Siiski on see mõeldud ainult selles artiklis kirjeldatud probleemi lahendamiseks. Rakendage see ainult süsteemidele, kus esineb see konkreetne probleem. See kiirparandus võib saada täiendavaid katseid. Seega, kui see probleem ei mõjuta teid tõsiselt, soovitame oodata järgmist Microsoft Dynamics NAV 2009 hoolduspaketti või järgmist Microsoft Dynamics NAV versiooni, mis sisaldab seda kiirparandust.

Märkus. Erijuhtudel võidakse tavaliselt tugiteenuse kõnede eest tehtud tasud tühistada, kui Microsoft Dynamicsi ja seotud toodete tehniline tugitöötaja leiab, et konkreetne värskendus lahendab teie probleemi. Tavapärased toetuskulud kehtivad täiendavatele tugiteenustega seotud küsimustele ja probleemidele, mis ei vasta kõnealuse värskenduse tingimustele.

            
          

Installiteave

Microsoft pakub programmeerimise näiteid ainult illustreerimiseks, ilma et garantii oleks väljendatud või kaudselt. See hõlmab kaubastatavuse või kindlaks otstarbeks sobivuse kaudseid garantiisid, kuid mitte ainult. Selles artiklis eeldatakse, et olete tuttav kuvatava programmeerimiskeelega ja tööriistadega, mida kasutatakse protseduuride loomiseks ja silumiseks. Microsofti tugiteenuste insenerid saavad aidata selgitada konkreetse protseduuri funktsionaalsust, kuid nad ei muuda neid näiteid selleks, et pakkuda teie vajadustele vastavaid lisafunktsioone või koostada protseduure.

Märkus. Enne selle kiirparanduse installimist veenduge, et kõik Microsoft Navisioni klientrakenduse kasutajad oleksid süsteemist välja logitud. See hõlmab ka Microsoft Navision Application Servicesi (NAS) klientkasutajaid. Peaksite olema ainus klientkasutaja, kes on sisse logitud, kui rakendate selle kiirparanduse.

Selle kiirparanduse rakendamiseks peab teil olema arendaja litsents.

Soovitame, et aknas Windowsi sisselogimised või aknas Andmebaasi sisselogimised olevale kasutajakontole määrataks "SUPER" rolli ID. Kui kasutajakontole ei saa superrolli ID-d määrata, peate kontrollima, kas kasutajakontol on järgmised õigused.

  • Muudetava objekti muutmisõigus.
  • Süsteemiobjekti ID 5210 ja süsteemiobjekti ID 9015 täitmisõigus.

                
Märkus. Teil pole andmesalvede jaoks õigusi, kui te ei pea tegema andmete parandamist.

Koodi muudatused

Märkus. Enne paranduste rakendamist tööarvutitele testige koodiparandusi alati kontrollitud keskkonnas.
Probleemi lahendamiseks tehke järgmist.

  1. Muutke väljal Kliendikannete rakendamine (232) funktsiooni HandlChosenEntries tähist järgmiselt.
    Olemasolev kood

    ...
          IF (ABS(CurrentAmount - PossiblePmtDisc) > ABS(AppliedCustLedgEntryTemp."Remaining Amount" -
            AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible"))
          THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
            CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" -
              AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
          END ELSE IF (ABS(CurrentAmount - PossiblePmtDisc) = ABS(AppliedCustLedgEntryTemp."Remaining Amount" -
            AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible"))
          THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible" + PossiblePmtDisc;
            CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" -
              AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible" - PossiblePmtDisc;
       PossiblePmtDisc := 0;
            AppliedAmount := AppliedAmount + CorrectionAmount;
          END ELSE IF (FromZeroGenJnl) THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
            CurrentAmount := CurrentAmount +
              AppliedCustLedgEntryTemp."Remaining Amount" - AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
          END ELSE BEGIN
            IF (CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" >= 0) <> (CurrentAmount >= 0) THEN BEGIN
              PmtDiscAmount := PmtDiscAmount + PossiblePmtDisc;
              CurrentAmount := CurrentAmount - PossiblePmtDisc; DELETE LINE
              AppliedAmount := AppliedAmount + CorrectionAmount;
            END;
            CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount";
            PossiblePmtDisc := AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
          END;
        END ELSE BEGIN
          IF (((CurrentAmount - PossiblePmtDisc + AppliedCustLedgEntryTemp."Amount to Apply") * CurrentAmount) <= 0) THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + PossiblePmtDisc;
            CurrentAmount := CurrentAmount - PossiblePmtDisc;
            PossiblePmtDisc := 0;
            AppliedAmount := AppliedAmount + CorrectionAmount;
          END;
          CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Amount to Apply";
        END;
      END ELSE BEGIN
        AppliedCustLedgEntryTemp.SETRANGE(Positive);
        AppliedCustLedgEntryTemp.FINDFIRST;
      END;
    ...
    
    

    Asenduskood

    ...
          IF (ABS(CurrentAmount) > ABS(AppliedCustLedgEntryTemp."Remaining Amount" -
            AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible"))
          THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
            CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" -
              AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
          END ELSE IF (ABS(CurrentAmount) = ABS(AppliedCustLedgEntryTemp."Remaining Amount" -
            AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible"))
          THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible" + PossiblePmtDisc;
            CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" -
              AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible" - PossiblePmtDisc;
            PossiblePmtDisc := 0;
            AppliedAmount := AppliedAmount + CorrectionAmount;
          END ELSE IF (FromZeroGenJnl) THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
            CurrentAmount := CurrentAmount +
              AppliedCustLedgEntryTemp."Remaining Amount" - AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
          END ELSE BEGIN
            IF (CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" >= 0) <> (CurrentAmount >= 0) THEN BEGIN
              PmtDiscAmount := PmtDiscAmount + PossiblePmtDisc;
              AppliedAmount := AppliedAmount + CorrectionAmount;
            END;
            CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Remaining Amount" -
              AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
            PossiblePmtDisc := AppliedCustLedgEntryTemp."Remaining Pmt. Disc. Possible";
          END;
        END ELSE BEGIN
          IF (((CurrentAmount - PossiblePmtDisc + AppliedCustLedgEntryTemp."Amount to Apply") * CurrentAmount) <= 0) THEN BEGIN
            PmtDiscAmount := PmtDiscAmount + PossiblePmtDisc;
            CurrentAmount := CurrentAmount - PossiblePmtDisc;
            PossiblePmtDisc := 0;
            AppliedAmount := AppliedAmount + CorrectionAmount;
          END;
          CurrentAmount := CurrentAmount + AppliedCustLedgEntryTemp."Amount to Apply";
        END;
      END ELSE BEGIN
       AppliedCustLedgEntryTemp.SETRANGE(Positive);
        AppliedCustLedgEntryTemp.FINDFIRST;
      END;
    ...
    
    
  2. Muutke sarnaseid koode ka funktsioonis HandlChosenEntries vormil Seo hankija kanded (233). Muudetud kood on järgmine:

    ...
                IF (ABS(CurrentAmount) > ABS(AppliedVendLedgEntryTemp."Remaining Amount" - // This line is changed.
                  AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible"))
                THEN BEGIN
                  PmtDiscAmount := PmtDiscAmount + AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible";
                  CurrentAmount := CurrentAmount + AppliedVendLedgEntryTemp."Remaining Amount" -
                    AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible";
                END ELSE IF (ABS(CurrentAmount) = ABS(AppliedVendLedgEntryTemp."Remaining Amount" - // This line is changed.
                  AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible"))
                THEN BEGIN
                  PmtDiscAmount := PmtDiscAmount + AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible" + PossiblePmtdisc;
                  CurrentAmount := CurrentAmount + AppliedVendLedgEntryTemp."Remaining Amount" -
                    AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible" - PossiblePmtdisc;
                  PossiblePmtdisc := 0;
                  AppliedAmount := AppliedAmount + CorrectionAmount;
                END ELSE IF FromZeroGenJnl THEN BEGIN
                  PmtDiscAmount := PmtDiscAmount + AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible";
                  CurrentAmount := CurrentAmount +
                    AppliedVendLedgEntryTemp."Remaining Amount" - AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible";
                END ELSE BEGIN
                  IF (CurrentAmount + AppliedVendLedgEntryTemp."Remaining Amount" >= 0) <> (CurrentAmount >= 0) THEN BEGIN
                    PmtDiscAmount := PmtDiscAmount + PossiblePmtdisc;
                    // CurrentAmount := CurrentAmount - PossiblePmtdisc; // This line is deleted.
                    AppliedAmount := AppliedAmount + CorrectionAmount;
                  END;
                  CurrentAmount := CurrentAmount + AppliedVendLedgEntryTemp."Remaining Amount" - // This line is changed.
                    AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible"; // This line is added
                  PossiblePmtdisc := AppliedVendLedgEntryTemp."Remaining Pmt. Disc. Possible";
                END;
              END ELSE BEGIN
                IF (((CurrentAmount - PossiblePmtdisc + AppliedVendLedgEntryTemp."Amount to Apply") * CurrentAmount) <= 0) THEN BEGIN
    ...
    
    

Eeltingimused

Selle kiirparanduse rakendamiseks peab teil olema installitud üks järgmistest toodetest:

  • Microsoft Dynamics NAV 2009 Service Pack 1
  • Microsoft Dynamics NAV 2009
  • Microsoft Dynamics NAV 5.0 Service Pack 1
  • Microsoft Dynamics NAV 5.0

Eemaldamisteave

Seda kiirparandust ei saa eemaldada.

Olek

Microsoft on kinnitanud, et see on jaotises „Rakenduskoht“ loetletud Microsofti toodete korral esinev probleem.

Märkus. See on otse Microsofti tugiteenuste organisatsioonist loodud FAST PUBLISH-artikkel. Käesolevas artiklis sisalduv teave on esitatud kujul, mis on seotud tekkivate küsimustega. Materjali kättesaadavaks tegemise kiiruse tõttu võivad materjalid sisaldada kirjavigu ja neid võib igal ajal ette teatamata läbi vaadata. Muid kaalutlusi leiate teemast Kasutustingimused .