Skip to content
Snippets Groups Projects
Commit 0c191244 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Qual: Mutualisation code redondant

parent 8f906b93
No related branches found
No related tags found
No related merge requests found
......@@ -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"]:'';
// Scurit d'accs 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);
......
<?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);
......
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 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');
// Scurit accs 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.'&amp;status=done">'.$langs->trans("ActionsDoneShort").'</a></td>';
print '</tr>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment