From f690589ef61943a4611cf44b429fc858f426c3d5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Mar 2006 23:31:56 +0000 Subject: [PATCH] Fix: Pb ouverture/fermeture tableau --- htdocs/product/fiche.php | 108 ++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 6250dc0226e..1b5403e2f7d 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2006 Régis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -725,6 +725,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) print ''; + // Propals if($user->rights->propale->creer) { @@ -756,20 +757,22 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) if ($result) { $num = $db->num_rows($result); - if ($num) { + print ''; + print '
'; + if ($num) + { $i = 0; - print '
'; $var=true; while ($i < $num) { $objp = $db->fetch_object($result); $var=!$var; - print ''; print ""; - print "\n"; + print "\n"; print "\n"; print "\n"; - print ''; print ''; print ''; - print ''; $i++; } - print "
propalid\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref.""; + print ''; + print "propalid\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref."idp\">".dolibarr_trunc($objp->nom,18)."".dolibarr_print_date($objp->dp,"%d %b")."'; print ''.$langs->trans("Discount"); print '%'; @@ -778,55 +781,59 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) print ''; print '
"; } else { + print ""; print $langs->trans("NoOpenedPropals"); + print ""; } + print ""; + print ''; $db->free($result); } print ''; - if ($user->rights->commercial->client->voir) - { - // Liste de "Other propals" - print ''; + if ($user->rights->commercial->client->voir) + { + // Liste de "Other propals" + print ''; + + $otherprop = $propal->liste_array(1, ' <> '.$user->id); + if (is_array($otherprop) && sizeof($otherprop)) + { + $var=false; + print '
'; + print ''; + print ''; + print ''; + print '
'; + print ''; + print $langs->trans("OtherPropals").''; + $html->select_array("propalid", $otherprop); + print '
'.$langs->trans("Qty"); + print ''.$langs->trans("Discount"); + print '%'; + print ''; + print ''; + print '
'; + print '
'; + } + else + { + print $langs->trans("NoOtherOpenedPropals"); + } - $otherprop = $propal->liste_array(1, ' <> '.$user->id); - if (is_array($otherprop) && sizeof($otherprop)) - { - $var=false; - print '
'; - print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("OtherPropals").''; - $html->select_array("propalid", $otherprop); - print '
'.$langs->trans("Qty"); - print ''.$langs->trans("Discount"); - print '%'; - print ''; - print ''; - print '
'; - print '
'; - } - else { - print $langs->trans("NoOtherOpenedPropals"); - } - } - print ''; - - print ''; - } + print ''; + } + + print ''; + } $commande = New Commande($db); - print ''; // Commande if($user->rights->commande->creer) @@ -869,10 +876,11 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) $objc = $db->fetch_object($result); $var=!$var; print ""; - print "\n"; + print "\n"; print "\n"; print "\n"; - print ''; print '
commandeid\">".img_object($langs->trans("ShowOrder"),"order")." ".$objc->ref.""; + print ''; + print "commandeid\">".img_object($langs->trans("ShowOrder"),"order")." ".$objc->ref."idp\">".dolibarr_trunc($objc->nom,18)."".dolibarr_print_date($objc->dc,"%d %b")."'; print ''.$langs->trans("Discount"); print '%'; @@ -907,8 +915,9 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) $var=false; print '
'; print ''; + print ''; print '
'; print ''; - print '
'.$langs->trans("OtherOrders").''; + print $langs->trans("OtherOrders").''; $html->select_array("commandeid", $othercom); print '
'.$langs->trans("Qty"); @@ -961,20 +970,22 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) { $num = $db->num_rows($result); $var=true; - if ($num) { + print ''; + print ''; + if ($num) + { $i = 0; - print '
'; - print ''; while ($i < $num) { $objp = $db->fetch_object($result); $var=!$var; print ""; - print "\n"; + print "\n"; print "\n"; print "\n"; - print ''; print '\n"; print ""; print '
factureid\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber.""; + print ''; + print "factureid\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber."idp\">".dolibarr_trunc($objp->nom,18)."".dolibarr_print_date($objp->df,"%d %b")."'; print ''.$langs->trans("Discount"); print '%'; @@ -1032,6 +1043,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) print "idp\">$objp->nom".$langs->trans("Qty"); print ''; + print "'; print ''.$langs->trans("Discount"); print '%';