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

/htdocs/core/tpl/predefinedproductline_create.tpl.php

https://github.com/asterix14/dolibarr
PHP | 98 lines | 62 code | 11 blank | 25 comment | 5 complexity | 671d05c741dbb9334b44df369ccc1bd3 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 predefinedproductline_create.tpl.php -->
  28. <tr class="liste_titre nodrag nodrop">
  29. <td colspan="3">
  30. <?php
  31. echo $langs->trans("AddNewLine").' - ';
  32. if ($conf->service->enabled)
  33. echo $langs->trans('RecordedProductsAndServices');
  34. else
  35. echo $langs->trans('RecordedProducts');
  36. ?>
  37. </td>
  38. <td align="right"><?php echo $langs->trans('Qty'); ?></td>
  39. <td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
  40. <td colspan="4">&nbsp;</td>
  41. </tr>
  42. <form name="addpredefinedproduct" id="addpredefinedproduct" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id; ?>#add" method="POST">
  43. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
  44. <input type="hidden" name="action" value="addline">
  45. <input type="hidden" name="id" value="<?php echo $this->id; ?>">
  46. <script type="text/javascript">
  47. jQuery(document).ready(function() {
  48. jQuery('#idprod').change(function() {
  49. jQuery('#np_desc').focus();
  50. });
  51. });
  52. </script>
  53. <tr <?php echo $bcnd[$var]; ?>>
  54. <td colspan="3">
  55. <?php
  56. $form->select_produits('','idprod','',$conf->product->limit_size,$buyer->price_level);
  57. if (is_object($hookmanager))
  58. {
  59. $parameters=array('fk_parent_line'=>$_POST["fk_parent_line"]);
  60. echo $hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
  61. }
  62. // Editor wysiwyg
  63. require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
  64. $nbrows=ROWS_2;
  65. if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
  66. $doleditor=new DolEditor('np_desc',$_POST["np_desc"],'',100,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
  67. $doleditor->Create();
  68. ?>
  69. </td>
  70. <td align="right"><input type="text" size="2" name="qty" value="1"></td>
  71. <td align="right" nowrap><input type="text" size="1" name="remise_percent" value="<?php echo $buyer->remise_client; ?>">%</td>
  72. <td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>" name="addline"></td>
  73. </tr>
  74. <?php if ($conf->service->enabled && $dateSelector) {?>
  75. <tr <?php echo $bcnd[$var]; ?>>
  76. <td colspan="9">
  77. <?php
  78. echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
  79. echo $form->select_date('','date_start_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
  80. echo ' '.$langs->trans('to').' ';
  81. echo $form->select_date('','date_end_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
  82. ?>
  83. </td>
  84. </tr>
  85. <?php } ?>
  86. </form>
  87. <!-- END PHP TEMPLATE predefinedproductline_create.tpl.php -->