Fix error on emailcollector for tickets
This commit is contained in:
parent
4f9ea912ab
commit
2839eedbbf
@ -1613,7 +1613,7 @@ class EmailCollector extends CommonObject
|
|||||||
if ($savesocid != $projecttocreate->socid)
|
if ($savesocid != $projecttocreate->socid)
|
||||||
{
|
{
|
||||||
$errorforactions++;
|
$errorforactions++;
|
||||||
setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$projecttocreate->socid.') by setting socid in operation with a different value');
|
setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$projecttocreate->socid.') by setting socid in operation with a different value', null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1721,14 +1721,14 @@ class EmailCollector extends CommonObject
|
|||||||
if ($filefound)
|
if ($filefound)
|
||||||
{
|
{
|
||||||
$result=dol_include_once($reldir."core/modules/ticket/".$modele.'.php');
|
$result=dol_include_once($reldir."core/modules/ticket/".$modele.'.php');
|
||||||
$modProject = new $classname;
|
$modTicket = new $classname;
|
||||||
|
|
||||||
if ($savesocid > 0)
|
if ($savesocid > 0)
|
||||||
{
|
{
|
||||||
if ($savesocid != $tickettocreate->socid)
|
if ($savesocid != $tickettocreate->socid)
|
||||||
{
|
{
|
||||||
$errorforactions++;
|
$errorforactions++;
|
||||||
setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$tickettocreate->socid.') by setting socid in operation with a different value');
|
setEventMessages('You loaded a thirdparty (id='.$savesocid.') and you force another thirdparty id (id='.$tickettocreate->socid.') by setting socid in operation with a different value', null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1738,7 +1738,7 @@ class EmailCollector extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$defaultref = $modTicket->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $projecttocreate);
|
$defaultref = $modTicket->getNextValue(($thirdpartystatic->id > 0 ? $thirdpartystatic : null), $tickettocreate);
|
||||||
}
|
}
|
||||||
$tickettocreate->ref = $defaultref;
|
$tickettocreate->ref = $defaultref;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user