PageRenderTime 37ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/speedealing/speedealing
PHP | 205 lines | 157 code | 31 blank | 17 comment | 22 complexity | 0855226f69d96e660959369ca670fdcc 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. ?>
  20. <!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP COMPANY -->
  21. <?php echo $this->control->tpl['title']; ?>
  22. <?php echo $this->control->tpl['error']; ?>
  23. <?php if ($conf->use_javascript_ajax) { ?>
  24. <?php echo $this->control->tpl['ajax_selecttype']; ?>
  25. <br>
  26. <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp;
  27. <input type="radio" id="radiocompany" class="flat" name="private" value="0" checked="checked">
  28. <?php echo $langs->trans("Company/Fundation"); ?> &nbsp; &nbsp;
  29. <input type="radio" id="radioprivate" class="flat" name="private" value="1"> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
  30. <br>
  31. <br>
  32. <?php echo $this->control->tpl['ajax_selectcountry']; ?>
  33. <?php } ?>
  34. <?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
  35. <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
  36. <input type="hidden" name="canvas" value="<?php echo $canvas ?>">
  37. <input type="hidden" name="action" value="add">
  38. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
  39. <input type="hidden" name="private" value="<?php echo $this->control->tpl['particulier']; ?>">
  40. <?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
  41. <input type="hidden" name="code_auto" value="1">
  42. <?php } ?>
  43. <table class="border allwidth">
  44. <tr>
  45. <td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
  46. <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
  47. <?php if (! empty($conf->global->SOCIETE_USEPREFIX)) { ?>
  48. <td><?php echo $langs->trans('Prefix'); ?></td>
  49. <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td>
  50. <?php } ?>
  51. </tr>
  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><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="15"></td>
  60. <td><?php echo $this->control->tpl['help_customercode']; ?></td>
  61. </tr>
  62. </table>
  63. </td>
  64. </tr>
  65. <?php if ($this->control->tpl['supplier_enabled']) { ?>
  66. <tr>
  67. <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
  68. <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
  69. <td><?php echo $langs->trans('SupplierCode'); ?></td>
  70. <td>
  71. <table class="nobordernopadding">
  72. <tr>
  73. <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="15"></td>
  74. <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
  75. </tr>
  76. </table>
  77. </td>
  78. </tr>
  79. <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
  80. <tr>
  81. <td><?php echo $langs->trans('SupplierCategory'); ?></td>
  82. <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
  83. </tr>
  84. <?php } }?>
  85. <?php if (! empty($conf->barcode->enabled)) { ?>
  86. <tr>
  87. <td><?php echo $langs->trans('Gencod'); ?></td>
  88. <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
  89. </tr>
  90. <?php } ?>
  91. <tr>
  92. <td valign="top"><?php echo $langs->trans('Address'); ?></td>
  93. <td colspan="3"><textarea name="adresse" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
  94. </tr>
  95. <tr>
  96. <td><?php echo $langs->trans('Zip'); ?></td>
  97. <td><?php echo $this->control->tpl['select_zip']; ?></td>
  98. <td><?php echo $langs->trans('Town'); ?></td>
  99. <td><?php echo $this->control->tpl['select_town']; ?></td>
  100. </tr>
  101. <tr>
  102. <td width="25%"><?php echo $langs->trans('Country'); ?></td>
  103. <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
  104. </tr>
  105. <tr>
  106. <td><?php echo $langs->trans('State'); ?></td>
  107. <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
  108. </tr>
  109. <tr>
  110. <td><?php echo $langs->trans('Phone'); ?></td>
  111. <td><input type="text" name="tel" value="<?php echo $this->control->tpl['tel']; ?>"></td>
  112. <td><?php echo $langs->trans('Fax'); ?></td>
  113. <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
  114. </tr>
  115. <tr>
  116. <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':''); ?></td>
  117. <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
  118. <td><?php echo $langs->trans('Web'); ?></td>
  119. <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
  120. </tr>
  121. <tr>
  122. <td><?php echo $langs->trans('Capital'); ?></td>
  123. <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>
  124. </tr>
  125. <?php
  126. for ($i=1; $i<=4; $i++) {
  127. if ($this->control->tpl['langprofid'.$i]!='-') {
  128. if ($i==1 || $i==3) echo '<tr>';
  129. echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
  130. echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
  131. if ($i==2 || $i==4) echo '</tr>';
  132. } else {
  133. if ($i==1 || $i==3) echo '<tr>';
  134. echo '<td>&nbsp;</td>';
  135. echo '<td>&nbsp;</td>';
  136. if ($i==2 || $i==4) echo '</tr>';
  137. }
  138. }
  139. ?>
  140. <tr>
  141. <td><?php echo $langs->trans('JuridicalStatus'); ?></td>
  142. <td colspan="3"><?php echo $this->control->tpl['select_juridicalstatus']; ?></td>
  143. </tr>
  144. <tr>
  145. <td><?php echo $langs->trans("ThirdPartyType"); ?></td>
  146. <td><?php echo $this->control->tpl['select_companytype']; echo $this->control->tpl['info_admin']; ?></td>
  147. <td><?php echo $langs->trans("Staff"); ?></td>
  148. <td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
  149. </tr>
  150. <?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
  151. <tr>
  152. <td><?php echo $langs->trans("DefaultLang"); ?></td>
  153. <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
  154. </tr>
  155. <?php } ?>
  156. <tr>
  157. <td><?php echo $langs->trans('VATIsUsed'); ?></td>
  158. <td><?php echo $this->control->tpl['yn_assujtva']; ?></td>
  159. <td nowrap="nowrap"><?php echo $langs->trans('VATIntra'); ?></td>
  160. <td nowrap="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td>
  161. </tr>
  162. <?php if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
  163. <?php if ($user->rights->societe->client->voir) { ?>
  164. <tr>
  165. <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
  166. <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
  167. </tr>
  168. <?php } ?>
  169. <tr>
  170. <td colspan="4" align="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
  171. </tr>
  172. </table>
  173. </form>
  174. <!-- END PHP TEMPLATE -->