Skip to content
Snippets Groups Projects
Commit 20c85b9c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Avoid duplicate messages during upgrade

parent 0a173454
No related branches found
No related tags found
No related merge requests found
......@@ -3285,6 +3285,7 @@ function migrate_mode_reglement($db,$langs,$conf)
'code' => array('VAD','TRA','LCR','FAC','PRO'),
'tables' => array('commande_fournisseur','commande','facture_rec','facture','propal')
);
$count=0;
foreach($elements['old_id'] as $key => $old_id)
{
......@@ -3303,6 +3304,8 @@ function migrate_mode_reglement($db,$langs,$conf)
$num = $db->num_rows($resql);
if ($num)
{
$count++;
$db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."c_paiement SET ";
......@@ -3344,13 +3347,12 @@ function migrate_mode_reglement($db,$langs,$conf)
$db->rollback();
}
}
else
{
print $langs->trans('AlreadyDone')."<br>\n";
}
}
}
if ($count == 0) print $langs->trans('AlreadyDone')."<br>\n";
print '</td></tr>';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment