Table llx product

From Dolibarr ERP CRM Wiki
Revision as of 22:34, 3 October 2018 by Ssherratt (talk | contribs) (→‎Table)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 the list of products and services.

Fr verysmall.png Contient les produits et services.

Es verysmall.png Contiene los productos y servicios.

Structure

Table

Field Type Null Key Default Extra Description
rowid integer NO PRI auto_increment Technical index
ref varchar(32) NO UNI Reference
entity int(11) NO 1 See page Field Multi company id. (llx_entity->rowid)
ref_ext varchar(30) NO See page Field ref_ext.
datec datetime YES NULL Creation date
tms timestamp NO Current date Date of last modification. See page Field Tms.
virtual tinyint NO Not used
fk_parent integer NO Not used
label varchar(255) NO Label of product/service
description text YES NULL Description
note text YES NULL Comment
customcode text YES NULL Code, required by customs of your country, to show on documents
fk_country int YES NULL Id of country of origin of product (required by customs of your country)
price double(24,8) YES 0.00000000 Unit price without tax
price_ttc double(24,8) YES 0.00000000 Unit price inc VAT
price_min double(24,8) YES 0.00000000 Minimum price without tax
price_min_ttc double(24,8) YES 0.00000000 Minimum price inc tax
price_base_type varchar(3) YES HT Base of price (HT=Without vat, TTC=Including tax)
tva_tx double(6,3) YES NULL Default vat rate of product
recuperableonly integer YES 0 Is it a French VAT NPR or not ?
localtax1_tx double(6,3) YES 0 Default vat 2 rate of product (for countries using 2 taxes for each lines). Note: with 3.9 version, this field is not used. When entering a line into a document Dolibarr search first entry into table llx_c_tva with couple (product vat rate, product npr) to get value for localtax type and rate and store this found value into lines of document.
localtax1_type varchar(10) YES 0 Default vat 2 type (for countries using 2 taxes for each lines). Note: with 3.9 version, this field is not used. When entering a line into a document Dolibarr search first entry into table llx_c_tva with couple (product vat rate, product npr) to get value for localtax type and rate and store this found value into lines of document.
localtax2_tx double(6,3) YES 0 Default vat 3 rate of product (for countries using 3 taxes for each lines). Note: with 3.9 version, this field is not used. When entering a line into a document Dolibarr search first entry into table llx_c_tva with couple (product vat rate, product npr) to get value for localtax type and rate and store this found value into lines of document.
localtax2_type varchar(10) YES 0 Default vat 3 type (for countries using 2 taxes for each lines). Note: with 3.9 version, this field is not used. When entering a line into a document Dolibarr search first entry into table llx_c_tva with couple (product vat rate, product npr) to get value for localtax type and rate and store this found value into lines of document.
fk_user_author int(11) YES NULL ID of creator user (llx_user->rowid)
tosell tinyint(4) YES 1 Is product for sale to customers (finished goods)?
tobuy tinyint(4) YES 1 Is product bought from suppliers (finished goods/raw materials, not virtual product/kit)?
tobatch tinyint(4) NO 0 Does product has batch number, eat-by and/or sell-by date ?
fk_product_type int(11) YES 0 type of product: 0=regular product, 1=for service, 9=other (used by external modules)
duration varchar(6) YES duration of service (Examples: 365d, 12m, 1y)
seuil_stock_alerte int(11) YES 0 Minimum value in stock to report an alert
desired_stock int(11) YES 0 Value we always want to keep in stock (may differ from value to report an alert)
barcode varchar(255) YES MUL NULL Barcode number (when using barcode module)
fk_barcode_type int(11) YES 0 ID of barcode type (llx_c_barcode_type->rowid)
accountancy_code_sell varchar(15) YES 0 Accountancy code (sell)
accountancy_code_buy varchar(15) YES 0 Accountancy code (buy)
partnumber varchar(32) YES NULL Not Used. Field can be used by external modules
weight float YES NULL weight value, depending on weight units
weight_units tinyint(4) YES NULL weight units (0=kg,-3=g,-6=mg)
length float YES NULL length value, depending on length units
length_units tinyint(4) YES NULL length units (0=m,-1=dm,-2=cm)
surface float YES NULL area value, depending on area units
surface_units tinyint(4) YES NULL area units (0=m2,-2=dm2,-4=cm2)
volume float YES NULL volume value, depending on volume area units
volume_units tinyint(4) YES NULL volume units (0=m3,-3=cm3,-6=mm3)
stock int(11) YES NULL Physical stock. This field is a denormalized value (so not reliable) of count into Table llx_product_stock (using this table is reliable).
pmp double(24,8) YES 0.00000000 Weighted Average Price of product
canvas varchar(15) YES
finished tinyint(4) YES NULL Is the product a finished product?
hidden tinyint(4) YES 0 Not used. Deprecated field.
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_product_ref UNIQUE ref,entity
idx_product_barcode MULTIPLE barcode
idx_product_import_key MULTIPLE import_key

 

Notes

En verysmall.png An AJAX search bar for products can be used in place of the drop-down list, by activating, in module products, the option "Use a search bar ..." and leaving AJAX/Javascript enabled in the user interface settings. It's the method select_produits() of html.form.class.php which will return the list, whether in AJAX or HTML form list.

Fr verysmall.png Une barre de recherche des produits en AJAX peut être utilisée à la place de la liste déroulante, en activant, dans le module produits, l'option "Utiliser une barre de recherche ..." et en laissant AJAX/Javascript activé dans les paramètres d'interface utilisateur. C'est la méthode select_produits() de html.form.class.php qui se charge de renvoyer la liste, qu'elle soit en AJAX ou en liste de formulaire HTML.

Es verysmall.png Se puede utilizar una barra de búsqueda de productos en AJAX en vez de la lista despleglable, activando en el módulo de productos la opción "Usar una barra de busqueda..." y activando AJAX/Javascript en los parámetros de interface del usuario. Es el método select_produits() de html.form.class.php quien se encarga de rellenar la lista, ya sea en AJAX o en lista de formulario HTML.