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;
86 public $product_label;
87 public $product_barcode;
89 public $fk_product_type;
93 public $remise_percent;
120 if (empty($this->fk_unit)) {
124 $langs->load(
'products');
126 $label_type =
'label';
128 $label_type =
'label';
129 if ($type ==
'short') {
130 $label_type =
'short_label';
131 } elseif ($type ==
'code') {
132 $label_type =
'code';
135 $sql =
"SELECT ".$label_type.
", code from ".$this->
db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
139 $res = $this->
db->fetch_array(
$resql);
140 if ($label_type ==
'code') {
141 $label =
'unit'.$res[
'code'];
143 $label = $res[$label_type];
148 $this->error = $this->
db->lasterror();
149 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
165 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.
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.
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)) $resql
Social contributions to pay.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
__construct($db)
Constructor.