Difference between revisions of "Module Customers Invoices (developer)"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Line 63: Line 63:
 
* [[Table llx facture_rec|llx_facture_rec]]
 
* [[Table llx facture_rec|llx_facture_rec]]
 
* [[Facturedet_rec_(Table_SQL)|llx_facturedet_rec]]
 
* [[Facturedet_rec_(Table_SQL)|llx_facturedet_rec]]
 +
 +
= Constants =
 +
* FACTURE_ADDON_PDF
 +
* FACTURE_ADDON
 +
* FAC_FORCE_DATE_VALIDATION

Revision as of 12:42, 1 October 2009

Invoice
Numero/ID of module {{{num}}}
User doc. of module Module Customers Invoices
Developer doc. of module This page

Feature

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

Le module Facture permet de gérer dans Dolibarr les entités suivantes:

  • Factures clients
  • Lignes de factures

Les factures fournisseurs sont gérées par le module Fournisseur.

Les arrondis de calcul de TVA doivent se faire "au plus près".

Exemple:

de 0,0000 à 0,0049 --> 0,00

de 0,0050 à 0,0099 --> 0,01

Number : 30

Entity Invoice

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

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

Business rules:

  • Une facture a plusieurs lignes de factures
  • Il est possible de rattacher 1 à n contacts à une facture
  • A compléter...

Cycle de vie:

  • Une facture peut être créée en mode brouillon (Provoque appel du trigger BILL_CREATE)
  • Une facture peut être modifiée (Provoque appel du trigger BILL_UPDATE)
  • Une facture peut être validée (Provoque appel du trigger BILL_VALIDATE)
  • Une facture peut recevoir un paiement
  • Une facture peut être classée abandonnée ou payée (Provoque appel du trigger BILL_CANCEL ou BILL_UPDATE)

Entity Invoice line

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

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

  • An invoice line has type product or service (you choose if both module Products and Services are activated).
  • An invoice line represent a product into an invoice (with a unit price, a qty, a vat and a discount)
  • Each invoice has between 1 and n invoice lines

Permissions

  • ->facture->lire
  • ->facture->creer
  • ->facture->modifier
  • ->facture->valider
  • ->facture->envoyer
  • ->facture->paiment
  • ->facture->supprimer
  • ->facture->facture->export

Tables SQL

Constants

  • FACTURE_ADDON_PDF
  • FACTURE_ADDON
  • FAC_FORCE_DATE_VALIDATION