Przejdź do głównej zawartości
Pomoc techniczna
Zaloguj się przy użyciu konta Microsoft
Zaloguj się lub utwórz konto.
Witaj,
Wybierz inne konto.
Masz wiele kont
Wybierz konto, za pomocą którego chcesz się zalogować.

Zniżki na koszt dodatkowy, które są przypisane do wydania sprzedaży nie są dystrybuowane zgodnie z wybranym wybór odpowiednich wartości wpisów w systemie Microsoft Dynamics NAV 2009. Wykonaj kroki opisane w sekcji zmiany kodu , aby rozwiązać ten problem. Ten problem występuje w następujących produktach:

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics NAV 2009 z dodatkiem Service Pack 1 (SP1)

Rozwiązanie

Informacje o poprawce

Obsługiwana poprawka jest obecnie udostępniana przez firmę Microsoft. Jednak to jest przeznaczona tylko do usunięcia problemu opisanego w tym artykule. Zastosuj ją tylko w systemach, w których występuje ten problem. Ta poprawka może być wciąż w fazie testowania. Jeśli dany system nie jest poważnie narażony na ten problem, firma Microsoft zaleca, aby poczekać na następny dodatek service pack dla systemu Microsoft Dynamics NAV 2009 lub następną wersję systemu Microsoft Dynamics NAV, zawierający tę poprawkę.

Uwaga W wyjątkowych przypadkach opłaty, telefonujący do pomocy technicznej mogą zostać anulowane, jeśli pomocy technicznej dla systemu Microsoft Dynamics i produktów powiązanych Określa, że określonej aktualizacji, można rozwiązać swój problem. Koszty obsługi zwykłych zastosuje się do dodatkowych pytań i problemów, których nie można rozwiązać przy użyciu określonej aktualizacji.

Informacje dotyczące instalacji

Firma Microsoft podaje przykłady programowania wyłącznie, bez jakichkolwiek gwarancji wyrażonych wprost lub domyślnie. To obejmuje, ale nie jest ograniczona, ustawowej rękojmi co do przydatności handlowej lub przydatności do określonego celu. W tym artykule założono, że użytkownik zna demonstrowany język programowania oraz narzędzia, które są używane do tworzenia i debugowania procedur. Wykwalifikowani pracownicy pomocy technicznej firmy Microsoft mogą pomóc w wyjaśnieniu, jak działa określona procedura. Nie będą jednak modyfikować tych przykładów ani dodawać funkcjonalności i konstruować procedur w celu zaspokojenia określonych potrzeb użytkownika.

Uwaga Przed zainstalowaniem tej poprawki należy zweryfikować, że wszyscy użytkownicy klienta systemu Microsoft Dynamics NAV są wylogowani systemu. Obejmuje to usług systemu Microsoft Dynamics NAV aplikacji serwera (NAS). Powinny być użytkownika klienta, który jest zalogowany w momencie wdrożyć tę poprawkę.

Aby wdrożyć tę poprawkę, musi mieć licencję deweloperską.

Firma Microsoft zaleca, aby do konta użytkownika w oknie identyfikatorów logowania systemu Windows lub w oknie identyfikatorów logowania bazy danych być przypisany identyfikator roli "SUPER". Jeśli konto użytkownika nie można przypisać Identyfikatora roli "SUPER", należy sprawdzić, czy konto użytkownika ma następujące uprawnienia:

  • Uprawnienie Modyfikacja dla obiektu, który będzie zmieniany.

  • Uprawnienie Execute obiektu 5210 identyfikator obiektu systemu i 9015 identyfikator obiektu systemu

    obiekt.

Uwaga Nie trzeba mieć prawa do magazynów danych, chyba że konieczne jest przeprowadzenie naprawy danych.

Zmiany kodu

Uwaga Zawsze test poprawki kodu w kontrolowanym środowisku przed zastosowaniem poprawki na komputerach produkcyjnych.

