To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
...
VAR
DocDim2@1003 : Record 357;
InvoiceRoundingAmount@1001 : Decimal;
NextLineNo@1002 : Integer;
BEGIN
Currency.TESTFIELD("Invoice Rounding Precision");
InvoiceRoundingAmount :=
-ROUND(
TotalSalesLine."Amount Including VAT" -
...
...
VAR
DocDim2@1003 : Record 357;
InvoiceRoundingAmount@1001 : Decimal;
NextLineNo@1002 : Integer;
// Add the following lines.
AdvLetterLineRelation@1004 : Record 26592;
TotalAmt@1005 : Decimal;
SalesLine1@1006 : Record 37;
// End of the lines.
BEGIN
Currency.TESTFIELD("Invoice Rounding Precision");
InvoiceRoundingAmount :=
-ROUND(
TotalSalesLine."Amount Including VAT" -
...
...
ROUND(
TotalSalesLine."Amount Including VAT",
Currency."Invoice Rounding Precision",
Currency.InvoiceRoundingDirection),
Currency."Amount Rounding Precision");
IF InvoiceRoundingAmount <> 0 THEN BEGIN
CustPostingGr.GET(SalesHeader."Customer Posting Group");
CustPostingGr.TESTFIELD("Invoice Rounding Account");
WITH SalesLine DO BEGIN
INIT;
...
...
ROUND(
TotalSalesLine."Amount Including VAT",
Currency."Invoice Rounding Precision",
Currency.InvoiceRoundingDirection),
Currency."Amount Rounding Precision");
// Add the following lines.
IF SalesHeader.IsAdvanceRelated THEN BEGIN
WITH SalesLine1 DO BEGIN
SETRANGE("Document Type",SalesHeader."Document Type");
SETRANGE("Document No.",SalesHeader."No.");
IF FINDSET THEN
REPEAT
AdvLetterLineRelation.SETRANGE(Type,AdvLetterLineRelation.Type::Sale);
AdvLetterLineRelation.SETRANGE("Order No.","Document No.");
AdvLetterLineRelation.SETRANGE("Order Line No.","Line No.");
IF AdvLetterLineRelation.FINDSET THEN
REPEAT
TotalAmt :=
TotalAmt +
ROUND(
"Prepmt Amt to Deduct" * AdvLetterLineRelation."Invoiced Amount" /
"Prepmt. Amt. Inv.",Currency."Amount Rounding Precision");
UNTIL AdvLetterLineRelation.NEXT = 0;
UNTIL NEXT = 0;
END;
IF TotalAmt = TotalSalesLine."Amount Including VAT" THEN
EXIT;
END;
// End of the lines.
IF InvoiceRoundingAmount <> 0 THEN BEGIN
CustPostingGr.GET(SalesHeader."Customer Posting Group");
CustPostingGr.TESTFIELD("Invoice Rounding Account");
WITH SalesLine DO BEGIN
INIT;
...
You must have the Hungarian version of Microsoft Dynamics NAV 2009 R2 installed to apply this hotfix. Additionally, you must have hotfix 2664469 installed to apply this hotfix.