Merge pull request #18272 from laurantines/patch-3
Fix opp status required even if PROJECT_USE_OPPORTUNITIES off
This commit is contained in:
commit
fea4210570
@ -136,9 +136,11 @@ if (empty($reshook)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (GETPOST('opp_amount') != '' && !(GETPOST('opp_status') > 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors');
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
if (GETPOST('opp_amount') != '' && !(GETPOST('opp_status') > 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Create with status validated immediatly
|
||||
@ -274,9 +276,11 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($object->opp_amount && ($object->opp_status <= 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors');
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
if ($object->opp_amount && ($object->opp_status <= 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user