dolibarr  16.0.5
recap-client.php
Go to the documentation of this file.
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 
25 require '../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
27 require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
28 
29 // Load translation files required by the page
30 $langs->load("companies");
31 if (isModEnabled('facture')) {
32  $langs->load("bills");
33 }
34 
35 // Security check
36 $socid = GETPOST("socid", 'int');
37 if ($user->socid > 0) {
38  $action = '';
39  $id = $user->socid;
40 }
41 $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
42 
43 
44 /*
45  * View
46  */
47 
48 llxHeader();
49 
50 if ($socid > 0) {
51  $societe = new Societe($db);
52  $societe->fetch($socid);
53 
54  /*
55  * Affichage onglets
56  */
57  $head = societe_prepare_head($societe);
58 
59  print dol_get_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company');
60 
61 
62  print "<table width=\"100%\">\n";
63  print '<tr><td valign="top" width="50%">';
64 
65  print '<table class="border centpercent">';
66 
67  // Name
68  print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
69 
70  // Prefix
71  if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field
72  print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
73  print ($societe->prefix_comm ? $societe->prefix_comm : '&nbsp;');
74  print '</td></tr>';
75  }
76 
77  print "</table>";
78 
79  print "</td></tr></table>\n";
80 
81  print '</div>';
82 
83 
84  print $langs->trans("FeatureNotYetAvailable");
85 } else {
86  dol_print_error($db);
87 }
88 
89 // End of page
90 llxFooter();
91 $db->close();
Societe
Class to manage third parties objects (customers, suppliers, prospects...)
Definition: societe.class.php:48
restrictedArea
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
Definition: security.lib.php:234
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
societe_prepare_head
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
Definition: company.lib.php:42
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:105
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59