Problems with credit notes for early payment discounts

This looks the same as Tax accounting incorrect for credit notes from early payment discounts

So fixed now.