Writing Accounting Detail log to DataBase