[Qal] uniformize code
This commit is contained in:
parent
cddb54207f
commit
b495fdb58e
@ -77,7 +77,7 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$mesg='<div class="error">'.$localtax->error.'</div>';
|
setEventMessages($localtax->error, $localtax->errors, 'errors');
|
||||||
$_GET["action"]="create";
|
$_GET["action"]="create";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,18 +112,19 @@ if ($_GET["action"] == 'delete')
|
|||||||
{
|
{
|
||||||
$localtax->error=$accountline->error;
|
$localtax->error=$accountline->error;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$mesg='<div class="error">'.$localtax->error.'</div>';
|
setEventMessages($localtax->error, $localtax->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$mesg='<div class="error">'.$localtax->error.'</div>';
|
setEventMessages($localtax->error, $localtax->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,11 +65,13 @@ if ($action == 'create')
|
|||||||
$result=$bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET);
|
$result=$bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$bprev->error.'</div>';
|
setEventMessages($bprev->error , $bprev->errors, 'errors');
|
||||||
}
|
}
|
||||||
if ($result == 0)
|
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)
|
foreach($bprev->invoice_in_error as $key => $val)
|
||||||
{
|
{
|
||||||
$mesg.=$val."<br>\n";
|
$mesg.=$val."<br>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user