recap-client.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. // Load Dolibarr environment
  24. require '../main.inc.php';
  25. require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
  26. require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
  27. // Load translation files required by the page
  28. $langs->load("companies");
  29. if (isModEnabled('facture')) {
  30. $langs->load("bills");
  31. }
  32. // Security check
  33. $socid = GETPOST("socid", 'int');
  34. if ($user->socid > 0) {
  35. $action = '';
  36. $id = $user->socid;
  37. }
  38. $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
  39. /*
  40. * View
  41. */
  42. llxHeader();
  43. if ($socid > 0) {
  44. $societe = new Societe($db);
  45. $societe->fetch($socid);
  46. /*
  47. * Affichage onglets
  48. */
  49. $head = societe_prepare_head($societe);
  50. print dol_get_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company');
  51. print "<table width=\"100%\">\n";
  52. print '<tr><td valign="top" width="50%">';
  53. print '<table class="border centpercent">';
  54. // Name
  55. print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
  56. // Prefix
  57. if (getDolGlobalString('SOCIETE_USEPREFIX')) { // Old not used prefix field
  58. print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
  59. print($societe->prefix_comm ? $societe->prefix_comm : '&nbsp;');
  60. print '</td></tr>';
  61. }
  62. print "</table>";
  63. print "</td></tr></table>\n";
  64. print '</div>';
  65. print $langs->trans("FeatureNotYetAvailable");
  66. } else {
  67. dol_print_error($db);
  68. }
  69. // End of page
  70. llxFooter();
  71. $db->close();