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

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Line 36: Line 36:
 
* A third party can be deleted (This call trigger COMPANY_DELETE)
 
* A third party can be deleted (This call trigger COMPANY_DELETE)
  
= Entité Société Prospect =
+
= Element Third party Prospect =
 
{{TemplateDocDevEntityEn|
 
{{TemplateDocDevEntityEn|
 
class=htdocs/comm/prospect/class/prospect.class.php}}
 
class=htdocs/comm/prospect/class/prospect.class.php}}
  
'''Cycle de vie''':
+
'''Life cycle''':
Un prospect peut avoir plusieurs états :
+
A prospect has a status :
* A ne pas connecter (-1) ;
+
* Do not contact (-1) ;
* Non contacté (0) ;
+
* Not contacted (0) ;
* A contacter (1) ;
+
* To contact (1) ;
* Contact en cours (2) ;
+
* Contact in process (2) ;
* Prospect contacté (3).
+
* Prospect contacted (3).
  
 
= Entité Contact =
 
= Entité Contact =

Revision as of 10:38, 16 February 2011

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 than 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 create (This call trigger COMPANY_CREATE)
  • A third party can be modified (This call trigger COMPANY_UPDATE)
  • A contact/address can be added to a third party.
  • Some elements can be created into this third party (order, commercial proposal, invoice, contract, ...)
  • A third party can be deleted (This call trigger COMPANY_DELETE)

Element Third party Prospect

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).

Entité 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.

Cycle de vie:

  • Un contact peut être créé (Provoque appel du trigger CONTACT_CREATE)
  • Un contact peut être modifié (Provoque appel du trigger CONTACT_UPDATE)
  • Un contact peut être supprimé (Provoque appel du 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