PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/societe/canvas/company/tpl/card_edit.tpl.php

https://bitbucket.org/speedealing/speedealing
PHP | 217 lines | 169 code | 31 blank | 17 comment | 28 complexity | c2bbf7379fd607118ce45e1961a4ca6d MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, GPL-3.0, MIT
  1. <?php
  2. /* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
  3. * Copyright (C) 2010-2012 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 3 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. $contact = $GLOBALS['objcanvas']->control->object;
  20. ?>
  21. <!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP COMPANY -->
  22. <?php echo $this->control->tpl['title']; ?>
  23. <?php echo $this->control->tpl['error']; ?>
  24. <?php echo $this->control->tpl['ajax_selectcountry']; ?>
  25. <?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
  26. <form action="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id']; ?>" method="POST" name="formsoc">
  27. <input type="hidden" name="canvas" value="<?php echo $canvas ?>">
  28. <input type="hidden" name="action" value="update">
  29. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
  30. <input type="hidden" name="socid" value="<?php echo $this->control->tpl['id']; ?>">
  31. <?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
  32. <input type="hidden" name="code_auto" value="1">
  33. <?php } ?>
  34. <table class="border allwidth">
  35. <tr>
  36. <td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
  37. <td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
  38. </tr>
  39. <?php if (! empty($conf->global->SOCIETE_USEPREFIX)) { ?>
  40. <tr>
  41. <td><?php echo $langs->trans("Prefix"); ?></td>
  42. <td colspan="3">
  43. <?php if (($this->control->tpl['prefix_customercode'] || $this->control->tpl['prefix_suppliercode']) && $this->control->tpl['prefix_comm']) { ?>
  44. <input type="hidden" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>">
  45. <?php echo $this->control->tpl['prefix_comm']; ?>
  46. <?php } else { ?>
  47. <input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>">
  48. <?php } ?>
  49. </td>
  50. </tr>
  51. <?php } ?>
  52. <tr>
  53. <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td>
  54. <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td>
  55. <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
  56. <td width="25%">
  57. <table class="nobordernopadding">
  58. <tr>
  59. <td>
  60. <?php if ($this->control->tpl['ismodifiable_customercode']) { ?>
  61. <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="15">
  62. <?php } else { ?>
  63. <?php echo $this->control->tpl['customercode']; ?>
  64. <input type="hidden" name="code_client" value="<?php echo $this->control->tpl['customercode']; ?>">
  65. <?php } ?>
  66. </td>
  67. <td><?php echo $this->tpl['help_customercode']; ?></td>
  68. </tr>
  69. </table>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
  74. <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
  75. <td><?php echo $langs->trans('SupplierCode'); ?></td>
  76. <td>
  77. <table class="nobordernopadding">
  78. <tr>
  79. <td>
  80. <?php if ($this->control->tpl['ismodifiable_suppliercode']) { ?>
  81. <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="15">
  82. <?php } else { ?>
  83. <?php echo $this->control->tpl['suppliercode']; ?>
  84. <input type="hidden" name="code_fournisseur" value="<?php echo $this->control->tpl['suppliercode']; ?>">
  85. <?php } ?>
  86. </td>
  87. <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
  88. </tr>
  89. </table>
  90. </td>
  91. </tr>
  92. <?php
  93. if ($this->control->tpl['fournisseur']) {
  94. if (count($this->control->tpl['suppliercategory']) > 0) { ?>
  95. <tr>
  96. <td><?php echo $langs->trans('SupplierCategory'); ?></td>
  97. <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
  98. </tr>
  99. <?php } }?>
  100. <?php if (! empty($conf->barcode->enabled)) { ?>
  101. <tr>
  102. <td><?php echo $langs->trans('Gencod'); ?></td>
  103. <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
  104. </tr>
  105. <?php } ?>
  106. <tr>
  107. <td valign="top"><?php echo $langs->trans('Address'); ?></td>
  108. <td colspan="3"><textarea name="adresse" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
  109. </tr>
  110. <tr>
  111. <td><?php echo $langs->trans('Zip'); ?></td>
  112. <td><?php echo $this->control->tpl['select_zip']; ?></td>
  113. <td><?php echo $langs->trans('Town'); ?></td>
  114. <td><?php echo $this->control->tpl['select_town']; ?></td>
  115. </tr>
  116. <tr>
  117. <td width="25%"><?php echo $langs->trans('Country'); ?></td>
  118. <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
  119. </tr>
  120. <tr>
  121. <td><?php echo $langs->trans('State'); ?></td>
  122. <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
  123. </tr>
  124. <tr>
  125. <td><?php echo $langs->trans('Phone'); ?></td>
  126. <td><input type="text" name="tel" value="<?php echo $this->control->tpl['tel']; ?>"></td>
  127. <td><?php echo $langs->trans('Fax'); ?></td>
  128. <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
  129. </tr>
  130. <tr>
  131. <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':''); ?></td>
  132. <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
  133. <td><?php echo $langs->trans('Web'); ?></td>
  134. <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
  135. </tr>
  136. <?php
  137. for ($i=1; $i<=4; $i++) {
  138. if ($this->control->tpl['langprofid'.$i]!='-') {
  139. if ($i==1 || $i==3) echo '<tr>';
  140. echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
  141. echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
  142. if ($i==2 || $i==4) echo '</tr>';
  143. } else {
  144. if ($i==1 || $i==3) echo '<tr>';
  145. echo '<td>&nbsp;</td>';
  146. echo '<td>&nbsp;</td>';
  147. if ($i==2 || $i==4) echo '</tr>';
  148. }
  149. }
  150. ?>
  151. <tr>
  152. <td><?php echo $langs->trans('VATIsUsed'); ?></td>
  153. <td><?php echo $this->control->tpl['yn_assujtva']; ?></td>
  154. <td nowrap="nowrap"><?php echo $langs->trans('VATIntra'); ?></td>
  155. <td nowrap="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td>
  156. </tr>
  157. <tr>
  158. <td><?php echo $langs->trans('Capital'); ?></td>
  159. <td colspan="3"><input type="text" name="capital" size="10" value="<?php echo $this->control->tpl['capital']; ?>"> <?php echo $langs->trans("Currency".$conf->currency); ?></td>
  160. </tr>
  161. <tr>
  162. <td><?php echo $langs->trans('JuridicalStatus'); ?></td>
  163. <td colspan="3"><?php echo $this->control->tpl['select_juridicalstatus']; ?></td>
  164. </tr>
  165. <tr>
  166. <td><?php echo $langs->trans("ThirdPartyType"); ?></td>
  167. <td><?php echo $this->control->tpl['select_companytype']; echo $this->control->tpl['info_admin']; ?></td>
  168. <td><?php echo $langs->trans("Staff"); ?></td>
  169. <td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
  170. </tr>
  171. <?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
  172. <tr>
  173. <td><?php echo $langs->trans("DefaultLang"); ?></td>
  174. <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
  175. </tr>
  176. <?php } ?>
  177. <?php if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
  178. </table>
  179. <br>
  180. <div align="center">
  181. <input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
  182. &nbsp; &nbsp;
  183. <input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
  184. </div>
  185. </form>
  186. <!-- END PHP TEMPLATE -->