Return POS Invoice with partial payment (Paid amount + Write Off Amount can not be greater than Grand Total)

Hello everybody,
We have a use case in which the customer returns POS invoice items and will be refunded with a part of his total grand total i.e if the original invoice grand total equals 300, we need to pay him 200 only on returning the invoice and pay the remaining amount later (not in the same return invoice) but we got message
Paid amount + Write Off Amount can not be greater than Grand Total
Now we don’t need to add this difference in the write off amount…
how to make the return with total paid less than the grand total?

Same issue here and still can’t resolve it.

same issue here did we get the solution there

i have the same issue unfortunately

def validate_pos(self):
invoice_total = self.rounded_total or self.grand_total

# Check if the transaction is a return
if self.is_return:
    # For return transactions, allow the validation to pass as we might have negative values
    if flt(self.paid_amount) + flt(self.write_off_amount) > 0:
        frappe.throw(_("Paid amount + Write Off Amount should be a negative value for returns"))
else:
    # Standard validation for non-return transactions
    if flt(self.paid_amount) + flt(self.write_off_amount) - flt(invoice_total) > 1.0 / (
        10.0 ** (self.precision("grand_total") + 1.0)
    ):
        frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))

at that time we have withdrawn this change as it was having issues from a financial perspective