Difference between revisions of "Module Customers Invoices (developer)"
m |
|||
Line 7: | Line 7: | ||
= Feature = | = Feature = | ||
− | + | The invoice module is to manage the following entities: | |
− | + | * Customer invoices | |
− | * | + | * Lines of customer invoices |
− | * | + | * Predefined invoices |
− | + | The suppliers invoices are managed by the module [[Module Supplies]]. | |
− | + | Rounding of VAT lines is done by the rule "the nearest". | |
− | + | Example: | |
− | + | for 0,0000 to 0,0049 --> 0,00 | |
− | + | for 0,0050 to 0,0099 --> 0,01 | |
''Number : 30'' | ''Number : 30'' | ||
Line 28: | Line 28: | ||
'''Business rules''': | '''Business rules''': | ||
− | * | + | * An invoice has several invoice lines |
− | * | + | * You can attach 1 to n contacts to an invoice |
− | * | + | * To complete... |
− | ''' | + | '''Life cycle''': |
− | * | + | * An invoice can be create as a draft (This call trigger BILL_CREATE) |
− | * | + | * An invoice can be modified (This call trigger BILL_UPDATE) |
− | * | + | * An invoice can be validated (This call trigger BILL_VALIDATE) |
− | * | + | * An invoice can receive one or several payments |
− | * | + | * An invoice can be closed by status Abandoned or Payed (This call trigger BILL_CANCEL or BILL_UPDATE) |
= Entity Invoice line = | = Entity Invoice line = | ||
Line 47: | Line 47: | ||
* An invoice line represent a product into an invoice (with a unit price, a qty, a vat and a discount) | * 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 | * Each invoice has between 1 and n invoice lines | ||
+ | |||
+ | = Entity Predefined invoice = | ||
+ | {{TemplateDocDevEntityEn| | ||
+ | class=htdocs/compta/facture/facture-rec.class.php}} | ||
= Permissions = | = Permissions = |
Revision as of 16:32, 4 November 2009
Invoice | |
---|---|
Numero/ID of module | {{{num}}} |
User doc. of module | Module Customers Invoices |
Developer doc. of module | This page |
Feature
The invoice module is to manage the following entities:
- Customer invoices
- Lines of customer invoices
- Predefined invoices
The suppliers invoices are managed by the module Module Supplies.
Rounding of VAT lines is done by the rule "the nearest".
Example:
for 0,0000 to 0,0049 --> 0,00
for 0,0050 to 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:
- An invoice has several invoice lines
- You can attach 1 to n contacts to an invoice
- To complete...
Life cycle:
- An invoice can be create as a draft (This call trigger BILL_CREATE)
- An invoice can be modified (This call trigger BILL_UPDATE)
- An invoice can be validated (This call trigger BILL_VALIDATE)
- An invoice can receive one or several payments
- An invoice can be closed by status Abandoned or Payed (This call trigger BILL_CANCEL or 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
Entity Predefined invoice
The PHP class to use to manipulate such object is file htdocs/compta/facture/facture-rec.class.php.
It contains CRUD methods to create (C), read (R), update (U) and delete (D) this object.
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