diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 137ee743bbf..1d8ecc4f516 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -600,7 +600,7 @@ if ($_GET['propalid'])
* Lignes de propale
*
*/
- $sql = 'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice,";
+ $sql = 'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice,';
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid';
$sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pt';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product=p.rowid';
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 2aa0c0249c6..6aa8f863637 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -622,68 +622,82 @@ else
$objp = $db->fetch_object($resql);
$var=!$var;
- // Update ligne de propale
- if ($_GET['action'] != 'editline' || $_GET['rowid'] != $objp->rowid)
- {
- print '
';
- if ($objp->fk_product > 0)
- {
- print '';
- if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
- else print img_object($langs->trans('ShowProduct'),'product');
- print ' '.$objp->ref.' - '.stripslashes(nl2br($objp->product));
- print ($objp->description && $objp->description!=$objp->product)?' '.$objp->description:'';
- print ' | ';
+ // Affiche ligne de commande en mode non edit
+ if ($_GET['action'] != 'editline' || $_GET['rowid'] != $objp->rowid)
+ {
+ print '
';
+ if ($objp->fk_product > 0)
+ {
+ print '';
+ if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
+ else print img_object($langs->trans('ShowProduct'),'product');
+ print ' '.$objp->ref.' - '.stripslashes(nl2br($objp->product));
+ print ($objp->description && $objp->description!=$objp->product)?' '.$objp->description:'';
+ print ' | ';
+ }
+ else
+ {
+ print ''.stripslashes(nl2br($objp->description));
+ print " | \n";
+ }
+ print ''.$objp->tva_tx.'% | ';
+
+ print ''.price($objp->subprice)." | \n";
+
+ print ''.$objp->qty.' | ';
+
+ if ($objp->remise_percent > 0)
+ {
+ print ''.$objp->remise_percent."% | \n";
+ }
+ else
+ {
+ print ' | ';
+ }
+ print ''.price($objp->subprice*$objp->qty*(100-$objp->remise_percent)/100)." | \n";
+
+ // Icone d'edition et suppression
+ if ($commande->statut == 0 && $user->rights->commande->creer && $_GET["action"] == '')
+ {
+ print '';
+ print img_edit();
+ print ' | ';
+ print '';
+ print img_delete();
+ print ' | ';
+ }
+ else
+ {
+ print ' | | ';
+ }
+ print '
';
}
- else
- {
- print ''.stripslashes(nl2br($objp->description));
- print " | \n";
- }
- print ''.$objp->tva_tx.'% | ';
-
- print ''.price($objp->subprice)." | \n";
-
- print ''.$objp->qty.' | ';
-
- if ($objp->remise_percent > 0)
- {
- print ''.$objp->remise_percent."% | \n";
- }
- else
- {
- print ' | ';
- }
- print ''.price($objp->subprice*$objp->qty*(100-$objp->remise_percent)/100)." | \n";
-
- // Icone d'edition et suppression
- if ($commande->statut == 0 && $user->rights->commande->creer && $_GET["action"] == '')
- {
- print '';
- print img_edit();
- print ' | ';
- print '';
- print img_delete();
- print ' | ';
- }
- else
- {
- print ' | | ';
- }
- print '';
- }
- // Update ligne de commande
+ // Affiche ligne de commande en mode non edit
if ($_GET["action"] == 'editline' && $_GET["rowid"] == $objp->rowid)
{
print "';