originproductline.tpl.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
  3. * Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com>
  4. * Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. // Protection to avoid direct call of template
  20. if (empty($conf) || !is_object($conf)) {
  21. print "Error, template page can't be called as URL";
  22. exit;
  23. }
  24. ?>
  25. <!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->
  26. <?php
  27. print '<tr data-id="'.$this->tpl['id'].'" class="oddeven'.(empty($this->tpl['strike']) ? '' : ' strikefordisabled').'">';
  28. print '<td class="linecolref">'.$this->tpl['label'].'</td>';
  29. print '<td class="linecoldescription">'.$this->tpl['description'].'</td>';
  30. print '<td class="linecolvat right">'.$this->tpl['vat_rate'].'</td>';
  31. print '<td class="linecoluht right">'.$this->tpl['price'].'</td>';
  32. if (isModEnabled("multicurrency")) {
  33. print '<td class="linecoluht_currency right">'.$this->tpl['multicurrency_price'].'</td>';
  34. }
  35. print '<td class="linecolqty right">'.$this->tpl['qty'].'</td>';
  36. if (!empty($conf->global->PRODUCT_USE_UNITS)) {
  37. print '<td class="linecoluseunit left">'.$langs->trans($this->tpl['unit']).'</td>';
  38. }
  39. print '<td class="linecoldiscount right">'.$this->tpl['remise_percent'].'</td>';
  40. print '<td class="linecolht right">'.$this->tpl['total_ht'].'</td>';
  41. $selected = 1;
  42. if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) {
  43. $selected = 0;
  44. }
  45. print '<td class="center">';
  46. print '<input id="cb'.$this->tpl['id'].'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->tpl['id'].'"'.($selected ? ' checked="checked"' : '').'>';
  47. print '</td>';
  48. print '</tr>'."\n";
  49. ?>
  50. <!-- END PHP TEMPLATE originproductline.tpl.php -->