dolibarr 21.0.0-beta
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 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
30
39// Load translation files required by the page
40$langs->load("companies");
41if (isModEnabled('invoice')) {
42 $langs->load("bills");
43}
44
45// Security check
46$socid = GETPOSTINT("socid");
47if ($user->socid > 0) {
48 $action = '';
49 $id = $user->socid;
50}
51$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
52
53
54/*
55 * View
56 */
57
58llxHeader();
59
60if ($socid > 0) {
61 $societe = new Societe($db);
62 $societe->fetch($socid);
63
64 /*
65 * Show tabs
66 */
67 $head = societe_prepare_head($societe);
68
69 print dol_get_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company');
70
71
72 print "<table width=\"100%\">\n";
73 print '<tr><td valign="top" width="50%">';
74
75 print '<table class="border centpercent">';
76
77 // Name
78 print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
79
80 // Prefix
81 if (getDolGlobalString('SOCIETE_USEPREFIX')) { // Old not used prefix field
82 print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
83 print($societe->prefix_comm ? $societe->prefix_comm : '&nbsp;');
84 print '</td></tr>';
85 }
86
87 print "</table>";
88
89 print "</td></tr></table>\n";
90
91 print '</div>';
92
93
94 print $langs->trans("FeatureNotYetAvailable");
95} else {
96 dol_print_error($db);
97}
98
99// End of page
100llxFooter();
101$db->close();
$id
Definition account.php:48
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
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.
llxFooter()
Footer empty.
Definition document.php:107
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 a 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.