Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Sales Invoice line / Order line rounding Problem

(0) ShareShare
ReportReport
Posted on by 330

Hi All,

Does anybody know how sales line amount rounding works or how to set it to nearest, up or down.

Eg:

22.176 ===> 22.18 This automatically up the amount (I need it to be 22.17)

8.155 ===> 8.15 This keeps it to nearest

6.949 ===> 6.95

26.136 ===> 26.14

26.84669 ===> 26.84

37.829 ===> 37.82

55.7175 ===> 55.72

Seems all random ups and downs

Anybody have a idea to get this solid

Thanks

Charith

*This post is locked for comments

  • CharithSilva Profile Picture
    CharithSilva 330 on at
    RE: Sales Invoice line / Order line rounding Problem

    Thanks Rafael and Mohana for the help

  • Verified answer
    CharithSilva Profile Picture
    CharithSilva 330 on at
    RE: Sales Invoice line / Order line rounding Problem

    ok Folks. I have figured it out.

    Its the line discount causing the problem. Line discount was calculated before and rounded before deducting from the line total.

    All sorted...!!! I have a fully working POS system written in VB.net using web services. Hopefully i wont be posting anything more until i discover another error (:)

  • CharithSilva Profile Picture
    CharithSilva 330 on at
    RE: Sales Invoice line / Order line rounding Problem

    My problem is this Navision round method is not consistant as the examples i have provided. It just doesnt follow the basic mathematical Rounding techniques.

    I need to to write a fuction on vb.net to replicate sales line calculation.

  • CharithSilva Profile Picture
    CharithSilva 330 on at
    RE: Sales Invoice line / Order line rounding Problem

    Hi Rafael,

    I need the code formula which makes the "Line Amount", just above the code snip you given me

    thanks

  • Rafael B. Profile Picture
    Rafael B. 715 on at
    RE: Sales Invoice line / Order line rounding Problem

    @Charith Silva,

    Part of function's code which one can be helpful:

    IF "Line Amount" <> ROUND(Quantity * "Unit Price",Currency."Amount Rounding Precision") - "Line Discount Amount" THEN BEGIN

     "Line Amount" := ROUND(Quantity * "Unit Price",Currency."Amount Rounding Precision") - "Line Discount Amount";

     "VAT Difference" := 0;

     LineAmountChanged := TRUE;

    END;

    Also you always can put the time on your PC back to the past when you licence was not expired, and after development, return actual time, if it's possible.

  • CharithSilva Profile Picture
    CharithSilva 330 on at
    RE: Sales Invoice line / Order line rounding Problem

    Hi Mohana,

    That is for the Whole invoice rounding and im already using it. This problem is on invoice/order lines, the calculation or rounding doesnt behave consistantly

  • CharithSilva Profile Picture
    CharithSilva 330 on at
    RE: Sales Invoice line / Order line rounding Problem

    Hi Rafael,

    I cannot see the CAL code anymore because its dev licence expired, so im working blind here. If you can tell me what it does that will be helpful

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,054 Super User 2024 Season 2 on at
    RE: Sales Invoice line / Order line rounding Problem

    Please check this

    msdn.microsoft.com/.../hh169051(v=nav.90).aspx

  • Rafael B. Profile Picture
    Rafael B. 715 on at
    RE: Sales Invoice line / Order line rounding Problem

    Hi @Charith Silva,

    Have you already looked into  UpdateAmounts function of t.37?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans