39 public $parent_element =
'';
44 public $fk_parent_attribute =
'';
63 public $picto =
'line';
75 public $date_debut_prevue;
79 public $date_debut_reel;
83 public $date_fin_prevue;
87 public $date_fin_reel;
106 public $length_units;
122 public $height_units;
130 public $surface_units;
138 public $volume_units;
147 public $product_type;
181 public $product_label;
186 public $product_barcode;
191 public $product_desc;
196 public $fk_product_type;
209 public $remise_percent;
222 public $special_code;
237 public $fk_multicurrency;
242 public $multicurrency_code;
247 public $multicurrency_subprice;
252 public $multicurrency_total_ht;
257 public $multicurrency_total_tva;
262 public $multicurrency_total_ttc;
286 if (empty($this->fk_unit)) {
290 $langs->load(
'products');
292 $label_type =
'label';
293 if ($type ==
'short') {
294 $label_type =
'short_label';
295 } elseif ($type ==
'code') {
296 $label_type =
'code';
299 $sql =
"SELECT ".$label_type.
", code from ".$this->db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
301 $resql = $this->db->query($sql);
302 if ($resql && $this->db->num_rows($resql) > 0 && $res = $this->db->fetch_array($resql)) {
303 if ($label_type ==
'code') {
304 $label =
'unit'.$res[
'code'];
306 $label = $res[$label_type];
308 $this->db->free($resql);
311 $this->error = $this->db->lasterror();
312 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
329 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, $filter =
'', $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, $filter='', $filtermode='AND')
Empty function to prevent errors on call of this function.
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.