Difference between revisions of "Table llx facture fourn"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Table SQL]]
 
[[Category:Table SQL]]
  La documentation relative aux autres tables est disponible sur la page [[Liste des tables]]
+
[[Category:Fournisseur]]
  The documentation related to other tables is available on the tables list page: [[Liste des tables]]
+
[[Category:Supplier]]
 +
[[Category:Proveedores]]
  
= Contenu =
+
{{ListOfTables}}
  
Cette table contient la liste des factures émises par les fournisseurs. Une facture fournisseur peut être liée à une commande fournisseur ([[Table llx_commande_fournisseur]]) au travers de la [[Table llx_comfourn_facfourn]])
+
= Content/Contenu/Contenido =
 +
{{flag en}} Contains invoices sent by suppliers. A supplier invoice can be linked to a supplier order ([[Table llx_commande_fournisseur]]) by the [[Table llx_element_element]].
  
Contains invoices sent by providers. A provider invoice can be linked to a provider order ([[Table llx_commande_fournisseur]]) by the [[Table llx_comfourn_facfourn]].
+
{{flag fr}} Cette table contient la liste des factures émises par les fournisseurs. Une facture fournisseur peut être liée à une commande fournisseur ([[Table llx_commande_fournisseur]]) au travers de la [[Table llx_element_element]]
 +
 
 +
{{flag sp}} Contiene las facturas emitidas por los proveedores. Una factura de proveedor puede estar enlazada con un pedido a proveedor ([[Table llx_commande_fournisseur]]) a traves de la [[Table llx_element_element]].
  
 
= Structure =
 
= Structure =
 +
== Table ==
 +
{|  align="left" width="100%" border="0" cellpadding="1" cellspacing="0" class="dolbox"
 +
|style="background-color: #e9e9ef"| <b>Field</b>
 +
|style="background-color: #e9e9ef"| <b>Type</b>
 +
|style="background-color: #e9e9ef"| <b>Null</b>
 +
|style="background-color: #e9e9ef"| <b>Key</b>
 +
|style="background-color: #e9e9ef"| <b>Default</b>
 +
|style="background-color: #e9e9ef"| <b>Extra</b>
 +
|style="background-color: #e9e9ef"| <b>Description</b>
 +
|-
 +
| rowid
 +
| int(11)
 +
| NO
 +
| PRI
 +
|
 +
| auto_increment
 +
| technical index
 +
|-
 +
| ref
 +
| varchar(180)
 +
| NO
 +
|
 +
|
 +
|
 +
| invoice number
 +
|-
 +
| ref_supplier
 +
| varchar(180)
 +
| NO
 +
|
 +
|
 +
|
 +
| invoice number from supplier
 +
{{FieldEntity}}
 +
{{FieldRefExt}}
 +
|-
 +
| type
 +
| smallint(6)
 +
| NO
 +
|
 +
| 0
 +
|
 +
| type of invoice (0=Standard invoice, 1=Replacement invoice, 2=Credit note invoice). For the moment only 0 is supported.
 +
|-
 +
| fk_soc
 +
| int(11)
 +
| NO
 +
| UNI
 +
|
 +
|
 +
| ID society ([[Table llx_societe|llx_societe]]->rowid)
 +
|-
 +
| datec
 +
| datetime
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| creation date
 +
|-
 +
| datef
 +
| date
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| date of invoice
 +
|-
 +
| date_pointoftax
 +
| date
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| date point of tax (for GB)
 +
|-
 +
| date_valid
 +
| date
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| date validation
 +
{{FieldTms}}
 +
|-
 +
| libelle
 +
| varchar(255)
 +
| YES 
 +
|
 +
| NULL
 +
|
 +
| label
 +
|-
 +
| paye
 +
| smallint(6)
 +
| NO
 +
|
 +
| 0
 +
|
 +
| Is the invoice payed (1=yes, 0=otherwise)?
 +
|-
 +
| amount
 +
| double(24,8)
 +
| NO
 +
|
 +
| 0.00000000
 +
|
 +
| amount
 +
|-
 +
| remise
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| discount
 +
|-
 +
| close_code
 +
| varchar(16)
 +
 +
|
 +
 +
|
 +
| Code motif clôture sans paiement complet
 +
|-
 +
| close_note
 +
| varchar(128)
 +
|
 +
|
 +
|
 +
|
 +
| Commentaire clôture sans paiement complet
 +
|-
 +
| tva
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| VAT
 +
{{FieldLocalTaxX}}
 +
|-
 +
| total
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| total amount
 +
|-
 +
| total_ht
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| total amount excluding VAT
 +
|-
 +
| total_tva
 +
| double(24,8)
 +
| YES 
 +
|
 +
| 0.00000000
 +
|
 +
| total amount of VAT
 +
|-
 +
| total_ttc
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| total amount with VAT
 +
|-
 +
| fk_statut
 +
| smallint(6)
 +
| NO
 +
|
 +
| 0
 +
|
 +
| Status of invoice (0=draft, 1=unpayed, 2=payed, 3=abandoned)
 +
|-
 +
| fk_user_author
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of user author of invoice ([[Table llx_user|llx_user]]->rowid)
 +
|-
 +
| fk_user_modif
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of user making last change of invoice ([[Table llx_user|llx_user]]->rowid)
 +
|-
 +
| fk_user_valid
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of user validator of invoice ([[Table llx_user|llx_user]]->rowid)
 +
|-
 +
| fk_facture_source
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of the invoice source in case of credit note ([[Table llx_facture_fourn|llx_facture_fourn]]->rowid)
 +
|-
 +
| fk_projet
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of related project ([[Table llx_projet|llx_projet]]->rowid)
 +
|-
 +
| fk_account
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of bank account ([[Table llx_bank_account|llx_bank_account]]->rowid)
 +
|-
 +
| fk_cond_reglement
 +
| int(11)
 +
| NO
 +
|
 +
| 1
 +
|
 +
| Id of payment condition ([[Table llx_c_payment_term|llx__c_payment_term]]->rowid)
 +
|-
 +
| fk_cond_reglement
 +
| int(11)
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| ID of payment mode ([[Table llx_c_paiement|llx_c_paiement]]->rowid)
 +
|-
 +
| date_lim_reglement
 +
| date
 +
| YES
 +
| MUL
 +
| NULL
 +
|
 +
| date limit for payment
 +
|-
 +
| note_private
 +
| text
 +
| YES 
 +
|
 +
| NULL
 +
|
 +
| private commentary
 +
|-
 +
| note_public
 +
| text
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| public commentary
 +
|-
 +
| location_incoterms
 +
| varchar(255)
 +
 +
|
 +
|
 +
|
 +
| for incoterms
 +
|-
 +
| model_pdf
 +
| varchar(255)
 +
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| last_main_doc
 +
| varchar(255)
 +
 +
|
 +
|
 +
|
 +
| relative filepath+filename of last main generated document
 +
{{FieldImportKey}}
 +
|-
 +
| extraparams
 +
| varchar(255)
 +
 +
|
 +
|
 +
|
 +
| for stock other parameters with json format
 +
|-
 +
| fk_multicurrency
 +
| int(11)
 +
| YES
 +
 +
| NULL
 +
|
 +
| ID of currency
 +
|-
 +
| multicurrency_code
 +
| varchar(255)
 +
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
| multicurrency_tx
 +
| double(24,8)
 +
| YES
 +
|
 +
| 1
 +
|
 +
|
 +
|-
 +
| multicurrency_total_ht
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
|
 +
|-
 +
| multicurrency_total_tva
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
|
 +
|-
 +
| multicurrency_total_ttc
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
|
 +
|-
 +
|}&nbsp;
 +
 +
== Keys ==
 +
{|  align="left" width="100%" border="0" cellpadding="1" cellspacing="0" class="dolbox"
 +
|style="background-color: #e9e9ef"| <b>Key</b>
 +
|style="background-color: #e9e9ef"| <b>Type</b>
 +
|style="background-color: #e9e9ef"| <b>Fields</b>
 +
|-
 +
| PRIMARY
 +
| PRIMARY
 +
| rowid
 +
|-
 +
| uk_facture_fourn_ref
 +
| UNIQUE
 +
| ref,entity
 +
|-
 +
| uk_facture_fourn_ref_supplier
 +
| UNIQUE
 +
| ref_supplier,fk_soc,entity
 +
|-
 +
| idx_facture_fourn_date_lim_reglement
 +
| MULTIPLE
 +
| date_lim_reglement
 +
|-
 +
| idx_facture_fourn_fk_soc
 +
| MULTIPLE
 +
| fk_soc
 +
|-
 +
| idx_facture_fourn_fk_user_author
 +
| MULTIPLE
 +
| fk_user_author
 +
|-
 +
| idx_facture_fourn_fk_user_valid
 +
| MULTIPLE
 +
| fk_user_valid
 +
|-
 +
| idx_facture_fourn_fk_projet
 +
| MULTIPLE
 +
| fk_projet
 +
|}&nbsp;
 +
 +
