* Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Raphaël Doursenaud * Copyright (C) 2015-2016 Marcos García * Copyright (C) 2018 Frédéric France * Copyright (C) 2018 Ferran Marcet * * 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) */ // Protection to avoid direct call of template if (empty($object) || ! is_object($object)) { print "Error: this template page cannot be called directly as an URL"; exit; } global $forceall, $forcetoshowtitlelines; if (empty($forceall)) $forceall=0; // Define colspan for the button 'Add' $colspan = 3; // Columns: total ht + col edit + col delete //print $object->element; // Lines for extrafield $objectline = new BOMLine($this->db); ?> lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { ?> global->MAIN_VIEW_LINE_NUMBER)) { ?>
trans('AddNewLine'); ?>trans("FreeZone"); ?> trans('Qty'); ?> global->PRODUCT_USE_UNITS) { print ''; print ''; print $langs->trans('Unit'); print ''; } ?> textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')); ?>   global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay++; echo ''; } $coldisplay++; ?> product->enabled) || ! empty($conf->service->enabled)) { if ($forceall >= 0 && $freelines) echo '
'; echo ''; $filtertype=''; if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) { // hide products in closed warehouse, but show products for internal transfer $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); } else { $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); } echo ''; } $coldisplay++; ?> "> global->PRODUCT_USE_UNITS) { $coldisplay++; print ''; print $form->selectUnits($line->fk_unit, "units"); print ''; } $coldisplay++; ?> "> showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?>