* Copyright (C) 2010-2011 Laurent Destailleur * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) * $conf * $langs * $forceall (0 by default, 1 for supplier invoices/orders) * $element (used to test $user->rights->$element->creer) * $permtoedit (used to replace test $user->rights->$element->creer) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) * $object_rights->creer initialized from = $object->getRights() * $disableedit, $disablemove, $disableremove * * $type, $text, $description, $line */ // Protection to avoid direct call of template if (empty($object) || ! is_object($object)) { print "Error, template page can't be called as URL"; exit; } global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; if (empty($dateSelector)) $dateSelector=0; if (empty($forceall)) $forceall=0; if (empty($senderissupplier)) $senderissupplier=0; if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0; if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0; // add html5 elements $domData = ' data-element="'.$line->element.'"'; $domData .= ' data-id="'.$line->id.'"'; $domData .= ' data-qty="'.$line->qty.'"'; $domData .= ' data-product_type="'.$line->product_type.'"'; // Lines for extrafield $objectline = new BOMLine($object->db); ?> > global->MAIN_VIEW_LINE_NUMBER)) { ?>
db); $tmpproduct->fetch($line->fk_product); print $tmpproduct->getNomUrl(1); ?> qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price ?> global->PRODUCT_USE_UNITS) { print ''; $label = $line->getLabelOfUnit('short'); if ($label !== '') { print $langs->trans($label); } print ''; } ?> efficiency; ?> statut == 0 && ($object_rights->write) && $action != 'selectlines' ) { ?> info_bits & 2) == 2 || ! empty($disableedit)) { ?> id.'#line_'.$line->id; ?>"> fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation print 'id . '">'; print img_delete(); print ''; } ?> 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { ?> 0) { ?> id; ?>"> id; ?>"> browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>> showOptionals($extrafieldsline, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?>