recap-client.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2010 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 <https://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file htdocs/comm/recap-client.php
  20. * \ingroup societe
  21. * \brief Page de fiche recap client
  22. */
  23. require '../main.inc.php';
  24. require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
  25. require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
  26. // Load translation files required by the page
  27. $langs->load("companies");
  28. if (isModEnabled('facture')) {
  29. $langs->load("bills");
  30. }
  31. // Security check
  32. $socid = GETPOST("socid", 'int');
  33. if ($user->socid > 0) {
  34. $action = '';
  35. $id = $user->socid;
  36. }
  37. $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
  38. /*
  39. * View
  40. */
  41. llxHeader();
  42. if ($socid > 0) {
  43. $societe = new Societe($db);
  44. $societe->fetch($socid);
  45. /*
  46. * Affichage onglets
  47. */
  48. $head = societe_prepare_head($societe);
  49. print dol_get_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company');
  50. print "<table width=\"100%\">\n";
  51. print '<tr><td valign="top" width="50%">';
  52. print '<table class="border centpercent">';
  53. // Name
  54. print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
  55. // Prefix
  56. if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field
  57. print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
  58. print ($societe->prefix_comm ? $societe->prefix_comm : '&nbsp;');
  59. print '</td></tr>';
  60. }
  61. print "</table>";
  62. print "</td></tr></table>\n";
  63. print '</div>';
  64. print $langs->trans("FeatureNotYetAvailable");
  65. } else {
  66. dol_print_error($db);
  67. }
  68. // End of page
  69. llxFooter();
  70. $db->close();