Difference between revisions of "Table llx commande"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Catégorie: Table SQL]]
+
[[Category:Table SQL]]
== Presentation ==
+
[[Category:Commande]]
Table principales des commandes clients, les détails de la commande sont dans la [[Table llx_commandedet]]
+
[[Category:Orders]]
 +
[[Category:Pedido]]
 +
{{ListOfTables}}
  
== Structure ==
+
= Content/Contenu/Contenido =
<pre>
 
-- ===================================================================
 
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
 
--
 
-- This program is free software; you can redistribute it and/or modify
 
-- it under the terms of the GNU General Public License as published by
 
-- the Free Software Foundation; either version 2 of the License, or
 
-- (at your option) any later version.
 
--
 
-- This program is distributed in the hope that it will be useful,
 
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
 
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
-- GNU General Public License for more details.
 
--
 
-- You should have received a copy of the GNU General Public License
 
-- along with this program; if not, write to the Free Software
 
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
--
 
-- $Id: llx_commande.sql,v 1.4 2004/10/09 10:47:16 opensides Exp $
 
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_commande.sql,v $
 
--
 
-- ===================================================================
 
  
create table llx_commande
+
{{flag en}} Contains customer orders. The order details are in [[Table llx_commandedet]]
(
 
  rowid            integer AUTO_INCREMENT PRIMARY KEY,
 
  tms              timestamp,
 
  fk_soc          integer,
 
  fk_soc_contact  integer,
 
  fk_projet        integer DEFAULT 0,    -- projet auquel est rattache la commande
 
  ref              varchar(30) NOT NULL,  -- propal number
 
  date_creation    datetime,              -- date de creation
 
  date_valid      datetime,              -- date de validation
 
  date_cloture    datetime,              -- date de cloture
 
  date_commande    date,                  -- date de la commande
 
  fk_user_author  integer,              -- createur de la commande
 
  fk_user_valid    integer,              -- valideur de la commande
 
  fk_user_cloture  integer,              -- cloture de la propale signee ou non signee
 
  source          smallint NOT NULL,
 
  fk_statut        smallint  default 0,
 
  amount_ht        real      default 0,
 
  remise_percent  real      default 0,
 
  remise          real      default 0,
 
  tva              real      default 0,
 
  total_ht        real      default 0,
 
  total_ttc        real      default 0,
 
  note            text,
 
  model_pdf        varchar(50),
 
  facture          tinyint default 0, 
 
  UNIQUE INDEX (ref)
 
)type=innodb;
 
  
</pre>
+
{{flag fr}} Table principales des commandes clients, les détails de la commande sont dans la [[Table llx_commandedet]]
 +
 
 +
{{flag sp}} Tabla principal de los pedidos de clientes, los detalles de pedidos están en [[Table llx_commandedet]]
 +
 
 +
= 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(30)
 +
| YES
 +
| UNI
 +
|
 +
|
 +
| order number
 +
{{FieldEntity}}
 +
{{FieldRefExt}}
 +
|-
 +
| ref_client
 +
| varchar(30)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| costumer order number
 +
|-
 +
| fk_soc
 +
| int(11)
 +
| NO
 +
| MUL
 +
|
 +
|
 +
| ID society ([[Table llx_societe|llx_societe]]->rowid)
 +
|-
 +
| fk_projet
 +
| int(11)
 +
| YES
 +
|
 +
| 0
 +
|
 +
| ID of proyect ([[Table llx_projet|llx_projet]]->rowid)
 +
{{FieldTms}}
 +
|-
 +
| date_creation
 +
| datetime
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| creation date
 +
|-
 +
| date_valid
 +
| datetime
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| validation date
 +
|-
 +
| date_cloture
 +
| datetime
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| closed date
 +
|-
 +
| date_comande
 +
| date
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| order date
 +
|-
 +
| fk_user_author
 +
| int(11)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| ID creator user ([[Table llx_user|llx_user]]->rowid)
 +
|-
 +
| fk_user_valid
 +
| int(11)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| ID validator user ([[Table llx_user|llx_user]]->rowid)
 +
|-
 +
| fk_user_cloture
 +
