web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Post Invoice-Attempt to divide by zero Error

(0) ShareShare
ReportReport
Posted on by

Hello,

When i try to post an invoice in the purchase order document. I get Error " Attempt to divide by zero.  Any idea to resolve this Issue. All the other lines in the PO are invoiced successfully previously except this line which generates the error.

Kind Regards,

Eri

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at

    Hi,

    This is a generic error, check is there any value which is zero, but shouldn't be.

    Best way to figure it out is to trace it via debugger.

    Can you attach a screenshot of the purchase document?

  • Suggested answer
    Alexander Ermakov Profile Picture
    28,096 on at

    I agree with Nareshwar that the best option is to check with debugger where exactly this error appears, as there might be many reasons, including currency exchange rate issues during attempt to recalculate local currency into additional currency, or customization had lead to this error.

  • Community Member Profile Picture
    on at

    Hi,

    Here is screenshots.

    Screenshot-2016_2D00_06_2D00_20-10.42.39.png

    Screenshot-2016_2D00_06_2D00_20-10.42.39.png

  • Verified answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at

    Hi,

    As per your screenshot, (PurchLine."Prepmt. Amt. Inv." - PurchLine."Prepmt Amt Deducted") is zero.

    Either, PurchLine."Prepmt. Amt. Inv."  is equal to PurchLine."Prepmt Amt Deducted" or or both the variables are 0 which result in 0, hence you cannot divide by zero. Can you check the Prepayment Invoices and Deducted for this Purchase Document?

    Hope it helps.

  • Community Member Profile Picture
    on at

    Thanks Nareshwar,

    Your solution exactly solved the Issue.

    Eri,

  • Suggested answer
    Jens Glathe Profile Picture
    6,092 on at

    Hi there,

    sounds like a "standard" error. Partial invoices and prepayments aparrently don't go together. This is a case for your NAV partner.

    with best regards

    Jens

  • Community Member Profile Picture
    on at

    Hi,

    I agree with you Jens.

    Thanks,

    Eri

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans