discount remaining after refund by credit note

Hi All
I have a situation as below:

  1. received advance payment from customer as bank transfer and issued a deposit invoice
  2. Deposit amount is converted and split into three disounts
  3. two discounts consumed out of three
  4. for the last remaining discount (amount) issued a credit note and made a refund through cash
  5. But the problem is last discount still remaining as discount, is there is way to remove it.
    Screenshot attached for your convenience.
    I am using dolibarr 7.0.0
    Thanks in advance.
    Sincerely.

I have the same problem looks like you cannot consume discounts in credit notes but from my understanding it makes senses for situation like this or where the customer accidentaly pays more