diff --git a/htdocs/compta/propal.php3 b/htdocs/compta/propal.php3
index 3237b8426cd..0879f36c90f 100644
--- a/htdocs/compta/propal.php3
+++ b/htdocs/compta/propal.php3
@@ -198,10 +198,10 @@ if ($propalid)
$result = $db->query($sql);
if ($result)
{
- $num = $db->num_rows();
+ $num_fac_asso = $db->num_rows();
$i = 0; $total = 0;
print "
";
- if ($num > 1)
+ if ($num_fac_asso > 1)
{
print_titre("Factures associées");
}
@@ -211,14 +211,14 @@ if ($propalid)
}
print '
| Num | "; + print "Numéro | "; print "Date | "; print "Auteur | "; print 'Prix | '; print "- | '; } - print "- | "; - print "- | "; + print '- | '; + print '- | '; - - if ($obj->statut == 2) + if ($obj->statut == 2 && $num_fac_asso) { print "[Facturée] | "; } else { - print "- | "; + print '- | '; } print "
$sql";
}
+
+ /*
+ * Produits
+ */
+ print_titre("Produits");
+
+ print '';
+ print "
';
+
+
/*
* Voir le suivi des actions
*
*
*
*/
- if ($suivi) {
- $validor = new User($db, $obj->fk_user_valid);
- $validor->fetch('');
- $cloturor = new User($db, $obj->fk_user_cloture);
- $cloturor->fetch('');
-
- print '";
+ print " ';
+
+ $sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid";
+ $sql .= " FROM llx_propaldet as pt, llx_product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propalid";
+
+ $result = $db->query($sql);
+ if ($result)
+ {
+ $num = $db->num_rows();
+ $i = 0;
+ $var=True;
+ while ($i < $num)
+ {
+ $objp = $db->fetch_object($i);
+ $var=!$var;
+ print "Réf Produit ";
+ print 'Prix Qté. \n";
+ $i++;
+ }
+ }
+ print '[$objp->ref] \n";
+ print ''.$objp->product.' ';
+ print "".price($objp->price)." ";
+ print ' ';
+ print "".$objp->qty."
Cacher le suivi des actions '; - print '
| Nom | Date | |
| Création | '.$author->fullname.' | '; - print ''.$obj->datec.' |
| Validation | '.$validor->fullname.' | '; - print ''.$obj->date_valid.' |
| Cloture | '.$cloturor->fullname.' | '; - print ''.$obj->date_cloture.' |
Voir le suivi des actions '; - } - + if ($suivi) + { + $validor = new User($db, $obj->fk_user_valid); + $validor->fetch(''); + $cloturor = new User($db, $obj->fk_user_cloture); + $cloturor->fetch(''); + + print '
Cacher le suivi des actions '; + print '
| Nom | Date | |
| Création | '.$author->fullname.' | '; + print ''.$obj->datec.' |
| Validation | '.$validor->fullname.' | '; + print ''.$obj->date_valid.' |
| Cloture | '.$cloturor->fullname.' | '; + print ''.$obj->date_cloture.' |
Voir le suivi des actions '; + } + } else { print $db->error(); print "
$sql"; } - + /* *