dolibarr  9.0.0
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@inodbox.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, $mysoc;
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->picto='service';
61 
62  // Data directories to create when module is enabled
63  $this->dirs = array("/product/temp");
64 
65  // Dependencies
66  $this->hidden = false; // A condition to hide module
67  $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
68  $this->requiredby = array(); // List of module ids to disable if this one is disabled
69  $this->conflictwith = array(); // List of module class names as string this module is in conflict with
70  $this->phpmin = array(5,4); // Minimum version of PHP required by module
71 
72  // Config pages
73  $this->config_page_url = array("product.php@product");
74  $this->langfiles = array("products","companies","bills");
75 
76  // Constants
77  $this->const = array();
78 
79  // Boxes
80  $this->boxes = array(
81  0=>array('file'=>'box_services_contracts.php','enabledbydefaulton'=>'Home'),
82  1=>array('file'=>'box_graph_product_distribution.php','enabledbydefaulton'=>'Home')
83  );
84 
85  // Permissions
86  $this->rights = array();
87  $this->rights_class = 'service';
88  $r=0;
89 
90  $this->rights[$r][0] = 531; // id de la permission
91  $this->rights[$r][1] = 'Read services'; // libelle de la permission
92  $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour)
93  $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
94  $this->rights[$r][4] = 'lire';
95  $r++;
96 
97  $this->rights[$r][0] = 532; // id de la permission
98  $this->rights[$r][1] = 'Create/modify services'; // libelle de la permission
99  $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour)
100  $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
101  $this->rights[$r][4] = 'creer';
102  $r++;
103 
104  $this->rights[$r][0] = 534; // id de la permission
105  $this->rights[$r][1] = 'Delete les services'; // libelle de la permission
106  $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
107  $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
108  $this->rights[$r][4] = 'supprimer';
109  $r++;
110 
111  $this->rights[$r][0] = 538; // Must be same permission than in product module
112  $this->rights[$r][1] = 'Export services';
113  $this->rights[$r][2] = 'r';
114  $this->rights[$r][3] = 0;
115  $this->rights[$r][4] = 'export';
116  $r++;
117 
118 
119  /* We can't enable this here because it must be enabled in both product and service module and this create duplicate insert
120  $r=0;
121  $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
122  'type'=>'left', // This is a Left menu entry
123  'titre'=>'ProductVatMassChange',
124  'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools',
125  'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
126  'position'=>300,
127  'enabled'=>'$conf->product->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // 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.
128  'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
129  'target'=>'',
130  'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
131  $r++;
132  */
133 
134 
135  // Menus
136  //-------
137  $this->menu = 1; // This module add menu entries. They are coded into menu manager.
138 
139 
140  // Exports
141  //--------
142  $r=0;
143 
144  $r++;
145  $this->export_code[$r]=$this->rights_class.'_'.$r;
146  $this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
147  $this->export_permission[$r]=array(array("service","export"));
148  $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');
149  if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock'));
150  if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit';
151  //$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');
152  $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');
153  if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.stock'=>'Numeric'));
154  if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.barcode'=>'Text'));
155  $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");
156  if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'service'));
157  if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'service'));
158  // Add extra fields
159  $sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
160  $resql=$this->db->query($sql);
161  if ($resql) // This can fail when class is used on old database (during migration for example)
162  {
163  while ($obj=$this->db->fetch_object($resql))
164  {
165  $fieldname='extra.'.$obj->name;
166  $fieldlabel=ucfirst($obj->label);
167  $typeFilter="Text";
168  switch($obj->type)
169  {
170  case 'int':
171  case 'double':
172  case 'price':
173  $typeFilter="Numeric";
174  break;
175  case 'date':
176  case 'datetime':
177  $typeFilter="Date";
178  break;
179  case 'boolean':
180  $typeFilter="Boolean";
181  break;
182  case 'sellist':
183  $tmp='';
184  $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
185  if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options']));
186  if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
187  break;
188  }
189  $this->export_fields_array[$r][$fieldname]=$fieldlabel;
190  $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
191  $this->export_entities_array[$r][$fieldname]='product';
192  }
193  }
194  // End add extra fields
195 
196  $this->export_sql_start[$r]='SELECT DISTINCT ';
197  $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p';
198  $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object';
199  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';
200  $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 1 AND p.entity IN ('.getEntity('product').')';
201 
202 
203  if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
204  {
205  if (! empty($conf->global->PRODUIT_MULTIPRICES))
206  {
207  // Exports product multiprice
208  $r++;
209  $this->export_code[$r]=$this->rights_class.'_'.$r;
210  $this->export_label[$r]="ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found)
211  $this->export_permission[$r]=array(array("produit","export"));
212  $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",
213  'pr.price_base_type'=>"PriceLevelPriceBase",'pr.price_level'=>"PriceLevel",
214  'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC",
215  'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
216  'pr.tva_tx'=>'PriceLevelVATRate',
217  'pr.date_price'=>'DateCreation');
218  //$this->export_TypeFields_array[$r]=array(
219  // 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",
220  // 'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text',
221  // 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",
222  // 'p.datec'=>'Date','p.tms'=>'Date'
223  //);
224  $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
225  'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
226  'pr.price_ttc'=>"product",
227  'pr.price_min'=>"product",'pr.price_min_ttc'=>"product",
228  'pr.tva_tx'=>'product',
229  'pr.date_price'=>"product");
230  $this->export_sql_start[$r]='SELECT DISTINCT ';
231  $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p';
232  $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product';
233  $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')';
234  }
235  }
236 
237 
238  // Imports
239  //--------
240  $r=0;
241 
242  $r++;
243  $this->import_code[$r]=$this->rights_class.'_'.$r;
244  $this->import_label[$r]="Products"; // Translation key
245  $this->import_icon[$r]=$this->picto;
246  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
247  $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields');
248  $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id
249  $this->import_fields_array[$r]=array(
250  'p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.url'=>"PublicUrl",'p.accountancy_code_sell'=>"ProductAccountancySellCode",
251  'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",
252  'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",
253  'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation'
254  );
255  if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode'));
256  if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
257  // Add extra fields
258  $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")";
259  $resql=$this->db->query($sql);
260  if ($resql) // This can fail when class is used on old database (during migration for example)
261  {
262  while ($obj=$this->db->fetch_object($resql))
263  {
264  $fieldname='extra.'.$obj->name;
265  $fieldlabel=ucfirst($obj->label);
266  $this->import_fields_array[$r][$fieldname]=$fieldlabel.($obj->fieldrequired?'*':'');
267  }
268  }
269  // End add extra fields
270  $this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'product'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
271  $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]$');
272  $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');
273 
274 
275  if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries)
276  {
277  if (! empty($conf->fournisseur->enabled))
278  {
279  // Import suppliers prices (note: this code is duplicated into module product)
280  $r++;
281  $this->import_code[$r]=$this->rights_class.'_supplierprices';
282  $this->import_label[$r]="SuppliersPricesOfProductsOrServices"; // Translation key
283  $this->import_icon[$r]=$this->picto;
284  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
285  $this->import_tables_array[$r]=array('sp'=>MAIN_DB_PREFIX.'product_fournisseur_price');
286  $this->import_tables_creator_array[$r]=array('sp'=>'fk_user');
287  $this->import_fields_array[$r]=array(
288  'sp.fk_product'=>"ProductOrService*",
289  'sp.fk_soc'=>"Supplier*", 'sp.ref_fourn'=>'SupplierRef', 'sp.quantity'=>"QtyMin*", 'sp.tva_tx'=>'VATRate', 'sp.default_vat_code'=>'VATCode'
290  );
291  if (is_object($mysoc) && $mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('sp.recuperableonly'=>'VATNPR'));
292  if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type'));
293  if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type'));
294  $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array(
295  'sp.price'=>"PriceQtyMinHT*",
296  'sp.unitprice'=>'UnitPriceHT*', // TODO Make this field not required and calculate it from price and qty
297  'sp.remise_percent'=>'DiscountQtyMin'
298  ));
299 
300  $this->import_convertvalue_array[$r]=array(
301  'sp.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'),
302  'sp.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'Product')
303  );
304  $this->import_examplevalues_array[$r]=array('sp.fk_product'=>"PREF123456",
305  'sp.fk_soc'=>"My Supplier",'sp.ref_fourn'=>"SupplierRef", 'sp.quantity'=>"1", 'sp.tva_tx'=>'21',
306  'sp.price'=>"50",
307  'sp.unitprice'=>'50',
308  'sp.remise_percent'=>'0'
309  );
310  }
311 
312  if (! empty($conf->global->PRODUIT_MULTIPRICES))
313  {
314  // Import product multiprice
315  $r++;
316  $this->import_code[$r]=$this->rights_class.'_multiprice';
317  $this->import_label[$r]="ProductsOrServiceMultiPrice"; // Translation key
318  $this->import_icon[$r]=$this->picto;
319  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
320  $this->import_tables_array[$r]=array('pr'=>MAIN_DB_PREFIX.'product_price');
321  $this->import_tables_creator_array[$r]=array('pr'=>'fk_user_author'); // Fields to store import user id
322  $this->import_fields_array[$r]=array('pr.fk_product'=>"ProductRowid*",
323  'pr.price_base_type'=>"PriceLevelPriceBase",'pr.price_level'=>"PriceLevel",
324  'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC",
325  'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
326  'pr.tva_tx'=>'PriceLevelVATRate',
327  'pr.date_price'=>'DateCreation*');
328  $this->import_regex_array[$r]=array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
329  $this->import_examplevalues_array[$r]=array('pr.fk_product'=>"1",
330  'pr.price_base_type'=>"HT",'pr.price_level'=>"1",
331  'pr.price'=>"100",'pr.price_ttc'=>"110",
332  'pr.price_min'=>"100",'pr.price_min_ttc'=>"110",
333  'pr.tva_tx'=>'19.6',
334  'pr.date_price'=>'2013-04-10');
335  }
336 
337  if (! empty($conf->global->MAIN_MULTILANGS))
338  {
339  $r++;
340  $this->import_code[$r]=$this->rights_class.'_languages';
341  $this->import_label[$r]="ProductsOrServicesTranslations";
342  $this->import_icon[$r]=$this->picto;
343  $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
344  $this->import_tables_array[$r]=array('l'=>MAIN_DB_PREFIX.'product_lang');
345  // multiline translation, one line per translation
346  $this->import_fields_array[$r]=array('l.fk_product'=>'Ref', 'l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription');
347  //$this->import_fields_array[$r]['l.note']='TranslatedNote';
348  $this->import_convertvalue_array[$r]=array(
349  'l.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'Product')
350  );
351  $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');
352  $this->import_updatekeys_array[$r]=array('l.fk_product'=>'Ref','l.lang'=>'Language');
353  }
354  }
355  }
356 
357 
366  function init($options='')
367  {
368  $this->remove($options);
369 
370  $sql = array();
371 
372  return $this->_init($sql,$options);
373  }
374 }
Class DolibarrModules.
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:1053
</td >< td class="liste_titre" align="right"></td ></tr >< tr class="liste_titre">< input type="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< tr class="oddeven">< td >< input type="checkbox" class="check" name="' . $i . '"' . $disabled . '></td >< td >< input type="checkbox" class="check" name="choose'.$i.'"></td >< td class="nowrap"></td >< td >< input type="hidden" name="desc' . $i . '" value="' . dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:573
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:103
Class to describe and enable module Service.
init($options='')
Function called when module is enabled.
_init($array_sql, $options='')
Enables a module.
__construct($db)
Constructor.