Implement product costs
Whenever a worker clocks out or whenever an order is finalized (basically, whenever there is any kind of change in costs), we will
- use the order index (#22 (closed)) to grab our incoming/outgoing orders
- grab products
- grab product ids for products like
incoming_orders ∪ company_active_products
- grab each product by id (yikes? but who cares, this is a prototype)
- grab product ids for products like
- grab year's worth of labor times
- grab (w)amortization tables from company (optional, obivs)
- pass all of it into the brand new cost algorithm
- attach the resulting costs to each of the company's active products
Notes
-
Need to implement way to attach costs to products -
When an order is created, it will look up the costs for each ordered product