dolibarr  18.0.0-alpha
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 
43  public function getKanbanView($option = '', $arraydata = null)
44  {
45  global $langs, $conf;
46 
47  $return = '<div class="box-flex-item box-flex-grow-zero">';
48  $return .= '<div class="info-box info-box-sm">';
49  $return .= '<div class="info-box-icon bg-infobox-action">';
50  $return .= img_picto('', 'order');
51  $return .= '</div>';
52  $return .= '<div class="info-box-content">';
53  $return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
54 
55  if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) {
56  $return .= '<br><div class="info-box-ref opacitymedium tdoverflowmax150">'.$this->thirdparty->getNomUrl(1).'</div>';
57  }
58  if (property_exists($this, 'total_ht')) {
59  $return .= '<div class="info-box-ref amount">'.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency).' '.$langs->trans('HT').'</div>';
60  }
61  if (method_exists($this, 'getLibStatut')) {
62  $return .= '<div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
63  }
64  $return .= '</div>';
65  $return .= '</div>';
66  $return .= '</div>';
67  return $return;
68  }
69 
73  public $code = "";
74 }
75 
79 abstract class CommonOrderLine extends CommonObjectLine
80 {
85  public $label;
86 
93  public $ref;
94 
101  public $libelle;
102 
107  public $product_ref;
108 
113  public $product_label;
114 
119  public $product_tosell=0;
120 
125  public $product_tobuy=0;
126 
131  public $product_desc;
132 
137  public $product_tobatch;
138 
143  public $product_barcode;
144 
149  public $qty;
150 
156  public $price;
157 
162  public $subprice;
163 
168  public $product_type = 0;
169 
174  public $fk_product;
175 
180  public $remise_percent;
181 
186  public $vat_src_code;
187 
192  public $tva_tx;
193 
198  public $localtax1_tx;
199 
204  public $localtax2_tx;
205 
206  public $localtax1_type;
207  public $localtax2_type;
208 
215  public $info_bits = 0;
216 
217  public $special_code = 0;
218 
219  public $fk_multicurrency;
220  public $multicurrency_code;
221  public $multicurrency_subprice;
222  public $multicurrency_total_ht;
223  public $multicurrency_total_tva;
224  public $multicurrency_total_ttc;
225 }
CommonOrder\getKanbanView
getKanbanView($option='', $arraydata=null)
Return clicable link of object (with eventually picto)
Definition: commonorder.class.php:43
CommonOrder
Superclass for orders classes.
Definition: commonorder.class.php:31
CommonIncoterm
trait CommonIncoterm
Superclass for incoterm classes.
Definition: commonincoterm.class.php:29
CommonObjectLine
Parent class for class inheritance lines of business objects This class is useless for the moment so ...
Definition: commonobjectline.class.php:32
CommonObject
Parent class of all other business classes (invoices, contracts, proposals, orders,...
Definition: commonobject.class.php:45
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:4025
CommonOrderLine\$label
$label
Custom label of line.
Definition: commonorder.class.php:85
CommonOrderLine\$price
$price
Unit price.
Definition: commonorder.class.php:156
CommonOrderLine
Superclass for orders classes.
Definition: commonorder.class.php:79