Marreco,

Can you provide a step by step example?
THe only thing I see is that you just copy from

"QUANTIDADE A FORNECER" from Final to Result.
But the Data in result


QUANTDADE DISTRIBUIDA
You do not tell use how you determine it.