From 53d13ed12a3fde14ecbf1f798be3b1415a1ee7c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 May 2004 11:27:54 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Corrections=20esth=E9tiques=20mineures?= =?UTF-8?q?=20sur=20les=20onglets=20fiche=20client.=20Fix:=20Correction=20?= =?UTF-8?q?liens=20invalides=20New:=20Ajout=20onglet=20fiche=20compta,=20c?= =?UTF-8?q?onditionn=E9=20par=20activation=20module=20compta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/docsoc.php | 9 +++++ htdocs/soc.php | 62 ++++++++++++++++++--------------- htdocs/societe/notify/fiche.php | 9 +++++ htdocs/socnote.php | 8 +++++ 4 files changed, 60 insertions(+), 28 deletions(-) diff --git a/htdocs/docsoc.php b/htdocs/docsoc.php index 437d082a721..c5d7895959e 100644 --- a/htdocs/docsoc.php +++ b/htdocs/docsoc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -100,9 +101,17 @@ if ($socid > 0) $head[$h][1] = 'Fiche fournisseur'; $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][1] = 'Note'; $h++; + if ($user->societe_id == 0) { $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; diff --git a/htdocs/soc.php b/htdocs/soc.php index 8390052a62d..26930f1f580 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -33,34 +33,34 @@ if ($user->societe_id > 0) $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->nom = $HTTP_POST_VARS["nom"]; - $soc->adresse = $HTTP_POST_VARS["adresse"]; - $soc->cp = $HTTP_POST_VARS["cp"]; - $soc->ville = $HTTP_POST_VARS["ville"]; - $soc->pays_id = $HTTP_POST_VARS["pays_id"]; - $soc->departement_id = $HTTP_POST_VARS["departement_id"]; - $soc->tel = $HTTP_POST_VARS["tel"]; - $soc->fax = $HTTP_POST_VARS["fax"]; - $soc->url = ereg_replace( "http://", "", $HTTP_POST_VARS["url"] ); - $soc->siren = $HTTP_POST_VARS["siren"]; - $soc->siret = $HTTP_POST_VARS["siret"]; - $soc->ape = $HTTP_POST_VARS["ape"]; - $soc->capital = $HTTP_POST_VARS["capital"]; - $soc->tva_intra = $HTTP_POST_VARS["tva_intra_code"] . $HTTP_POST_VARS["tva_intra_num"]; + $soc->nom = $_POST["nom"]; + $soc->adresse = $_POST["adresse"]; + $soc->cp = $_POST["cp"]; + $soc->ville = $_POST["ville"]; + $soc->pays_id = $_POST["pays_id"]; + $soc->departement_id = $_POST["departement_id"]; + $soc->tel = $_POST["tel"]; + $soc->fax = $_POST["fax"]; + $soc->url = ereg_replace( "http://", "", $_POST["url"] ); + $soc->siren = $_POST["siren"]; + $soc->siret = $_POST["siret"]; + $soc->ape = $_POST["ape"]; + $soc->capital = $_POST["capital"]; + $soc->tva_intra = $_POST["tva_intra_code"] . $_POST["tva_intra_num"]; - $soc->forme_juridique_id = $HTTP_POST_VARS["forme_juridique_id"]; - $soc->effectif_id = $HTTP_POST_VARS["effectif_id"]; - $soc->client = $HTTP_POST_VARS["client"]; - $soc->fournisseur = $HTTP_POST_VARS["fournisseur"]; + $soc->forme_juridique_id = $_POST["forme_juridique_id"]; + $soc->effectif_id = $_POST["effectif_id"]; + $soc->client = $_POST["client"]; + $soc->fournisseur = $_POST["fournisseur"]; - if ($HTTP_POST_VARS["action"] == 'update') + if ($_POST["action"] == 'update') { $soc->update($socid); } - if ($HTTP_POST_VARS["action"] == 'add') + if ($_POST["action"] == 'add') { $socid = $soc->create(); } @@ -237,13 +237,13 @@ else $head[0][0] = 'soc.php?socid='.$soc->id; $head[0][1] = "Fiche société"; $h = 1; + if ($soc->client==1) { $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id; $head[$h][1] = 'Fiche client'; $h++; } - if ($soc->client==2) { $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$soc->id; @@ -256,6 +256,13 @@ else $head[$h][1] = 'Fiche fournisseur'; $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][1] = 'Note'; $h++; @@ -278,10 +285,9 @@ else print ''; print ''; - print ''; - + print ""; + print ''; print ''; print '
Nom'.$soc->nom.'
Adresse'.nl2br($soc->adresse).' '; - print '
'.$soc->cp.' '.$soc->ville.'
'.$soc->pays.'
Adresse".nl2br($soc->address)."
".$soc->cp." ".$soc->ville." ".$soc->pays."
Téléphone'.dolibarr_print_phone($soc->tel).'Fax'.dolibarr_print_phone($soc->fax).'
Web'; @@ -309,11 +315,11 @@ else */ print '
'; - print 'Editer'; + print 'Editer'; - print 'Ajouter un contact'; + print 'Ajouter un contact'; - print 'Notifications'; + print 'Notifications'; print '
'; /* * diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index cdc736dde20..9762157a70f 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -74,9 +74,11 @@ $soc = new Societe($db); $soc->id = $socid; if ( $soc->fetch($socid) ) { + $head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$soc->id; $head[0][1] = "Fiche société"; $h = 1; + if ($soc->client==1) { $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'; $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][1] = 'Note'; $h++; diff --git a/htdocs/socnote.php b/htdocs/socnote.php index 156d803b2bc..24011da8b45 100644 --- a/htdocs/socnote.php +++ b/htdocs/socnote.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -61,6 +62,13 @@ if ($socid > 0) { $head[$h][1] = 'Fiche fournisseur'; $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][1] = 'Note'; $a = $h;