Fix regression

This commit is contained in:
Laurent Destailleur 2018-04-15 18:20:04 +02:00
parent e2838aa074
commit 2959dc4a3a
3 changed files with 8 additions and 5 deletions

View File

@ -324,9 +324,12 @@ class CommandeFournisseur extends CommonOrder
$result=$this->fetch_lines();
if ($result < 0)
{
return -3;
return -1;
}
else
{
return 1;
}
}
else
{

View File

@ -852,7 +852,7 @@ SCRIPT;
{
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=add_price&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>";
print ' &nbsp; ';
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=ask_remove_pf&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_picto($langs->trans("Remove"),'disable.png').'</a>';
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=ask_remove_pf&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_picto($langs->trans("Remove"),'delete').'</a>';
}
print '</td>';

View File

@ -179,7 +179,7 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
$result=$localobject2->create($user);
print __METHOD__." result=".$result."\n";
$this->assertGreaterThanOrEqual(0, $result);
$this->assertGreaterThan(0, $result);
return $result;
}
@ -206,7 +206,7 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
$result=$localobject->fetch($id);
print __METHOD__." id=".$id." result=".$result."\n";
$this->assertLessThan($result, 0);
$this->assertLessThan($result, 0, 'Failed to fetch supplier order with id '.$id);
return $localobject;
}