53 public $picto =
'line';
62 public $date_debut_prevue;
63 public $date_debut_reel;
64 public $date_fin_prevue;
65 public $date_fin_reel;
76 public $surface_units;
119 public $product_label;
124 public $product_barcode;
129 public $product_desc;
134 public $fk_product_type;
138 public $remise_percent;
148 public $special_code;
155 public $fk_multicurrency;
160 public $multicurrency_code;
165 public $multicurrency_subprice;
170 public $multicurrency_total_ht;
175 public $multicurrency_total_tva;
180 public $multicurrency_total_ttc;
204 if (empty($this->fk_unit)) {
208 $langs->load(
'products');
210 $label_type =
'label';
211 if ($type ==
'short') {
212 $label_type =
'short_label';
213 } elseif ($type ==
'code') {
214 $label_type =
'code';
217 $sql =
"SELECT ".$label_type.
", code from ".$this->db->prefix().
"c_units where rowid = ".((int) $this->fk_unit);
219 $resql = $this->db->query(
$sql);
220 if ($resql && $this->db->num_rows($resql) > 0 && $res = $this->db->fetch_array($resql)) {
221 if ($label_type ==
'code') {
222 $label =
'unit'.$res[
'code'];
224 $label = $res[$label_type];
226 $this->db->free($resql);
229 $this->error = $this->db->lasterror();
230 dol_syslog(get_class($this).
"::getLabelOfUnit Error ".$this->error, LOG_ERR);
247 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.
if(isModEnabled('invoice') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) if(isModEnabled('invoice') &&isModEnabled('order') && $user->hasRight("commande", "lire") &&!getDolGlobalString('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')) $sql
Social contributions to pay.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.