Issue
The error "Divide by zero error encountered.SELECT TOP 1 * FROM tblSMCompanySetup" occured when we tried to run the taxation reports they got:
Solution
The error is caused only when using CASH method and is when there is a $0 value invoice with payments against it. The system cannot allocate the payments as it cannot divide by $0.