Write additional accounting fields to sql