| int(11)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| ID closer user ([[Table llx_user|llx_user]]->rowid)
 +
|-
 +
| source
 +
| smallint(6)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| order source
 +
|-
 +
| fk_statut
 +
| smallint(6)
 +
| YES
 +
|
 +
| 0
 +
|
 +
| ID of status
 +
|-
 +
| amount_ht
 +
| real
 +
| YES
 +
|
 +
| 0
 +
|
 +
| amount without tax
 +
|-
 +
| remise_percent
 +
| real
 +
| YES
 +
|
 +
| 0
 +
|
 +
| discount percentage
 +
|-
 +
| remise
 +
| real
 +
| YES
 +
|
 +
| 0
 +
|
 +
| discount amount
 +
|-
 +
| tva
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| VAT
 +
{{FieldLocalTaxX}}
 +
|-
 +
| total_ht
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| total without tax
 +
|-
 +
| total_ttc
 +
| double(24,8)
 +
| YES
 +
|
 +
| 0.00000000
 +
|
 +
| total
 +
|-
 +
| note
 +
| text
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| comentary
 +
|-
 +
| note_public
 +
| text
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| public comentary
 +
|-
 +
| model_pdf
 +
| varchar(50)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| Model PDF to print
 +
|-
 +
| facture
 +
| tinyint
 +
| YES
 +
|
 +
| 0
 +
|
 +
| flag order invoiced
 +
|-
 +
| fk_cond_reglement
 +
| int(11)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| ID conditions of payment ([[Table llx_cond_reglement|llx_cond_reglement]]->rowid)
 +
|-
 +
| fk_mode_reglement
 +
| int(11)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| ID mode of payment
 +
|-
 +
| date_livraison
 +
| date
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| delivery date
 +
|-
 +
| fk_livraison
 +
| int(11)
 +
| YES
 +
|
 +
| NULL
 +
|
 +
| delivery address
 +
{{FieldImportKey}}
 +
|}&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_commande_ref
 +
| UNIQUE
 +
| ref,entity
 +
|-
 +
| idx_commande_fk_soc
 +
| MULTIPLE
 +
| fk_soc
 +
|}&nbsp;

Latest revision as of 10:32, 19 July 2011


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 customer orders. The order details are in Table llx_commandedet

Fr verysmall.png Table principales des commandes clients, les détails de la commande sont dans la Table llx_commandedet

Es verysmall.png Tabla principal de los pedidos de clientes, los detalles de pedidos están en Table llx_commandedet

Structure

Table

Field Type Null Key Default Extra Description
rowid int(11) NO PRI auto_increment technical index
ref varchar(30) YES UNI order 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 costumer order number
fk_soc int(11) NO MUL ID society (llx_societe->rowid)
fk_projet int(11) YES 0 ID of proyect (llx_projet->rowid)
tms timestamp NO Current date Date of last modification. See page Field Tms.
date_creation datetime YES NULL creation date
date_valid datetime YES NULL validation date
date_cloture datetime YES NULL closed date
date_comande date YES NULL order date
fk_user_author int(11) YES NULL ID creator user (llx_user->rowid)
fk_user_valid int(11) YES NULL ID validator user (llx_user->rowid)
fk_user_cloture int(11) YES NULL ID closer user (llx_user->rowid)
source smallint(6) YES NULL order source
fk_statut smallint(6) YES 0 ID of status
amount_ht real YES 0 amount without tax
remise_percent real YES 0 discount percentage
remise real YES 0 discount amount
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_ht double(24,8) YES 0.00000000 total without tax
total_ttc double(24,8) YES 0.00000000 total
note text YES NULL comentary
note_public text YES NULL public comentary
model_pdf varchar(50) YES NULL Model PDF to print
facture tinyint YES 0 flag order invoiced
fk_cond_reglement int(11) YES NULL ID conditions of payment (llx_cond_reglement->rowid)
fk_mode_reglement int(11) YES NULL ID mode of payment
date_livraison date YES NULL delivery date
fk_livraison int(11) YES NULL delivery address
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
uk_commande_ref UNIQUE ref,entity
idx_commande_fk_soc MULTIPLE fk_soc