Merge github.com:Dolibarr/dolibarr into dev_new_add_desc_when_select_product

This commit is contained in:
Florian HENRY 2020-10-26 16:31:16 +01:00
commit 967fae594e

View File

@ -2300,24 +2300,20 @@ if ($action == 'create')
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250);
} }
// Confirmation de la validation // Confirmation of validation
if ($action == 'valid') if ($action == 'valid')
{ {
// We check if number is temporary number // We check if number is temporary number
if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) // empty should not happened, but when it occurs, the test save life if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) { // empty should not happened, but when it occurs, the test save life
{
$numref = $object->getNextNumRef($societe); $numref = $object->getNextNumRef($societe);
} else { } else {
$numref = $object->ref; $numref = $object->ref;
} }
if ($numref < 0) if ($numref < 0) {
{
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
$action = ''; $action = '';
} } else {
else
{
$text = $langs->trans('ConfirmValidateBill', $numref); $text = $langs->trans('ConfirmValidateBill', $numref);
/*if (! empty($conf->notification->enabled)) /*if (! empty($conf->notification->enabled))
{ {