FIX Error management on cheque deposit.
This commit is contained in:
parent
3eebba6116
commit
edd33fd17b
2 changed files with 6 additions and 3 deletions
|
|
@ -168,6 +168,7 @@ if ($action == 'create' && GETPOSTINT("accountid") > 0 && $user->hasRight('banqu
|
|||
exit;
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'new';
|
||||
}
|
||||
} else {
|
||||
setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'mesgs');
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ class RemiseCheque extends CommonObject
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque";
|
||||
$sql .= " SET statut = 1, ref = '".$this->db->escape($numref)."'";
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
$sql .= " AND entity = ".((int) $conf->entity);
|
||||
$sql .= " AND statut = 0";
|
||||
|
||||
dol_syslog("RemiseCheque::Validate", LOG_DEBUG);
|
||||
|
|
@ -368,13 +368,15 @@ class RemiseCheque extends CommonObject
|
|||
if ($num == 1) {
|
||||
$this->ref = $numref;
|
||||
$this->statut = 1;
|
||||
$this->status = 1;
|
||||
} else {
|
||||
$this->errno = -1029;
|
||||
dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR);
|
||||
dol_syslog("Remisecheque::validate Error ".$this->errno, LOG_ERR);
|
||||
}
|
||||
} else {
|
||||
$this->errno = -1033;
|
||||
dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR);
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_syslog("Remisecheque::validate Error ".$this->errno, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue