Difference between revisions of "Module Stock (developer)"
m |
PolyglotBot (talk | contribs) m (Import interlang links (links to translated versions of this page in other languages) from Multi Language Manager table.) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | <!-- BEGIN origin interlang links --> | ||
+ | <!-- You can edit this section but do NOT remove these comments | ||
+ | Links below will be automatically replicated on translated pages by PolyglotBot --> | ||
+ | [[fr:Module_Stock_(développeur)]] | ||
+ | [[es:Módulo_Stock_(desarrollador)]] | ||
+ | <!-- END interlang links --> | ||
+ | |||
[[Category:Stock]] | [[Category:Stock]] | ||
{{TemplateDocDevEn}} | {{TemplateDocDevEn}} | ||
+ | {{TemplateModEN Developer}} | ||
{{BasculeDevUserEn| | {{BasculeDevUserEn| | ||
− | name=Stock| | + | name=Stock| |
+ | num=52| | ||
devdoc=This page| | devdoc=This page| | ||
userdoc=[[Module Stocks En|Module Stock]]|}} | userdoc=[[Module Stocks En|Module Stock]]|}} | ||
Line 8: | Line 17: | ||
= Feature = | = Feature = | ||
{{ToTranslate}} | {{ToTranslate}} | ||
− | + | The stock module manages a list of warehouses (or any other "container") and list at any time, list and quantity of the products it contains. When a product is delivered, the choice of the source warehouse is realized and the quantity is automatically decremented. It is possible to adjust the content of these warehouses after inventory. | |
− | |||
− | |||
− | + | The inventory module is configurable in the administration of Dolibarr to choose if the decrement of stock is during the delivery of a shipment, invoicing or ordering. | |
− | + | The management of stock in this way do not, in the present state, increment the stock on the supplier delivery. | |
= Entity Warehouse = | = Entity Warehouse = | ||
{{TemplateDocDevEntityEn| | {{TemplateDocDevEntityEn| | ||
− | class=htdocs/product/stock/entrepot.class.php}} | + | class=htdocs/product/stock/class/entrepot.class.php}} |
= Implémentation = | = Implémentation = | ||
Line 24: | Line 31: | ||
== Expéditions == | == Expéditions == | ||
− | + | Changing the expedition stock is in the script htdocs / shipping / commandes.php and uses expedition.class.php class (Method '' valid () ''). The verification before modification of the stock is as follows: | |
if ($conf->stock->enabled && $this->entrepot_id && $conf->global->STOCK_CALCULATE_ON_SHIPMENT == 1) | if ($conf->stock->enabled && $this->entrepot_id && $conf->global->STOCK_CALCULATE_ON_SHIPMENT == 1) | ||
− | == Commandes/Livraison == | + | == Commandes/Livraison (Order/delivery or shipment)== |
Lorsque l'option d'incrémenter le stock sur commandes est activée, du côté des commandes fournisseurs, c'est la classe htdocs/fourn/fournisseur.commande.class.php qui prend en charge l'incrémentation du stock au travers de sa méthode ''DispatchProduct()''. L'activation de cette commande n'est possible qu'à l'état 3 et 4 de la commande fournisseur, ce qui veut dire qu'il ne faut pas rater son coup au moment d'encoder la commande. Une fois la commande "envoyée", il est possible de placer les produits dans le stock en cliquant sur l'onglet Dispatch (''Ventilation''). | Lorsque l'option d'incrémenter le stock sur commandes est activée, du côté des commandes fournisseurs, c'est la classe htdocs/fourn/fournisseur.commande.class.php qui prend en charge l'incrémentation du stock au travers de sa méthode ''DispatchProduct()''. L'activation de cette commande n'est possible qu'à l'état 3 et 4 de la commande fournisseur, ce qui veut dire qu'il ne faut pas rater son coup au moment d'encoder la commande. Une fois la commande "envoyée", il est possible de placer les produits dans le stock en cliquant sur l'onglet Dispatch (''Ventilation''). | ||
− | = Améliorations possibles = | + | '''Temporary translation:''' |
+ | When the option to increment the stock of orders is on the side of supplier orders, this is the class htdocs / prov / fournisseur.commande.class.php that supports incrementing the stock through its method '' DispatchProduct () ''. Enabling this control is only possible state 3 and 4 of the purchase order, which means that you should not miss a step when encode the order. Once the order "sent", it is possible to place the products in the stock by clicking on the tab Dispatch ('' Ventilation '). | ||
+ | |||
+ | = Améliorations possibles (Possible enhancements) = | ||
− | + | Une livraison d'un produit composé de plusieurs sous-produits devrait pouvoir être intégrée au stock sous forme des différents constituants plutôt que du tout. | |
Cette intégration peut être faite de façon simple en ajoutant un checkbox dans fourn/commande/dispatch.php, une méthode donnant la liste détaillée des composants d'un produit (incluant les quantités), et une nouvelle méthode commandeFournisseur::DispatchProductAsComponents() qui va chercher la liste des enfants et les place un à un dans le stock. | Cette intégration peut être faite de façon simple en ajoutant un checkbox dans fourn/commande/dispatch.php, une méthode donnant la liste détaillée des composants d'un produit (incluant les quantités), et une nouvelle méthode commandeFournisseur::DispatchProductAsComponents() qui va chercher la liste des enfants et les place un à un dans le stock. | ||
+ | |||
+ | |||
+ | '''Temporary translation''' | ||
+ | A supply of a product consisting of several by-products should be able to be integrated into the stock in the form of individual components rather than at all. | ||
+ | This integration can be done in a simple way by adding a checkbox in prov / order / dispatch.php a method giving a detailed list of components of a product (including quantities), and a new method commandeFournisseur :: DispatchProductAsComponents () that fetches the list of children and places them one by one into the stock. | ||
= Permissions = | = Permissions = | ||
Line 41: | Line 56: | ||
= Tables SQL = | = Tables SQL = | ||
* [[Table llx_entrepot]] Contient la liste des entrepots | * [[Table llx_entrepot]] Contient la liste des entrepots | ||
+ | * [[Table llx_stock_mouvement]] Contient l'historique des mouvements de stock (entrée ou sortie) |
Latest revision as of 13:21, 23 July 2019
Stock | |
---|---|
Numero/ID of module | 52 |
User doc. of module | Module Stock |
Developer doc. of module | This page |
Feature
The stock module manages a list of warehouses (or any other "container") and list at any time, list and quantity of the products it contains. When a product is delivered, the choice of the source warehouse is realized and the quantity is automatically decremented. It is possible to adjust the content of these warehouses after inventory.
The inventory module is configurable in the administration of Dolibarr to choose if the decrement of stock is during the delivery of a shipment, invoicing or ordering.
The management of stock in this way do not, in the present state, increment the stock on the supplier delivery.
Entity Warehouse
The PHP class to use to manipulate such object is file htdocs/product/stock/class/entrepot.class.php.
It contains CRUD methods to create (C), read (R), update (U) and delete (D) this object.
Implémentation
Expéditions
Changing the expedition stock is in the script htdocs / shipping / commandes.php and uses expedition.class.php class (Method valid () ). The verification before modification of the stock is as follows:
if ($conf->stock->enabled && $this->entrepot_id && $conf->global->STOCK_CALCULATE_ON_SHIPMENT == 1)
Commandes/Livraison (Order/delivery or shipment)
Lorsque l'option d'incrémenter le stock sur commandes est activée, du côté des commandes fournisseurs, c'est la classe htdocs/fourn/fournisseur.commande.class.php qui prend en charge l'incrémentation du stock au travers de sa méthode DispatchProduct(). L'activation de cette commande n'est possible qu'à l'état 3 et 4 de la commande fournisseur, ce qui veut dire qu'il ne faut pas rater son coup au moment d'encoder la commande. Une fois la commande "envoyée", il est possible de placer les produits dans le stock en cliquant sur l'onglet Dispatch (Ventilation).
Temporary translation: When the option to increment the stock of orders is on the side of supplier orders, this is the class htdocs / prov / fournisseur.commande.class.php that supports incrementing the stock through its method DispatchProduct () . Enabling this control is only possible state 3 and 4 of the purchase order, which means that you should not miss a step when encode the order. Once the order "sent", it is possible to place the products in the stock by clicking on the tab Dispatch ( Ventilation ').
Améliorations possibles (Possible enhancements)
Une livraison d'un produit composé de plusieurs sous-produits devrait pouvoir être intégrée au stock sous forme des différents constituants plutôt que du tout. Cette intégration peut être faite de façon simple en ajoutant un checkbox dans fourn/commande/dispatch.php, une méthode donnant la liste détaillée des composants d'un produit (incluant les quantités), et une nouvelle méthode commandeFournisseur::DispatchProductAsComponents() qui va chercher la liste des enfants et les place un à un dans le stock.
Temporary translation
A supply of a product consisting of several by-products should be able to be integrated into the stock in the form of individual components rather than at all.
This integration can be done in a simple way by adding a checkbox in prov / order / dispatch.php a method giving a detailed list of components of a product (including quantities), and a new method commandeFournisseur :: DispatchProductAsComponents () that fetches the list of children and places them one by one into the stock.
Permissions
Tables SQL
- Table llx_entrepot Contient la liste des entrepots
- Table llx_stock_mouvement Contient l'historique des mouvements de stock (entrée ou sortie)