Online dunning final action for partial credit applied to invoice
When an invoice is in dunning but has a partial credit note attached to it, the final action of dunning for the invoice status will be 'NOT PAID' even though it was set as “mark as voided“
This is the expected behavior. The invoice has a credit note associated with it which means partial
payment is done via credit note. Currently, the invoice cannot be voided when a credit note is applied to the invoice.
Hence, the invoice is marked as NOT_PAID and not voided.
For advance invoices when the term in the advance invoice has not begun yet, we can refund the amount because the service has not been used for that term yet. But in the partially paid invoice scenario, the customer has used the service for that term which costs some credits + some amount due. It w right to refund the credits or adjust the invoice when the customer has used the service for that period and it is marked as 'NOT PAID'.