Nouveaux fichiers
This commit is contained in:
parent
e19d2c83b2
commit
b93f1b8d83
98
htdocs/projet/commandes.php
Normal file
98
htdocs/projet/commandes.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* 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");
|
||||
|
||||
|
||||
llxHeader("","../");
|
||||
|
||||
$projet = new Project($db);
|
||||
$projet->fetch($id);
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
|
||||
$head[$h][1] = 'Fiche projet';
|
||||
|
||||
$head[$h+1][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;
|
||||
$head[$h+1][1] = 'Prop. Commerciales';
|
||||
|
||||
$head[$h+2][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id;
|
||||
$head[$h+2][1] = 'Commandes';
|
||||
|
||||
$head[$h+3][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id;
|
||||
$head[$h+3][1] = 'Factures';
|
||||
|
||||
dolibarr_fiche_head($head, 2);
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
$projet->societe->fetch($projet->societe->id);
|
||||
|
||||
print '<table class="border" border="1" cellpadding="4" cellspacing="0" width="100%">';
|
||||
print '<tr><td width="20%">Titre</td><td>'.$projet->title.'</td>';
|
||||
print '<td width="20%">Réf</td><td>'.$projet->ref.'</td></tr>';
|
||||
print '<tr><td>Société</td><td colspan="3"><a href="../comm/fiche.php?socid='.$projet->societe->id.'">'.$projet->societe->nom.'</a></td></tr>';
|
||||
print '</table><br>';
|
||||
|
||||
/*
|
||||
* 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 '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<TR class="liste_titre">';
|
||||
print '<td width="15%">Réf</td><td width="25%">Date</td><td align="right">Montant</td><td> </td></tr>';
|
||||
|
||||
for ($i = 0; $i<sizeof($commandes);$i++)
|
||||
{
|
||||
$commande = new Commande($db);
|
||||
$commande->fetch($commandes[$i]);
|
||||
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<td><a href=\"../commande/fiche.php?id=$commande->id\">$commande->ref</a></TD>\n";
|
||||
print '<td>'.strftime("%d %B %Y",$commande->date).'</td>';
|
||||
print '<TD align="right">'.price($commande->total_ht).'</td><td> </td></tr>';
|
||||
|
||||
$total = $total + $commande->total_ht;
|
||||
}
|
||||
|
||||
print '<tr><td>'.$i.' commandes</td><td> </td>';
|
||||
print '<td align="right">Total : '.price($total).'</td>';
|
||||
print '<td align="right">'.MAIN_MONNAIE.' HT</td></tr>';
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
99
htdocs/projet/facture.php
Normal file
99
htdocs/projet/facture.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* 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");
|
||||
|
||||
|
||||
llxHeader("","../");
|
||||
|
||||
$projet = new Project($db);
|
||||
$projet->fetch($id);
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
|
||||
$head[$h][1] = 'Fiche projet';
|
||||
|
||||
$head[$h+1][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;
|
||||
$head[$h+1][1] = 'Prop. Commerciales';
|
||||
|
||||
$head[$h+2][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id;
|
||||
$head[$h+2][1] = 'Commandes';
|
||||
|
||||
$head[$h+3][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id;
|
||||
$head[$h+3][1] = 'Factures';
|
||||
|
||||
dolibarr_fiche_head($head, 3);
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
$projet->societe->fetch($projet->societe->id);
|
||||
|
||||
print '<table class="border" border="1" cellpadding="4" cellspacing="0" width="100%">';
|
||||
print '<tr><td width="20%">Titre</td><td>'.$projet->title.'</td>';
|
||||
print '<td width="20%">Réf</td><td>'.$projet->ref.'</td></tr>';
|
||||
print '<tr><td>Société</td><td colspan="3"><a href="../comm/fiche.php?socid='.$projet->societe->id.'">'.$projet->societe->nom.'</a></td></tr>';
|
||||
print '</table><br>';
|
||||
|
||||
|
||||
/*
|
||||
* 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 '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="15%">Réf</td><td width="25%">Date</td><td align="right">Montant</td><td> </td></tr>';
|
||||
|
||||
for ($i = 0; $i<sizeof($factures);$i++)
|
||||
{
|
||||
$facture = new Facture($db);
|
||||
$facture->fetch($factures[$i]);
|
||||
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD><a href=\"../compta/facture.php?facid=$facture->id\">$facture->ref</a></TD>\n";
|
||||
print '<td>'.strftime("%d %B %Y",$facture->date).'</td>';
|
||||
print '<TD align="right">'.price($facture->total_ht).'</td><td> </td></tr>';
|
||||
|
||||
$total = $total + $facture->total_ht;
|
||||
}
|
||||
|
||||
print '<tr><td>'.$i.' factures</td><td> </td>';
|
||||
print '<td align="right">Total : '.price($total).'</td>';
|
||||
print '<td align="left">'.MAIN_MONNAIE.' HT</td></tr>';
|
||||
print "</TABLE>";
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
96
htdocs/projet/propal.php
Normal file
96
htdocs/projet/propal.php
Normal file
@ -0,0 +1,96 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* 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");
|
||||
|
||||
|
||||
llxHeader("","../");
|
||||
|
||||
$projet = new Project($db);
|
||||
$projet->fetch($id);
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
|
||||
$head[$h][1] = 'Fiche projet';
|
||||
|
||||
$head[$h+1][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;
|
||||
$head[$h+1][1] = 'Prop. Commerciales';
|
||||
|
||||
$head[$h+2][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id;
|
||||
$head[$h+2][1] = 'Commandes';
|
||||
|
||||
$head[$h+3][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id;
|
||||
$head[$h+3][1] = 'Factures';
|
||||
|
||||
dolibarr_fiche_head($head, 1);
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
$propales = array();
|
||||
|
||||
$projet->societe->fetch($projet->societe->id);
|
||||
|
||||
print '<table class="border" border="1" cellpadding="4" cellspacing="0" width="100%">';
|
||||
print '<tr><td width="20%">Titre</td><td>'.$projet->title.'</td>';
|
||||
print '<td width="20%">Réf</td><td>'.$projet->ref.'</td></tr>';
|
||||
print '<tr><td>Société</td><td colspan="3"><a href="../comm/fiche.php?socid='.$projet->societe->id.'">'.$projet->societe->nom.'</a></td></tr>';
|
||||
print '</table><br>';
|
||||
|
||||
$propales = $projet->get_propal_list();
|
||||
|
||||
if (sizeof($propales)>0 && is_array($propales))
|
||||
{
|
||||
print_titre('Listes des propositions commerciales associées au projet');
|
||||
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
print '<TR class="liste_titre">';
|
||||
print '<td width="15%">Réf</td><td width="25%">Date</td><td align="right">Montant</td><td> </td></tr>';
|
||||
|
||||
for ($i = 0; $i<sizeof($propales);$i++)
|
||||
{
|
||||
$propale = new Propal($db);
|
||||
$propale->fetch($propales[$i]);
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"../comm/propal.php?propalid=$propale->id\">$propale->ref</a></td>\n";
|
||||
|
||||
print '<td>'.strftime("%d %B %Y",$propale->datep).'</td>';
|
||||
|
||||
print '<td align="right">'.price($propale->price).'</td><td> </td></tr>';
|
||||
$total = $total + $propale->price;
|
||||
}
|
||||
|
||||
print '<tr><td>'.$i.' propales</td><td> </td>';
|
||||
print '<td align="right">Total : '.price($total).'</td>';
|
||||
print '<td align="left">'.MAIN_MONNAIE.' HT</td></tr></table>';
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user