* 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-2024 Frédéric France * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2024 Vincent Maury * Copyright (C) 2024-2025 MDW * Copyright (C) 2025 Nick Fragoulis * * 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 * $forceall (0 by default, 1 for supplier invoices/orders) */ require_once DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php"; /** * @var CommonObject $this * @var CommonObject $object * @var Form $form * @var Societe $buyer * @var Translate $langs */ // 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; } ' @phan-var-force CommonObject $this @phan-var-force CommonObject $object @phan-var-force Societe $buyer '; global $forceall, $forcetoshowtitlelines, $filtertype; if (empty($forceall)) { $forceall = 0; } if (empty($filtertype)) { $filtertype = 0; } $formproduct = new FormProduct($object->db); // Define colspan for the button 'Add' $colspan = 3; // Lines for extrafield $objectline = new ReceptionLineBatch($this->db); print "\n"; $nolinesbefore = (count($this->lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { print ''; if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { print ''; } print ''; print '
'.$langs->trans('AddNewLine').''; print ''; print ''.$langs->trans('Qty').''; if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''; print ''; print $langs->trans('Unit'); print ''; } print ''; } print ''; $coldisplay = 0; // Adds a line numbering column if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { $coldisplay++; echo ''; } // Product $coldisplay++; print ''; // Predefined product/service if (isModEnabled("product")) { if ($filtertype == 1) { print $langs->trans("Service"); } else { print $langs->trans("Product"); } echo ''; $statustoshow = -1; echo ''; } if (!empty($extrafields)) { $temps = $objectline->showOptionals($extrafields, 'create', array(), '', '', '1', 'line'); if (!empty($temps)) { print '
'; print $temps; print '
'; } } print ''; // Qty $coldisplay++; print ''; print ''; // Unit if (getDolGlobalInt('PRODUCT_USE_UNITS')) { $coldisplay++; print ''; print ''; } $coldisplay += $colspan; print ''; print ''; print ''; print ''; ?>