fix problems with Accounts Payable against an sqlite database