Division By Zero

navuser1
Member Posts: 1,334
Dear all,
I have created a PO with calculating the Service Tax and try to post it in the Nav 5.0 SP1 HF2 IN version db.
It gives me an error message Division by zero.
CodeUnit 12, Function Name : PostServiceTax
how to solve this issue ?
I have created a PO with calculating the Service Tax and try to post it in the Nav 5.0 SP1 HF2 IN version db.
It gives me an error message Division by zero.
CodeUnit 12, Function Name : PostServiceTax
how to solve this issue ?
Now or Never
0
Comments
-
before calculating check the condition that
if servicetac ecess amount <> 0 then
.....0 -
If that is part of a hotfix, then you need to get in touch with Microsoft and notify them that they have introduced this error, so that they can issue a hotfix to fix this hotfix
.
0 -
I think MS and every vertical solution out there should look for all code that has division in code and make sure there is an if statement or code that prevents division by zero.
This is a simple search for / in all objects.0 -
LOL you think there could be something in the compiler that warns about div by 0?
would be nice!0 -
Dear All,
The process is as follows :
First I posted a bank payment entry (advance to vendor) with a check mark in Serv. Tax on Advance payment field in Bank Payment Voucher.
Thereafter I created a purchase order with that vendor and activate the Applies-to-doc type feild & Applies-to-doc No. feilds.
During posting the error (Division by Zero) appears.
Regards
SBNow or Never0 -
In which case that variable has a zero value, and it blows up, because the code does not take zero value into account. Report this issue to Microsoft and have them address it. What you have told us is that they provided a hotfix that causes a problem, and they would probably appreciate it when you report this issue. Chances are that they already know about it, and they have a fix ready for it.0
-
jlandeen wrote:LOL you think there could be something in the compiler that warns about div by 0?
would be nice!
If I do Z := x / y;
how can the compiler know that the value of y will be zero :-kDavid Singleton0 -
-
:oops: yes I think so.David Singleton0
-
Yes I was joking div by zero errors are difficult to account in a compiler and they're normally hammered home in any introductory Computer Science class....but thankfully they're annoying but not too difficult to prevent0
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