inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.35k stars 790 forks source link

[FR] Support Actual Cost of Build Outputs based on Cost of Parts #7279

Open cjdet opened 6 months ago

cjdet commented 6 months ago

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

Problem statement

When creating a build order to assemble parts with purchase cost data, the cost of the assembled output is not the sum of the cost of the parts. Instead a BOM range is used in the "stock value" for the output. This does not allow accurate tracking of the value of inventory we have, which fundamentally breaks the ability to use InvenTree as part of the accounting side of inventory management.

Here is a simple example to show how this can cause significant errors in the calculated "stock value" versions the actual value in stock:

Let’s say we just have two parts:

With this very simple example you could just say take the low end, but that doesn’t work in more complex examples. Using stock item pricing age can help in some cases, but not others.

My company would likely be willing to support some of this development since right now this is creating significant overhead in accounting for what the value of our stock is.

Suggested solution

When build outputs are created from a build order, the cost of the assembled stock items should be the sum of all the stock items used.

Describe alternatives you've considered

Using "Stock Item Pricing Age" can help in some cases, but does not work well overall to solve this problem since some parts we have get turned over quickly, while others only transition slowly and can have significant cost changes.

It makes sense that when looking at a part that the BOM price range will used to give a sense of the overall price of making a part. However, when a build order is completed the newly built part has a very specific cost based on the exact cost of the stock that was allocated to build the new part.

Right now the solution involves either a lot of additional spreadsheets or we have to manually assign costs to assemblies.

Examples of other systems

No response

Do you want to develop this?

Upvote & Fund

Fund with Polar

LavissaWoW commented 6 months ago

I've been meeting similar questions from my own management. I do think the pre-requisites are present for this to be easy to implement.

Sure, InvenTree isn't an accounting tool. And half-assing one is worse than not having one. But I do agree that it wouldn't be a bad idea to populate the purchase_price field for a build Output, basing the cost on the actual costs of the stock items used.

Doing this will also yield more accurate tracking of increasing production costs, as the price range of a given part will be based on the actual production cost, not just the projected future cost.

SchrodingersGat commented 6 months ago

@cjdet your suggestion is a good one. There is another similar issue floating around which raises the same idea, however I can't find it right now (the curse of having > 200 open issues and only a handful of active developers).

I have been pondering on this one, I think it calls for an extension of the existing pricing system:

Further ideas / discussions welcome. One additional consideration is for things like labour costs, and additional "costs to build" which are not part of the Bill of Materials

cjdet commented 6 months ago

Thanks for the consideration and feedback. I searched a whole bunch of FRs and Bugs and didn't find anything along these lines, but I'm sure there are other related ones. Here are some additional thoughts:

While InvenTree certainly isn't an accounting system, it is tightly tied to accounting since at least in the US you can't deduct cost of goods sold until the inventory goes out the door. So knowing how much the parts of an assembly you just sold cost is very important. Regardless, InvenTree has really streamlined out inventory management and build proces, thanks!

SchrodingersGat commented 6 months ago

@cjdet given the vast quantity of outstanding issues, this concept (while important, and I support it) is getting added to a very big pile of things to do.. Our development team is very under resourced unfortunately.

If your comapny is willing to fund this issue, or even contribute code I'd be happy to discuss further!

matmair commented 6 months ago

I expect whoever adds this functionality to commit to maintaining it, I guarantee I will neither handle bug reports, fixes, reviews or code quality for it. And I expect the person to write documentation that ensures InvenTree is not mistaken for an accounting system, driving some small businesses into the ground come tax time.

cjdet commented 5 months ago

@SchrodingersGat we would certainly be willing to talk about funding this or contributing code. Would you be open to just propagating purchase_price into the purchase_price of the assembly? If so that could be a straightforward PR that we could probably do. If it is revamping to add unit_cost, that would require a lot more in-depth knowledge.