Merge pull request #5225 from hregis/3.8_bug

Fix: doublon (merge problem?)
This commit is contained in:
Laurent Destailleur 2016-05-18 17:39:14 +02:00
commit 517b189df2

View File

@ -562,15 +562,6 @@ if (empty($reshook))
}
}
// Reopen proposal
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
{
// prevent browser refresh from reopening proposal several times
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) {
$object->reopen($user, 1);
}
}
// Close proposal
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
{
@ -591,17 +582,6 @@ if (empty($reshook))
}
}
// Classify billed
else if ($action == 'classifybilled' && $user->rights->propal->cloturer)
{
$result=$object->cloture($user, 4, '');
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
}
// Reopen proposal
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
{
@ -617,20 +597,6 @@ if (empty($reshook))
}
}
// Close proposal
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
{
if (! GETPOST('statut')) {
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), 'errors');
$action = 'statut';
} else {
// prevent browser refresh from closing proposal several times
if ($object->statut == Propal::STATUS_VALIDATED) {
$object->cloture($user, GETPOST('statut'), GETPOST('note'));
}
}
}
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';