From 8078b272e907fa11bcd212aae5f0f2101ed7ae5e Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 6 Dec 2005 15:34:04 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20verif=20pr=E9sence=20lignes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/verif-contrat-contact-services.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/htdocs/telephonie/script/tools/verif-contrat-contact-services.php b/htdocs/telephonie/script/tools/verif-contrat-contact-services.php index 87b96e0512a..b5d3a7ea27c 100644 --- a/htdocs/telephonie/script/tools/verif-contrat-contact-services.php +++ b/htdocs/telephonie/script/tools/verif-contrat-contact-services.php @@ -57,7 +57,20 @@ if ( $resql ) $rows = $db->fetch_row($resqls); if ($rows[0] == 0) { - print "Contrat ".$row[0]." sans contact ni envoi courrier\n"; + $sqll = "SELECT count(*)"; + $sqll .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne"; + $sqll .= " WHERE fk_contrat =".$row[0]; + $sqll .= " AND statut = 3;"; + + $resqll = $db->query($sqll) ; + if ( $resqll ) + { + $rowl = $db->fetch_row($resqll); + if ($rowl[0] > 0) + { + print "Contrat ".$row[0]." sans contact ni envoi courrier\n"; + } + } } } }