Announcements
Hi,
I have an intercompany PO _ SO.
I raised a PO for 2 items for which a Sale Order raised. Later in the PO I have added another 2 items and confirmed as the initial 2 items are not available.
Now I have made the invoice for the newly added 2 items and sale order in in OPEN ORDER Status as there is pending qty to deliver
I deleted the first 2items in the PO and the sale order status changed to INVOICED
Now when I try to confrim the PO, i receive the error as " Division by zero. - (C)\Classes\TW_TaxDocuments\Purchase......"
Refer below the image for details
Hi,
I checked in our internal knowledge base and observed that similar issue was reported in AX2012+R3 version for project transaction scenario but didn't come across specific inter company PO-SO scenario. May be you can check the below link for more information:
"Division by zero" error with posted project transactions list page after upgrading
Product and version: AX 2012 R3
KB number: 4011468
Fix type: Application update
LCS Link: fix.lcs.dynamics.com/.../Details
Also next time; please share your AX build information to check further.
Best Regards
Ashok Kumar Gupta Ega
Sr. T.A, Microsoft
I have seen this sort of error previosuly for example there is an unhandled exception in the line of code for \classes\SalesInvoiceDP\insertIntoSalesInvoiceTmp method
Line 122 of the method :
salesInvoiceTmp.SalesPrice = _custInvoiceTrans.SalesPrice / (_custInvoiceTrans.LineAmount +_custInvoiceTrans.LineAmountTax) * _custInvoiceTrans.LineAmount;
Changing that line of code like this resolves the issue
// changes made to avoid division by zero error.
if((_custInvoiceTrans.LineAmount +_custInvoiceTrans.LineAmountTax) * _custInvoiceTrans.LineAmount == 0)
salesInvoiceTmp.SalesPrice = 0 ;
else
salesInvoiceTmp.SalesPrice = _custInvoiceTrans.SalesPrice / (_custInvoiceTrans.LineAmount +_custInvoiceTrans.LineAmountTax) * _custInvoiceTrans.LineAmount;
It looks like this issue is similar.
Hi Sriram,
The object looks like a customization object for me. Can you please check and confirm back. If the object is customized object you may have to troubleshoot the issue from your side or raise a support incident with MS.
Best Regards
Ashok Kumar Gupta Ega
Sr. T.A, Microsoft
Hi All,
Please suggest
Hi,
This is for a specific PO
Hello Sriram,
Are you able to reproduce the issue on demand, or only for this specific PO ?
HI,
Any suggestions please
André Arnaud de Cal...
294,255
Super User 2025 Season 1
Martin Dráb
232,984
Most Valuable Professional
nmaenpaa
101,158
Moderator