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