Renamed hidden option INVOICE_CAN_ALWAYS_BE_EDITED into
INVOICE_CAN_BE_EDITED_EVEN_IF_PAYMENT_DONE for better understanding.
This commit is contained in:
parent
d143b8bf6e
commit
c7d5ecd4f7
@ -737,7 +737,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
// On verifie si aucun paiement n'a ete effectue
|
// On verifie si aucun paiement n'a ete effectue
|
||||||
if ($ventilExportCompta == 0) {
|
if ($ventilExportCompta == 0) {
|
||||||
if (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_EDITED) || ($resteapayer == $object->total_ttc && empty($object->paye))) {
|
if (!empty($conf->global->INVOICE_CAN_BE_EDITED_EVEN_IF_PAYMENT_DONE) || ($resteapayer == $object->total_ttc && empty($object->paye))) {
|
||||||
$result = $object->setDraft($user, $idwarehouse);
|
$result = $object->setDraft($user, $idwarehouse);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
@ -5340,13 +5340,13 @@ if ($action == 'create') {
|
|||||||
$ventilExportCompta = $object->getVentilExportCompta();
|
$ventilExportCompta = $object->getVentilExportCompta();
|
||||||
|
|
||||||
if ($ventilExportCompta == 0) {
|
if ($ventilExportCompta == 0) {
|
||||||
if (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_EDITED) || ($resteapayer == price2num($object->total_ttc, 'MT', 1) && empty($object->paye))) {
|
if (!empty($conf->global->INVOICE_CAN_BE_EDITED_EVEN_IF_PAYMENT_DONE) || ($resteapayer == price2num($object->total_ttc, 'MT', 1) && empty($object->paye))) {
|
||||||
if (!$objectidnext && $object->is_last_in_cycle()) {
|
if (!$objectidnext && $object->is_last_in_cycle()) {
|
||||||
if ($usercanunvalidate) {
|
if ($usercanunvalidate) {
|
||||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif', '', true, $params);
|
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params);
|
||||||
} else {
|
} else {
|
||||||
$params['attr']['title'] = $langs->trans('NotEnoughPermissions');
|
$params['attr']['title'] = $langs->trans('NotEnoughPermissions');
|
||||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif', '', false, $params);
|
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', false, $params);
|
||||||
}
|
}
|
||||||
} elseif (!$object->is_last_in_cycle()) {
|
} elseif (!$object->is_last_in_cycle()) {
|
||||||
$params['attr']['title'] = $langs->trans('NotLastInCycle');
|
$params['attr']['title'] = $langs->trans('NotLastInCycle');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user