* 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 * Copyright (C) 2024 Frédéric France * * 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 the following variables defined: * $object (invoice, order, ...) * $conf * $langs * $element (used to test $user->hasRight($element, 'creer')) * $permtoedit (used to replace test $user->hasRight($element, 'creer')) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) * $outputalsopricetotalwithtax * $usemargins (0 to disable all margins columns, 1 to show according to margin setup) * * $type, $text, $description, $line */ /** * @var CommonObject $this * @var CommonObject $object * @var Form $form * @var Translate $langs * * @var string $action */ // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit(1); } '@phan-var-force CommonObject $this @phan-var-force CommonObject $object'; global $filtertype; if (empty($filtertype)) { $filtertype = 0; } print "\n"; // Title line print "\n"; print ''; // Adds a line numbering column if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { print ' '; } // Product or sub-bom print ''.$langs->trans('Description'); if (getDolGlobalString('BOM_SUB_BOM') && $filtertype != 1) { print '   '.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'  '; print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' '; } print ''; // Qty print ''.$form->textwithpicto($langs->trans('Qty'), ($filtertype != 1) ? $langs->trans("QtyRequiredIfNoLoss") : '').''; if ($filtertype != 1) { // Product if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''; } } else { // Service print ''; } if ($filtertype != 1 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { // Product or stock support for Services is active // Qty frozen print '' . $form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")) . ''; // Disable stock change print '' . $form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')) . ''; // Efficiency print '' . $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')) . ''; } // Service and workstations are active if ($filtertype == 1 && isModEnabled('workstation')) { // Workstation if (isModEnabled('workstation')) { print '' .img_picto('', 'workstation', 'class="pictofixedwidth"'). $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . ''; } } // Cost print ''.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).''; print ''; // No width to allow autodim print ''; print ''; if ($action == 'selectlines') { print ''; print ''; print ''; print ''; } print "\n"; print "\n"; print "\n";