= Notes =
 +
{{flag en}} Attention, if the status is 1 (unpayed) but the field  "paye" is also 1 (payed), which should never happen under normal use, the invoice is specified payed.
  
<pre>
+
{{flag fr}} Attention, si le statut est à 1 (impayée) mais le champ "paye" est à 1 également (payée), ce qui ne devrait jamais arriver dans des conditions normales d'utilisation, la facture est indiquée comme payée.
+--------------------+--------------+------+-----+------------+----------------+
 
| Field              | Type        | Null | Key | Default    | Extra          |
 
+--------------------+--------------+------+-----+------------+----------------+
 
| rowid              | int(11)      | NO  | PRI | NULL      | auto_increment |
 
| facnumber          | varchar(50)  | NO  | MUL |            |                |
 
| type              | smallint(6)  | NO  |    | 0          |                |
 
| fk_soc            | int(11)      | NO  | MUL |            |                |
 
| datec              | datetime    | YES  |    | NULL      |                |
 
| datef              | date        | YES  |    | NULL      |                |
 
| libelle            | varchar(255) | YES  |    | NULL      |                |
 
| paye               | smallint(6) | NO  |    | 0          |                | 1 si la facture a été payée, 0 sinon
 
| amount            | double(16,8) | NO  |    | 0.00000000 |                |
 
| remise            | double(16,8) | YES  |    | 0.00000000 |                |
 
| tva                | double(16,8) | YES  |    | 0.00000000 |                |
 
| total              | double(16,8) | YES  |    | 0.00000000 |                |
 
| total_ht          | double(16,8) | YES  |    | 0.00000000 |                |
 
| total_tva          | double(16,8) | YES  |    | 0.00000000 |                |
 
| total_ttc          | double(16,8) | YES  |    | 0.00000000 |                |
 
| fk_statut          | smallint(6)  | NO  |    | 0          |                |  0= brouillon, 1=impayée, 2=payée, 3=abandonnée
 
| fk_user_author    | int(11)      | YES  | MUL | NULL      |                |
 
| fk_user_valid      | int(11)      | YES  | MUL | NULL      |                |
 
| fk_projet          | int(11)      | YES  | MUL | NULL      |                |
 
| fk_cond_reglement  | int(11)      | NO  |    | 1          |                |
 
| date_lim_reglement | date        | YES  | MUL | NULL      |                |
 
| note              | text        | YES  |    | NULL      |                |
 
| note_public        | text        | YES  |    | NULL      |                |
 
+--------------------+--------------+------+-----+------------+----------------+
 
</pre>
 
  
Attention, si le statut est à 1 (impayée) mais le champ "paye" est à 1 également (payée), ce qui ne devrait jamais arriver dans des conditions normales d'utilisation, la facture est indiquée comme payée.
+
{{flag sp}} Atención, si el statut está a 1 (impagada) pero el campo "paye" está a 1 también (pagada), cosa que nunca pasa en condiciones normales de uso, la factura se indicará como pagada.

Latest revision as of 14:49, 2 July 2018


En verysmall.png The documentation related to other tables is available on the page: Table SQL
Fr verysmall.png La documentation relative aux autres tables est disponible sur la page: Table SQL
Es verysmall.png La documentación relativa a otras tablas se encuentra disponible en la página: Table SQL
De verysmall.png Eine Dokumentation zu weiteren Tabellen ist auf dieser Seite verfügbar: Table SQL
Cn verysmall.png与其他表相关的文档请参阅:Table SQL


Content/Contenu/Contenido

En verysmall.png Contains invoices sent by suppliers. A supplier invoice can be linked to a supplier order (Table llx_commande_fournisseur) by the Table llx_element_element.

Fr verysmall.png Cette table contient la liste des factures émises par les fournisseurs. Une facture fournisseur peut être liée à une commande fournisseur (Table llx_commande_fournisseur) au travers de la Table llx_element_element

Es verysmall.png Contiene las facturas emitidas por los proveedores. Una factura de proveedor puede estar enlazada con un pedido a proveedor (Table llx_commande_fournisseur) a traves de la Table llx_element_element.

