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;
114 public $fk_multicurrency;
119 public $multicurrency_code;
124 public $multicurrency_subprice;
129 public $multicurrency_total_ht;
134 public $multicurrency_total_tva;
139 public $multicurrency_total_ttc;
163 if (empty($this->fk_unit)) {
167 $langs->load(
'products');
169 $label_type =
'label';
171 $label_type =
'label';
172 if ($type ==
'short') {
173 $label_type =
'short_label';
174 } elseif ($type ==
'code') {
175 $label_type =
'code';
178 $sql =
"SELECT ".$label_type.
", code from ".$this->db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
180 $resql = $this->db->query($sql);
181 if ($resql && $this->db->num_rows($resql) > 0) {
182 $res = $this->db->fetch_array($resql);
183 if ($label_type ==
'code') {
184 $label =
'unit'.$res[
'code'];
186 $label = $res[$label_type];
188 $this->db->free($resql);
191 $this->error = $this->db->lasterror();
192 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
208 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
Parent class of all other business classes (invoices, contracts, proposals, orders,...
Parent class for class inheritance lines of business objects This class is useless for the moment so ...
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.
getLabelOfUnit($type='long')
Returns the label, short_label or code found in units dictionary from ->fk_unit.
__construct($db)
Constructor.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.