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");
47$id = 0;
48if ($user->socid > 0) {
49 $action = '';
50 $id = $user->socid;
51}
52$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
53
54
55/*
56 * View
57 */
58
59llxHeader();
60
61if ($socid > 0) {
62 $societe = new Societe($db);
63 $societe->fetch($socid);
64
65 /*
66 * Show tabs
67 */
68 $head = societe_prepare_head($societe);
69
70 print dol_get_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company');
71
72
73 print "<table width=\"100%\">\n";
74 print '<tr><td valign="top" width="50%">';
75
76 print '<table class="border centpercent">';
77
78 // Name
79 print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
80
81 // Prefix
82 if (getDolGlobalString('SOCIETE_USEPREFIX')) { // Old not used prefix field
83 print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
84 print($societe->prefix_comm ? $societe->prefix_comm : '&nbsp;');
85 print '</td></tr>';
86 }
87
88 print "</table>";
89
90 print "</td></tr></table>\n";
91
92 print '</div>';
93
94
95 print $langs->trans("FeatureNotYetAvailable");
96} else {
97 dol_print_error($db);
98}
99
100// End of page
101llxFooter();
102$db->close();
$id
Definition account.php:48
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:87
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.
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.