mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
Fix : presend on reception resulted in fatal error (#36794)
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user