Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Intercompany PO - SO confirmation

Posted on by 765

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

pastedimage1589452175742v1.png

  • RE: Intercompany PO - SO confirmation

    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

  • Suggested answer
    guk1964 Profile Picture
    guk1964 10,877 on at
    RE: Intercompany PO - SO confirmation

    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.

  • RE: Intercompany PO - SO confirmation

    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

  • sriram Profile Picture
    sriram 765 on at
    RE: Intercompany PO - SO confirmation

    Hi All,

    Please suggest

  • sriram Profile Picture
    sriram 765 on at
    RE: Intercompany PO - SO confirmation

    Hi,

    This is for a specific PO

  • RE: Intercompany PO - SO confirmation

    Hello Sriram,

    Are you able to reproduce the issue on demand, or only for this specific PO ?

  • sriram Profile Picture
    sriram 765 on at
    RE: Intercompany PO - SO confirmation

    HI,

    Any suggestions please

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans