Skip to content

Commit

Permalink
[Qal] uniformize code
Browse files Browse the repository at this point in the history
  • Loading branch information
grandoc committed Mar 10, 2016
1 parent cddb542 commit b495fdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions htdocs/compta/localtax/card.php
Expand Up @@ -77,7 +77,7 @@
else
{
$db->rollback();
$mesg='<div class="error">'.$localtax->error.'</div>';
setEventMessages($localtax->error, $localtax->errors, 'errors');
$_GET["action"]="create";
}
}
Expand Down Expand Up @@ -112,18 +112,19 @@
{
$localtax->error=$accountline->error;
$db->rollback();
$mesg='<div class="error">'.$localtax->error.'</div>';
setEventMessages($localtax->error, $localtax->errors, 'errors');
}
}
else
{
$db->rollback();
$mesg='<div class="error">'.$localtax->error.'</div>';
setEventMessages($localtax->error, $localtax->errors, 'errors');
}
}
else
{
$mesg='<div class="error">Error try do delete a line linked to a conciliated bank transaction</div>';
$mesg='Error try do delete a line linked to a conciliated bank transaction';
setEventMessages($mesg, null, 'errors');
}
}

Expand Down
6 changes: 4 additions & 2 deletions htdocs/compta/prelevement/create.php
Expand Up @@ -65,11 +65,13 @@
$result=$bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET);
if ($result < 0)
{
$mesg='<div class="error">'.$bprev->error.'</div>';
setEventMessages($bprev->error , $bprev->errors, 'errors');
}
if ($result == 0)
{
$mesg='<div class="error">'.$langs->trans("NoInvoiceCouldBeWithdrawed").'</div>';
$mesg='';
$mesg=$langs->trans("NoInvoiceCouldBeWithdrawed");
setEventMessages($mesg, null, 'errors');
foreach($bprev->invoice_in_error as $key => $val)
{
$mesg.=$val."<br>\n";
Expand Down

0 comments on commit b495fdb

Please sign in to comment.