From 338f3e4f7eb3d60133860bfef2d17b580276eb6d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 29 Jun 2003 10:21:10 +0000 Subject: [PATCH] =?UTF-8?q?Nouvelle=20m=E9thode=20d'ajout=20aux=20propales?= =?UTF-8?q?=20plus=20efficaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php3 | 62 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/htdocs/product/fiche.php3 b/htdocs/product/fiche.php3 index 46f01e4d7c9..434f286f5b3 100644 --- a/htdocs/product/fiche.php3 +++ b/htdocs/product/fiche.php3 @@ -183,17 +183,73 @@ if ($id && $action == '') $htmls = new Form($db); $propal = New Propal($db); + print '
'; + + $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price - p.remise as price, p.ref,".$db->pdate("p.datep")." as dp"; + $sql .= " FROM llx_societe as s, llx_propal as p"; + $sql .=" WHERE p.fk_soc = s.idp AND p.fk_statut = 0"; + $sql .= " ORDER BY p.datec DESC, tms DESC"; + + if ( $db->query($sql) ) + { + $num = $db->num_rows(); + $i = 0; + print ''; + + $var=True; + + while ($i < $num) + { + $objp = $db->fetch_object( $i); + + $var=!$var; + print ""; + print "\n"; + print "\n"; + + print "\n"; + + print ''; + print ''; + + print ""; + print ''; + + + print "\n"; + + $i++; + } + + + print "
propalid\">$objp->refidp\">$objp->nom"; + + print strftime("%d %B %Y",$objp->dp)."
"; + print ''; + print ''; + print ''; + print ''; + print "
"; + $db->free(); + } + + + + print '
'; + print '
'; print ''; - print ''; - print "
Proposition"; - $htmls->select_array("propalid", $propal->liste_array(1)); + print ''; + print ""; print '
Autres Propositions"; + $htmls->select_array("propalid", $propal->liste_array(1, '<>'.$user->id)); print ''; print ''; print ''; print ''; print "
'; + + print '
'; }