diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index 428c042a295..03d8c0af29a 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -694,29 +694,29 @@ if ($id > 0)
$var=true;
while ($i < $num)
{
- $objp = $commande->lignes[$i];
+ $commandline = $commande->lignes[$i];
$var=!$var;
// Ligne en mode visu
- if ($_GET['action'] != 'editline' || $_GET['rowid'] != $objp->rowid)
+ if ($_GET['action'] != 'editline' || $_GET['rowid'] != $commandline->id)
{
print '
';
- if ($objp->fk_product > 0)
+ if ($commandline->fk_product > 0)
{
print '';
- print ''; // ancre pour retourner sur la ligne
+ print ''; // ancre pour retourner sur la ligne
// Affiche ligne produit
- $text = '';
+ $text = '';
$text.= img_object($langs->trans('ShowProduct'),'product');
- $text.= ' '.$objp->ref_fourn.'';
- $text.= ' ('.$objp->ref.')';
- $text.= ' - '.$objp->libelle;
- $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->product_desc));
+ $text.= ' '.$commandline->ref_fourn.'';
+ $text.= ' ('.$commandline->ref.')';
+ $text.= ' - '.$commandline->libelle;
+ $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($commandline->product_desc));
print $html->textwithtooltip($text,$description,3,'','',$i);
if ($conf->global->PRODUIT_DESC_IN_FORM)
{
- print ($objp->product_desc && $objp->product_desc!=$objp->libelle)?' '.dol_htmlentitiesbr($objp->product_desc):'';
+ print ($commandline->product_desc && $commandline->product_desc!=$commandline->libelle)?' '.dol_htmlentitiesbr($commandline->product_desc):'';
}
print " | ";
@@ -724,32 +724,32 @@ if ($id > 0)
else
{
print '';
- print ''; // ancre pour retourner sur la ligne
- print nl2br($objp->product_desc);
+ print ''; // ancre pour retourner sur la ligne
+ print nl2br($commandline->product_desc);
print ' | ';
}
- print ''.vatrate($objp->tva_tx).'% | ';
- print ''.price($objp->subprice)." | \n";
- print ''.$objp->qty.' | ';
- if ($objp->remise_percent > 0)
+ print ''.vatrate($commandline->tva_tx).'% | ';
+ print ''.price($commandline->subprice)." | \n";
+ print ''.$commandline->qty.' | ';
+ if ($commandline->remise_percent > 0)
{
- print ''.dolibarr_print_reduction($objp->remise_percent)." | \n";
+ print ''.dolibarr_print_reduction($commandline->remise_percent)." | \n";
}
else
{
print ' | ';
}
- print ''.price($objp->total_ht).' | ';
+ print ''.price($commandline->total_ht).' | ';
if ($commande->statut == 0 && $user->rights->fournisseur->commande->creer)
{
- print 'id.'&action=editline&rowid='.$objp->id.'#'.$objp->id.'">';
+ print ' | id.'&action=editline&rowid='.$commandline->id.'#'.$commandline->id.'">';
print img_edit();
print ' | ';
$actiondelete='delete_product_line';
if (empty($conf->global->PRODUIT_CONFIRM_DELETE_LINE)) $actiondelete='confirm_deleteproductline';
- print 'id.'&action='.$actiondelete.'&lineid='.$objp->id.'">';
+ print ' | id.'&action='.$actiondelete.'&lineid='.$commandline->id.'">';
print img_delete();
print ' | ';
}
@@ -761,43 +761,43 @@ if ($id > 0)
}
// Ligne en mode update
- if ($_GET["action"] == 'editline' && $user->rights->fournisseur->commande->creer && $_GET["rowid"] == $objp->rowid)
+ if ($_GET["action"] == 'editline' && $user->rights->fournisseur->commande->creer && ($_GET["rowid"] == $commandline->id))
{
- print '\n";