Go to the documentation of this file.
51 public $picto =
'line';
59 public $date_debut_prevue;
60 public $date_debut_reel;
61 public $date_fin_prevue;
62 public $date_fin_reel;
73 public $surface_units;
98 public $product_label;
99 public $product_barcode;
100 public $product_desc;
101 public $fk_product_type;
105 public $remise_percent;
107 public $special_code;
134 if (empty($this->fk_unit)) {
138 $langs->load(
'products');
140 $label_type =
'label';
142 $label_type =
'label';
143 if ($type ==
'short') {
144 $label_type =
'short_label';
145 } elseif ($type ==
'code') {
146 $label_type =
'code';
149 $sql =
"SELECT ".$label_type.
", code from ".$this->db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
151 $resql = $this->db->query(
$sql);
152 if ($resql && $this->db->num_rows($resql) > 0) {
153 $res = $this->db->fetch_array($resql);
154 if ($label_type ==
'code') {
155 $label =
'unit'.$res[
'code'];
157 $label = $res[$label_type];
159 $this->db->free($resql);
162 $this->error = $this->db->lasterror();
163 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
179 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND')
Empty function to prevent errors on call of this function must be overload if usefull.
Parent class for class inheritance lines of business objects This class is useless for the moment so ...
Parent class of all other business classes (invoices, contracts, proposals, orders,...
getLabelOfUnit($type='long')
Returns the label, short_label or code found in units dictionary from ->fk_unit.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
__construct($db)
Constructor.
if(isModEnabled('facture') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.