dolibarr  x.y.z
commonorder.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
24 require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
25 require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php';
27 
31 abstract class CommonOrder extends CommonObject
32 {
33  use CommonIncoterm;
34 
35 
42  public function getKanbanView($option = '')
43  {
44  global $langs, $conf;
45 
46  $return = '<div class="box-flex-item box-flex-grow-zero">';
47  $return .= '<div class="info-box info-box-sm">';
48  $return .= '<div class="info-box-icon bg-infobox-action">';
49  $return .= img_picto('', 'order');
50  $return .= '</div>';
51  $return .= '<div class="info-box-content">';
52  $return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
53 
54  if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) {
55  $return .= '<br><div class="info-box-ref opacitymedium tdoverflowmax150">'.$this->thirdparty->getNomUrl(1).'</div>';
56  }
57  if (property_exists($this, 'total_ht')) {
58  $return .= '<div class="info-box-ref amount">'.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency).' '.$langs->trans('HT').'</div>';
59  }
60  if (method_exists($this, 'getLibStatut')) {
61  $return .= '<div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
62  }
63  $return .= '</div>';
64  $return .= '</div>';
65  $return .= '</div>';
66  return $return;
67  }
68 
72  public $code = "";
73 }
74 
78 abstract class CommonOrderLine extends CommonObjectLine
79 {
84  public $label;
85 
92  public $ref;
93 
100  public $libelle;
101 
106  public $product_ref;
107 
112  public $product_label;
113 
118  public $product_tosell=0;
119 
124  public $product_tobuy=0;
125 
130  public $product_desc;
131 
136  public $product_tobatch;
137 
142  public $product_barcode;
143 
148  public $qty;
149 
155  public $price;
156 
161  public $subprice;
162 
167  public $product_type = 0;
168 
173  public $desc;
174 
179  public $fk_product;
180 
185  public $remise_percent;
186 
191  public $vat_src_code;
192 
197  public $tva_tx;
198 
203  public $localtax1_tx;
204 
209  public $localtax2_tx;
210 
211  public $localtax1_type;
212  public $localtax2_type;
213 
220  public $info_bits = 0;
221 
222  public $special_code = 0;
223 
224  public $fk_multicurrency;
225  public $multicurrency_code;
226  public $multicurrency_subprice;
227  public $multicurrency_total_ht;
228  public $multicurrency_total_tva;
229  public $multicurrency_total_ttc;
230 }
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 ...
Superclass for orders classes.
getKanbanView($option='')
Return clicable link of object (with eventually picto)
Superclass for orders classes.
$label
Custom label of line.
trait CommonIncoterm
Superclass for incoterm classes.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)