Try our conversational search powered by Generative AI!

Deducting a return fee on a return form

Vote:
 

On a return order I need to be able to set a return fee, in turn reducing the amount that is refunded.

How would you do this in a way that uses the built-in calculation logic? I checked HandlingTotal, but using that will increase the return amount. And a negative value is not allowed.

#320874
Apr 22, 2024 20:09
Vote:
 

I am considering adding a custom decimal field to the OrderForm MetaClass. And then override the ReturnOrderFormCalculator to deduct the value of this.

Has anyone tried this approach?

#321016
Apr 24, 2024 23:16
Vote:
 

Hi Stefan, 

I don't think the built-in calculation logic supports your scenario. Using HandlingTotal as a return fee seems to be still a good approach to me. But maybe you should also override the ValidateHandlingTotal method of the DefaultReturnOrderFormCalculator, so that it will allow negative value. What do you think? I have never tried that before however, but looks promissing to me.

Thanks,

/B.

#321018
Apr 25, 2024 8:01
Vote:
 

Thank you, Bien.

I will try that first. Might be a good middle-ground. Overriding the validate method. But only on the return calculator.

#321019
Apr 25, 2024 8:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.