PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/core/tpl/freeproductline_edit.tpl.php

https://github.com/asterix14/dolibarr
PHP | 93 lines | 57 code | 11 blank | 25 comment | 12 complexity | be672272af1fed873332f6c76d8a75e1 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. * Need to have following variables defined:
  20. * $conf
  21. * $langs
  22. * $dateSelector
  23. * $this (invoice, order, ...)
  24. * $line defined
  25. */
  26. ?>
  27. <!-- BEGIN PHP TEMPLATE freeproductline_edit.tpl.php -->
  28. <form action="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'#'.$line->id; ?>" method="POST">
  29. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
  30. <input type="hidden" name="action" value="updateligne">
  31. <input type="hidden" name="id" value="<?php echo $this->id; ?>">
  32. <input type="hidden" name="lineid" value="<?php echo $line->id; ?>">
  33. <input type="hidden" name="type" value="<?php echo $line->product_type; ?>">
  34. <tr <?php echo $bc[$var]; ?>>
  35. <td>
  36. <a name="<?php echo $line->id; ?>"></a>
  37. <?php
  38. if (is_object($hookmanager))
  39. {
  40. $parameters=array('fk_parent_line'=>$line->fk_parent_line);
  41. echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
  42. }
  43. // editeur wysiwyg
  44. $nbrows=ROWS_2;
  45. if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
  46. require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
  47. $doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
  48. $doleditor->Create();
  49. ?>
  50. </td>
  51. <td align="right"><?php echo $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td>
  52. <td align="right"><input size="6" type="text" class="flat" name="subprice" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
  53. <td align="right">
  54. <?php if (($line->info_bits & 2) != 2) { ?>
  55. <input size="2" type="text" class="flat" name="qty" value="<?php echo $line->qty; ?>">
  56. <?php } else { ?>
  57. &nbsp;
  58. <?php } ?>
  59. </td>
  60. <td align="right" nowrap>
  61. <?php if (($line->info_bits & 2) != 2) { ?>
  62. <input size="1" type="text" class="flat" name="remise_percent" value="<?php echo $line->remise_percent; ?>">%
  63. <?php } else { ?>
  64. &nbsp;
  65. <?php } ?>
  66. </td>
  67. <td align="center" colspan="5" valign="middle"><input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
  68. <br><input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"></td>
  69. </tr>
  70. <?php if ($conf->service->enabled && $dateSelector && $line->product_type == 1) { ?>
  71. <tr <?php echo $bc[$var]; ?>>
  72. <td colspan="9"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
  73. <?php
  74. echo $form->select_date($line->date_start,'date_start',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$line->date_start?0:1,"updateligne");
  75. echo ' '.$langs->trans('to').' ';
  76. echo $form->select_date($line->date_end,'date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$line->date_end?0:1,"updateligne");
  77. ?>
  78. </td>
  79. </tr>
  80. <?php } ?>
  81. </form>
  82. <!-- END PHP TEMPLATE freeproductline_edit.tpl.php -->