Merge pull request #4887 from defrance/patch-111
NEW : INVOICE_CAN_NEVER_BE_CANCELED global
This commit is contained in:
commit
dc491fbae9
@ -3953,6 +3953,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
// Classify 'closed not completely paid' (possible si validee et pas encore classee payee)
|
||||
|
||||
if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 && $user->rights->facture->paiement)
|
||||
{
|
||||
if ($totalpaye > 0 || $totalcreditnotes > 0)
|
||||
@ -3962,10 +3963,16 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($objectidnext) {
|
||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('ClassifyCanceled') . '</span></div>';
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=canceled">' . $langs->trans('ClassifyCanceled') . '</a></div>';
|
||||
if ( empty($conf->global->INVOICE_CAN_NEVER_BE_CANCELED))
|
||||
{
|
||||
if ($objectidnext)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('ClassifyCanceled') . '</span></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=canceled">' . $langs->trans('ClassifyCanceled') . '</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user