You are now calculating the total of a single line (BerekenRegel).
I would suggest to store that information as an attribute ('Totaal’) in BerekenRegel
After calculating every line you can then simply maken a list of all BerekenRegels and sum the “Totaal’ values. This is the value you want in Totaalberekening/Totalekosten.
You will have to update this after each change in a BerekenRegel and after adding or removing one.
I got it. Thank you!
It looks like instead of calculating the total price of the list, you're calculating the total price of a single line of costs. For the total, you can do two things: