Add hidden option to allow to fix corrupted situations

This commit is contained in:
Laurent Destailleur 2021-10-07 10:43:50 +02:00
parent eba377cdf0
commit 5910d10021

View File

@ -443,11 +443,13 @@ if ($resql)
print '<td class="right">'.$invoice->getLibStatut(5, $alreadypayed).'</td>';
print "</tr>\n";
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
{
// If at least one invoice is paid, disable delete. INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED Can be use for maintenance purpose. Never use this in production
if ($objp->paye == 1 && empty($conf->global->INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED)) {
$disable_delete = 1;
$title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
}
$total = $total + $objp->amount;
$i++;
}