Hey community,
I want to do the following: Our company is producing goods based on our customer's goods. Basically a finishing process. This finishing process takes anywhere between 8 and 40 hours. Different processes can be bundled into a kit/package.
So if the customer has a desired shipping date, we need the parts to be finished at least x hours in our facilities before shipping. I want to calculate this date.
My idea is:
- Generate a custom field in the "product" entity where we put in the time for the process in hours.
- Calculate the date when the parts need to be here based on the amount of products and the corresponding process times within the "order" entity.
- Date = DeliveryDate - (Amount of Product 1 * Process Time of Product 1) - (Amount of Product 2 * Process Time of Product 2) + [...]
- Note: The items in the order can be products and/or packages/kits.
How do I achieve my goal? I somehow need to reach the product field from the order entity as well als the amount of each item and that's where I am lost.