From 03065731bc5be4c7069b3972bac57dba83c6e78f Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 3 Dec 2004 11:22:49 +0000 Subject: [PATCH] Nouveau fichier & Copyright --- htdocs/telephonie/fournisseurtel.class.php | 70 +++ htdocs/telephonie/ligne/commande/archives.php | 119 +++++ .../ligne/commande/commandetableur.class.php | 342 +++++++++++++++ htdocs/telephonie/ligne/commande/index.php | 132 ++++++ htdocs/telephonie/ligne/commande/liste.php | 189 ++++++++ htdocs/telephonie/ligne/commande/pre.inc.php | 69 +++ htdocs/telephonie/ligne/conso.php | 170 ++++++++ htdocs/telephonie/ligne/graph-1.png | Bin 0 -> 198 bytes htdocs/telephonie/ligne/graph1.png | Bin 0 -> 197 bytes htdocs/telephonie/ligne/graph2.png | Bin 0 -> 191 bytes htdocs/telephonie/ligne/graph3.png | Bin 0 -> 193 bytes htdocs/telephonie/ligne/graph4.png | Bin 0 -> 198 bytes htdocs/telephonie/ligne/graph5.png | Bin 0 -> 198 bytes htdocs/telephonie/ligne/graph6.png | Bin 0 -> 193 bytes htdocs/telephonie/ligne/graph7.png | Bin 0 -> 209 bytes htdocs/telephonie/ligne/history.php | 410 ++++++++++++++++++ htdocs/telephonie/ligne/infoc.php | 408 +++++++++++++++++ 17 files changed, 1909 insertions(+) create mode 100644 htdocs/telephonie/fournisseurtel.class.php create mode 100644 htdocs/telephonie/ligne/commande/archives.php create mode 100644 htdocs/telephonie/ligne/commande/commandetableur.class.php create mode 100644 htdocs/telephonie/ligne/commande/index.php create mode 100644 htdocs/telephonie/ligne/commande/liste.php create mode 100644 htdocs/telephonie/ligne/commande/pre.inc.php create mode 100644 htdocs/telephonie/ligne/conso.php create mode 100644 htdocs/telephonie/ligne/graph-1.png create mode 100644 htdocs/telephonie/ligne/graph1.png create mode 100644 htdocs/telephonie/ligne/graph2.png create mode 100644 htdocs/telephonie/ligne/graph3.png create mode 100644 htdocs/telephonie/ligne/graph4.png create mode 100644 htdocs/telephonie/ligne/graph5.png create mode 100644 htdocs/telephonie/ligne/graph6.png create mode 100644 htdocs/telephonie/ligne/graph7.png create mode 100644 htdocs/telephonie/ligne/history.php create mode 100644 htdocs/telephonie/ligne/infoc.php diff --git a/htdocs/telephonie/fournisseurtel.class.php b/htdocs/telephonie/fournisseurtel.class.php new file mode 100644 index 00000000000..be0227c27b3 --- /dev/null +++ b/htdocs/telephonie/fournisseurtel.class.php @@ -0,0 +1,70 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + +class FournisseurTelephonie { + var $db; + + var $id; + + function FournisseurTelephonie($DB, $id=0) + { + $this->db = $DB; + $this->id = $id; + return 1; + } + /* + * + * + */ + function fetch() + { + $sql = "SELECT f.rowid, f.nom, f.email_commande, f.commande_active"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; + $sql .= " WHERE f.rowid = ".$this->id; + + if ($this->db->query($sql)) + { + if ($this->db->num_rows()) + { + $obj = $this->db->fetch_object(0); + + + $this->email_commande = $obj->email_commande; + $this->commande_enable = $obj->commande_active; + + return 0; + } + else + { + dolibarr_syslog("FournisseurTelephonie::Fetch Erreur id=".$this->id); + return -1; + } + } + else + { + dolibarr_syslog("FournisseurTelephonie::Fetch Erreur SQL id=".$this->id); + return -2; + } + } +} + +?> diff --git a/htdocs/telephonie/ligne/commande/archives.php b/htdocs/telephonie/ligne/commande/archives.php new file mode 100644 index 00000000000..4c06ceca1f1 --- /dev/null +++ b/htdocs/telephonie/ligne/commande/archives.php @@ -0,0 +1,119 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +require("./pre.inc.php"); + +$page = $_GET["page"]; +$sortorder = $_GET["sortorder"]; +$sortfield = $_GET["sortfield"]; + +if ($_GET["action"] == "create") +{ + $ct = new CommandeTableur($db, $user); + $ct->create(); +} + +llxHeader("","Telephonie - Commande - Archives"); + +/* + * Sécurité accés client + */ +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + +/* ***************************************** */ + +$sql = "SELECT c.filename, u.name, u.firstname, f.nom,".$db->pdate("c.datec"). " as datec"; +$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_commande as c"; +$sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; +$sql .= " ,".MAIN_DB_PREFIX."user as u"; +$sql .= " WHERE c.fk_user_creat = u.rowid AND c.fk_fournisseur = f.rowid"; + +if ($_GET["search_ligne"]) +{ + $sql .= " AND l.ligne LIKE '%".$_GET["search_ligne"]."%'"; +} + +$sql .= " ORDER BY c.datec DESC";//$sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); + +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows(); + $i = 0; + + print_barre_liste("Commandes archives", $page, "liste.php", "", $sortfield, $sortorder, '', $num); + + print ''; + print ''; + print ''; + print ''; + print ''; + + print "\n"; + + /* print ''; + print ''; + print ''; + + print ''; + print ''; + */ + print ''; + + $var=True; + + while ($i < min($num,$conf->liste_limit)) + { + $obj = $db->fetch_object($i); + $var=!$var; + + print ""; + print "\n"; + + print "\n"; + print "\n"; + $dir = DOL_DATA_ROOT . "/telephonie/ligne/commande/"; + + $encfile = urlencode($dir.$obj->filename); + + print ''; + + print "\n"; + $i++; + } + print "
DateUtilisateurFournisseurFichier
".strftime("%a %d %b %Y %HH%M",$obj->datec)."".$obj->firstname . " ".$obj->name."".$obj->nom."'.$obj->filename.'
"; + $db->free(); +} +else +{ + print $db->error() . ' ' . $sql; +} + +/* ******************************************** */ + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/telephonie/ligne/commande/commandetableur.class.php b/htdocs/telephonie/ligne/commande/commandetableur.class.php new file mode 100644 index 00000000000..d098809ece7 --- /dev/null +++ b/htdocs/telephonie/ligne/commande/commandetableur.class.php @@ -0,0 +1,342 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + +require_once DOL_DOCUMENT_ROOT."/includes/php_writeexcel/class.writeexcel_workbook.inc.php"; +require_once DOL_DOCUMENT_ROOT."/includes/php_writeexcel/class.writeexcel_worksheet.inc.php"; +require_once DOL_DOCUMENT_ROOT."/lib/dolibarrmail.class.php"; + +define ('COMMANDETABLEUR_NOEMAIL', -3); + +class CommandeTableur +{ + + + function CommandeTableur ($DB, $USER, $fourn) + { + $this->db = $DB; + $this->user = $USER; + $this->fournisseur = $fourn; + } + + function Create() + { + + $this->date = time(); + + $this->datef = "commande-".strftime("%d%b%y-%HH%M", $this->date); + + $fname = DOL_DATA_ROOT ."/telephonie/ligne/commande/".$this->datef.".xls"; + + if (strlen(trim($this->fournisseur->email_commande)) == 0) + { + return -3; + } + + if (file_exists($fname)) + { + return 2; + } + else + { + $res = $this->CreateFile($fname); + $res = $res + $this->LogSql(); + $res = $res + $this->MailFile($fname); + + return $res; + } + } + /** + * + * + * + * + */ + function MailFile($filename) + { + $sql = "SELECT l.ligne"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; + $sql .= " WHERE l.statut = 2"; + + $result = $this->db->query($sql); + + if ($result) + { + $num = $this->db->num_rows(); + } + + $subject = "Commande Société iBreizh"; + + $sendto = $this->fournisseur->email_commande; + + $from = TELEPHONIE_LIGNE_COMMANDE_EMAIL_BCC; + + $message = "Bonjour,\n\nVeuillez trouver ci-joint notre dernière commande.\n\n"; + $message .= "Nous avons à ce jour $num ligne(s) commandée(s) pour lesquelles nous attendons la confirmation de présélection.\n\nMerci de nous envoyer les confirmations de présélection à l'adresse comstragex@ibreizh.net\n"; + $message .= "\n\nCordialement,\n\n"; + + $message .= "-- \n"; + $message .= $this->user->fullname."\n"; + $message .= "iBreizh\n"; + $message .= "Tél : 02 90 92 26 00\n"; + + + $mailfile = new DolibarrMail($subject, + $sendto, + $from, + $message); + + $mailfile->addr_bcc = TELEPHONIE_LIGNE_COMMANDE_EMAIL_BCC; + + $mailfile->PrepareFile(array($filename), + array("application/msexcel"), + array($this->datef.".xls")); + + if ( $mailfile->sendfile() ) + { + return 0; + } + + } + + function LogSql() + { + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."telephonie_commande"; + $sql .= " (datec, fk_user_creat, fk_fournisseur, filename)"; + $sql .= " VALUES (now(),".$this->user->id.",".$this->fournisseur->id.",'".$this->datef.".xls')"; + + $result = $this->db->query($sql); + + if ($result) + { + return 0; + } + + } + + + function CreateFile($fname) + { + + $ligne = new LigneTel($db); + + $workbook = &new writeexcel_workbook($fname); + + $worksheet = &$workbook->addworksheet(); + + $worksheet->write(0, 0, "Commande du ".strftime("%d %B %Y %HH%M", $this->date)); + + $worksheet->set_column('A:A', 20); + $worksheet->set_column('B:B', 40); + $worksheet->set_column('C:C', 15); + $worksheet->set_column('D:D', 9); + $worksheet->set_column('E:E', 16); + $worksheet->set_column('F:F', 18); + $worksheet->set_column('G:G', 20); + + $formatcc =& $workbook->addformat(); + $formatcc->set_align('center'); + $formatcc->set_align('vcenter'); + + $formatccb =& $workbook->addformat(); + $formatccb->set_align('center'); + $formatccb->set_align('vcenter'); + $formatccb->set_bold(); + + $formatccbr =& $workbook->addformat(); + $formatccbr->set_align('center'); + $formatccbr->set_align('vcenter'); + $formatccbr->set_color('red'); + $formatccbr->set_bold(); + + $formatc =& $workbook->addformat(); + $formatc->set_align('vcenter'); + + $formatcb =& $workbook->addformat(); + $formatcb->set_align('vcenter'); + $formatcb->set_bold(); + + $i = 0; + + $ligneids = array(); + + $sqlall = "SELECT s.nom, s.idp as socid, l.ligne, f.nom as fournisseur, l.statut, l.rowid"; + $sqlall .= " , comm.name, comm.firstname, l.remise"; + $sqlall .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sqlall .= " , ".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; + $sqlall .= " , ".MAIN_DB_PREFIX."societe as r"; + $sqlall .= " , ".MAIN_DB_PREFIX."user as comm"; + $sqlall .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; + $sqlall .= " WHERE l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid"; + $sqlall .= " AND l.fk_soc_facture = r.idp "; + $sqlall .= " AND l.fk_commercial = comm.rowid "; + /* + * + */ + + $sql = $sqlall; + + $sql .= " AND l.statut in (1,4)"; + $sql .= " ORDER BY l.statut ASC"; + + $result = $this->db->query($sql); + + if ($result) + { + $num = $this->db->num_rows(); + + $worksheet->write(1, 0, "Clients", $formatc); + $worksheet->write(1, 1, "Adresses", $formatc); + $worksheet->write(1, 2, "CLI", $formatcc); + $worksheet->write(1, 3, "Préfixe", $formatcc); + $worksheet->write(1, 4, "Présélection", $formatcc); + $worksheet->write(1, 5, "Connexion", $formatcc); + $worksheet->write(1, 6, "Date de la demande", $formatcc); + + while ($i < $num) + { + $obj = $this->db->fetch_object(); + + if (strlen($obj->ligne)== 10) + { + + $j = $i + 2; + $k = $j + 1; + + $soc = new Societe($this->db); + $soc->fetch($obj->socid); + + $worksheet->write($j, 0, $obj->nom, $formatc); + $worksheet->write($j, 1, $soc->adresse. " " . $soc->cp . " " . $soc->ville, $formatc); + + $worksheet->write_string($j, 2, "$obj->ligne", $formatcc); + + $worksheet->write_string($j, 3, "Non", $formatcc); + $worksheet->write_string($j, 4, "Oui", $formatcc); + + if ($obj->statut == 1) + { + $worksheet->write($j, 5, "Ajouter", $formatccb); + $worksheet->write($j, 6, strftime("%d/%m/%y",$this->date), $formatcc); + } + elseif($obj->statut == 4) + { + $worksheet->write($j, 5, "A Résilier", $formatccbr); + $worksheet->write($j, 6, strftime("%d/%m/%y",$this->date), $formatcc); + } + else + { + $worksheet->write($j, 5, "", $formatccb); + $worksheet->write($j, 6, "", $formatccb); + } + + + array_push($ligneids, $obj->rowid); + } + $i++; + } + + $this->db->free(); + } + else + { + print $this->db->error() . ' ' . $sql; + } + + /* + * Archives + * Insertion des anciennes lignes dans le fichier Excell + */ + + $sql = $sqlall; + + $sql .= "AND l.statut > 0 AND l.statut <> 1 AND l.statut <> 4"; + $sql .= " ORDER BY l.statut ASC"; + + $result = $this->db->query($sql); + + if ($result) + { + $num = $this->db->num_rows(); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($i); + + $jj = $i + $j + 2; + $k = $jj + 1; + + $soc = new Societe($this->db); + $soc->fetch($obj->socid); + + $worksheet->write($jj, 0, $obj->nom, $formatc); + $worksheet->write($jj, 1, $soc->adresse. " " . $soc->cp . " " . $soc->ville, $formatc); + + $worksheet->write_string($jj, 2, "$obj->ligne", $formatcc); + + $worksheet->write_string($jj, 3, "Non", $formatcc); + $worksheet->write_string($jj, 4, "Oui", $formatcc); + + $worksheet->write($jj, 5, "", $formatccb); + $worksheet->write($jj, 6, "", $formatccb); + + array_push($ligneids, $obj->rowid); + + $i++; + } + + $this->db->free(); + } + else + { + print $this->db->error() . ' ' . $sql; + } + + + /* + * + * + */ + + foreach ($ligneids as $lid) + { + + $lint = new LigneTel($this->db); + $lint->fetch_by_id($lid); + if ($lint->statut == 1) + { + $lint->set_statut($this->user, 2); + } + if ($lint->statut == 4) + { + $lint->set_statut($this->user, 5); + } + } + + + $workbook->close(); + + + return 0; + + } +} diff --git a/htdocs/telephonie/ligne/commande/index.php b/htdocs/telephonie/ligne/commande/index.php new file mode 100644 index 00000000000..e6caa6b058d --- /dev/null +++ b/htdocs/telephonie/ligne/commande/index.php @@ -0,0 +1,132 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +require("./pre.inc.php"); + +$page = $_GET["page"]; +$sortorder = $_GET["sortorder"]; + +if (!$user->rights->telephonie->lire) + accessforbidden(); + +llxHeader('','Telephonie - Ligne - Commande'); + + + +/* + * Sécurité accés client + */ +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + +/* + * Mode Liste + * + * + * + */ + +print ''; + +print ''; + + + +print '
'; + + +$sql = "SELECT distinct statut, count(*) as cc"; +$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; +$sql .= " GROUP BY statut"; + +if ($db->query($sql)) +{ + $num = $db->num_rows(); + $i = 0; + $ligne = new LigneTel($db); + print_barre_liste("Commande", $page, "index.php", "", $sortfield, $sortorder, '', $num); + + print ''; + print ''; + print "\n"; + $var=True; + + while ($i < min($num,$conf->liste_limit)) + { + $obj = $db->fetch_object($i); + $var=!$var; + + print ""; + print "\n"; + print "\n"; + print "\n"; + $i++; + } + print "
Lignes StatutsNb
".$ligne->statuts[$obj->statut]."".$obj->cc."
"; + $db->free(); +} +else +{ + print $db->error() . ' ' . $sql; +} + +print '
'; + +print ''; +print ''; +print "\n"; + +print ""; +print ''; +print "\n"; +print '
Nouvelle commande
'.img_edit().''; +print ' Créer une nouvelle commande
'; + + + +print '
'; + +/* + * Seconde colonne + * + */ + + print_barre_liste("Commande", $page, "liste.php", "", $sortfield, $sortorder, '', $num); + +print '

'; + + + + + + + +print '
'; + + + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/telephonie/ligne/commande/liste.php b/htdocs/telephonie/ligne/commande/liste.php new file mode 100644 index 00000000000..14d365bfe23 --- /dev/null +++ b/htdocs/telephonie/ligne/commande/liste.php @@ -0,0 +1,189 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +require("./pre.inc.php"); + + +$page = $_GET["page"]; +$sortorder = $_GET["sortorder"]; +$sortfield = $_GET["sortfield"]; + + + +if ($_GET["action"] == "commande" && $user->rights->telephonie->ligne_commander) +{ + $ltel = new LigneTel($db); + $ltel->id = $_GET["lid"]; + $ltel->set_statut($user, $_GET["statut"]); + + Header("Location: liste.php"); +} + + +llxHeader("","Telephonie - Ligne - Commande"); + +/* + * Sécurité accés client + */ +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + +if ($sortorder == "") { + $sortorder="DESC"; +} +if ($sortfield == "") { + $sortfield="l.statut"; +} + +/* + * Recherche + * + * + */ +if ($mode == 'search') { + if ($mode-search == 'soc') { + $sql = "SELECT s.idp FROM ".MAIN_DB_PREFIX."societe as s "; + $sql .= " WHERE lower(s.nom) like '%".strtolower($socname)."%'"; + } + + if ( $db->query($sql) ) { + if ( $db->num_rows() == 1) { + $obj = $db->fetch_object(0); + $socid = $obj->idp; + } + $db->free(); + } +} + +if ($page == -1) { $page = 0 ; } + +$offset = $conf->liste_limit * $page ; +$pageprev = $page - 1; +$pagenext = $page + 1; + +/* + * Mode Liste + * + * + * + */ + +$sql = "SELECT sf.idp as sfidp, sf.nom as sfnom, s.idp as socidp, s.nom, l.ligne, f.nom as fournisseur, l.statut, l.rowid, f.rowid as fournid, l.mode_paiement"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; +$sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; +$sql .= " , ".MAIN_DB_PREFIX."societe as sf"; +$sql .= " WHERE l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid AND l.statut IN (-1,1,4) "; +$sql .= " AND l.fk_soc_facture = sf.idp"; +$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); + +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows(); + $i = 0; + + print_barre_liste("Commande", $page, "liste.php", "", $sortfield, $sortorder, '', $num); + + print ''; + print ''; + print_liste_field_titre("Ligne","liste.php","l.ligne"); + print ''; + print_liste_field_titre("Client","liste.php","s.nom"); + print ''; + print "\n"; + + $var=True; + + $ligne = new LigneTel($db); + + while ($i < min($num,$conf->liste_limit)) + { + $obj = $db->fetch_object($i); + $var=!$var; + + $fourntels = array(); + + if (!array_key_exists($obj->fournid, $fourntels)) + { + $ft = new FournisseurTelephonie($db, $obj->fournid); + $ft->fetch(); + $fourntels[$obj->fournid] = $ft; + } + + + $socf = new Societe($db); + $socf->fetch($obj->sfidp); + + print ""; + print '\n"; + + $ftx = $fourntels[$obj->fournid]; + + if ($ok_commande && $ftx->commande_enable && $user->rights->telephonie->ligne_commander && ($obj->statut == 1 or $obj->statut == -1) && ( $socf->verif_rib() or $obj->mode_paiement == 'vir')) + { + $nst = ($obj->statut * -1); + print '\n"; + } + else + { + print '\n"; + } + + print ''; + print ''; + print ''; + print "\n"; + print "\n"; + $i++; + } + print "
StatutClient FacturéRib OKFournisseur
'; + print ' '; + + if (strlen($obj->ligne) <> 10) + { + print "Erreur"; + $ok_commande = 0; + } + else + { + print dolibarr_print_phone($obj->ligne); + $ok_commande = 1; + } + + print "'; + print img_edit(); + print ' '; + print $ligne->statuts[$obj->statut]; + print "'.$ligne->statuts[$obj->statut]."'.$obj->nom.''.$obj->sfnom.''.$socf->verif_rib().'".$obj->fournisseur."
"; + $db->free(); +} +else +{ + print $db->error() . ' ' . $sql; +} + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/telephonie/ligne/commande/pre.inc.php b/htdocs/telephonie/ligne/commande/pre.inc.php new file mode 100644 index 00000000000..09af5f15f76 --- /dev/null +++ b/htdocs/telephonie/ligne/commande/pre.inc.php @@ -0,0 +1,69 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +require("../../../main.inc.php"); +require(DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"); +require(DOL_DOCUMENT_ROOT."/telephonie/fournisseurtel.class.php"); +require(DOL_DOCUMENT_ROOT."/telephonie/ligne/commande/commandetableur.class.php"); + +$user->getrights('telephonie'); + +function llxHeader($head = "", $title="") { + global $user, $conf; + + /* + * + * + */ + top_menu($head, $title); + + $menu = new Menu(); + + $menu->add(DOL_URL_ROOT."/telephonie/index.php", "Telephonie"); + + $menu->add(DOL_URL_ROOT."/telephonie/simulation/fiche.php", "Simulation"); + $menu->add_submenu(DOL_URL_ROOT."/telephonie/simulation/fiche.php?action=create", "Nouvelle"); + + $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs"); + $menu->add(DOL_URL_ROOT."/telephonie/client/index.php", "Clients"); + $menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes"); + + $menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes"); + $menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/liste.php", "Lignes"); + + if ($user->rights->telephonie->ligne_commander) + { + $menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/fiche.php", "Nouvelle"); + } + + $menu->add_submenu(DOL_URL_ROOT."/telephonie/ligne/commande/archives.php", "Archives"); + + $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); + + $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques"); + + $menu->add(DOL_URL_ROOT."/telephonie/fournisseurs.php", "Fournisseurs"); + + + left_menu($menu->liste); +} + +?> diff --git a/htdocs/telephonie/ligne/conso.php b/htdocs/telephonie/ligne/conso.php new file mode 100644 index 00000000000..4af8e5f0be5 --- /dev/null +++ b/htdocs/telephonie/ligne/conso.php @@ -0,0 +1,170 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + +require("./pre.inc.php"); + +$mesg = ''; + +llxHeader("","","Fiche Ligne"); + + + + if ($_GET["id"] or $_GET["numero"]) + { + if ($_GET["action"] <> 're-edit') + { + $ligne = new LigneTel($db); + if ($_GET["id"]) + { + $result = $ligne->fetch_by_id($_GET["id"]); + } + if ($_GET["numero"]) + { + $result = $ligne->fetch($_GET["numero"]); + } + } + + if ( $result ) + { + if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') + { + + $h=0; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; + $head[$h][1] = $langs->trans("Ligne"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Infos'); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/history.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Historique'); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/conso.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Conso'); + $hselected = $h; + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/stat.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Stats'); + $h++; + + dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + + print_fiche_titre('Fiche Ligne', $mesg); + + print ''; + + print ''; + print ''; + + $client = new Societe($db, $ligne->client_id); + $client->fetch($ligne->client_id); + + print ''; + + $client_facture = new Societe($db); + $client_facture->fetch($ligne->client_facture_id); + + print ''; + + + print ''; + + /* + + $sql = "SELECT f.cout_vente"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_facture as f"; + $sql .= " WHERE f.fk_ligne = ".$ligne->id; + $sql .= " ORDER BY f.date ASC "; + if ( $db->query( $sql) ) + { + $num = $db->num_rows(); + if ( $num > 0 ) + { + $i = 0; + while ($i < $num) + { + $row = $db->fetch_row($i); + + print ''; + + print '"; + print '"; + $i++; + } + } + $db->free(); + } + else + { + print $sql; + } + */ + print '
Numéro'.dolibarr_print_phone($ligne->numero).'Facturée : '.$ligne->facturable.' 
Client'; + + print ''; + print $client->nom.'Client Facturé'.$client_facture->nom.'
Statut'; + print ' '; + print $ligne->statuts[$ligne->statut]; + print '
'.strftime("%A %d %B %Y",$row[0]).' '; + print $ligne->statuts[$row[1]]."'.$row[4] . " " . $row[3] . "
'; + print '
'; + print 'liste
'; + print '
'; + print ''; + print "
"; + + + } + } + + + + + + /* + * + * + * + */ + + } + else + { + print "Error"; + } + + +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ + + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/telephonie/ligne/graph-1.png b/htdocs/telephonie/ligne/graph-1.png new file mode 100644 index 0000000000000000000000000000000000000000..7a8fb19836863bc7b7f7eee1f809db6adf2fc626 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kwj^(N7l!`~4GjPP3v~Pgif|Tq zL>2>eTxVe5JHn{gn6eot$X?><>&kwGi=9VV&|ki)3@9X9;u=xnoS&PUnpeW$T$Gwv zlA5AWo>`Ki5R#Fq;O^-g@IFN~52#Sf)5S5Q;#P7>Lc)*p4onG&2|&jG`4+Z4Jv}@= lJSt6ryv@$c$}2sY87}9risv)*uLbI2@O1TaS?83{1OPk+H@pA< literal 0 HcmV?d00001 diff --git a/htdocs/telephonie/ligne/graph1.png b/htdocs/telephonie/ligne/graph1.png new file mode 100644 index 0000000000000000000000000000000000000000..134f1b74b305154a2e4ab14812c4ffa37f6c9035 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kwj^(N7l!{JxM1({$v_d#0*}aI zppNSd417lz6&q7F0|nVjJbhi+uW+$)vg%Z1?^gy2$(FcAlsM<-=BDPAFgO>bCYGe8 zD3oWGWGIAWq$;?3`UbpDQOyG?)bw<545_%4oRX06bCYGe8 zD3oWGWGIAWq$;?3`UbpDQOyG?RP}Um45_%4oRX06bCYGe8 zD3oWGWGIAWq$;?3`UbpDQOyG?)bez345_%4oRX06gTe~DWM4f+%-8K literal 0 HcmV?d00001 diff --git a/htdocs/telephonie/ligne/graph6.png b/htdocs/telephonie/ligne/graph6.png new file mode 100644 index 0000000000000000000000000000000000000000..4d8f59be1c226e76c2ddc5a89f5bde2f7de5da8e GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kwj^(N7l!{JxM1({$v_d#0*}aI zppNSd417lz6&q7F0|nVjJbhi+uW+&RC~7F_O!xy7k}YwKC~?lu%}vcKVQ?-=O)N=G zQ7F$W$xsN%NL6t6^bL5QqM8R(sOstB7*cU7IVBZOB%3JUOAoFUl*+*Fxn1%h!w7D+FqJxR0yKO#>Rh;OXk;vd$@?2>{d!Kmh;% literal 0 HcmV?d00001 diff --git a/htdocs/telephonie/ligne/history.php b/htdocs/telephonie/ligne/history.php new file mode 100644 index 00000000000..437b8252f86 --- /dev/null +++ b/htdocs/telephonie/ligne/history.php @@ -0,0 +1,410 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + +require("./pre.inc.php"); + + +$mesg = ''; + + +if ($_POST["action"] == 'add') +{ + $ligne = new LigneTel($db); + + $ligne->numero = $_POST["numero"]; + $ligne->client = $_POST["client"]; + $ligne->client_facture = $_POST["client_facture"]; + $ligne->fournisseur = $_POST["fournisseur"]; + $ligne->commercial = $_POST["commercial"]; + $ligne->remise = $_POST["remise"]; + $ligne->note = $_POST["note"]; + + + if ( $ligne->create($user) ) + { + Header("Location: fiche.php?id=".$ligne->id); + } + +} + +if ($_POST["action"] == 'addcontact') +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + if ( $ligne->add_contact($_POST["contact_id"]) ) + { + Header("Location: fiche.php?id=".$ligne->id); + } + +} + + +if ($_GET["action"] == 'delcontact') +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + if ( $ligne->del_contact($_GET["contact_id"]) ) + { + Header("Location: fiche.php?id=".$ligne->id); + } + +} + +if ($_GET["action"] == 'active') +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + if ( $ligne->set_statut($user, 3) == 0) + { + Header("Location: fiche.php?id=".$ligne->id); + } + +} + +if ($_GET["action"] == 'resilier') +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + if ( $ligne->set_statut($user, 4) == 0) + { + Header("Location: fiche.php?id=".$ligne->id); + } +} + +if ($_GET["action"] == 'annuleresilier') +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + if ( $ligne->set_statut($user, 3) == 0) + { + Header("Location: fiche.php?id=".$ligne->id); + } +} + + + + +if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + $ligne->numero = $_POST["numero"]; + $ligne->client = $_POST["client"]; + $ligne->client_facture = $_POST["client_facture"]; + $ligne->fournisseur = $_POST["fournisseur"]; + $ligne->commercial = $_POST["commercial"]; + $ligne->remise = $_POST["remise"]; + $ligne->note = $_POST["note"]; + + if ( $ligne->update($user) ) + + { + $action = ''; + $mesg = 'Fiche mise à jour'; + } + else + { + $action = 're-edit'; + $mesg = 'Fiche non mise à jour !' . "
" . $entrepot->mesg_error; + } +} + + +llxHeader("","","Fiche Ligne"); + +if ($cancel == $langs->trans("Cancel")) +{ + $action = ''; +} +/* + * Affichage + * + */ +/* + * Création + * + */ + +if ($_GET["action"] == 'create') +{ + $ligne = new LigneTel($db); + print "
\n"; + print ''; + print ''."\n"; + print_titre("Nouvelle ligne"); + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + + print ''; + + print '"; + + print ''; + print '
Numéro
Client'; + print '
Client à facturer'; + print '
Fournisseur'; + print '
Commercial'; + print '
Remise %
Note'; + print '
 
'; + print '
'; +} +else +{ + if ($_GET["id"] or $_GET["numero"]) + { + if ($_GET["action"] <> 're-edit') + { + $ligne = new LigneTel($db); + if ($_GET["id"]) + { + $result = $ligne->fetch_by_id($_GET["id"]); + } + if ($_GET["numero"]) + { + $result = $ligne->fetch($_GET["numero"]); + } + } + + if ( $result ) + { + if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') + { + + $h=0; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; + $head[$h][1] = $langs->trans("Ligne"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Infos'); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/history.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Historique'); + $hselected = $h; + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/conso.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Conso'); + $h++; + + dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + + print_fiche_titre('Fiche Ligne', $mesg); + + print ''; + + print ''; + print ''; + + $client = new Societe($db, $ligne->client_id); + $client->fetch($ligne->client_id); + + print ''; + + $client_facture = new Societe($db); + $client_facture->fetch($ligne->client_facture_id); + + print ''; + + + print ''; + + /* Contacts */ + + $sql = "SELECT ".$db->pdate("l.tms").", l.statut, l.fk_user, u.name, u.firstname, l.comment"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne_statut as l"; + $sql .= ",".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE u.rowid = l.fk_user AND l.fk_ligne = ".$ligne->id; + $sql .= " ORDER BY l.tms DESC "; + if ( $db->query( $sql) ) + { + $num = $db->num_rows(); + if ( $num > 0 ) + { + $i = 0; + while ($i < $num) + { + $row = $db->fetch_row($i); + + print ''; + + print '"; + $i++; + } + } + $db->free(); + } + else + { + print $sql; + } + + /* Fin Contacts */ + + if ($_GET["action"] <> 'edit' && 0) + { + print ''; + } + + print "
Numéro'.dolibarr_print_phone($ligne->numero).'Facturée : '.$ligne->facturable.' 
Client'.$client->nom.'Client Facturé'.$client_facture->nom.'
Statut'; + print ' '; + print $ligne->statuts[$ligne->statut]; + print '
'.strftime("%a %d %B %Y %H:%M:%S",$row[0]).' '; + print $ligne->statuts[$row[1]]; + if ($row[5]) + { + print '
'.$row[5]; + } + + print '
'.$row[4] . " " . $row[3] . "
Point de rentabilité'; + + + print ''; + + print '
"; + } + } + + + + + + /* + * + * + * + */ + + } + else + { + print "Error"; + } +} + +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ + + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/telephonie/ligne/infoc.php b/htdocs/telephonie/ligne/infoc.php new file mode 100644 index 00000000000..9609f649dab --- /dev/null +++ b/htdocs/telephonie/ligne/infoc.php @@ -0,0 +1,408 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + +require("./pre.inc.php"); + +$mesg = ''; + +if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) +{ + $ligne = new LigneTel($db); + $ligne->id = $_GET["id"]; + + $ligne->code_analytique = $_POST["code_ana"]; + + if ( $ligne->update_infoc($user) ) + + { + $action = ''; + $mesg = 'Fiche mise à jour'; + Header("Location: infoc.php?id=".$ligne->id); + } + else + { + $action = 're-edit'; + $mesg = 'Fiche non mise à jour !' . "
" . $entrepot->mesg_error; + } +} + + +llxHeader("","","Fiche Ligne"); + +if ($cancel == $langs->trans("Cancel")) +{ + $action = ''; +} +/* + * Affichage + * + */ +/* + * Création + * + */ + +if ($_GET["action"] == 'create') +{ + $ligne = new LigneTel($db); + print "
\n"; + print ''; + print ''."\n"; + print_titre("Nouvelle ligne"); + + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + /* + * Commercial + */ + + print ''; + + /* + * Concurrents + */ + + print ''; + + + print ''; + + print '"; + + print ''; + print '
Numéro
Client'; + print '
Client à facturer'; + print '
Fournisseur'; + print '
Commercial'; + print '
Fournisseur précédent'; + print '
Remise %
Note'; + print '
 
'; + print '
'; +} +else +{ + if ($_GET["id"] or $_GET["numero"]) + { + if ($_GET["action"] <> 're-edit') + { + $ligne = new LigneTel($db); + if ($_GET["id"]) + { + $result = $ligne->fetch_by_id($_GET["id"]); + } + if ($_GET["numero"]) + { + $result = $ligne->fetch($_GET["numero"]); + } + } + + if ( $result ) + { + if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') + { + + $h=0; + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; + $head[$h][1] = $langs->trans("Ligne"); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Infos'); + $hselected = $h; + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/history.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Historique'); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/conso.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Conso'); + $h++; + + dolibarr_fiche_head($head, $hselected, 'Ligne : '.$ligne->numero); + + print_fiche_titre('Informations complémentaires', $mesg); + + print ''; + + print ''; + print ''; + + $client = new Societe($db, $ligne->client_id); + $client->fetch($ligne->client_id); + + print ''; + + $client_facture = new Societe($db); + $client_facture->fetch($ligne->client_facture_id); + + print ''; + + print ''; + + print ''; + + + + + print "
Numéro'.dolibarr_print_phone($ligne->numero).'Facturée : '.$ligne->facturable.'
Client'.$client->nom.'
Client Facturé'; + print $client_facture->nom.''; + + print ''; + + if ($ligne->mode_paiement == 'pre') + { + print 'RIB : '.$client_facture->display_rib(); + } + else + { + print 'Paiement par virement'; + } + + print '
Remise LMN'.$ligne->remise.' %
Code analytique'.$ligne->code_analytique.' 
"; + } + } + + + if ($_GET["action"] == 'edit' || $action == 're-edit') + { + print_fiche_titre('Edition des informations complémentaires de la ligne', $mesg); + + print "
id\" method=\"post\">\n"; + print ''; + + print ''; + + print ''; + + $client = new Societe($db, $ligne->client_id); + $client->fetch($ligne->client_id); + + print ''; + + print ''; + + print ''; + + print ''; + print '
Numéro'.$ligne->numero.'
Client'.$client->nom; + print '
Remise LMN'.$ligne->remise.' %
Code Analytique 
 '; + print 'Annuler
'; + print '
'; + } + + /* + * + * + * + */ + + } + else + { + print "Error"; + } +} + +print ''; + +if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 2) +{ + $form = new Form($db); + + print '
'; + + print '
'; + print ''; + print ''; + print ''; + print '
Activer'; + print '
Date'; + print $form->select_date(); + print '
'; + + print '
'; + + + print '
'; + print ''; + print ''; + print ''; + print '
Refuser'; + print '
Date'; + print $form->select_date(); + print '
'; + + print '
'; +} + +if ( $user->rights->telephonie->ligne_activer && $ligne->statut == 5) +{ + /** + * Résiliation demandée + */ + $form = new Form($db); + + print '
'; + + print '
'; + print ''; + print ''; + print ''; + print '
Confirmation de la résiliation'; + print '
Date'; + print $form->select_date(); + print '
'; + + print '
'; + + print ' 
'; +} + + +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ + +print "
\n"; + +if ($_GET["action"] == '') +{ + print "id\">".$langs->trans("Edit").""; +} + +print "
"; + + + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?>