added calculation of total fields in invoice panel