Module Stock (developer)

Stock
Numero/ID of module 52
User doc. of module Module Stock
Developer doc. of module This page

Feature

  Page waiting for translation. To translate, create an account, go back and clic on "Modify".
  Page en attente de traduction. Pour traduire, créez un compte, revenez et cliquez sur "Modifier".
  Página a traducir. Para traducirla, cree una cuenta, vuelva a la página y haga clic en "editar".
  Pagina da tradurre. Per tradurla, crea un utente, torna indietro e clicca su "modifica".
  Página a aguardar por tradução. Para traduzir, crie uma conta, volte atrás e clique em "Modificar".
  Seite wartet auf Übersetzung. Um Übersetzung zu erstellen, richte einen Account ein, geh zurück und klicke auf "bearbeiten".
  页面等待翻译。若要翻译本页,先创建一个帐户、登录并返回本页后单击“编辑”。

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