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 ''; - print ''; - $i = 0; - $var = False; - while ($i < $num) - { - $obj = $db->fetch_object(); - print ""; - print ''; - $i++; - $var=!$var; - } - print "
'.$langs->trans("OrdersToValid").'
rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."'.$obj->nom.'

"; + print ''; + print ''; + print ''; + $i = 0; + $var = true; + while ($i < $num) + { + $var=!$var; + $obj = $db->fetch_object(); + print ""; + print ''; + $i++; + } + print "
'.$langs->trans("DraftOrders").'
rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."'.dolibarr_trunc($obj->nom,24).'

"; } } } 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";