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;
132 if (empty($this->fk_unit)) {
136 $langs->load(
'products');
138 $label_type =
'label';
140 $label_type =
'label';
141 if ($type ==
'short') {
142 $label_type =
'short_label';
143 } elseif ($type ==
'code') {
144 $label_type =
'code';
147 $sql =
"SELECT ".$label_type.
", code from ".$this->
db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
149 $resql = $this->
db->query(
$sql);
150 if ($resql && $this->
db->num_rows($resql) > 0) {
151 $res = $this->
db->fetch_array($resql);
152 if ($label_type ==
'code') {
153 $label =
'unit'.$res[
'code'];
155 $label = $res[$label_type];
157 $this->
db->free($resql);
160 $this->error = $this->
db->lasterror();
161 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
177 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
$conf db
API class for accounts.
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.
if(isModEnabled('facture') &&!empty($user->rights->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') &&!empty($user->rights->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.
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.