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')
179 $return =
'<div class="box-flex-item box-flex-grow-zero">';
180 $return .=
'<div class="info-box info-box-sm">';
181 $return .=
'<span class="info-box-icon bg-infobox-action">';
184 $return .=
'</span>';
185 $return .=
'<div class="info-box-content">';
186 $return .=
'<span class="info-box-ref">'.(method_exists($this,
'getNomUrl') ? $this->getNomUrl(1) :
'').
'</span>';
187 if (property_exists($this,
'date_delivery')) {
188 $return .=
'<br><span class="info-box-label opacitymedium">'.dol_print_date($this->
db->jdate($this->date_delivery),
"dayhour").
'</span>';
190 if (property_exists($this,
'town') && !empty($this->town)) {
191 $return .=
'<br><span class="info-box-label opacitymedium">'.$langs->trans(
"Town").
'</span>';
192 $return .=
'<span class="info-box-label "> : '.$this->town.
'</span>';
194 if (method_exists($this,
'getLibStatut')) {
195 $return .=
'<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).
'</div>';
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.
getKanbanView($option='')
Return clicable link of object (with eventually picto)
__construct($db)
Constructor.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
$conf db
API class for accounts.