dolibarr  7.0.0-beta
modService.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
5  * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
6  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
29 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
30 
31 
36 {
37 
43  function __construct($db)
44  {
45  global $conf;
46 
47  $this->db = $db;
48  $this->numero = 53;
49 
50  $this->family = "products";
51  $this->module_position = 30;
52  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
53  $this->name = preg_replace('/^mod/i','',get_class($this));
54  $this->description = "Service management";
55 
56  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
57  $this->version = 'dolibarr';
58 
59  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
60  $this->special = 0;
61  $this->picto='service';
62 
63  // Data directories to create when module is enabled
64  $this->dirs = array("/product/temp");
65 
66  // Dependancies
67  $this->depends = array();
68  $this->requiredby = array();
69 
70  // Config pages
71  $this->config_page_url = array("product.php@product");
72  $this->langfiles = array("products","companies","bills");
73 
74  // Constants
75  $this->const = array();
76 
77  // Boxes
78  $this->boxes = array(
79  0=>array('file'=>'box_services_contracts.php','enabledbydefaulton'=>'Home'),
80  1=>array('file'=>'box_graph_product_distribution.php','enabledbydefaulton'=>'Home')
81  );
82 
83  // Permissions
84  $this->rights = array();
85  $this->rights_class = 'service';
86  $r=0;
87 
88  $this->rights[$r][0] = 531; // id de la permission
89  $this->rights[$r][1] = 'Lire les services'; // libelle de la permission
90  $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
91  $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
92  $this->rights[$r][4] = 'lire';
93  $r++;
94 
95  $this->rights[$r][0] = 532; // id de la permission
96  $this->rights[$r][1] = 'Creer/modifier les services'; // libelle de la permission
97  $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
98  $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
99  $this->rights[$r][4] = 'creer';
100  $r++;
101 
102  $this->rights[$r][0] = 534; // id de la permission
103  $this->rights[$r][1] = 'Supprimer les services'; // libelle de la permission
104  $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
105  $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
106  $this->rights[$r][4] = 'supprimer';
107  $r++;
108 
109  $this->rights[$r][0] = 538; // Must be same permission than in product module
110  $this->rights[$r][1] = 'Exporter les services';
111  $this->rights[$r][2] = 'r';
112  $this->rights[$r][3] = 0;
113  $this->rights[$r][4] = 'export';
114  $r++;
115 
116 
117  /* We can't enable this here because it must be enabled in both product and service module and this create duplicate insert
118  $r=0;
119  $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
120  'type'=>'left', // This is a Left menu entry
121  'titre'=>'ProductVatMassChange',
122  'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools',
123  'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
124  'position'=>300,
125  'enabled'=>'$conf->product->enabled && $leftmenu=="admintools"', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
126  'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
127  'target'=>'',
128  'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
129  $r++;
130  */
131 
132 
133  // Menus
134  //-------
135  $this->menu = 1; // This module add menu entries. They are coded into menu manager.
136 
137 
138  // Exports
139  //--------
140  $r=0;
141 
142  $r++;
143  $this->export_code[$r]=$this->rights_class.'_'.$r;
144  $this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
145  $this->export_permission[$r]=array(array("service","export"));
146  $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
147  if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock'));
148  if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit';
149  //$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
150  $this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
151  if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.stock'=>'Numeric'));
152  if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.barcode'=>'Text'));
153  $this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.tobuy'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
154  if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'service'));
155  if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'service'));
156  // Add extra fields
157  $sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
158  $resql=$this->db->query($sql);
159  if ($resql) // This can fail when class is used on old database (during migration for example)
160  {
161  while ($obj=$this->db->fetch_object($resql))
162  {
163  $fieldname='extra.'.$obj->name;
164  $fieldlabel=ucfirst($obj->label);
165  $typeFilter="Text";
166  switch($obj->type)
167  {
168  case 'int':
169  case 'double':
170  case 'price':
171  $typeFilter="Numeric";
172  break;
173  case 'date':
174  case 'datetime':
175  $typeFilter="Date";
176  break;
177  case 'boolean':
178  $typeFilter="Boolean";
179  break;
180  case 'sellist':
181  $tmp='';
182  $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
183  if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options']));
184  if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
185  break;
186  }
187  $this->export_fields_array[$r][$fieldname]=$fieldlabel;
188  $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
189  $this->export_entities_array[$r][$fieldname]='product';
190  }
191  }
192  // End add extra fields
193 
194  $this->export_sql_start[$r]='SELECT DISTINCT ';
195  $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p';
196  $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object';
197  if (! empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc';
198  $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 1 AND p.entity IN ('.getEntity('product').')';
199 
200 
201  if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
202  {
203  if (! empty($conf->global->PRODUIT_MULTIPRICES))
204  {
205  // Exports product multiprice
206  $r++;
207  $this->export_code[$r]=$this->rights_class.'_'.$r;
208  $this->export_label[$r]="ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found)
209  $this->export_permission[$r]=array(array("produit","export"));
210  $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",
211  'pr.price_base_type'=>"PriceLevelPriceBase",'pr.price_level'=>"PriceLevel",
212  'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC",
213  'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
214  'pr.tva_tx'=>'PriceLevelVATRate',
215  'pr.date_price'=>'DateCreation');
216  //$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text','p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.datec'=>'Date','p.tms'=>'Date');
217  $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
218  'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
219  'pr.price_ttc'=>"product",
220  'pr.price_min'=>"product",'pr.price_min_ttc'=>"product",
221  'pr.tva_tx'=>'product',
222  'pr.date_price'=>"product");
223  $this->export_sql_start[$r]='SELECT DISTINCT ';
224  $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p';
225  $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product';
226  $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')';
227  }
228  }
229 
230 
231  // Imports
232  //--------
233  $r=0;
234 
235  $r++;
236  $this->import_code[$r]=$this->rights_class.'_'.$r;
237  $this->import_label[$r]="Products"; // Translation key
238  $this->import_icon[$r]=$this->picto;
239  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
240  $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields');
241  $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id
242  $this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.url'=>"PublicUrl",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation');
243  if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode'));
244  if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
245  // Add extra fields
246  $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity = ".$conf->entity;
247  $resql=$this->db->query($sql);
248  if ($resql) // This can fail when class is used on old database (during migration for example)
249  {
250  while ($obj=$this->db->fetch_object($resql))
251  {
252  $fieldname='extra.'.$obj->name;
253  $fieldlabel=ucfirst($obj->label);
254  $this->import_fields_array[$r][$fieldname]=$fieldlabel.($obj->fieldrequired?'*':'');
255  }
256  }
257  // End add extra fields
258  $this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'product'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
259  $this->import_regex_array[$r]=array('p.ref'=>'[^ ]','p.tosell'=>'^[0|1]$','p.tobuy'=>'^[0|1]$','p.fk_product_type'=>'^[0|1]$','p.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
260  $this->import_examplevalues_array[$r]=array('p.ref'=>"PREF123456",'p.label'=>"My product",'p.description'=>"This is a description example for record",'p.note'=>"Some note",'p.price'=>"100",'p.price_ttc'=>"110",'p.tva_tx'=>'10','p.tosell'=>"0 or 1",'p.tobuy'=>"0 or 1",'p.fk_product_type'=>"0 for product/1 for service",'p.finished'=>'','p.duration'=>"1y",'p.datec'=>'2008-12-31');
261 
262 
263  if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
264  {
265  if (! empty($conf->fournisseur->enabled))
266  {
267  // Import suppliers prices (note: this code is duplicated into module product)
268  $r++;
269  $this->import_code[$r]=$this->rights_class.'_supplierprices';
270  $this->import_label[$r]="SuppliersPricesOfProductsOrServices"; // Translation key
271  $this->import_icon[$r]=$this->picto;
272  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
273  $this->import_tables_array[$r]=array('sp'=>MAIN_DB_PREFIX.'product_fournisseur_price');
274  $this->import_tables_creator_array[$r]=array('sp'=>'fk_user');
275  $this->import_fields_array[$r]=array('sp.fk_product'=>"ProductOrService*",
276  'sp.fk_soc'=>"Supplier*", 'sp.ref_fourn'=>'SupplierRef', 'sp.quantity'=>"QtyMin*", 'sp.tva_tx'=>'VATRate',
277  'sp.price'=>"PriceQtyMinHT*",
278  'sp.unitprice'=>'UnitPriceHT*', // TODO Make this file not required and calculate it from price and qty
279  'sp.remise_percent'=>'DiscountQtyMin'
280  );
281 
282  $this->import_convertvalue_array[$r]=array(
283  'sp.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'),
284  'sp.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'Product')
285  );
286  $this->import_examplevalues_array[$r]=array('sp.fk_product'=>"PREF123456",
287  'sp.fk_soc'=>"My Supplier",'sp.ref_fourn'=>"SupplierRef", 'sp.quantity'=>"1", 'sp.tva_tx'=>'21',
288  'sp.price'=>"50",
289  'sp.unitprice'=>'50',
290  'sp.remise_percent'=>'0'
291  );
292  }
293 
294  if (! empty($conf->global->PRODUIT_MULTIPRICES))
295  {
296  // Import product multiprice
297  $r++;
298  $this->import_code[$r]=$this->rights_class.'_multiprice';
299  $this->import_label[$r]="ProductsOrServiceMultiPrice"; // Translation key
300  $this->import_icon[$r]=$this->picto;
301  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
302  $this->import_tables_array[$r]=array('pr'=>MAIN_DB_PREFIX.'product_price');
303  $this->import_tables_creator_array[$r]=array('pr'=>'fk_user_author'); // Fields to store import user id
304  $this->import_fields_array[$r]=array('pr.fk_product'=>"ProductRowid*",
305  'pr.price_base_type'=>"PriceLevelPriceBase",'pr.price_level'=>"PriceLevel",
306  'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC",
307  'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
308  'pr.tva_tx'=>'PriceLevelVATRate',
309  'pr.date_price'=>'DateCreation*');
310  $this->import_regex_array[$r]=array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
311  $this->import_examplevalues_array[$r]=array('pr.fk_product'=>"1",
312  'pr.price_base_type'=>"HT",'pr.price_level'=>"1",
313  'pr.price'=>"100",'pr.price_ttc'=>"110",
314  'pr.price_min'=>"100",'pr.price_min_ttc'=>"110",
315  'pr.tva_tx'=>'19.6',
316  'pr.date_price'=>'2013-04-10');
317  }
318 
319  if (! empty($conf->global->MAIN_MULTILANGS))
320  {
321  $r++;
322  $this->import_code[$r]=$this->rights_class.'_languages';
323  $this->import_label[$r]="ProductsOrServicesTranslations";
324  $this->import_icon[$r]=$this->picto;
325  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
326  $this->import_tables_array[$r]=array('l'=>MAIN_DB_PREFIX.'product_lang');
327  // multiline translation, one line per translation
328  $this->import_fields_array[$r]=array('l.fk_product'=>'Ref', 'l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription');
329  //$this->import_fields_array[$r]['l.note']='TranslatedNote';
330  $this->import_convertvalue_array[$r]=array(
331  'l.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'Product')
332  );
333  $this->import_examplevalues_array[$r]=array('l.fk_product'=>'MyProductRef','l.lang'=>'en_US','l.label'=>'Label in en_US','l.description'=>'Desc in en_US');
334  $this->import_updatekeys_array[$r]=array('l.fk_product'=>'Ref','l.lang'=>'Language');
335  }
336  }
337  }
338 
339 
348  function init($options='')
349  {
350  $this->remove($options);
351 
352  $sql = array();
353 
354  return $this->_init($sql,$options);
355  }
356 }
Class DolibarrModules.
</td >< tdclass="liste_titre"align="right"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="'.$i.'"'.$disabled.'></td >< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"></td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:554
Class to describe and enable module Service.
init($options='')
Function called when module is enabled.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:104
_init($array_sql, $options='')
Enables a module.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->societe->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1013
__construct($db)
Constructor.