Difference between revisions of "Module Third Parties (developer)"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m (Import interlang links (links to translated versions of this page in other languages) from Multi Language Manager table.)
 
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{ToTranslate}}
+
<!-- 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_Tiers_(développeur)]]
 +
[[es:Módulo_Terceros_(desarrollador)]]
 +
<!-- END interlang links -->
 +
 
 
[[Category:Third parties]]
 
[[Category:Third parties]]
 +
{{TemplateDocDev}}
 +
{{TemplateModEN Developer}}
 
{{BasculeDevUser|
 
{{BasculeDevUser|
nom=Third parties|  
+
nom=Third parties|
devdoc=Cette page|
+
num=1|
userdoc=[[Third Parties]]|}}
+
devdoc=This page|
{{TemplateDocDev}}
+
userdoc=[[Module Third Parties]]|}}
 
 
== Fonction du module ==
 
 
 
Le module société a pour vocation de permettre de gérer dans Dolibarr les entités suivantes:
 
* Les sociétés
 
* Les contacts
 
* Les RIB de sociétés
 
 
 
Une société représente un tiers moral ou physique (prospect, client, fournisseur). Le terme est mal choisi car il peut très bien s'agir d'un "particulier".
 
Une société est caractérisée par des informations obligatoires comme le nom, pays et d'autres optionnelles comme le capital, identifiant professionnel, etc...
 
Les contacts sont les personnes physiques d'une société. Dans le cas d'un particulier, les caractéristiques d'un contact sont les même que les caractéristiques de l'entité société.
 
 
 
''Number : 1''
 
 
 
== Entité Société ==
 
 
 
La classe PHP pour manipuler cette entité est le fichier ''htdocs/societe.class.php''.
 
Elle contient principalement une méthode fecth, insert, update, et delete.
 
 
 
* Une société peut avoir 1 à plusieurs contacts.
 
* Une société a une caractéristique qui peut être prospect (Dans ce cas l'entité Société une fois créée peut aussi etre manipulé comme entité Prospect), client (Dans ce cas l'entité Société une fois créée peut aussi etre manipulé comme entité Client) ou aucun des deux.
 
