The N° is for the transaction. A transaction can affect multiple STOCK, ITEM. Each Item have its own version and it own QUANTITY.
The second one contains:
The transaction has a COST by STOCK and CATEGORY of Work provide.
What I need is to calculate is the COST by VERSION for each STOCK which is a prorata of the total cost of the transaction taking into account the quantity of the items of the version. I consider a quantity has a fixed cost in a iteration for each stock.
Hope I am clear in my explanation.
You may found attached a qvf which contain the loaded data and a table that I begin to create to get Version by cost.
And the result of what I need in the excel file "Feuil3" yellow columns. The blue columns are intermediate columns that help me create the results.