Skip to content

Calculate potential stock of kits using the stock of components - #38012

Open
edupulpillo wants to merge 15 commits into
Dolibarr:developfrom
edupulpillo:develop
Open

Calculate potential stock of kits using the stock of components#38012
edupulpillo wants to merge 15 commits into
Dolibarr:developfrom
edupulpillo:develop

Conversation

@edupulpillo

@edupulpillo edupulpillo commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Display in product card.php/kits tab the potential stock available of a kit based on its components stock in inventory at the bottom of components list

Fix #38010

[The stock qty of product-kits are not displayed neither in the product sheet or the kit Tab with the list of components]

@edupulpillo edupulpillo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation fix

@edupulpillo edupulpillo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation fix

@edupulpillo edupulpillo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Calculate potential kits stock from components

Comment thread htdocs/product/composition/card.php Outdated
Comment thread htdocs/product/composition/card.php

@edupulpillo edupulpillo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potential_kit_stock = 0 instead null

@edupulpillo
edupulpillo marked this pull request as draft April 28, 2026 16:57
@edupulpillo
edupulpillo marked this pull request as ready for review April 28, 2026 20:29
@edupulpillo
edupulpillo marked this pull request as draft April 30, 2026 17:11
@edupulpillo
edupulpillo marked this pull request as ready for review April 30, 2026 17:11

@JonBendtsen JonBendtsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt I have any kind of review / merge rights in this repo, and I can not see the places where I made comments in the Files changed tab, but I can try help your changes move forward.

@edupulpillo edupulpillo closed this Jul 5, 2026
@edupulpillo edupulpillo reopened this Jul 5, 2026
@edupulpillo edupulpillo changed the title Calculate potential kits stock from components Calculate potential stock of kits using stock of components Jul 5, 2026
@edupulpillo edupulpillo changed the title Calculate potential stock of kits using stock of components Calculate potential stock of kits using the stock of components Jul 5, 2026
@Pichinov-Jose

Copy link
Copy Markdown
Contributor

Hi @edupulpillo

Just adding fyi a product as reference as seems to be in the same direction:
https://www.dolistore.com/product.php?id=2098&title=productmixer-mix-your-inventory-master-your-boms&l=en

@edupulpillo

Copy link
Copy Markdown
Contributor Author

Thank you for show me this module, that have much more options!
Even that, the current kit products in Dolibarr native code do not display the stock, so with this small and simple PR we will have the feature available in Dolibarr without need any extra module. Can you please merge my PR ?

Updated stock display logic to show potential kit stock directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The stock qty of product-kits are not displayed neither in the product sheet or the kit tab with the list of components

4 participants