Division by Zero

We are having problems when using ‘Post Batch’ to post invoices. We sometimes get the error ‘Division By Zero 1/0’. If we post each invoice individually it works fine. Any ideas? Jonathan

Hi Jonathan It is known issue in batch posting sales invoices in 3.60. Fixed with suggested code as follows:

quote:


Add the following line in the SalesHeader - OnPreDataItem trigger of report 297 Batch Post Sales Invoices. That should do it. CounterTotal := COUNT


Something to do with not knowing the number of invoices being generated by the batch post.

Many thanks Steven. I’m actually using 3.70 but the line of code was missing anyway so I’ve added it to the top of the trigger. Jonathan

Hi Steven, I tried to reverse a transaction for a customer named as XYZ222 but received an error message says “Division by Zero” The path is AR → Customer → XYZ222 → Functions → Closed-transaction editing → CP-12345 → Reverse. Any idea? Thank you. Gem Han jasminenz@163.com

quote:

Hi Jonathan It is known issue in batch posting sales invoices in 3.60. Fixed with suggested code as follows:
quote:
Add the following line in the SalesHeader - OnPreDataItem trigger of report 297 Batch Post Sales Invoices. That should do it. CounterTotal := COUNT
</blockquote id=“quote”></font id=“quote”> Something to do with not knowing the number of invoices being generated by the batch post.
Originally posted by SBWEAVER - 2004 May 07 : 17:02:16

Hi Gem “Closed-transaction editing” is either a localisation or a modification (I have never seen this option or heard of it), so it is difficult to comment, in both cases I would report it to your solution centre. In version 4.0 you can reverse transactions under set circumstances, so it maybe a localisation of this. Ultimately though the division by zero error message is caused by a “hole” in the coding that you need to catch and get fixed!