PageRenderTime 52ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/core/tpl/predefinedproductline_view.tpl.php

https://github.com/asterix14/dolibarr
PHP | 97 lines | 66 code | 12 blank | 19 comment | 25 complexity | 528c702f171548fc0475453ddddd6718 MD5 | raw file
Possible License(s): LGPL-2.0
  1. <?php
  2. /* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr>
  3. * Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. ?>
  20. <!-- BEGIN PHP TEMPLATE predefinedproductline_view.tpl.php -->
  21. <tr <?php echo 'id="row-'.$line->id.'" '.$bcdd[$var]; ?>>
  22. <td>
  23. <a name="<?php echo $line->id; ?>"></a>
  24. <?php
  25. echo $form->textwithtooltip($text,$description,3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
  26. // Show range
  27. print_date_range($line->date_start, $line->date_end);
  28. // Add description in form
  29. if ($conf->global->PRODUIT_DESC_IN_FORM)
  30. {
  31. print ($line->description && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
  32. }
  33. ?>
  34. </td>
  35. <td align="right" nowrap="nowrap"><?php echo vatrate($line->tva_tx,'%',$line->info_bits); ?></td>
  36. <td align="right" nowrap="nowrap"><?php echo price($line->subprice); ?></td>
  37. <td align="right" nowrap="nowrap">
  38. <?php if ((($line->info_bits & 2) != 2) && $line->special_code != 3) echo $line->qty;
  39. else echo '&nbsp;'; ?>
  40. </td>
  41. <?php if (!empty($line->remise_percent) && $line->special_code != 3) { ?>
  42. <td align="right"><?php echo dol_print_reduction($line->remise_percent,$langs); ?></td>
  43. <?php } else { ?>
  44. <td>&nbsp;</td>
  45. <?php } ?>
  46. <?php if ($line->special_code == 3) { ?>
  47. <td align="right" nowrap="nowrap"><?php echo $langs->trans('Option'); ?></td>
  48. <?php } else { ?>
  49. <td align="right" nowrap="nowrap"><?php echo price($line->total_ht); ?></td>
  50. <?php } ?>
  51. <?php if ($this->statut == 0 && $user->rights->$element->creer) { ?>
  52. <td align="center">
  53. <?php if (($line->info_bits & 2) == 2) { ?>
  54. <?php } else { ?>
  55. <a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=editline&amp;lineid='.$line->id.'#'.$line->id; ?>">
  56. <?php echo img_edit(); ?>
  57. </a>
  58. <?php } ?>
  59. </td>
  60. <td align="center">
  61. <a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=ask_deleteline&amp;lineid='.$line->id; ?>">
  62. <?php echo img_delete(); ?>
  63. </a>
  64. </td>
  65. <?php if ($num > 1) { ?>
  66. <td align="center" class="tdlineupdown">
  67. <?php if ($i > 0) { ?>
  68. <a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=up&amp;rowid='.$line->id; ?>">
  69. <?php echo img_up(); ?>
  70. </a>
  71. <?php } ?>
  72. <?php if ($i < $num-1) { ?>
  73. <a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&amp;action=down&amp;rowid='.$line->id; ?>">
  74. <?php echo img_down(); ?>
  75. </a>
  76. <?php } ?>
  77. </td>
  78. <?php } else { ?>
  79. <td align="center" class="tdlineupdown">&nbsp;</td>
  80. <?php } ?>
  81. <?php } else { ?>
  82. <td colspan="3">&nbsp;</td>
  83. <?php } ?>
  84. </tr>
  85. <!-- END PHP TEMPLATE predefinedproductline_view.tpl.php -->