Aby rozwiązać ten problem, wykonaj następujące kroki:

  1. Zmień kod w właściwości w codeunit Księgowanie sprzedaży (80) w następujący sposób:
    Istniejący kod 1

    ...PostJobContractLine(JobTaskSalesLine,TempJnlLineDim2);

    END;

    SalesLine.Type::"Charge (Item)":

    IF Invoice OR ItemChargeAssgntOnly THEN BEGIN

    // Delete the following line.
    ItemJnlRollRndg := FALSE;
    // End of the deleted line.

    ClearItemChargeAssgntFilter;

    TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type");

    TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No.");

    IF TempItemChargeAssgntSales.FINDSET THEN
    ...

    Kod zastępczy 1

    ...PostJobContractLine(JobTaskSalesLine,TempJnlLineDim2);

    END;

    SalesLine.Type::"Charge (Item)":

    IF Invoice OR ItemChargeAssgntOnly THEN BEGIN

    // Add the following line.
    ItemJnlRollRndg := TRUE;
    // End of the added line.

    ClearItemChargeAssgntFilter;

    TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type");

    TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No.");

    IF TempItemChargeAssgntSales.FINDSET THEN
    ...

    Istniejący kod 2

    ...GenJnlLineDocNo := TempItemChargeAssgntSales."Applies-to Doc. No.";

    CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF

    TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment:

    BEGIN

    // Delete the following line.
    PostItemChargePerShpt(SalesLine);

    TempItemChargeAssgntSales.MARK(TRUE);

    END;

    TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt":

    BEGIN
    ...

    Kod zastępczy 2

    ...GenJnlLineDocNo := TempItemChargeAssgntSales."Applies-to Doc. No.";

    CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF

    TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment:

    BEGIN

    // Add the following lines.
    PostItemChargePerShpt(SalesLine,SalesLine."Inv. Discount Amount",

    SalesLine.Quantity,SalesLine."Line Discount Amount",SalesLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntSales.MARK(TRUE);

    END;

    TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt":

    BEGIN
    ...

    Istniejący kod 3

    ...TempItemChargeAssgntSales.MARK(TRUE);

    END;

    TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt":

    BEGIN

    // Delete the following line.
    PostItemChargePerRetRcpt(SalesLine);

    TempItemChargeAssgntSales.MARK(TRUE);

    END;

    TempItemChargeAssgntSales."Applies-to Doc. Type"::Order,

    TempItemChargeAssgntSales."Applies-to Doc. Type"::Invoice:
    ...

    Kod zastępczy 3

    ...TempItemChargeAssgntSales.MARK(TRUE);

    END;

    TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt":

    BEGIN

    // Add the following lines.
    PostItemChargePerRetRcpt(SalesLine,SalesLine."Inv. Discount Amount",

    SalesLine.Quantity,SalesLine."Line Discount Amount",SalesLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntSales.MARK(TRUE);

    END;

    TempItemChargeAssgntSales."Applies-to Doc. Type"::Order,

    TempItemChargeAssgntSales."Applies-to Doc. Type"::Invoice:
    ...
  2. Zmień kod w funkcji PostItemChargePerShpt w codeunit Księgowanie sprzedaży (80) w następujący sposób:
    Istniejący kod 1

    ...END;

    END;

    END;


    // Delete the following line.
    LOCAL PROCEDURE PostItemChargePerShpt@5807(SalesLine@1000 : Record 37);

    VAR

    SalesShptLine@1003 : Record 111;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...

    Kod zastępczy 1

    ...END;

    END;

    END;


    // Add the following line.
    LOCAL PROCEDURE PostItemChargePerShpt@5807(SalesLine@1000 : Record 37;VAR TotalInvDiscAmtRemaining@1012 : Decimal;VAR TotalQtyRemaining@1013 : Decimal;VAR TotalLineDiscAmtRemaining@1014 : Decimal;VAR TotalLineAmtRemaining@1015 : Decimal);

    VAR

    SalesShptLine@1003 : Record 111;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...

    Istniejący kod 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Delete the following line.
    AmountToAssign,QtyToAssign);

    NonDistrQuantity := NonDistrQuantity - ABS(TempItemLedgEntry.Quantity);

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Add the following lines.
    AmountToAssign,QtyToAssign,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - ABS(TempItemLedgEntry.Quantity);

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Delete the following line.
    NonDistrAmountToAssign,NonDistrQtyToAssign);

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    PostItemCharge(SalesLine,

    SalesShptLine."Item Shpt. Entry No.",SalesShptLine."Quantity (Base)",
    ...

    Kod zastępczy 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Add the following lines.
    NonDistrAmountToAssign,NonDistrQtyToAssign,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    PostItemCharge(SalesLine,

    SalesShptLine."Item Shpt. Entry No.",SalesShptLine."Quantity (Base)",
    ...

    Istniejący kod 4

    ...END ELSE

    PostItemCharge(SalesLine,

    SalesShptLine."Item Shpt. Entry No.",SalesShptLine."Quantity (Base)",

    TempItemChargeAssgntSales."Amount to Assign",

    // Delete the following lines.
    TempItemChargeAssgntSales."Qty. to Assign");

    END;



    LOCAL PROCEDURE PostItemChargePerRetRcpt@5810(SalesLine@1000 : Record 37);
    // End of the deleted lines.

    VAR

    ReturnRcptLine@1002 : Record 6661;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...

    Kod zastępczy 4

    ...END ELSE

    PostItemCharge(SalesLine,

    SalesShptLine."Item Shpt. Entry No.",SalesShptLine."Quantity (Base)",

    TempItemChargeAssgntSales."Amount to Assign",

    // Add the following lines.
    TempItemChargeAssgntSales."Qty. to Assign",TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);

    END;



    LOCAL PROCEDURE PostItemChargePerRetRcpt@5810(SalesLine@1000 : Record 37;VAR TotalInvDiscAmtRemaining@1012 : Decimal;VAR TotalQtyRemaining@1013 : Decimal;VAR TotalLineDiscAmtRemaining@1014 : Decimal;VAR TotalLineAmtRemaining@1015 : Decimal);
    // End of the added lines.

    VAR

    ReturnRcptLine@1002 : Record 6661;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...
  3. Zmień kod w funkcji PostItemChargePerRetRcpt w codeunit Księgowanie sprzedaży (80) w następujący sposób:
    Istniejący kod 1

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Delete the following line.
    AmountToAssign,QtyToAssign);

    NonDistrQuantity := NonDistrQuantity - ABS(TempItemLedgEntry.Quantity);

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 1

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Add the following lines.
    AmountToAssign,QtyToAssign,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - ABS(TempItemLedgEntry.Quantity);

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 2

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Delete the following line.
    NonDistrAmountToAssign,NonDistrQtyToAssign);

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    PostItemCharge(SalesLine,

    ReturnRcptLine."Item Rcpt. Entry No.",ReturnRcptLine."Quantity (Base)",
    ...

    Kod zastępczy 2

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(SalesLine,

    TempItemLedgEntry."Entry No.",ABS(TempItemLedgEntry.Quantity),

    // Add the following lines.
    NonDistrAmountToAssign,NonDistrQtyToAssign,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    PostItemCharge(SalesLine,

    ReturnRcptLine."Item Rcpt. Entry No.",ReturnRcptLine."Quantity (Base)",
    ...

    Istniejący kod 3

    ...END ELSE

    PostItemCharge(SalesLine,

    ReturnRcptLine."Item Rcpt. Entry No.",ReturnRcptLine."Quantity (Base)",

    TempItemChargeAssgntSales."Amount to Assign",

    // Delete the following line.
    TempItemChargeAssgntSales."Qty. to Assign")

    END;



    LOCAL PROCEDURE PostAssocItemJnlLine@3(QtyToBeShipped@1000 : Decimal;QtyToBeShippedBase@1001 : Decimal) : Integer;

    VAR
    ...

    Kod zastępczy 3

    ...END ELSE

    PostItemCharge(SalesLine,

    ReturnRcptLine."Item Rcpt. Entry No.",ReturnRcptLine."Quantity (Base)",

    TempItemChargeAssgntSales."Amount to Assign",

    // Add the following lines.
    TempItemChargeAssgntSales."Qty. to Assign",TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining)
    // End of the added lines.

    END;



    LOCAL PROCEDURE PostAssocItemJnlLine@3(QtyToBeShipped@1000 : Decimal;QtyToBeShippedBase@1001 : Decimal) : Integer;

    VAR
    ...
  4. Zmień kod w funkcji PostItemCharge w codeunit Księgowanie sprzedaży (80) w następujący sposób:
    Istniejący kod 1

    ...TempValueEntryRelation.DELETEALL;

    END;

    END;


    // Delete the following line.
    PROCEDURE PostItemCharge@42(SalesLine@1005 : Record 37;ItemEntryNo@1004 : Integer;QuantityBase@1003 : Decimal;AmountToAssign@1002 : Decimal;QtyToAssign@1001 : Decimal);

    VAR

    DummyTrackingSpecification@1000 : Record 336;

    BEGIN

    WITH TempItemChargeAssgntSales DO BEGIN
    ...

    Kod zastępczy 1

    ...TempValueEntryRelation.DELETEALL;

    END;

    END;


    // Add the following line.
    PROCEDURE PostItemCharge@42(SalesLine@1005 : Record 37;ItemEntryNo@1004 : Integer;QuantityBase@1003 : Decimal;AmountToAssign@1002 : Decimal;QtyToAssign@1001 : Decimal;VAR TotalInvDiscAmtRemaining@1006 : Decimal;VAR TotalQtyRemaining@1007 : Decimal;VAR TotalLineDiscAmtRemaining@1008 : Decimal;VAR TotalLineAmtRemaining@1009 : Decimal);

    VAR

    DummyTrackingSpecification@1000 : Record 336;

    BEGIN

    WITH TempItemChargeAssgntSales DO BEGIN
    ...

    Istniejący kod 2

    ...SalesLine.Amount :=

    CurrExchRate.ExchangeAmtFCYToLCY(

    UseDate,SalesHeader."Currency Code",TotalChargeAmt,SalesHeader."Currency Factor");

    SalesLine."Inv. Discount Amount" := ROUND(

    // Delete the following lines.
    SalesLine."Inv. Discount Amount" / SalesLine.Quantity * QtyToAssign,

    GLSetup."Amount Rounding Precision");
    // End of the deleted lines.

    SalesLine.Amount := ROUND(SalesLine.Amount,GLSetup."Amount Rounding Precision") - TotalChargeAmtLCY;

    IF SalesHeader."Currency Code" <> '' THEN

    TotalChargeAmtLCY := TotalChargeAmtLCY + SalesLine.Amount;

    SalesLine."Unit Cost (LCY)" := ROUND(
    ...

    Kod zastępczy 2

    ...SalesLine.Amount :=

    CurrExchRate.ExchangeAmtFCYToLCY(

    UseDate,SalesHeader."Currency Code",TotalChargeAmt,SalesHeader."Currency Factor");

    SalesLine."Inv. Discount Amount" := ROUND(

    // Add the following lines.
    TotalInvDiscAmtRemaining / TotalQtyRemaining * QtyToAssign,

    GLSetup."Amount Rounding Precision");

    SalesLine."Line Discount Amount" := ROUND(

    TotalLineDiscAmtRemaining / TotalQtyRemaining * QtyToAssign,

    GLSetup."Amount Rounding Precision");

    SalesLine."Line Amount" := ROUND(

    TotalLineAmtRemaining / TotalQtyRemaining * QtyToAssign,

    GLSetup."Amount Rounding Precision");

    TotalInvDiscAmtRemaining := TotalInvDiscAmtRemaining - SalesLine."Inv. Discount Amount";

    TotalLineDiscAmtRemaining := TotalLineDiscAmtRemaining - SalesLine."Line Discount Amount";

    TotalLineAmtRemaining := TotalLineAmtRemaining - SalesLine."Line Amount";

    TotalQtyRemaining := TotalQtyRemaining - QtyToAssign;

    // End of the added lines.

    SalesLine.Amount := ROUND(SalesLine.Amount,GLSetup."Amount Rounding Precision") - TotalChargeAmtLCY;

    IF SalesHeader."Currency Code" <> '' THEN

    TotalChargeAmtLCY := TotalChargeAmtLCY + SalesLine.Amount;

    SalesLine."Unit Cost (LCY)" := ROUND(
    ...
  5. Zmień kod w oknie właściwości w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...3:

    ERROR(Text015);

    PurchLine.Type::"Charge (Item)":

    IF Invoice OR ItemChargeAssgntOnly THEN BEGIN

    // Delete the following line.
    ItemJnlRollRndg := FALSE;

    ClearItemChargeAssgntFilter;

    TempItemChargeAssgntPurch.SETCURRENTKEY("Applies-to Doc. Type");

    TempItemChargeAssgntPurch.SETRANGE("Document Line No.",PurchLine."Line No.");

    IF TempItemChargeAssgntPurch.FINDSET THEN
    ...

    Kod zastępczy 1

    ...3:

    ERROR(Text015);

    PurchLine.Type::"Charge (Item)":

    IF Invoice OR ItemChargeAssgntOnly THEN BEGIN

    // Add the following line.
    ItemJnlRollRndg := TRUE;

    ClearItemChargeAssgntFilter;

    TempItemChargeAssgntPurch.SETCURRENTKEY("Applies-to Doc. Type");

    TempItemChargeAssgntPurch.SETRANGE("Document Line No.",PurchLine."Line No.");

    IF TempItemChargeAssgntPurch.FINDSET THEN
    ...

    Istniejący kod 2

    ...GenJnlLineDocNo := TempItemChargeAssgntPurch."Applies-to Doc. No.";

    CASE TempItemChargeAssgntPurch."Applies-to Doc. Type" OF

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::Receipt:

    BEGIN

    // Delete the following line.
    PostItemChargePerRcpt(PurchLine);

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt":

    BEGIN
    ...

    Kod zastępczy 2

    ...GenJnlLineDocNo := TempItemChargeAssgntPurch."Applies-to Doc. No.";

    CASE TempItemChargeAssgntPurch."Applies-to Doc. Type" OF

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::Receipt:

    BEGIN

    // Add the following lines.
    PostItemChargePerRcpt(PurchLine,PurchLine."Inv. Discount Amount",

    PurchLine.Quantity,PurchLine."Line Discount Amount",PurchLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt":

    BEGIN
    ...

    Istniejący kod 3

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt":

    BEGIN

    // Delete the following line.
    PostItemChargePerTransfer(PurchLine);

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment":

    BEGIN
    ...

    Kod zastępczy 3

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt":

    BEGIN

    // Add the following lines.
    PostItemChargePerTransfer(PurchLine,PurchLine."Inv. Discount Amount",

    PurchLine.Quantity,PurchLine."Line Discount Amount",PurchLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment":

    BEGIN
    ...

    Istniejący kod 4

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment":

    BEGIN

    // Delete the following line.
    PostItemChargePerRetShpt(PurchLine);

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment":

    BEGIN
    ...

    Kod zastępczy 4

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment":

    BEGIN

    // Add the following lines.
    PostItemChargePerRetShpt(PurchLine,PurchLine."Inv. Discount Amount",

    PurchLine.Quantity,PurchLine."Line Discount Amount",PurchLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment":

    BEGIN
    ...

    Istniejący kod 5

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment":

    BEGIN

    // Delete the following line.
    PostItemChargePerSalesShpt(PurchLine);

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt":

    BEGIN
    ...

    Kod zastępczy 5

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment":

    BEGIN

    // Add the following lines.
    PostItemChargePerSalesShpt(PurchLine,PurchLine."Inv. Discount Amount",

    PurchLine.Quantity,PurchLine."Line Discount Amount",PurchLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt":

    BEGIN
    ...

    Istniejący kod 6

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt":

    BEGIN

    // Delete the following line.
    PostItemChargePerRetRcpt(PurchLine);

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::Order,

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::Invoice:
    ...

    Kod zastępczy 6

    ...TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt":

    BEGIN

    // Add the following lines.
    PostItemChargePerRetRcpt(PurchLine,PurchLine."Inv. Discount Amount",

    PurchLine.Quantity,PurchLine."Line Discount Amount",PurchLine."Line Amount");
    // End of the added lines.

    TempItemChargeAssgntPurch.MARK(TRUE);

    END;

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::Order,

    TempItemChargeAssgntPurch."Applies-to Doc. Type"::Invoice:
    ...
  6. Zmień kod w funkcji PostItemChargePerRcpt w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...END;

    END;

    END;


    // Delete the following line.
    LOCAL PROCEDURE PostItemChargePerRcpt@5807(PurchLine@1000 : Record 39);

    VAR

    PurchRcptLine@1002 : Record 121;

    TempItemLedgEntry@1003 : TEMPORARY Record 32;

    ItemTrackingMgt@1005 : Codeunit 6500;
    ...

    Kod zastępczy 1

    ...END;

    END;

    END;


    // Add the following line.
    LOCAL PROCEDURE PostItemChargePerRcpt@5807(PurchLine@1000 : Record 39;VAR TotalInvDiscAmtRemaining@1012 : Decimal;VAR TotalQtyRemaining@1013 : Decimal;VAR TotalLineDiscAmtRemaining@1014 : Decimal;VAR TotalLineAmtRemaining@1015 : Decimal);

    VAR

    PurchRcptLine@1002 : Record 121;

    TempItemLedgEntry@1003 : TEMPORARY Record 32;

    ItemTrackingMgt@1005 : Codeunit 6500;
    ...

    Istniejący kod 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    AmountToAssign * Sign,QtyToAssign,PurchRcptLine."Indirect Cost %");

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    AmountToAssign * Sign,QtyToAssign,PurchRcptLine."Indirect Cost %",

    TotalInvDiscAmtRemaining,TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,PurchRcptLine."Indirect Cost %");

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Kod zastępczy 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,PurchRcptLine."Indirect Cost %",

    TotalInvDiscAmtRemaining,TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Istniejący kod 4

    ...PostItemCharge(PurchLine,

    PurchRcptLine."Item Rcpt. Entry No.",PurchRcptLine."Quantity (Base)",

    TempItemChargeAssgntPurch."Amount to Assign" * Sign,

    TempItemChargeAssgntPurch."Qty. to Assign",

    // Delete the following lines.
    PurchRcptLine."Indirect Cost %");

    END;



    LOCAL PROCEDURE PostItemChargePerRetShpt@5811(PurchLine@1000 : Record 39);
    // End of the deleted lines.

    VAR

    ReturnShptLine@1002 : Record 6651;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...

    Kod zastępczy 4

    ...PostItemCharge(PurchLine,

    PurchRcptLine."Item Rcpt. Entry No.",PurchRcptLine."Quantity (Base)",

    TempItemChargeAssgntPurch."Amount to Assign" * Sign,

    TempItemChargeAssgntPurch."Qty. to Assign",

    // Add the following lines.
    PurchRcptLine."Indirect Cost %",TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);

    END;



    LOCAL PROCEDURE PostItemChargePerRetShpt@5811(PurchLine@1000 : Record 39;VAR TotalInvDiscAmtRemaining@1012 : Decimal;VAR TotalQtyRemaining@1013 : Decimal;VAR TotalLineDiscAmtRemaining@1014 : Decimal;VAR TotalLineAmtRemaining@1015 : Decimal);
    // End of the added lines.

    VAR

    ReturnShptLine@1002 : Record 6651;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...
  7. Zmień kod w funkcji PostItemChargePerRetShpt w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    AmountToAssign * Sign,QtyToAssign,ReturnShptLine."Indirect Cost %");

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 1

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    AmountToAssign * Sign,QtyToAssign,ReturnShptLine."Indirect Cost %",TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 2

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,ReturnShptLine."Indirect Cost %");

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Kod zastępczy 2

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,ReturnShptLine."Indirect Cost %",TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Istniejący kod 3

    ...PostItemCharge(PurchLine,

    ReturnShptLine."Item Shpt. Entry No.",-ReturnShptLine."Quantity (Base)",

    ABS(TempItemChargeAssgntPurch."Amount to Assign") * Sign,

    TempItemChargeAssgntPurch."Qty. to Assign",

    // Delete the following lines.
    ReturnShptLine."Indirect Cost %");

    END;



    LOCAL PROCEDURE PostItemChargePerTransfer@23(PurchLine@1000 : Record 39);
    // End of the deleted lines.

    VAR

    TransRcptLine@1002 : Record 5747;

    ItemApplnEntry@1003 : Record 339;

    DummyTrackingSpecification@1001 : Record 336;
    ...

    Kod zastępczy 3

    ...PostItemCharge(PurchLine,

    ReturnShptLine."Item Shpt. Entry No.",-ReturnShptLine."Quantity (Base)",

    ABS(TempItemChargeAssgntPurch."Amount to Assign") * Sign,

    TempItemChargeAssgntPurch."Qty. to Assign",

    // Add the following lines.
    ReturnShptLine."Indirect Cost %",TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);

    END;



    LOCAL PROCEDURE PostItemChargePerTransfer@23(PurchLine@1000 : Record 39;VAR TotalInvDiscAmtRemaining@1016 : Decimal;VAR TotalQtyRemaining@1017 : Decimal;VAR TotalLineDiscAmtRemaining@1018 : Decimal;VAR TotalLineAmtRemaining@1019 : Decimal);
    // End of the added lines.

    VAR

    TransRcptLine@1002 : Record 5747;

    ItemApplnEntry@1003 : Record 339;

    DummyTrackingSpecification@1001 : Record 336;
    ...
  8. Zmień kod w funkcji PostItemChargePerTransfer w thePurch.-Post codeunit (90) w następujący sposób
    Istniejący kod

    ...PurchLine."Bin Code" := '';

    PurchLine."Line No." := "Document Line No.";



    IF TransRcptLine."Item Rcpt. Entry No." = 0 THEN

    // Delete the following line.
    PostItemChargePerITTransfer(PurchLine,TransRcptLine)

    ELSE BEGIN

    TotalAmountToPostFCY := "Amount to Assign";

    IF PurchHeader."Currency Code" <> '' THEN

    TotalAmountToPostLCY :=
    ...

    Kod zastępczy

    ...PurchLine."Bin Code" := '';

    PurchLine."Line No." := "Document Line No.";



    IF TransRcptLine."Item Rcpt. Entry No." = 0 THEN

    // Add the following lines.
    PostItemChargePerITTransfer(PurchLine,TransRcptLine,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining)
    // End of the added lines.

    ELSE BEGIN

    TotalAmountToPostFCY := "Amount to Assign";

    IF PurchHeader."Currency Code" <> '' THEN

    TotalAmountToPostLCY :=
    ...
  9. Zmień kod w funkcji PostItemChargePerITTransfer w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...END;

    END;

    END;


    // Delete the following line.
    LOCAL PROCEDURE PostItemChargePerITTransfer@43(PurchLine@1000 : Record 39;TransRcptLine@1017 : Record 5747);

    VAR

    TempItemLedgEntry@1016 : TEMPORARY Record 32;

    ItemTrackingMgt@1001 : Codeunit 6500;

    Factor@1023 : Decimal;
    ...

    Kod zastępczy 1

    ...END;

    END;

    END;


    // Add the following line.
    LOCAL PROCEDURE PostItemChargePerITTransfer@43(PurchLine@1000 : Record 39;TransRcptLine@1017 : Record 5747;VAR TotalInvDiscAmtRemaining@1026 : Decimal;VAR TotalQtyRemaining@1024 : Decimal;VAR TotalLineDiscAmtRemaining@1025 : Decimal;VAR TotalLineAmtRemaining@1030 : Decimal);

    VAR

    TempItemLedgEntry@1016 : TEMPORARY Record 32;

    ItemTrackingMgt@1001 : Codeunit 6500;

    Factor@1023 : Decimal;
    ...

    Istniejący kod 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    AmountToAssign,QtyToAssign,0);

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    AmountToAssign,QtyToAssign,0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    NonDistrAmountToAssign,NonDistrQtyToAssign,0);

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042);

    END;
    ...

    Kod zastępczy 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    NonDistrAmountToAssign,NonDistrQtyToAssign,0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042);

    END;
    ...
  10. Zmień kod w funkcji PostItemChargePerSalesShpt w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...ERROR(Text042);

    END;

    END;


    // Delete the following line.
    LOCAL PROCEDURE PostItemChargePerSalesShpt@41(PurchLine@1000 : Record 39);

    VAR

    SalesShptLine@1002 : Record 111;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...

    Kod zastępczy 1

    ...ERROR(Text042);

    END;

    END;


    // Add the following line.
    LOCAL PROCEDURE PostItemChargePerSalesShpt@41(PurchLine@1000 : Record 39;VAR TotalInvDiscAmtRemaining@1012 : Decimal;VAR TotalQtyRemaining@1013 : Decimal;VAR TotalLineDiscAmtRemaining@1014 : Decimal;VAR TotalLineAmtRemaining@1015 : Decimal);

    VAR

    SalesShptLine@1002 : Record 111;

    TempItemLedgEntry@1010 : TEMPORARY Record 32;

    ItemTrackingMgt@1009 : Codeunit 6500;
    ...

    Istniejący kod 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    AmountToAssign * Sign,QtyToAssign,0);

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 2

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    AmountToAssign * Sign,QtyToAssign,0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,0);

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Kod zastępczy 3

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Istniejący kod 4

    ...ELSE

    PostItemCharge(PurchLine,

    SalesShptLine."Item Shpt. Entry No.",-SalesShptLine."Quantity (Base)",

    TempItemChargeAssgntPurch."Amount to Assign" * Sign,

    // Delete the following lines.
    TempItemChargeAssgntPurch."Qty. to Assign",0)

    END;



    PROCEDURE PostItemChargePerRetRcpt@37(PurchLine@1001 : Record 39);
    // End of the deleted lines.

    VAR

    ReturnRcptLine@1000 : Record 6661;

    TempItemLedgEntry@1011 : TEMPORARY Record 32;

    ItemTrackingMgt@1010 : Codeunit 6500;
    ...

    Kod zastępczy 4

    ...ELSE

    PostItemCharge(PurchLine,

    SalesShptLine."Item Shpt. Entry No.",-SalesShptLine."Quantity (Base)",

    TempItemChargeAssgntPurch."Amount to Assign" * Sign,

    // Add the following lines.
    TempItemChargeAssgntPurch."Qty. to Assign",0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining)

    END;



    PROCEDURE PostItemChargePerRetRcpt@37(PurchLine@1001 : Record 39;VAR TotalInvDiscAmtRemaining@1012 : Decimal;VAR TotalQtyRemaining@1013 : Decimal;VAR TotalLineDiscAmtRemaining@1014 : Decimal;VAR TotalLineAmtRemaining@1015 : Decimal);
    // End of the added lines.

    VAR

    ReturnRcptLine@1000 : Record 6661;

    TempItemLedgEntry@1011 : TEMPORARY Record 32;

    ItemTrackingMgt@1010 : Codeunit 6500;
    ...
  11. Zmień kod w funkcji PostItemChargePerRetRcpt w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    AmountToAssign * Sign,QtyToAssign,0);

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Kod zastępczy 1

    ...AmountToAssign := ROUND(NonDistrAmountToAssign * Factor,GLSetup."Amount Rounding Precision");

    IF Factor < 1 THEN BEGIN

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    AmountToAssign * Sign,QtyToAssign,0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    NonDistrQuantity := NonDistrQuantity - TempItemLedgEntry.Quantity;

    NonDistrQtyToAssign := NonDistrQtyToAssign - QtyToAssign;

    NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time
    ...

    Istniejący kod 2

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Delete the following line.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,0);

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Kod zastępczy 2

    ...NonDistrAmountToAssign := NonDistrAmountToAssign - AmountToAssign;

    END ELSE // the last time

    PostItemCharge(PurchLine,

    TempItemLedgEntry."Entry No.",TempItemLedgEntry.Quantity,

    // Add the following lines.
    NonDistrAmountToAssign * Sign,NonDistrQtyToAssign,0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining);
    // End of the added lines.

    UNTIL TempItemLedgEntry.NEXT = 0;

    END ELSE

    ERROR(Text042)

    ELSE
    ...

    Istniejący kod 3

    ...ELSE

    PostItemCharge(PurchLine,

    ReturnRcptLine."Item Rcpt. Entry No.",ReturnRcptLine."Quantity (Base)",

    TempItemChargeAssgntPurch."Amount to Assign" * Sign,

    // Delete the following line.
    TempItemChargeAssgntPurch."Qty. to Assign",0)

    END;



    LOCAL PROCEDURE PostAssocItemJnlLine@3(QtyToBeShipped@1000 : Decimal;QtyToBeShippedBase@1001 : Decimal) : Integer;

    VAR
    ...

    Kod zastępczy 3

    ...ELSE

    PostItemCharge(PurchLine,

    ReturnRcptLine."Item Rcpt. Entry No.",ReturnRcptLine."Quantity (Base)",

    TempItemChargeAssgntPurch."Amount to Assign" * Sign,

    // Add the following lines.
    TempItemChargeAssgntPurch."Qty. to Assign",0,TotalInvDiscAmtRemaining,

    TotalQtyRemaining,TotalLineDiscAmtRemaining,TotalLineAmtRemaining)
    // End of the added lines.

    END;



    LOCAL PROCEDURE PostAssocItemJnlLine@3(QtyToBeShipped@1000 : Decimal;QtyToBeShippedBase@1001 : Decimal) : Integer;

    VAR
    ...
  12. Zmień kod w funkcji PostItemCharge w thePurch.-Post codeunit (90) w następujący sposób:
    Istniejący kod 1

    ...TempValueEntryRelation.DELETEALL;

    END;

    END;


    // Delete the following line.
    LOCAL PROCEDURE PostItemCharge@42(PurchLine@1000 : Record 39;ItemEntryNo@1004 : Integer;QuantityBase@1005 : Decimal;AmountToAssign@1006 : Decimal;QtyToAssign@1007 : Decimal;IndirectCostPct@1008 : Decimal);

    VAR

    DummyTrackingSpecification@1001 : Record 336;

    BEGIN

    WITH TempItemChargeAssgntPurch DO BEGIN
    ...

    Kod zastępczy 1

    ...TempValueEntryRelation.DELETEALL;

    END;

    END;


    // Add the following line.
    LOCAL PROCEDURE PostItemCharge@42(PurchLine@1000 : Record 39;ItemEntryNo@1004 : Integer;QuantityBase@1005 : Decimal;AmountToAssign@1006 : Decimal;QtyToAssign@1007 : Decimal;IndirectCostPct@1008 : Decimal;VAR TotalInvDiscAmtRemaining@1009 : Decimal;VAR TotalQtyRemaining@1010 : Decimal;VAR TotalLineDiscAmtRemaining@1011 : Decimal;VAR TotalLineAmtRemaining@1012 : Decimal);

    VAR

    DummyTrackingSpecification@1001 : Record 336;

    BEGIN

    WITH TempItemChargeAssgntPurch DO BEGIN
    ...

    Istniejący kod 2

    ...ROUND(

    PurchLine.Amount / QuantityBase,GLSetup."Unit-Amount Rounding Precision");



    PurchLine."Inv. Discount Amount" := ROUND(

    // Delete the following lines.
    PurchLine."Inv. Discount Amount" / PurchLine.Quantity * QtyToAssign,

    GLSetup."Amount Rounding Precision");



    PurchLine."Line Discount Amount" := ROUND(

    PurchLine."Line Discount Amount" / PurchLine.Quantity * QtyToAssign,

    GLSetup."Amount Rounding Precision");
    // End of the deleted lines.

    PostItemJnlLine(

    PurchLine,

    0,0,

    QuantityBase,QuantityBase,
    ...

    Kod zastępczy 2

    ...ROUND(

    PurchLine.Amount / QuantityBase,GLSetup."Unit-Amount Rounding Precision");



    PurchLine."Inv. Discount Amount" := ROUND(

    // Add the following lines.
    TotalInvDiscAmtRemaining / TotalQtyRemaining * QtyToAssign,

    GLSetup."Amount Rounding Precision");



    PurchLine."Line Discount Amount" := ROUND(

    TotalLineDiscAmtRemaining / TotalQtyRemaining * QtyToAssign,

    GLSetup."Amount Rounding Precision");

    PurchLine."Line Amount" := ROUND(

    TotalLineAmtRemaining / TotalQtyRemaining * QtyToAssign,

    GLSetup."Amount Rounding Precision");

    TotalInvDiscAmtRemaining := TotalInvDiscAmtRemaining - PurchLine."Inv. Discount Amount";

    TotalLineDiscAmtRemaining := TotalLineDiscAmtRemaining - PurchLine."Line Discount Amount";

    TotalLineAmtRemaining := TotalLineAmtRemaining - PurchLine."Line Amount";

    TotalQtyRemaining := TotalQtyRemaining - QtyToAssign;
    // End of the added lines.


    PostItemJnlLine(

    PurchLine,

    0,0,

    QuantityBase,QuantityBase,
    ...


Wymagania wstępne

Musi mieć jedną z następujących produktów, w celu zastosowania tej poprawki:

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics NAV 2009 SP1

Informacje dotyczące usuwania

Nie można usunąć tej poprawki.

Stan

Firma Microsoft potwierdziła, że jest to problem występujący w produktach firmy Microsoft wymienionych w sekcji „Dotyczy”.

Uwaga Jest to artykuł " szybkiej publikacji" tworzony bezpośrednio przez organizację pomocy technicznej firmy Microsoft. Informacje zawarte w niniejszym dokumencie są dostarczane jako odpowiedź na pojawiające się problemy. W wyniku przyspieszonego udostępnienia, materiały te mogą zawierać błędy typograficzne i mogą być zmieniane w dowolnym czasie bez uprzedzenia. Zobacz Warunki użytkowaniadla innych względów.

Potrzebujesz dalszej pomocy?

Chcesz uzyskać więcej opcji?

Poznaj korzyści z subskrypcji, przeglądaj kursy szkoleniowe, dowiedz się, jak zabezpieczyć urządzenie i nie tylko.

Społeczności pomagają zadawać i odpowiadać na pytania, przekazywać opinie i słuchać ekspertów z bogatą wiedzą.

Czy te informacje były pomocne?

Jaka jest jakość języka?
Co wpłynęło na Twoje wrażenia?
Jeśli naciśniesz pozycję „Wyślij”, Twoja opinia zostanie użyta do ulepszania produktów i usług firmy Microsoft. Twój administrator IT będzie mógł gromadzić te dane. Oświadczenie o ochronie prywatności.

Dziękujemy za opinię!

×