I have made a custom component using https://www.component-creator.com (which made the process really easy). I have two fields that are only there to serve as sums of the other fields.
At the moment in the views I just do a simply calculation and then set the variable as the answer. This however, does not save it to the database.
It achieves the right results and the user will never know any different, but I was wondering how I could save it to the database. Would I do this as an onAfterSave plugin, or could I do this in the view I am in, or should I do this in the model?