39 public $parent_element =
'';
44 public $fk_parent_attribute =
'';
63 public $picto =
'line';
72 public $date_debut_prevue;
73 public $date_debut_reel;
74 public $date_fin_prevue;
75 public $date_fin_reel;
86 public $surface_units;
129 public $product_label;
134 public $product_barcode;
139 public $product_desc;
144 public $fk_product_type;
151 public $remise_percent;
164 public $special_code;
176 public $fk_multicurrency;
181 public $multicurrency_code;
186 public $multicurrency_subprice;
191 public $multicurrency_total_ht;
196 public $multicurrency_total_tva;
201 public $multicurrency_total_ttc;
225 if (empty($this->fk_unit)) {
229 $langs->load(
'products');
231 $label_type =
'label';
232 if ($type ==
'short') {
233 $label_type =
'short_label';
234 } elseif ($type ==
'code') {
235 $label_type =
'code';
238 $sql =
"SELECT ".$label_type.
", code from ".$this->db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
240 $resql = $this->db->query($sql);
241 if ($resql && $this->db->num_rows($resql) > 0 && $res = $this->db->fetch_array($resql)) {
242 if ($label_type ==
'code') {
243 $label =
'unit'.$res[
'code'];
245 $label = $res[$label_type];
247 $this->db->free($resql);
250 $this->error = $this->db->lasterror();
251 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
268 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.