Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Assembly pricing calculation without consumables #7603

Open
1 of 2 tasks
dieselburner opened this issue Jul 9, 2024 · 10 comments
Open
1 of 2 tasks

[FR] Assembly pricing calculation without consumables #7603

dieselburner opened this issue Jul 9, 2024 · 10 comments
Assignees
Labels
enhancement This is an suggested enhancement or new feature Fund This issue can be specifically funded for development pricing Pricing functionality
Milestone

Comments

@dieselburner
Copy link

dieselburner commented Jul 9, 2024

Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

Problem statement

I love assembly pricing calculation feature as it precisely shows absolute minimum and maximum of overall assembly cost, depending on component purchase quantities and their price breaks.

However, when looking at assembly price range, it is calculated with consumables. Now, if I add to assembly, let's say, PCB stencil or solder paste, which are consumables, these will be not tracked in build order, which is also a great feature, but the assembly itself will not reflect the right cost anymore. 500g of solder paste I use cost around 150$. And if before a tiny board assembly was 5$ at a minimum and 20$ at a maximum, if I add this solder paste to BOM as consumable, board pricing will show 155$ at a minimum and 170$ at a maximum.

Suggested solution

I would love to see an option to turn on assembly pricing calculation without consumables.

Describe alternatives you've considered

Do not place consumables into BOM?

Examples of other systems

No response

Do you want to develop this?

  • I want to develop this.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@dieselburner dieselburner added enhancement This is an suggested enhancement or new feature triage:not-checked Item was not checked by the core team labels Jul 9, 2024
@SchrodingersGat
Copy link
Member

We could add a global option to exclude consumable items from BOM pricing calculation, I think this would provide the flexibility you are looking for?

@SchrodingersGat SchrodingersGat added question This is a question pricing Pricing functionality Fund This issue can be specifically funded for development and removed triage:not-checked Item was not checked by the core team labels Jul 10, 2024
@dieselburner
Copy link
Author

We could add a global option to exclude consumable items from BOM pricing calculation, I think this would provide the flexibility you are looking for?

Yes! Thanks!

@SchrodingersGat
Copy link
Member

@dieselburner ok, I'll look into it. Currently there's a lot of the developer pile - if you want to support this feature request via the "fund this issue" button above - that would be greatly appreciated :)

@rocheparadox
Copy link
Contributor

@SchrodingersGat shall I take this up?

@SchrodingersGat
Copy link
Member

@rocheparadox happy for you to tackle it! An extra setting, allowing "consumable" items to be excluded when performing BOM pricing calculation :)

rocheparadox added a commit to rocheparadox/InvenTree that referenced this issue Aug 1, 2024
…nventree#7603

- A checkbox is added in the BOM panel in parts section to decide if the consumables' price have to be added to the BOM pricing

- A listener is attached to the checkbox to refresh the BOM table data when a change in the checkbox is detected.
@rocheparadox
Copy link
Contributor

Based on the suggestions provided by @SchrodingersGat I added a global setting to include/exclude consumables in bom pricing calculation. While working on it, I came across, two different sources for the calculation. I can see that @matmair implemented PartPricing model to hold the pricing related data of a part which contains fields such as bom_cost_min and bom_cost_max.

However, the Part model has a method to calculate the bom price range.

def get_bom_price_range(self, quantity=1, internal=False, purchase=False):

@matmair , Shall I convert this method into a delegator which returns the values of PartPricing.bom_cost_min and PartPricing.bom_cost_max with no deliberate calculation in it?. Also, the global setting that I have implemented affects all the rows of PartPricing model, if changed. So, do we have a hook that gets triggered when a global setting is changed?

Copy link
Contributor

This issue seems stale. Please react to show this is still important.

@github-actions github-actions bot added the inactive Indicates lack of activity label Oct 26, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2024
@dieselburner
Copy link
Author

dieselburner commented Nov 3, 2024

Closed why? There's a person who looked into this and wanted to implement it, asked a question, no replies, and this FR got closed? Or is this automatic?

@SchrodingersGat SchrodingersGat added this to the horizon milestone Nov 3, 2024
@SchrodingersGat
Copy link
Member

Issues without activity (and not attached to any milestone) get automatically closed after a period. I guess this one dropped off the radar (apologies @rocheparadox )

@SchrodingersGat
Copy link
Member

@rocheparadox if I understand your question correctly, the difference with the get_bom_price_range method is that it attempts to take quantity pricing into account. The idea is that it may be more cost efficient to produce or purchase a part at a higher quantity.

However, this does add another level of complexity to pricing - which is already quite complex and does not capture everyone's (varying) requirements. I have been considering how pricing calculations could potentially be offloaded (or augmented) by plugins to allow greater flexibility. But, I have not had time or inspiration to work this out yet. Input welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an suggested enhancement or new feature Fund This issue can be specifically funded for development pricing Pricing functionality
Projects
None yet
Development

No branches or pull requests

4 participants