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

  • RE: Post Invoice-Attempt to divide by zero Error

    Hi,

    I agree with you Jens.

    Thanks,

    Eri

  • Suggested answer
    Jens Glathe Profile Picture
    Jens Glathe 6,092 on at
    RE: Post Invoice-Attempt to divide by zero Error

    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

  • RE: Post Invoice-Attempt to divide by zero Error

    Thanks Nareshwar,

    Your solution exactly solved the Issue.

    Eri,

  • Verified answer
    RE: Post Invoice-Attempt to divide by zero Error

    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.

  • RE: Post Invoice-Attempt to divide by zero Error

    Hi,

    Here is screenshots.

    Screenshot-2016_2D00_06_2D00_20-10.42.39.png

    Screenshot-2016_2D00_06_2D00_20-10.42.39.png

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Post Invoice-Attempt to divide by zero Error

    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.

  • Suggested answer
    RE: Post Invoice-Attempt to divide by zero Error

    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?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans