Open sargonas opened 8 years ago
This solution needs to be better implemented. Not happy with currently iterating through each print's math calculations in the view, and I would rather learn how to properly calculate it in the control and run the math through there instead, simply calling the variables in the view.
However, this is a hair beyond my current skill so I'm gonna need to noodle on this one for a while.
Additional thoughts: It might make sense to calculate the cost based on inputted values at the time of record creation and write it to the DB then. However, something needs to be done to account for edge cases where a base filament cost is wrong and later edited. Perhaps an option to refresh the calculations in two places: one on the edit print screen, and another on the edit filament screen (such as, re-calc all related prints). That might be the best solution.
costs of individual prints should be calculated based on the particular filament used, length/weight, etc