This looks the same as Tax accounting incorrect for credit notes from early payment discounts
So fixed now.