Fix : presend on reception resulted in fatal error (#36794)
This commit is contained in:
parent
3b6d803bbd
commit
ff8a8f5bb4
1 changed files with 7 additions and 4 deletions
|
|
@ -333,6 +333,13 @@ if ($action == 'presend') {
|
|||
|
||||
if (!empty($origin) && !empty($origin_id)) {
|
||||
$element = $subelement = $origin;
|
||||
|
||||
if ($element == 'order_supplier') {
|
||||
$element = 'fourn';
|
||||
$subelement = 'fournisseur.commande';
|
||||
$origin = 'CommandeFournisseur';
|
||||
}
|
||||
|
||||
$regs = array();
|
||||
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
|
||||
$element = $regs[1];
|
||||
|
|
@ -355,10 +362,6 @@ if ($action == 'presend') {
|
|||
if ($element == 'shipping') {
|
||||
$element = $subelement = 'expedition';
|
||||
}
|
||||
if ($element == 'order_supplier') {
|
||||
$element = 'fourn';
|
||||
$subelement = 'fournisseur.commande';
|
||||
}
|
||||
if ($element == 'project') {
|
||||
$element = 'projet';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue