Table llx facture
The documentation related to other tables is available on the page: Table SQL
La documentation relative aux autres tables est disponible sur la page: Table SQL
La documentación relativa a otras tablas se encuentra disponible en la página: Table SQL
Eine Dokumentation zu weiteren Tabellen ist auf dieser Seite verfügbar: Table SQL
与其他表相关的文档请参阅:Table SQL
Content/Contenu/Contenido
Contains the customer invoices. The invoice details are in Table llx_facturedet
Contient les factures clients. les détails de la facture sont dans la Table llx_facturedet
Contiene las facturas a clientes. Los detalles de la factura se encuentran en la Table llx_facturedet
Structure
Table
Field | Type | Null | Key | Default | Extra | Description |
rowid | int(11) | NO | PRI | auto_increment | technical index | |
ref | varchar(30) | NO | UNI | invoice number | ||
entity | int(11) | NO | 1 | See page Field Multi company id. (llx_entity->rowid) | ||
ref_ext | varchar(30) | NO | See page Field ref_ext. | |||
ref_client | varchar(30) | YES | NULL | customer reference | ||
type | smallint(6) | NO | 0 | type of invoice (0=Standard invoice, 1=Replacement invoice, 2=Credit note invoice, 3=Deposit invoice, 5=Situation invoice) | ||
fk_soc | int(11) | NO | MUL | 0 | ID of third party (llx_societe->rowid) | |
datec | datetime | YES | NULL | creation date of invoice | ||
datef | date | YES | NULL | date of invoice | ||
date_pointoftax | date | YES | NULL | Date for point of tax (Used for GB only) | ||
date_valid | date | YES | NULL | validation date of invoice | ||
tms | timestamp | NO | Current date | Date of last modification. See page Field Tms. | ||
paye | smallint(6) | NO | 0 | is the invoice payed completely (1=yes, 0=not paid or paid partially) | ||
remise_percent | real | YES | 0 | discount percentage | ||
remise_absolue | real | YES | 0 | discount absolute | ||
remise | real | YES | 0 | discount | ||
close_code | varchar(16) | YES | NULL | close code | ||
close_note | varchar(128) | YES | NULL | close note | ||
tva | real | YES | 0 | VAT | ||
localtax1 | double(24,8) | YES | 0.00000000 | Special VAT rate 1 (spain) | ||
localtax2 | double(24,8) | YES | 0.00000000 | Special VAT rate 2 (spain) | ||
revenu_stamp | double(24,8) | YES | NULL | Revenue stamp (for some countries line Tunisia) | ||
total | real | YES | 0 | total amount | ||
total_ttc | real | YES | 0 | total amount with VAT | ||
fk_statut | smallint(6) | NO | 0 | ID of status (0=draft, 1=unpayed, 2=payed partially or completely, 3=abandoned) | ||
fk_user_author | int(11) | YES | MUL | NULL | ID of user author of invoice (llx_user->rowid) | |
fk_user_valid | int(11) | YES | MUL | NULL | ID of validator user of invoice (llx_user->rowid) | |
fk_facture_source | int(11) | YES | MUL | NULL | ID of source invoice for replacement invoices and credit notes (llx_facture->rowid) | |
fk_projet | int(11) | YES | MUL | NULL | ID of related proyect (llx_projet->rowid) | |
fk_cond_reglement | int(11) | NO | 1 | ID of payment condition (llx_cond_reglement->rowid) | ||
fk_mode_reglement | int(11) | YES | NULL | ID of payment mode (llx_c_paiement->id) | ||
date_lim_reglement | date | YES | NULL | limit date of payment | ||
note | text | YES | NULL | comentary | ||
note_public | text | YES | NULL | public comentary | ||
model_pdf | varchar(50) | YES | NULL | Model of document to suggest by default | ||
import_key | varchar(14) | YES | NULL | Code used to save the import id. See page Field Import key. |
Keys
Key | Type | Fields |
PRIMARY | PRIMARY | rowid |
idx_facture_uk_facnumber | UNIQUE | ref,entity |
idx_facture_fk_soc | MULTIPLE | fk_soc |
idx_facture_fk_user_author | MULTIPLE | fk_user_author |
idx_facture_fk_user_valid | MULTIPLE | fk_user_valid |
idx_facture_fk_facture_source | MULTIPLE | fk_facture_source |
idx_facture_fk_projet | MULTIPLE | fk_projet |