From cd5bda27f4ea74bda5e2b0dc6823fee610d56c47 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 25 Feb 2013 16:56:37 +0100 Subject: [PATCH] Supplier dispatch : add new trigger called after order is dispatched --- htdocs/fourn/commande/dispatch.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index bdb41c091ec..911e6b7fd90 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -84,6 +84,19 @@ if ($_POST["action"] == 'dispatch' && $user->rights->fournisseur->commande->rece } } } + + if (! $notrigger) + { + global $conf, $langs, $user; + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result_trigger=$interface->run_triggers('ORDER_SUPPLIER_DISPATCH',$this,$user,$langs,$conf); + if ($result_trigger < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + + $this->db->commit(); + } if ($result > 0) {