I am receiving a divide by zero error when trying to view a tax report. This appears to be isolated to “cash basis” reports for one particular Business file I have setup. It does not occur in another Business file. I am seeking ideas as to what may be wrong or unusual with my Business file.
I have Edited a Tax Transactions report to cover 01-07-2017 to 30-09-2017 with Accounting method = Cash basis. I have confirmed that there are taxable transactions that occur during this period.
When I click to View this report I receive the following message and have to close Manager:
Internal Error
17.10.26 (Desktop)
/tax-transactions-view?Key=3636e767-885a-4783-b653-c5be44f12a05&FileID=dfff04dd-b9aa-438f-8e48-e2e8690899da
System.DivideByZeroException: Attempted to divide by zero.
at System.Decimal.FCallDivide(Decimal& d1, Decimal& d2)
at System.Decimal.op_Division(Decimal d1, Decimal d2)
at Manager.Query.GeneralLedgerTransactions.GetAllGeneralLedgerTransactions(ApplicationData objects, Guid entityId, AccountingBasis accountingBasis)
at Manager.Query.GeneralLedgerAccounts2.GetAccountsWithTransactions(ApplicationData objects, Guid fileId, AccountingBasis accountingBasis)
at ManagerServer.Extensions.TaxAudit.GetTaxAudit(HttpHandler httpHandler, DateTime from, DateTime to, AccountingBasis accountingBasis)
at ManagerServer.Extensions.TaxSummary.GetTaxSummary(HttpHandler httpHandler, DateTime from, DateTime to, AccountingBasis accountingBasis)
at ManagerServer.HttpHandlers.Businesses.Business.Reports.TaxTransactions.TaxTransactionsView.GetViewModel(TaxTransactions report)
at ManagerServer.HttpHandlers.Businesses.Business.Reports.Report`1.GetViewModel()
at ManagerServer.HttpHandlers.Businesses.Business.Reports.Report.Get()
at HttpFramework.HttpApplication.ProcessRequest(HttpRequest request, HttpResponse response)
at ManagerServer.HttpApplication.ProcessRequest(HttpRequest request, HttpResponse response)
If I try to raise a GST report covering the same period and using Cash basis I get “HTTP 500 Internal Server Error” but I have the option to “Go back to the previous page”.
I still get the crash when I change the reporting date to go From today’s date Until today’s date with no transactions entered for this date.
The crash also occurs when I use the Backup (*.manager) file of this Business.
Importantly, if I change the accounting method to Accrual then none of these errors occur.
Also this does not occur with a different test Business file that I created to play around with.
System Details
Manager version 17.10.26 on Windows 10 but I ran into the same problem with Ubuntu Linux.