Merge pull request #24643 from atm-thibaultf/patch-2

Fix for deleting loan payment
This commit is contained in:
Laurent Destailleur 2023-04-28 18:01:14 +02:00 committed by GitHub
commit 6718ba1fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ print '<div class="tabsAction">';
if (empty($action) && !empty($user->rights->loan->delete)) {
if (!$disable_delete) {
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 1);
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$id.'&action=delete&token='.newToken(), 'delete', 1);
} else {
print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 0);
}