Hello,
Is there a way to get a ponderate price for a product?
E.g.:
I did 2 purchases of the same product with different landed costs:
- 1st purchase:
- Units: 100
- Product cost per unit: 300
- Landed costs: 500
- 2nd purchase:
- Units 30
- Product cost per unit: 325
- Landed costs: 250
Now I need to get the Average Cost price of the product + landed costs:
[(100 x 300 + 500) + (30 x 325 + 250)] / (100 + 30) = 311,538
I would like to have this value for a new field in the product_product table, but I'm not sure how to get this calculated value.
I know there is a way to get Average Cost for a product, but I cannot add a landed cost to this and this is why I will use a new field to set this reference value.
So, my question would be:
How could I get the average cost + landed cost for a product?
Thank you for your time and responses
Best regards