Accounting data not being properly written to mySQL database.