From 4f69253b24896574d54800474ef1131c0be8afcd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Jun 2004 17:34:33 +0000 Subject: [PATCH] =?UTF-8?q?Gestion=20des=20formes=20juridiques=20pour=20to?= =?UTF-8?q?us=20les=20pays=20actifs=20dans=20la=20liste=20d=E9roulante=20d?= =?UTF-8?q?es=20formes=20juridiques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/fiche.php | 8 +++--- htdocs/compta/fiche.php | 27 ++++++++++-------- htdocs/html.form.class.php | 57 ++++++++++++++++++++++++++++++++++++-- htdocs/soc.php | 24 ++++++++++------ htdocs/societe.class.php | 3 ++ 5 files changed, 92 insertions(+), 27 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index f582c6c9048..dab72713639 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -453,7 +453,7 @@ if ($socid > 0) * */ print ''; - print ''; + print ''; print ''; print '
Actions à faire [Nouvelle action]
Actions à faire Nouvelle action
'; @@ -531,7 +531,7 @@ if ($socid > 0) * Listes des actions effectuees * */ - print ''; + print '
'; print ''; print ''; print ''; + print ''; } else { - print ''; + print ''; } /* * Contact pour cette action diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 651bad43c9c..80a7dbe8f60 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -415,20 +415,18 @@ if ($socid > 0) $i++; $tag = !$tag; } - print "
Actions effectuées
'; @@ -585,11 +585,11 @@ if ($socid > 0) if ($obj->propalrowid) { - print ''.$obj->libelle.''.$obj->libelle.''.$obj->libelle.''.$obj->libelle.'
"; + print "

"; - print "\n
\n"; /* + * + * Listes des actions effectuées * */ print ''; + print ''; print ''; print ''; - if ($obj->propalrowid) { - print ''; - } else { - print ''; - } + if ($obj->propalrowid) + { + print ''; + } + else + { + print ''; + } + /* * Contact pour cette action * @@ -494,6 +496,7 @@ if ($socid > 0) print $db->error(); } print "
Actions effectuées
'; - /* - * - * Listes des actions - * - */ + $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; $sql .= " WHERE a.fk_soc = $objsoc->idp "; @@ -465,11 +463,15 @@ if ($socid > 0) print ' '.$obj->libelle.''.$obj->libelle.''.$obj->libelle.''.$obj->libelle.'
"; + /* * * Notes sur la societe diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 0af58872457..48c46d169cb 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -38,7 +38,7 @@ class Form { * avec un affichage avec rupture sur le pays * */ - Function select_departement($selected='', $addnsp=0) + Function select_departement($selected='') { print ''; @@ -121,6 +121,59 @@ class Form { print ''; } + /* + * Retourne la liste déroulante des formes juridiques + * avec un affichage avec rupture sur le pays + * + */ + Function select_forme_juridique($selected='') + { + print ''; + } + /* * * diff --git a/htdocs/soc.php b/htdocs/soc.php index 791eb2adc25..091c146399a 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -75,6 +75,9 @@ $form = new Form($db); if ($action == 'create') { + /* + * Fiche societe en mode création + */ $soc = new Societe($db); print '
Nouvelle société (prospect, client, fournisseur)

'; print '
'; @@ -88,7 +91,7 @@ if ($action == 'create') print 'Ville '; print 'Département'; - print $form->select_departement(0); + print $form->select_departement($soc->departement_id); print ''; print 'Pays'; @@ -108,7 +111,7 @@ if ($action == 'create') print 'Capital '.MAIN_MONNAIE.''; print 'Forme juridique'; - print $form->select_array("forme_juridique_id",$soc->forme_juridique_array(), $soc->forme_juridique, 0, 1); + print $form->select_forme_juridique($soc->forme_juridique_id); print ''; print 'Effectif'; @@ -123,7 +126,7 @@ if ($action == 'create') print ''; print 'Prospect / Client'; @@ -138,6 +141,10 @@ if ($action == 'create') } elseif ($action == 'edit') { + /* + * Fiche societe en mode edition + */ + print_titre("Edition de la société"); if ($socid) @@ -177,12 +184,11 @@ elseif ($action == 'edit') print 'Forme juridique'; - $html = new Form($db); - print $html->select_array("forme_juridique_id",$soc->forme_juridique_array(), $soc->forme_juridique_id,0,1); + print $form->select_forme_juridique($soc->forme_juridique_id); print ''; print 'Effectif'; - print $html->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id); + print $form->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id); print ''; print 'Numéro de TVA Intracommunautaire'; @@ -195,21 +201,21 @@ elseif ($action == 'edit') print 'Prospect / Client'; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index d365767636c..2bfac8b15bb 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -31,10 +31,13 @@ class Societe { var $adresse; var $cp; var $ville; + var $departement_id; + var $pays_id; var $tel; var $fax; var $url; var $siren; + var $forme_juridique_id; var $client; var $note; var $fournisseur;