Qual: Mutualisation code redondant
This commit is contained in:
parent
8f906b9362
commit
0c1912448f
@ -31,7 +31,6 @@
|
||||
|
||||
require_once("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
if ($conf->facture->enabled) require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
||||
@ -46,7 +45,7 @@ if ($conf->fichinter->enabled) $langs->load("interventions");
|
||||
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
|
||||
// S<EFBFBD>curit<EFBFBD> d'acc<63>s client et commerciaux
|
||||
// Securite d'acces client et commerciaux
|
||||
$socid = restrictedArea($user, 'societe', $socid);
|
||||
|
||||
$sortorder=$_GET["sortorder"];
|
||||
@ -129,7 +128,6 @@ if ($mode == 'search') {
|
||||
|
||||
llxHeader('',$langs->trans('CustomerCard'));
|
||||
|
||||
$actionstatic=new ActionComm($db);
|
||||
$facturestatic=new Facture($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 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
|
||||
@ -29,7 +29,6 @@
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
@ -101,7 +100,6 @@ if ($mode == 'search')
|
||||
|
||||
llxHeader();
|
||||
|
||||
$actionstatic=new ActionComm($db);
|
||||
$facturestatic=new Facture($db);
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 <EFBFBD>ric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2008 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
|
||||
@ -18,20 +18,17 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/fourn/fiche.php
|
||||
\ingroup fournisseur, facture
|
||||
\brief Page de fiche fournisseur
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require('./pre.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
|
||||
$user->getrights();
|
||||
|
||||
@ -42,7 +39,7 @@ $langs->load('orders');
|
||||
$langs->load('companies');
|
||||
$langs->load('commercial');
|
||||
|
||||
// S<EFBFBD>curit<EFBFBD> acc<63>s client
|
||||
// Securite acces client
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
@ -75,7 +72,6 @@ if (!$user->rights->commercial->client->voir && $socid && !$user->societe_id > 0
|
||||
* Mode fiche
|
||||
*/
|
||||
$societe = new Fournisseur($db);
|
||||
$actionstatic = new ActionComm($db);
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
if ( $societe->fetch($socid) )
|
||||
|
||||
@ -130,9 +130,15 @@ function societe_prepare_head($objsoc)
|
||||
|
||||
function show_actions_todo($conf,$langs,$db,$objsoc)
|
||||
{
|
||||
global $bc;
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
print_titre($langs->trans("ActionsOnCompany"));
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
$actionstatic=new ActionComm($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
print_titre($langs->trans("ActionsOnCompany"));
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -250,9 +256,15 @@ function show_actions_todo($conf,$langs,$db,$objsoc)
|
||||
|
||||
function show_actions_done($conf,$langs,$db,$objsoc)
|
||||
{
|
||||
global $bc;
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
$actionstatic=new ActionComm($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="12"><a href="'.DOL_URL_ROOT.'/comm/action/index.php?socid='.$objsoc->id.'&status=done">'.$langs->trans("ActionsDoneShort").'</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user