Here is the microflow for the calculated attribute “$VoorraadZonderLocatie” it creates a variable that is called “$VoorraadOpLocatie” and “$BeschikbareVoorraad” then goes through all the lines of “$LocatieRegel/Aantal” and each time it adds it up to the variable “$VoorraadOpLocatie”.
Then when the loop is done it changes “$BeschikbareVoorraad” with “$Artikel/ActueleVoorraad - $VoorraadOpLocatie” and the end just says that the attribute must be the value of “$BeschikbareVoorraad”
Then we have the decision when you want to add a certain value, but before you can do that it has a control if the value is more than 0, witch is the first decision. Then the second one is about it reads: “$LocatieRegel/Aantal <= $LocatieRegel/MyFirstModule.LocatieRegel_Artikel/MyFirstModule.Artikel/VoorraadZonderLocatie”.