Structure

Table

Field Type Null Key Default Extra Description
rowid int(11) NO PRI auto_increment technical index
ref varchar(180) NO invoice number
ref_supplier varchar(180) NO invoice number from supplier
entity int(11) NO 1 See page Field Multi company id. (llx_entity->rowid)
ref_ext varchar(30) NO See page Field ref_ext.
type smallint(6) NO 0 type of invoice (0=Standard invoice, 1=Replacement invoice, 2=Credit note invoice). For the moment only 0 is supported.
fk_soc int(11) NO UNI ID society (llx_societe->rowid)
datec datetime YES NULL creation date
datef date YES NULL date of invoice
date_pointoftax date YES NULL date point of tax (for GB)
date_valid date YES NULL date validation
tms timestamp NO Current date Date of last modification. See page Field Tms.
libelle varchar(255) YES NULL label
paye smallint(6) NO 0 Is the invoice payed (1=yes, 0=otherwise)?
amount double(24,8) NO 0.00000000 amount
remise double(24,8) YES 0.00000000 discount
close_code varchar(16) Code motif clôture sans paiement complet
close_note varchar(128) Commentaire clôture sans paiement complet
tva double(24,8) YES 0.00000000 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)
total double(24,8) YES 0.00000000 total amount
total_ht double(24,8) YES 0.00000000 total amount excluding VAT
total_tva double(24,8) YES 0.00000000 total amount of VAT
total_ttc double(24,8) YES 0.00000000 total amount with VAT
fk_statut smallint(6) NO 0 Status of invoice (0=draft, 1=unpayed, 2=payed, 3=abandoned)
fk_user_author int(11) YES MUL NULL ID of user author of invoice (llx_user->rowid)
fk_user_modif int(11) YES MUL NULL ID of user making last change of invoice (llx_user->rowid)
fk_user_valid int(11) YES MUL NULL ID of user validator of invoice (llx_user->rowid)
fk_facture_source int(11) YES MUL NULL ID of the invoice source in case of credit note (llx_facture_fourn->rowid)
fk_projet int(11) YES MUL NULL ID of related project (llx_projet->rowid)
fk_account int(11) YES MUL NULL ID of bank account (llx_bank_account->rowid)
fk_cond_reglement int(11) NO 1 Id of payment condition (llx__c_payment_term->rowid)
fk_cond_reglement int(11) YES MUL NULL ID of payment mode (llx_c_paiement->rowid)
date_lim_reglement date YES MUL NULL date limit for payment
note_private text YES NULL private commentary
note_public text YES NULL public commentary
location_incoterms varchar(255) for incoterms
model_pdf varchar(255)
last_main_doc varchar(255) relative filepath+filename of last main generated document
import_key varchar(14) YES NULL Code used to save the import id. See page Field Import key.
extraparams varchar(255) for stock other parameters with json format
fk_multicurrency int(11) YES NULL ID of currency
multicurrency_code varchar(255)
multicurrency_tx double(24,8) YES 1
multicurrency_total_ht double(24,8) YES 0.00000000
multicurrency_total_tva double(24,8) YES 0.00000000
multicurrency_total_ttc double(24,8) YES 0.00000000

 

Keys

Key Type Fields
PRIMARY PRIMARY rowid
uk_facture_fourn_ref UNIQUE ref,entity
uk_facture_fourn_ref_supplier UNIQUE ref_supplier,fk_soc,entity
idx_facture_fourn_date_lim_reglement MULTIPLE date_lim_reglement
idx_facture_fourn_fk_soc MULTIPLE fk_soc
idx_facture_fourn_fk_user_author MULTIPLE fk_user_author
idx_facture_fourn_fk_user_valid MULTIPLE fk_user_valid
idx_facture_fourn_fk_projet MULTIPLE fk_projet

 

Notes

En verysmall.png Attention, if the status is 1 (unpayed) but the field "paye" is also 1 (payed), which should never happen under normal use, the invoice is specified payed.

Fr verysmall.png Attention, si le statut est à 1 (impayée) mais le champ "paye" est à 1 également (payée), ce qui ne devrait jamais arriver dans des conditions normales d'utilisation, la facture est indiquée comme payée.

Es verysmall.png Atención, si el statut está a 1 (impagada) pero el campo "paye" está a 1 también (pagada), cosa que nunca pasa en condiciones normales de uso, la factura se indicará como pagada.