diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index af71662b3a5..9d15e3d57c8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -48,7 +48,7 @@ abstract class CommonObject public $array_options=array(); public $thirdparty; - + public $linkedObjectsIds; // Loaded by ->fetchObjectLinked public $linkedObjects; // Loaded by ->fetchObjectLinked @@ -2784,7 +2784,7 @@ abstract class CommonObject // Price HT print ''; - if ($conf->global->MAIN_FEATURES_LEVEL > 1) print ' '; + if ($inputalsopricewithtax) print ' '; // Qty print ''; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 75f6692b6c5..5d34ccfb19d 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -96,7 +96,7 @@ $coldisplay=-1; // We remove first td load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?> - global->MAIN_FEATURES_LEVEL > 1) { ?> + diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index ce87aa5e815..c56ffc30aea 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -17,9 +17,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * To use this template, the following var must be defined + * Need to have following variables defined: + * $object (invoice, order, ...) + * $conf + * $langs + * $dateSelector + * $forceall (0 by default, 1 for supplier invoices/orders) + * $senderissupplier (0 by default, 1 for supplier invoices/orders) + * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) + * * $type, $text, $description, $line */ + +$usemargins=0; +if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1; + +global $forceall, $senderissupplier, $inputalsopricewithtax; +if (empty($dateSelector)) $dateSelector=0; +if (empty($forceall)) $forceall=0; +if (empty($senderissupplier)) $senderissupplier=0; +if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0; + ?> @@ -100,7 +118,7 @@ subprice); ?> - global->MAIN_FEATURES_LEVEL > 1) { ?> +