* * 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"); require("./project.class.php"); require("../propal.class.php"); require("../facture.class.php"); require("../commande/commande.class.php"); if ($HTTP_POST_VARS["action"] == 'update') { $projet = new Project($db); $projet->id = $id; $projet->ref = $HTTP_POST_VARS["ref"]; $projet->title = $HTTP_POST_VARS["title"]; $projet->update(); } if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"] == yes) { $projet = new Project($db); $projet->id = $id; $projet->delete(); Header("Location: index.php"); } llxHeader("","../"); if ($action == 'delete') { print '
'; print ''; print ''; print ''; print '\n"; print ''; print '
Supprimer le projet
Etes-vous sur de vouloir supprimer ce projet ?'; $htmls = new Form($db); $htmls->selectyesno("confirm","no"); print "
'; print "
\n"; } if ($action == 'create') { print_titre("Nouveau projet"); print '
'; ?> '; ?>
Société get_nom($socidp); print ''.$societe->nom.''; ?>
Créateur'.$user->fullname.'
Référence
Titre
fetch($id); $projet->societe->fetch($projet->societe->id); if ($action == 'edit') { print '
'; print ''; print ''; print ''; print ''; print ''; print '
Société'.$projet->societe->nom.'
Ref
Titre
'; } else { print ''; print ''; print ''; print ''; print '
Société'.$projet->societe->nom.'
Réf'.$projet->ref.'
Titre'.$projet->title.'
'; } print '

'; if ($action == "edit") { print ""; } else { print ""; } print ''; print ''; print ''; print ""; print "
AnnulerEditer---Supprimer
"; if ($_GET["action"] == '') { $propales = $projet->get_propal_list(); if (sizeof($propales)>0 && is_array($propales)) { print_titre('Listes des propositions commerciales associées au projet'); print ''; print ''; print ''; for ($i = 0; $ifetch($propales[$i]); $var=!$var; print ""; print "\n"; print ''; print ''; $total = $total + $propale->price; } print ''; print ''; print '
RéfDatePrix
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).'
'.$i.' propalesTotal : '.price($total).''.MAIN_MONNAIE.' HT
'; } /* * Commandes * */ $commandes = $projet->get_commande_list(); $total = 0 ; if (sizeof($commandes)>0 && is_array($commandes)) { print_titre('Listes des commandes associées au projet'); print ''; print ''; print ''; for ($i = 0; $ifetch($commandes[$i]); $var=!$var; print ""; print "\n"; print ''; print ''; $total = $total + $commande->total_ht; } print ''; print ''; print ''; print "
RéfDatePrix
id\">$commande->ref'.strftime("%d %B %Y",$commande->date).''.price($commande->total_ht).'
'.$i.' commandesTotal : '.price($total).''.MAIN_MONNAIE.' HT
"; } /* * Factures * */ $factures = $projet->get_facture_list(); $total = 0; if (sizeof($factures)>0 && is_array($factures)) { print_titre('Listes des factures associées au projet'); print ''; print ''; print ''; for ($i = 0; $ifetch($factures[$i]); $var=!$var; print ""; print "\n"; print ''; print ''; $total = $total + $facture->total_ht; } print ''; print ''; print ''; print "
RéfDatePrix
id\">$facture->ref'.strftime("%d %B %Y",$facture->date).''.price($facture->total_ht).'
'.$i.' facturesTotal : '.price($total).''.MAIN_MONNAIE.' HT
"; } } } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>