157 lines
3.9 KiB
PHP
157 lines
3.9 KiB
PHP
<?php
|
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* $Id$
|
|
* $Source$
|
|
*/
|
|
|
|
/**
|
|
\file htdocs/comm/recap-client.php
|
|
\ingroup societe
|
|
\brief Page de fiche recap client
|
|
\version $Revision$
|
|
*/
|
|
|
|
require("./pre.inc.php");
|
|
include_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
|
|
|
$langs->load("companies");
|
|
if ($conf->facture->enabled) $langs->load("bills");
|
|
|
|
// Sécurité accés client
|
|
$socid = $_GET["socid"];
|
|
if ($user->societe_id > 0)
|
|
{
|
|
$action = '';
|
|
$socid = $user->societe_id;
|
|
}
|
|
|
|
$user->getrights('facture');
|
|
|
|
|
|
|
|
/*
|
|
*
|
|
* Mode fiche
|
|
*
|
|
*/
|
|
|
|
llxHeader();
|
|
|
|
if ($socid > 0)
|
|
{
|
|
$societe = new Societe($db);
|
|
$societe->fetch($socid, $to); // si $to='next' ajouter " AND s.idp > $socid ORDER BY idp ASC LIMIT 1";
|
|
|
|
/*
|
|
* Affichage onglets
|
|
*/
|
|
$h = 0;
|
|
|
|
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Company");
|
|
$h++;
|
|
|
|
if ($societe->client==1)
|
|
{
|
|
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Customer");
|
|
$hselected=$h;
|
|
$h++;
|
|
}
|
|
if ($societe->client==2)
|
|
{
|
|
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Prospect");
|
|
$h++;
|
|
}
|
|
if ($societe->fournisseur)
|
|
{
|
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Supplier");
|
|
$h++;
|
|
}
|
|
|
|
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
|
|
{
|
|
$langs->load("compta");
|
|
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Accountancy");
|
|
$h++;
|
|
}
|
|
|
|
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Note");
|
|
$h++;
|
|
|
|
if ($user->societe_id == 0)
|
|
{
|
|
$head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Documents");
|
|
$h++;
|
|
}
|
|
|
|
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id;
|
|
$head[$h][1] = $langs->trans("Notifications");
|
|
$h++;
|
|
|
|
if ($user->societe_id == 0)
|
|
{
|
|
$head[$h][0] = DOL_URL_ROOT."/index.php?socidp=$societe->id&action=add_bookmark";
|
|
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
|
|
$head[$h][2] = 'image';
|
|
}
|
|
|
|
dolibarr_fiche_head($head, $hselected, $societe->nom);
|
|
|
|
/*
|
|
*
|
|
*/
|
|
print "<table width=\"100%\">\n";
|
|
print '<tr><td valign="top" width="50%">';
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
// Nom
|
|
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
|
|
|
// Prefix
|
|
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
|
print ($societe->prefix_comm?$societe->prefix_comm:' ');
|
|
print '</td></tr>';
|
|
|
|
print "</table>";
|
|
|
|
print "</td></tr></table>\n";
|
|
|
|
print '</div>';
|
|
|
|
|
|
print $langs->trans("FeatureNotYetAvailable");
|
|
}
|
|
else
|
|
{
|
|
dolibarr_print_error($db);
|
|
}
|
|
|
|
|
|
$db->close();
|
|
|
|
llxFooter('$Date$ - $Revision$');
|
|
?>
|