* Une société a une caractéristique fournisseur qui peut etre non ou oui (Dans ce cas l'entité Société une fois créée peut aussi etre manipulé comme entité Fournisseur).
 
* Il est possible de rattacher 1 à n commerciaux par défaut à une société
 
* A compléter...
 
 
 
'''Cycle de vie''':
 
  
* Une société peut être créée (Provoque appel du trigger COMPANY_CREATE)
+
= Feature =
* Une société peut être modifiée (Provoque appel du trigger COMPANY_UPDATE)
+
The Third Party module is used to manage the following objects:
* Un contact peut être ajouté à la société
+
* Companies
* D'autres entités peuvent être créées sur cette société (commande, propal, facture, contrat, ...)
+
* Contacts/Addresses
* Une société peut être supprimée (Provoque appel du trigger COMPANY_DELETE)
+
* Bank information of companies
  
== Entité Société Prospect ==
+
A third party is a moral or physical entity (prospect, customer, supplier). This can be a company, foundation but also be a physical person.
 +
A third party is defined by mandatory information like name and country but also by optional information like capital, professional id, etc...
 +
Contacts/Addresses are physical persons of a company or generic addresses. For a physical person, properties of a contact has similar values as properties of contact.
  
La classe PHP pour manipuler cette entité est le fichier ''htdocs/prospect.class.php''.
+
= Element Third Party =
 +
{{TemplateDocDevEntityEn|
 +
class=htdocs/societe/class/societe.class.php}}
  
'''Cycle de vie''':
+
'''Business rules''':
 +
* A third party can have 1 or more contacts/addresses.
 +
* A third party has a property to define if it's a prospect, a customer, none or both.
 +
* A third party has a property to define if it's a supplier or not.
 +
* You can attach one to n sales representative (Dolibarr users) to a third party.
 +
* To complete...
  
Un prospect peut avoir plusieurs états :
+
'''Life cycle''':
* A ne pas connecter (-1) ;
+
* A third party can be created (This calls trigger COMPANY_CREATE)
* Non contacté (0) ;
+
* A third party can be modified (This calls trigger COMPANY_UPDATE)
* A contacter (1) ;
+
* A contact/address can be added to a third party.
* Contact en cours (2) ;
+
* Some elements can be created for the third party like (order, commercial proposal, invoice, contract, ...)
* Prospect contacté (3).
+
* A third party can be deleted (This calls trigger COMPANY_DELETE)
  
== Entité Contact ==
+
= Element Third party Prospect =
 +
A prospect is just a third party that is a prospect. There is a particular class to manipulate such objects.
 +
{{TemplateDocDevEntityEn|
 +
class=htdocs/comm/prospect/class/prospect.class.php}}
  
La classe PHP pour manipuler cette entité est le fichier ''htdocs/contact.class.php''.
+
'''Life cycle''':
Elle contient principalement une méthode fecth, insert, update, et delete.
 
  
'''Cycle de vie''':
+
A prospect has a status :
 +
* Do not contact (-1) ;
 +
* Not contacted (0) ;
 +
* To contact (1) ;
 +
* Contact in process (2) ;
 +
* Prospect contacted (3).
  
* Un contact peut être créé (Provoque appel du trigger CONTACT_CREATE)
+
= Element Contact =
* Un contact peut être modifié (Provoque appel du trigger CONTACT_UPDATE)
+
{{TemplateDocDevEntityEn|
* Un contact peut être supprimé (Provoque appel du trigger CONTACT_DELETE)
+
class=htdocs/contact/class/contact.class.php}}
  
== Permissions ==
+
'''Life cycle''':
 +
* A contact can be created (This calls trigger CONTACT_CREATE)
 +
* A contact can be modified (This calls trigger CONTACT_UPDATE)
 +
* A contact can be deleted (This calls trigger CONTACT_DELETE)
  
 +
= Permissions =
 
* ->societe->lire
 
* ->societe->lire
 
* ->societe->creer
 
* ->societe->creer
Line 75: Line 77:
 
* ->societe->contact->export
 
* ->societe->contact->export
  
== Tables SQL ==
+
= Tables SQL =
* [[Table llx_societe|llx_societe]] Contient la liste des societes
+
* [[Table llx_societe|llx_societe]] Contains list of third parties (companies...)
* [[Table llx_contratdet|llx_contratdet]] Contient les produits associés aux contrats
+
* [[Table llx_socpeople|llx_socpeople]] Contains list of third parties' contacts.

Latest revision as of 13:21, 23 July 2019

Third parties
Numéro/ID du module 1
Doc utilisateur du module Module Third Parties
Doc développeur du module This page

Feature

The Third Party module is used to manage the following objects:

  • Companies
  • Contacts/Addresses
  • Bank information of companies

A third party is a moral or physical entity (prospect, customer, supplier). This can be a company, foundation but also be a physical person. A third party is defined by mandatory information like name and country but also by optional information like capital, professional id, etc... Contacts/Addresses are physical persons of a company or generic addresses. For a physical person, properties of a contact has similar values as properties of contact.

Element Third Party

The PHP class to use to manipulate such object is file htdocs/societe/class/societe.class.php.

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

Business rules:

  • A third party can have 1 or more contacts/addresses.
  • A third party has a property to define if it's a prospect, a customer, none or both.
  • A third party has a property to define if it's a supplier or not.
  • You can attach one to n sales representative (Dolibarr users) to a third party.
  • To complete...

Life cycle:

  • A third party can be created (This calls trigger COMPANY_CREATE)
  • A third party can be modified (This calls trigger COMPANY_UPDATE)
  • A contact/address can be added to a third party.
  • Some elements can be created for the third party like (order, commercial proposal, invoice, contract, ...)
  • A third party can be deleted (This calls trigger COMPANY_DELETE)

Element Third party Prospect

A prospect is just a third party that is a prospect. There is a particular class to manipulate such objects. The PHP class to use to manipulate such object is file htdocs/comm/prospect/class/prospect.class.php.

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

Life cycle:

A prospect has a status :

  • Do not contact (-1) ;
  • Not contacted (0) ;
  • To contact (1) ;
  • Contact in process (2) ;
  • Prospect contacted (3).

Element Contact

The PHP class to use to manipulate such object is file htdocs/contact/class/contact.class.php.

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

Life cycle:

  • A contact can be created (This calls trigger CONTACT_CREATE)
  • A contact can be modified (This calls trigger CONTACT_UPDATE)
  • A contact can be deleted (This calls trigger CONTACT_DELETE)

Permissions

  • ->societe->lire
  • ->societe->creer
  • ->societe->supprimer
  • ->societe->export
  • ->societe->client->voir
  • ->societe->contact->lire
  • ->societe->contact->creer
  • ->societe->contact->supprimer
  • ->societe->contact->export

Tables SQL