adds validation to dates on Analysis, fix invoice row delete, improve tests