From 28d19748eaf7521caacfcee669d843d953bbbcda Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 28 Jun 2003 13:55:12 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20possibilite=20d'ajout=20direct=20du=20p?= =?UTF-8?q?roduit=20dans=20une=20proposition=20commerciale=20=E0=20l'=E9ta?= =?UTF-8?q?t=20de=20brouillon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php3 | 43 +++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/htdocs/product/fiche.php3 b/htdocs/product/fiche.php3 index fb749bdc880..fa9df14c264 100644 --- a/htdocs/product/fiche.php3 +++ b/htdocs/product/fiche.php3 @@ -21,6 +21,7 @@ */ require("./pre.inc.php3"); +require("../propal.class.php3"); llxHeader(); @@ -37,8 +38,20 @@ if ($action == 'add') $product->description = $desc; $id = $product->create($user); + $action = ''; } +if ($action == 'addinpropal') +{ + $propal = New Propal($db); + + $propal->fetch($HTTP_POST_VARS["propalid"]); + $propal->insert_product($id, $HTTP_POST_VARS["qty"]); + + $action = ''; +} + + if ($action == 'update') { $product = new Product($db); @@ -77,15 +90,12 @@ if ($action == 'create') print ""; print ' '; print ''; - print ''; - - + print ''; } else { if ($id) { - $product = new Product($db); $result = $product->fetch($id); @@ -96,8 +106,7 @@ else print ''; print ""; print ''; - print ''; - print ''; + print ''; print ""; print '
Référence'.$product->ref.'Statistiques
Statistiques
Libellé$product->label'; print "Propositions commerciales : ".$product->count_propale(); @@ -117,8 +126,7 @@ else print "
\n"; print ""; - print ''; - print ""; + print '
'; print ''; print ''; print ''; @@ -163,6 +171,25 @@ else print ''; print '
Référence
Libellé
Prix
-

'; +if ($id && $action == '') +{ + print_titre("Ajouter à la proposition"); + + $htmls = new Form($db); + $propal = New Propal($db); + + print ''; + print ''; + print ''; + print ""; + print '
Proposition"; + $htmls->select_array("propalid", $propal->liste_array(1)); + print ''; + print ''; + print ''; + print ''; + print "
'; +} $db->close();