Error Posting SalesOrder to Invoice

selece28
Member Posts: 316
Hi All,
I have some problems that i can resolve.
When i'm going to post some SO(sales order) it shows this error message
" Amount 1,85628 needs to be rounded in Gen. Journal Line Journal Template Name='',Journal Batch Name='',Line No.='0'. "
Did anyone knows how to fix this?
Please help me
Thanks in advance
I have some problems that i can resolve.
When i'm going to post some SO(sales order) it shows this error message
" Amount 1,85628 needs to be rounded in Gen. Journal Line Journal Template Name='',Journal Batch Name='',Line No.='0'. "
Did anyone knows how to fix this?
Please help me
Thanks in advance
______________
Regards,
Steven
Regards,
Steven
0
Comments
-
This seems like a localization or customization problem.
Use the debugger for tracking the problem.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Unfortunately this will be hard to find with the debugger. The reason is that the Bug that you have written is probably somewhere in either codeunit 80 or Codeunit 22. It looks like some modification that calculates some unit price or cost as a function of the total amount. But the testing is done in CU 12 quite a while after. And with the Navision debugger its not possible to go backwards.
I think you are going to have to find some point where you divide some amounts, and forgot to round them before you enter them into the Amount field in General Journal Line.David Singleton0 -
I already debug it and haven't find it until now
I'm curious 'bout the " Gen. Journal Line Journal Template Name='',Journal Batch Name='',Line No.='0'. "
All of them are empty, is it really because the rounding? Or is it possible there's an error when inserting those line?
I'm still debugging until now
Thanks in advance______________
Regards,
Steven0 -
Those journal lines aren't inserted but posted on the fly. So it's normal.
In CU80 try to MESSAGE or ERROR out (with FORMAT) the values that are put into the journal (search for GenJnlLine). When you find a wrong one you can try to track it back from there.0 -
selece28 wrote:I already debug it and haven't find it until now
I'm curious 'bout the " Gen. Journal Line Journal Template Name='',Journal Batch Name='',Line No.='0'. "
All of them are empty, is it really because the rounding? Or is it possible there's an error when inserting those line?
I'm still debugging until now
Thanks in advance
better is to find the command
GenJnlPostLine
and immediately before it place this:IF "Currency Code" = '' THEN Currency.InitRoundingPrecision; END ELSE Currency.GET("Currency Code") IF Amount <> ROUND(Amount,Currency."Amount Rounding Precision") THEN ERROR('Amount %1 must be rounded to %2, Amount, ROUND(Amount,Currency."Amount Rounding Precision"));
David Singleton0 -
Hi All,
I've found it, and yes the problem is on CodeUnit 80.
Thanks, i use the ROUND() function and the posting is working now
But theres something i want to know, whats the different between rounding value 0,01 and 0,00? Can anyone explain me?
Thanks again to all, for helping me solve this problem,
You guys are the best______________
Regards,
Steven0 -
selece28 wrote:Hi All,
I've found it, and yes the problem is on CodeUnit 80.
Thanks, i use the ROUND() function and the posting is working now
But theres something i want to know, whats the different between rounding value 0,01 and 0,00? Can anyone explain me?
Thanks again to all, for helping me solve this problem,
You guys are the best
First of all and most important.
DO NOT use the code:
Amount := ROUND(Amount,0.01) in this case. The code I posted was to find the error, once found, use this code:IF "Currency Code" = '' THEN Currency.InitRoundingPrecision; END ELSE Currency.GET("Currency Code") Amount := ROUND(Amount,Currency."Amount Rounding Precision");
This will then round to the default rounding for your currency.
ROUNd(amount,0.01) says to round to the nearest 0.01, you could also use 0.05 or anything else.
Round(amount0.00) does nothing, since the nearest 0 is the same.
Think in terms of Amount mod 0.01 and Amount mod 0.00.David Singleton0 -
David,
Thanks for pointing me in the right direction. It turned what could have taken hours of debugging into about 30 minutes. Some other solution center did a mod that calculated amounts & pushed the unrounded data into the Gen. Journal Line record being posted. Correctly rounded everything works as designed.0 -
I love it when these old posts pop years after and are still relevant. Thanks for following up :thumbsup:0
-
=D>David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions