diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index efed0298f52..a9ec591cf5f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -473,7 +473,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G $result = $interface->run_triggers('PROPAL_SENTBYMAIL', $object, $user, $langs, $conf); if ($result < 0) { $error ++; - $this->errors = $interface->errors; + $object->errors = $interface->errors; } // Fin appel triggers diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index da275ca37c1..b6837d68a98 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1607,7 +1607,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $result = $interface->run_triggers('BILL_SENTBYMAIL', $object, $user, $langs, $conf); if ($result < 0) { $error ++; - $this->errors = $interface->errors; + $object->errors = $interface->errors; } // Fin appel triggers diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 5cf09642c68..b7a94bc28c4 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1128,6 +1128,10 @@ class Expedition extends CommonObject // Eat-by date if (! empty($conf->productbatch->enabled)) { + /* test on conf at begining of file sometimes doesn't include expeditionbatch + * May be conf is not well initialized for dark reason + */ + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; $line->detail_batch=ExpeditionLigneBatch::FetchAll($this->db,$obj->line_id); } $this->lines[$i] = $line; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 1fd33b29c53..45208e77dbe 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -500,7 +500,7 @@ if ($action == 'send' && ! GETPOST('addfile','alpha') && ! GETPOST('removedfile' $interface=new Interfaces($db); $result=$interface->run_triggers('SHIPPING_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { - $error++; $this->errors=$interface->errors; + $error++; $object->errors=$interface->errors; } // Fin appel triggers @@ -863,7 +863,7 @@ if ($action == 'create') if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0; } - if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_array($product->stock_warehouse[GETPOST('entrepot_id','int')]))) + if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_object($product->stock_warehouse[GETPOST('entrepot_id','int')]))) { // Quantity to send print '