fix bad margin calculation for credit notes