From ca670b0a7dd296ce2be3654a3db6b165b9cb16f6 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 7 Jul 2003 10:03:53 +0000 Subject: [PATCH] Ajout notification --- htdocs/facture.class.php3 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/facture.class.php3 b/htdocs/facture.class.php3 index cab73161817..b5d5b4162c9 100644 --- a/htdocs/facture.class.php3 +++ b/htdocs/facture.class.php3 @@ -269,14 +269,28 @@ class Facture $sql = "UPDATE llx_facture set paye = 1 WHERE rowid = $rowid ;"; $return = $this->db->query( $sql); } - + /* + * + * + */ Function set_valid($rowid, $userid) { - global $conf; + $action_notify = 2; // ne pas modifier cette valeur $sql = "UPDATE llx_facture set fk_statut = 1, fk_user_valid = $userid WHERE rowid = $rowid ;"; $result = $this->db->query( $sql); + /* + * Notify + * + */ + $filepdf = FAC_OUTPUTDIR . "/" . $this->ref . "/" . $this->ref . ".pdf"; + + $mesg = "La facture ".$this->ref." a été validée.\n"; + + $notify = New Notify($this->db); + $notify->send($action_notify, $mesg, $filepdf); + return $result; } /*