[FIX] mofify position of draft invoice check
[IMP] Improve tests