From 9d96b45cc7f06ce41b6420ccb0af97f02353ff93 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 28 Jan 2003 17:55:40 +0000 Subject: [PATCH] Gestion du statut lors de la creation --- htdocs/soc.php3 | 20 ++++++++++++++++++-- htdocs/societe.class.php3 | 4 +++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/htdocs/soc.php3 b/htdocs/soc.php3 index 67e60198445..2a4be22de8b 100644 --- a/htdocs/soc.php3 +++ b/htdocs/soc.php3 @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * 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 @@ -41,6 +41,9 @@ if ($action == 'add') $soc->url = $url; $soc->siren = $siren; + $soc->client = $client; + $soc->fournisseur = $fournisseur; + $socid = $soc->create(); } @@ -88,7 +91,13 @@ if ($action == 'create') print 'Siren'; + print 'Client'; + print 'Fournisseur'; print ''; print ''; @@ -153,7 +162,14 @@ elseif ($action == 'edit') print 'Siren'.$soc->siren.' '; print 'Client'.$soc->client.''; - print 'Fournisseur'.$soc->fournisseur.''; + if ($soc->fournisseur) + { + print 'Fournisseur'.$soc->fournisseur.'Fiche'; + } + else + { + print 'Fournisseur'.$soc->fournisseur.''; + } print ''; print "[Editer]"; diff --git a/htdocs/societe.class.php3 b/htdocs/societe.class.php3 index 2b2453b4e1b..f2d0226b8f4 100644 --- a/htdocs/societe.class.php3 +++ b/htdocs/societe.class.php3 @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2003 Rodolphe Quiedeville * * 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 @@ -34,6 +34,8 @@ class Societe { var $siren; var $client; var $note; + var $fournisseur; + Function Societe($DB, $id=0) { global $config;