Skip to content

Project Component Lock & Negative Quantity #921

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

Open
0x915 opened this issue Apr 27, 2025 · 1 comment
Open

Project Component Lock & Negative Quantity #921

0x915 opened this issue Apr 27, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@0x915
Copy link

0x915 commented Apr 27, 2025

Is your feature request related to a problem? Please describe.
In production environment usage I found a major logic flaw in the project functionality:
A project's components are shared with other projects before they are consumed in production.

This makes it impossible to correctly count the actual component consumption for multiple projects (planning production at the same time, and purchasing missing components for multiple projects at the same time) because the list of missing components indicated by [Parts not stocked] on the [Build] page for each project references the current inventory (shared by all projects).

Describe the solution you'd like
I think adding component locking to the project system (or call it [pre-build], [scheduled build]) would solve the global component sharing problem. The simplest implementation:
0. If I need to build twenty [Project A].

  1. [Project A] -> [PreBuild] -> [Amount=20 and Request].
  2. the component adds the [LockedQuantity] attribute and calculates this value by iterating through all the project prebuild requests that exist.
  3. [PreBuild Request] does not actually subtract the component quantity, meaning that the PreBuild can be undone. The [PreBuild Request] contains a [Confirm Production] function, which when used, eliminates the [PreBuild Request] and actually subtracts the component quantity.
  4. In conjunction with the above design, the component quantity display [AMOUNT - LOCKED] may have a negative number [AMOUNT is less than LOCKED], but this is not currently supported, and a negative number may be recognized as [QUANTITY NEEDED TO BE REPLENISHED].

Describe alternatives you've considered
There is no solution in the case that negative quantities are not currently supported, because the number of components will just be reduced to zero even if [Do not check quantities] is selected when the project is built, and there is no way to know the cumulative missing quantities when multiple projects are made.

Additional context

Image
Image

I apologize for mentioning such a complex feature request, I haven't learned php so I can't be directly involved in the project.

@0x915 0x915 added the enhancement New feature or request label Apr 27, 2025
@d-buchmann
Copy link
Contributor

Another kind of "locking" was proposed in #571.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants