Difference between revisions of "Module Suppliers (developer)"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m (Minor grammatical edit)
 
(25 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_Fournisseurs_(développeur)]]
 +
[[es:Módulo_Proveedores_(desarrollador)]]
 +
<!-- END interlang links -->
 +
 
[[Category:Supplier]]
 
[[Category:Supplier]]
{{ToTranslate}}
+
{{TemplateDocDevEn}}
 +
{{TemplateModEN Developer}}
 
{{BasculeDevUserEn|
 
{{BasculeDevUserEn|
name=Supplier|  
+
name=Supplier|
 +
num=40|
 
devdoc=This page|
 
devdoc=This page|
userdoc=[[Suppliers Orders]], [[Suppliers Invoices]]|}}
+
userdoc=[[Module Suppliers Orders]],  
{{TemplateDocDevEn}}
+
[[Module Suppliers Invoices]]|}}
 +
 
 +
=Feature=
 +
This module manage the following entities:
 +
 
 +
*Suppliers orders
 +
*Lines of suppliers orders
 +
*Suppliers invoices
 +
*Lines of suppliers invoices
 +
 
 +
=Entity Supplier orders=
 +
{{TemplateDocDevEntityEn|
 +
class=htdocs/fourn/class/fournisseur.commande.class.php}}
  
== Fonction ==
+
==Business rules==
 +
See [[Module Suppliers Orders]].
  
== Entité Commandes fournisseur ==
+
==Permissions==
  
=== Permissions ===
+
*->fournisseur->commande->lire
  if ($obj->fk_id == 181)
+
*->fournisseur->commande->creer
    $this->rights->fournisseur->commande->lire = 1;
+
*->fournisseur->commande->valider
 +
*->fournisseur->commande->approuver
 +
*->fournisseur->commande->approve2 (if option SUPPLIER_ORDER_DOUBLE_APPROVAL is set)
 +
*->fournisseur->commande->commander
 +
*->fournisseur->commande->cloturer
  
  if ($obj->fk_id == 182)
+
==Different Status==
    $this->rights->fournisseur->commande->creer = 1;
+
Number is value of field fk_statut in [[Table llx_commande_fournisseur]].
  
  if ($obj->fk_id == 183)
+
*0 : draft
    $this->rights->fournisseur->commande->valider = 1;
+
*1 : validated (no more a draft)
 +
*2 : appoved (someone approved your request. If option SUPPLIER_ORDER_DOUBLE_APPROVAL is set, a second user with permission approve2 has also approved)
 +
*3 : sent to supplier
 +
*4 : received partially
 +
*5 : received completely or closed
 +
*9 : refused (Your manager disagrees with your request)
  
  if ($obj->fk_id == 184)
+
=Entity Supplier invoices=
    $this->rights->fournisseur->commande->approuver = 1;
+
{{TemplateDocDevEntityEn|
 +
class=htdocs/fourn/class/fournisseur.facture.class.php}}
  
  if ($obj->fk_id == 185)
+
==Business rules==
    $this->rights->fournisseur->commande->commander = 1;
+
See [[Module Suppliers Invoices]].
  
  if ($obj->fk_id == 186)
+
==Life cycle==
    $this->rights->fournisseur->commande->cloturer = 1;
 
  
=== Différents Statuts ===
+
==Permissions==
  
* 0 : mode brouillon en rédaction
+
*->fournisseur->facture->lire
* 1 : rédigée, le rédacteur de la commande a fini la rédaction de sa commande
+
*->fournisseur->facture->creer
* 2 : validée, la personne devant valider les commandes a validé la commande
+
*->fournisseur->facture->valider
* 3 : transmise au fournisseur  
+
*->fournisseur->facture->supprimer
* 4 : livrée partiellement
+
*->fournisseur->facture->export
* 5 : totalement livrée ou cloturée
 
* 9 : refusée, le responsable des commandes a refusé la commande
 
  
 +
=Tables SQL=
  
== Tables SQL ==
+
*[[Table llx_commande_fournisseur|llx_commande_fournisseur]] contient les commandes fournisseurs
 +
*[[Table_llx_commande_fournisseur_log|llx_commande_fournisseur_log]] contient l'historique des changements d'états d'une commande fournisseur
 +
*[[Table_llx_commande_fournisseurdet|llx_commande_fournisseurdet]] contient les lignes de détails d'une commande fournisseur
 +
*[[Table llx_facture_fourn|llx_facture_fourn]] contient les factures fournisseurs
 +
*[[Table llx_facture_fourn_det|llx_facture_fourn_det]] contient les lignes de détails des factures fournisseurs
 +
*[[Table llx_element_element|llx_element_element]] contient les liens commandes fournisseurs - factures fournisseurs

Latest revision as of 21:28, 10 June 2020

Supplier
Numero/ID of module 40
User doc. of module Module Suppliers Orders,

Module Suppliers Invoices

Developer doc. of module This page

Feature

This module manage the following entities:

  • Suppliers orders
  • Lines of suppliers orders
  • Suppliers invoices
  • Lines of suppliers invoices

Entity Supplier orders

The PHP class to use to manipulate such object is file htdocs/fourn/class/fournisseur.commande.class.php.

It contains CRUD methods to create (C), read (R), update (U) and delete (D) this object.

Business rules

See Module Suppliers Orders.

Permissions

  • ->fournisseur->commande->lire
  • ->fournisseur->commande->creer
  • ->fournisseur->commande->valider
  • ->fournisseur->commande->approuver
  • ->fournisseur->commande->approve2 (if option SUPPLIER_ORDER_DOUBLE_APPROVAL is set)
  • ->fournisseur->commande->commander
  • ->fournisseur->commande->cloturer

Different Status

Number is value of field fk_statut in Table llx_commande_fournisseur.

  • 0 : draft
  • 1 : validated (no more a draft)
  • 2 : appoved (someone approved your request. If option SUPPLIER_ORDER_DOUBLE_APPROVAL is set, a second user with permission approve2 has also approved)
  • 3 : sent to supplier
  • 4 : received partially
  • 5 : received completely or closed
  • 9 : refused (Your manager disagrees with your request)

Entity Supplier invoices

The PHP class to use to manipulate such object is file htdocs/fourn/class/fournisseur.facture.class.php.

It contains CRUD methods to create (C), read (R), update (U) and delete (D) this object.

Business rules

See Module Suppliers Invoices.

Life cycle

Permissions

  • ->fournisseur->facture->lire
  • ->fournisseur->facture->creer
  • ->fournisseur->facture->valider
  • ->fournisseur->facture->supprimer
  • ->fournisseur->facture->export

Tables SQL