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

/htdocs/societe/canvas/individual/tpl/card_view.tpl.php

https://bitbucket.org/speedealing/speedealing
PHP | 228 lines | 167 code | 39 blank | 22 comment | 19 complexity | 8dc9330a802ee1e50cf2cdb756165908 MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, GPL-3.0, MIT
  1. <?php
  2. /* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. */
  18. $object = $GLOBALS['objcanvas']->control->object;
  19. ?>
  20. <!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP INDIVIDUAL -->
  21. <?php
  22. $head = societe_prepare_head($object);
  23. dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
  24. ?>
  25. <?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
  26. <?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
  27. <table class="border allwidth">
  28. <tr>
  29. <td width="20%"><?php echo $langs->trans('Name'); ?></td>
  30. <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
  31. </tr>
  32. <?php if (! empty($conf->global->SOCIETE_USEPREFIX)) { ?>
  33. <tr>
  34. <td><?php echo $langs->trans('Prefix'); ?></td>
  35. <td colspan="3"><?php echo $this->control->tpl['prefix_comm']; ?></td>
  36. </tr>
  37. <?php } ?>
  38. <?php if ($this->control->tpl['client']) { ?>
  39. <tr>
  40. <td><?php echo $langs->trans('CustomerCode'); ?></td>
  41. <td colspan="3"><?php echo $this->control->tpl['code_client']; ?>
  42. <?php if ($this->control->tpl['checkcustomercode'] <> 0) { ?>
  43. <font class="error">(<?php echo $langs->trans("WrongCustomerCode"); ?>)</font>
  44. <?php } ?>
  45. </td>
  46. </tr>
  47. <?php } ?>
  48. <?php if ($this->control->tpl['fournisseur']) { ?>
  49. <tr>
  50. <td><?php echo $langs->trans('SupplierCode'); ?></td>
  51. <td colspan="3"><?php echo $this->control->tpl['code_fournisseur']; ?>
  52. <?php if ($this->control->tpl['checksuppliercode'] <> 0) { ?>
  53. <font class="error">(<?php echo $langs->trans("WrongSupplierCode"); ?>)</font>
  54. <?php } ?>
  55. </td>
  56. </tr>
  57. <?php } ?>
  58. <?php if (! empty($conf->barcode->enabled)) { ?>
  59. <tr>
  60. <td><?php echo $langs->trans('Gencod'); ?></td>
  61. <td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td>
  62. </tr>
  63. <?php } ?>
  64. <tr>
  65. <td valign="top"><?php echo $langs->trans('Address'); ?></td>
  66. <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
  67. </tr>
  68. <tr>
  69. <td width="25%"><?php echo $langs->trans('Zip'); ?></td>
  70. <td width="25%"><?php echo $this->control->tpl['cp']; ?></td>
  71. <td width="25%"><?php echo $langs->trans('Town'); ?></td>
  72. <td width="25%"><?php echo $this->control->tpl['ville']; ?></td>
  73. </tr>
  74. <tr>
  75. <td><?php echo $langs->trans("Country"); ?></td>
  76. <td colspan="3" nowrap="nowrap"><?php echo $this->control->tpl['country']; ?></td>
  77. </tr>
  78. <tr>
  79. <td><?php echo $langs->trans('State'); ?></td>
  80. <td colspan="3"><?php echo $this->control->tpl['departement']; ?></td>
  81. </tr>
  82. <tr>
  83. <td><?php echo $langs->trans('Phone'); ?></td>
  84. <td><?php echo $this->control->tpl['phone']; ?></td>
  85. <td><?php echo $langs->trans('Fax'); ?></td>
  86. <td><?php echo $this->control->tpl['fax']; ?></td>
  87. </tr>
  88. <tr>
  89. <td><?php echo $langs->trans('EMail'); ?></td>
  90. <td><?php echo $this->control->tpl['email'];; ?></td>
  91. <td><?php echo $langs->trans('Web'); ?></td>
  92. <td><?php echo $this->control->tpl['url']; ?></td>
  93. </tr>
  94. <tr>
  95. <td><?php echo $langs->trans('VATIsUsed'); ?></td>
  96. <td colspan="3"><?php echo $this->control->tpl['tva_assuj']; ?></td>
  97. </tr>
  98. <?php if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
  99. <tr>
  100. <td><?php echo $langs->trans("Type"); ?></td>
  101. <td colspan="3"><?php echo $this->control->tpl['typent']; ?></td>
  102. </tr>
  103. <?php if (! empty($conf->global->MAIN_MULTILANGS)) { ?>
  104. <tr>
  105. <td><?php echo $langs->trans("DefaultLang"); ?></td>
  106. <td colspan="3"><?php echo $this->control->tpl['default_lang']; ?></td>
  107. </tr>
  108. <?php } ?>
  109. <tr>
  110. <td>
  111. <table class="nobordernopadding allwidth">
  112. <tr>
  113. <td><?php echo $langs->trans('RIB'); ?></td>
  114. <td align="right">
  115. <?php if ($user->rights->societe->creer) { ?>
  116. <a href="<?php echo DOL_URL_ROOT.'/societe/rib.php?socid='.$this->control->tpl['id']; ?>"><?php echo $this->control->tpl['image_edit']; ?></a>
  117. <?php } else { ?>
  118. &nbsp;
  119. <?php } ?>
  120. </td>
  121. </tr>
  122. </table>
  123. </td>
  124. <td colspan="3"><?php echo $this->control->tpl['display_rib']; ?></td>
  125. </tr>
  126. <tr>
  127. <td>
  128. <table class="nobordernopadding allwidth">
  129. <tr>
  130. <td><?php echo $langs->trans('SalesRepresentatives'); ?></td>
  131. <td align="right">
  132. <?php if ($user->rights->societe->creer) { ?>
  133. <a href="<?php echo DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$this->control->tpl['id']; ?>"><?php echo $this->control->tpl['image_edit']; ?></a>
  134. <?php } else { ?>
  135. &nbsp;
  136. <?php } ?>
  137. </td>
  138. </tr>
  139. </table>
  140. </td>
  141. <td colspan="3"><?php echo $this->control->tpl['sales_representatives']; ?></td>
  142. </tr>
  143. <?php if (! empty($conf->adherent->enabled)) { ?>
  144. <tr>
  145. <td width="25%" valign="top"><?php echo $langs->trans("LinkedToSpeedealingMember"); ?></td>
  146. <td colspan="3"><?php echo $this->control->tpl['linked_member']; ?></td>
  147. </tr>
  148. <?php } ?>
  149. </table>
  150. <?php dol_fiche_end(); ?>
  151. <div class="tabsAction">
  152. <?php if ($user->rights->societe->creer) { ?>
  153. <a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&amp;action=edit&amp;canvas='.$canvas; ?>"><?php echo $langs->trans("Modify"); ?></a>
  154. <?php } ?>
  155. <?php if ($user->rights->societe->supprimer) { ?>
  156. <?php if ($conf->use_javascript_ajax) { ?>
  157. <span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
  158. <?php } else { ?>
  159. <a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&amp;action=delete&amp;canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
  160. <?php } ?>
  161. <?php } ?>
  162. </div>
  163. <br>
  164. <table class="allwidth"><tr><td valign="top" width="50%">
  165. <div id="builddoc"></div>
  166. <?php
  167. /*
  168. * Documents generes
  169. */
  170. $filedir=$conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid;
  171. $urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
  172. $genallowed=$user->rights->societe->creer;
  173. $delallowed=$user->rights->societe->supprimer;
  174. $somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
  175. ?>
  176. </td>
  177. <td></td>
  178. </tr>
  179. </table>
  180. <br>
  181. <?php
  182. // Subsidiaries list
  183. $result=show_subsidiaries($conf,$langs,$db,$object);
  184. // Contacts list
  185. $result=show_contacts($conf,$langs,$db,$object);
  186. // Projects list
  187. $result=show_projects($conf,$langs,$db,$object);
  188. ?>
  189. <!-- END PHP TEMPLATE -->