improve invoice numbering (start with 1 in every new year)
do some refactoring


Change-Id: I4859e946c00cb7edefb8883a496bf9159ba7231f
invalidfix #9