Forum Discussion

sascaro's avatar
sascaro
Experienced User
3 years ago

Divide by Zero Error when attempting to record invoice

I am attempting to record an invoice and continue to receive the following error message:

Code:

System.DivideByZeroException

 

I have looked at previosu communications regarding this same error and also looked into the inventory items within the invoice and there does nto appear to be any reason why the invoice will not record.

Any assistance would be greatly appreciated.

  • Hi sascaro 

     

    This generally happens if  the same item is used more than once on order as shown : 

     

    Another reason could be if an item is discounted by 100% on an order and that order is then converted to an invoice. In order to resolve it, if you have selected to discount an item by 100%, you would want to remove that discount, convert the order to an invoice and then re-add that discount once the transaction has been saved as an invoice/bill.


    If it still doesn't help, combine the order to have both items on 1 line.

     

    Let us know how you go on. 

    • sascaro's avatar
      sascaro
      Experienced User

      Thansk you for your reply, however none of those situations exist on the order I am trying to process.

      I tried deleteing teh roder and re-entering as an invoice and this still didn;t work.

      I could not see any inventory item which was causing any background cost issues (i.e. that selling the stock would take it back to zero as there was plenty of all teh items ins tock and all at an average cost which seemed reasonable.

      I did up managing to get the invoice to record by entering one line at a time and then saving after each line. Not sure why they would have worked but it did!

      • Komal_S's avatar
        Komal_S
        MYOB Staff

        Hi sascaro 

        Thanks for providing additional information on this. We have not received reports of this happening before but could be due to a one-off glitch. That said, I have also passed this on to our product development teams, please feel free to reach out if it happens again.