fixed bug in Creditnote file, updated tests