From ebf2edf019057b73e7a816d1fdc64478f4749236 Mon Sep 17 00:00:00 2001 From: abb Date: Sat, 23 May 2015 15:35:19 +0100 Subject: [PATCH] added new trigger for supplier invoice unvalidation "BILL_SUPPLIER_UNVALIDATE" in set_draft class function --- htdocs/fourn/class/fournisseur.facture.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 994ddb28310..1cfbe941d9a 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos GarcĂ­a + * Copyright (C) 2015 Bahfir Abbes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1073,7 +1074,14 @@ class FactureFournisseur extends CommonInvoice } } } - + // Triggers call + if (! $error && empty($notrigger)) + { + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user); + if ($result < 0) $error++; + // End call triggers + } if ($error == 0) { $this->db->commit();