diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 09ecf8f0b90..afa8c7b8905 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -156,7 +156,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
/*
- * Commandes à valider
+ * Commandes brouillons
*/
if ($conf->commande->enabled)
{
@@ -165,28 +165,28 @@ if ($conf->commande->enabled)
$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 0";
if ($socidp)
{
- $sql .= " AND c.fk_soc = $socidp";
+ $sql .= " AND c.fk_soc = $socidp";
}
-
- if ( $db->query($sql) )
+
+ if ( $db->query($sql) )
{
- $num = $db->num_rows();
- if ($num)
+ $num = $db->num_rows();
+ if ($num)
{
- print '
";
+ print '
";
}
}
}
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 5ec2c6fe4ec..2269d9c7395 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -333,7 +333,7 @@ if ($_GET["action"] == 'create' && $user->rights->commande->creer)
{
print ' | ';
print ' | ';
- print ' % |
';
+ print '% | ';
}
print '';
@@ -375,7 +375,7 @@ if ($_GET["action"] == 'create' && $user->rights->commande->creer)
print "| [$objp->ref] | \n";
print ''.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.' | ';
print "".price($objp->price)." | ";
- print ''.$objp->remise_percent.' % | ';
+ print ''.$objp->remise_percent.'% | ';
print "".$objp->qty." |
\n";
$i++;
}
@@ -395,14 +395,14 @@ if ($_GET["action"] == 'create' && $user->rights->commande->creer)
print "| | \n";
print ''.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.' | ';
print ''.price($objp->price).' | ';
- print ''.$objp->remise_percent.' % | ';
+ print ''.$objp->remise_percent.'% | ';
print "".$objp->qty." |
\n";
$i++;
}
}
else
{
- print $sql;
+ dolibarr_print_error($db);
}
print '';
@@ -730,15 +730,15 @@ else
print $html->select_tva("tva_tx",$conf->defaulttx);
print '';
print ' | ';
- print '% | ';
- print ' | ';
+ print '% | ';
+ print ' | ';
print ' | ';
$var=!$var;
print " | ";
print ' | ';
- print '% | ';
+ print '% | ';
print ' | ';
print ' |
';
print "\n";