refactoring invoice
fixed some calculating errors wrong dates