Skip to content

Commit

Permalink
FIX : display error when loan can't be deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-Ngr committed Dec 12, 2024
1 parent 3c22179 commit a4785ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/loan/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
if ($result > 0) {
setEventMessages($langs->trans('LoanPaid'), null, 'mesgs');
} else {
setEventMessages($loan->error, null, 'errors');
setEventMessages($object->error, $object->errors, 'errors');
}
}

Expand All @@ -95,7 +95,7 @@
header("Location: list.php");
exit;
} else {
setEventMessages($loan->error, null, 'errors');
setEventMessages($object->error, $object->errors, 'errors');
}
}

Expand Down
1 change: 1 addition & 0 deletions htdocs/loan/class/loan.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public function delete($user)
$accountline->fetch($line_url['fk_bank']);
$result = $accountline->delete_urls($user);
if ($result < 0) {
$this->errors = array_merge($this->errors, [$accountline->error], $accountline->errors);
$error++;
}
}
Expand Down

0 comments on commit a4785ad

Please sign in to comment.