recap-client.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 <http://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 (! empty($conf->facture->enabled)) $langs->load("bills");
  29. // Security check
  30. $socid = $_GET["socid"];
  31. if ($user->societe_id > 0)
  32. {
  33. $action = '';
  34. $socid = $user->societe_id;
  35. }
  36. /*
  37. * View
  38. */
  39. llxHeader();
  40. if ($socid > 0)
  41. {
  42. $societe = new Societe($db);
  43. $societe->fetch($socid);
  44. /*
  45. * Affichage onglets
  46. */
  47. $head = societe_prepare_head($societe);
  48. dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company');
  49. print "<table width=\"100%\">\n";
  50. print '<tr><td valign="top" width="50%">';
  51. print '<table class="border" width="100%">';
  52. // Name
  53. print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
  54. // Prefix
  55. if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
  56. {
  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. }
  66. else
  67. {
  68. dol_print_error($db);
  69. }
  70. // End of page
  71. llxFooter();
  72. $db->close();