Look: Corrections esthétiques mineures sur les onglets fiche client.

Fix: Correction liens invalides
New: Ajout onglet fiche compta, conditionné par activation module compta
This commit is contained in:
Laurent Destailleur 2004-05-20 11:27:54 +00:00
parent 50e6ee565f
commit 53d13ed12a
4 changed files with 60 additions and 28 deletions

View File

@ -1,5 +1,6 @@
<?PHP <?PHP
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -100,9 +101,17 @@ if ($socid > 0)
$head[$h][1] = 'Fiche fournisseur'; $head[$h][1] = 'Fiche fournisseur';
$h++; $h++;
} }
if ($conf->compta->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
$head[$h][1] = 'Fiche compta';
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id;
$head[$h][1] = 'Note'; $head[$h][1] = 'Note';
$h++; $h++;
if ($user->societe_id == 0) if ($user->societe_id == 0)
{ {
$head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id;

View File

@ -33,34 +33,34 @@ if ($user->societe_id > 0)
$socid = $user->societe_id; $socid = $user->societe_id;
} }
if ($HTTP_POST_VARS["action"] == 'add' or $HTTP_POST_VARS["action"] == 'update') if ($_POST["action"] == 'add' or $_POST["action"] == 'update')
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->nom = $HTTP_POST_VARS["nom"]; $soc->nom = $_POST["nom"];
$soc->adresse = $HTTP_POST_VARS["adresse"]; $soc->adresse = $_POST["adresse"];
$soc->cp = $HTTP_POST_VARS["cp"]; $soc->cp = $_POST["cp"];
$soc->ville = $HTTP_POST_VARS["ville"]; $soc->ville = $_POST["ville"];
$soc->pays_id = $HTTP_POST_VARS["pays_id"]; $soc->pays_id = $_POST["pays_id"];
$soc->departement_id = $HTTP_POST_VARS["departement_id"]; $soc->departement_id = $_POST["departement_id"];
$soc->tel = $HTTP_POST_VARS["tel"]; $soc->tel = $_POST["tel"];
$soc->fax = $HTTP_POST_VARS["fax"]; $soc->fax = $_POST["fax"];
$soc->url = ereg_replace( "http://", "", $HTTP_POST_VARS["url"] ); $soc->url = ereg_replace( "http://", "", $_POST["url"] );
$soc->siren = $HTTP_POST_VARS["siren"]; $soc->siren = $_POST["siren"];
$soc->siret = $HTTP_POST_VARS["siret"]; $soc->siret = $_POST["siret"];
$soc->ape = $HTTP_POST_VARS["ape"]; $soc->ape = $_POST["ape"];
$soc->capital = $HTTP_POST_VARS["capital"]; $soc->capital = $_POST["capital"];
$soc->tva_intra = $HTTP_POST_VARS["tva_intra_code"] . $HTTP_POST_VARS["tva_intra_num"]; $soc->tva_intra = $_POST["tva_intra_code"] . $_POST["tva_intra_num"];
$soc->forme_juridique_id = $HTTP_POST_VARS["forme_juridique_id"]; $soc->forme_juridique_id = $_POST["forme_juridique_id"];
$soc->effectif_id = $HTTP_POST_VARS["effectif_id"]; $soc->effectif_id = $_POST["effectif_id"];
$soc->client = $HTTP_POST_VARS["client"]; $soc->client = $_POST["client"];
$soc->fournisseur = $HTTP_POST_VARS["fournisseur"]; $soc->fournisseur = $_POST["fournisseur"];
if ($HTTP_POST_VARS["action"] == 'update') if ($_POST["action"] == 'update')
{ {
$soc->update($socid); $soc->update($socid);
} }
if ($HTTP_POST_VARS["action"] == 'add') if ($_POST["action"] == 'add')
{ {
$socid = $soc->create(); $socid = $soc->create();
} }
@ -237,13 +237,13 @@ else
$head[0][0] = 'soc.php?socid='.$soc->id; $head[0][0] = 'soc.php?socid='.$soc->id;
$head[0][1] = "Fiche société"; $head[0][1] = "Fiche société";
$h = 1; $h = 1;
if ($soc->client==1) if ($soc->client==1)
{ {
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id; $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id;
$head[$h][1] = 'Fiche client'; $head[$h][1] = 'Fiche client';
$h++; $h++;
} }
if ($soc->client==2) if ($soc->client==2)
{ {
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$soc->id; $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$soc->id;
@ -256,6 +256,13 @@ else
$head[$h][1] = 'Fiche fournisseur'; $head[$h][1] = 'Fiche fournisseur';
$h++; $h++;
} }
if ($conf->compta->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id;
$head[$h][1] = 'Fiche compta';
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$soc->id; $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$soc->id;
$head[$h][1] = 'Note'; $head[$h][1] = 'Note';
$h++; $h++;
@ -278,9 +285,8 @@ else
print '<table class="border" cellpadding="3" cellspacing="0" width="100%">'; print '<table class="border" cellpadding="3" cellspacing="0" width="100%">';
print '<tr><td width="20%">Nom</td><td width="80%" colspan="3">'.$soc->nom.'</td></tr>'; print '<tr><td width="20%">Nom</td><td width="80%" colspan="3">'.$soc->nom.'</td></tr>';
print '<tr><td valign="top">Adresse</td><td colspan="3">'.nl2br($soc->adresse).'&nbsp;';
print '<br>'.$soc->cp.'&nbsp;'.$soc->ville.'<br>'.$soc->pays.'</td></tr>';
print "<tr><td valign=\"top\">Adresse</td><td colspan=\"3\">".nl2br($soc->address)."<br>".$soc->cp." ".$soc->ville." ".$soc->pays."</td></tr>";
print '<tr><td>Téléphone</td><td>'.dolibarr_print_phone($soc->tel).'</td>'; print '<tr><td>Téléphone</td><td>'.dolibarr_print_phone($soc->tel).'</td>';
print '<td>Fax</td><td>'.dolibarr_print_phone($soc->fax).'</td></tr>'; print '<td>Fax</td><td>'.dolibarr_print_phone($soc->fax).'</td></tr>';
@ -309,11 +315,11 @@ else
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
print '<a class="tabAction" href="soc.php?socid='.$socid.'&action=edit">Editer</a>'; print '<a class="tabAction" href="'.DOL_URL_ROOT.'/soc.php?socid='.$socid.'&action=edit">Editer</a>';
print '<a class="tabAction" href="./contact/fiche.php?socid='.$socid.'&amp;action=create">Ajouter un contact</a>'; print '<a class="tabAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid.'&amp;action=create">Ajouter un contact</a>';
print '<a class="tabAction" href="societe/notify/fiche.php?socid='.$socid.'">Notifications</a>'; print '<a class="tabAction" href="'.DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$socid.'">Notifications</a>';
print '</div>'; print '</div>';
/* /*
* *

View File

@ -74,9 +74,11 @@ $soc = new Societe($db);
$soc->id = $socid; $soc->id = $socid;
if ( $soc->fetch($socid) ) if ( $soc->fetch($socid) )
{ {
$head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$soc->id; $head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$soc->id;
$head[0][1] = "Fiche société"; $head[0][1] = "Fiche société";
$h = 1; $h = 1;
if ($soc->client==1) if ($soc->client==1)
{ {
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id; $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id;
@ -96,6 +98,13 @@ if ( $soc->fetch($socid) )
$head[$h][1] = 'Fiche fournisseur'; $head[$h][1] = 'Fiche fournisseur';
$h++; $h++;
} }
if ($conf->compta->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id;
$head[$h][1] = 'Fiche compta';
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$soc->id; $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$soc->id;
$head[$h][1] = 'Note'; $head[$h][1] = 'Note';
$h++; $h++;

View File

@ -1,5 +1,6 @@
<?PHP <?PHP
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -61,6 +62,13 @@ if ($socid > 0) {
$head[$h][1] = 'Fiche fournisseur'; $head[$h][1] = 'Fiche fournisseur';
$h++; $h++;
} }
if ($conf->compta->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
$head[$h][1] = 'Fiche compta';
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id;
$head[$h][1] = 'Note'; $head[$h][1] = 'Note';
$a = $h; $a = $h;