This commit is contained in:
Rodolphe Quiedeville 2002-04-30 15:36:13 +00:00
parent bdfb01f0e4
commit 41ec00f328
14 changed files with 484 additions and 181 deletions

View File

@ -79,6 +79,7 @@ function llxHeader($head = "", $urlp = "") {
*/
print "<TR><TD valign=\"top\" align=\"right\">";
print '<div align="center"><A href="'.$urlp.'../product/">Produits</A></div>';
print '<div align="center"><A href="'.$urlp.'../service/">Services</A></div>';
print "</td></tr>";
/*
*
@ -121,14 +122,6 @@ function llxHeader($head = "", $urlp = "") {
print "<TD valign=\"top\" width=\"85%\">\n";
}
function llxFooter($foot='') {
print "</TD></TR>";
/*
*
*/
print "</TABLE>\n";
print "$foot</BODY></HTML>";
}
/*
* $Id$
* $Source$

View File

@ -21,7 +21,7 @@
*/
require("./pre.inc.php3");
require("../../lib/functions.inc.php3");
require("../../societe.class.php3");
require("./project.class.php3");
require("../propal.class.php3");
@ -54,25 +54,38 @@ $pagenext = $page + 1;
if ($action == 'create') {
?>
<form action="index.php3" method="post">
<table border=1 cellpadding="1" cellspacing="0">
<input type="hidden" name="action" value="create">
<tr><td>Société</td><td>
<?PHP print '<input type="text" name="socidp" value="'.$socidp.'">'; ?>
</td></tr>
<?PHP
print '<tr><td>Créateur</td><td>'.$user->fullname.'</td></tr>';
?>
<tr><td>Ref</td><td><input type="text" name="ref"></td></tr>
<tr><td>Titre</td><td><input type="text" name="title"></td></tr>
<tr><td colspan="2"><input type="submit"></td></tr>
</table>
</form>
<?PHP
print '<form action="index.php3?socidp='.$socidp.'" method="post">';
?>
<table border=1 cellpadding="1" cellspacing="0">
<input type="hidden" name="action" value="create">
<tr><td>Société</td><td>
<?PHP
$societe = new Societe($db);
$societe->get_nom($socidp);
print $societe->nom;
?>
</td></tr>
<?PHP
print '<tr><td>Créateur</td><td>'.$user->fullname.'</td></tr>';
?>
<tr><td>Référence</td><td><input size="10" type="text" name="ref"></td></tr>
<tr><td>Titre</td><td><input size="30" type="text" name="title"></td></tr>
<tr><td colspan="2"><input type="submit"></td></tr>
</table>
</form>
<?PHP
} else {
/*
*
*
*
*/
$propales = array();
$projet = new Project();
$projet->fetch($db, $id);
@ -119,7 +132,6 @@ print '<tr><td>Cr
print '<td align="right"><small>Soit : '.francs($total).' FF HT</small></td>';
print '<td colspan="1" align="right"><b>Total : '.price($total).'</b></td>';
print '<td align="left"><b>Euros HT</b></td></tr>';
print "</TABLE>";

View File

@ -63,7 +63,7 @@ function llxHeader($head = "", $urlp = "") {
print "<A href=\"".$urlp."../../compta/\">Factures</A><BR>\n";
print "<A href=\"".$urlp."product.php3\">Produits</A><BR>\n";
print "<A href=\"".$urlp."../../product/\">Produits</A><BR>\n";
print "</td></tr>";
@ -99,14 +99,6 @@ function llxHeader($head = "", $urlp = "") {
print "<TD valign=\"top\" width=\"85%\">\n";
}
function llxFooter($foot='') {
print "</TD></TR>";
/*
*
*/
print "</TABLE>\n";
print "$foot</BODY></HTML>";
}
/*
* $Id$
* $Source$

View File

@ -101,10 +101,7 @@ function llxHeader($head = "") {
/*
*
*/
function llxFooter($foot='') {
print "</TD></TR></TABLE>\n";
print "$foot</BODY></HTML>";
}
// $Id$
// $Source$
?>

View File

@ -33,6 +33,17 @@ $db = new Db();
$user = new User($db);
$user->fetch($GLOBALS["REMOTE_USER"]);
function llxFooter($foot='') {
print "</TD></TR>";
/*
*
*/
print "</TABLE>\n";
print "$foot<br>";
print '[<a href="http://savannah.gnu.org/bugs/?group_id=1915">Bug report</a>]&nbsp;';
print '[<a href="http://savannah.gnu.org/projects/dolibarr/">Source Code</a>]&nbsp;';
print "</BODY></HTML>";
}
?>

View File

@ -63,6 +63,7 @@ function llxHeader($head = "") {
print "<A href=\"/dict/\">Dictionnaires</A>\n";
print '</td></tr>';
print "<TR><TD valign=\"top\" align=\"right\">";
print "<center><A href=\"/comm/propal.php3\">Propal</A></center>\n";
print '</td></tr>';
@ -73,6 +74,8 @@ function llxHeader($head = "") {
print "<TR><TD valign=\"top\" align=\"right\">";
print "<center><A href=\"/product/\">Produits</center></A>\n";
print "<center><A href=\"/service/\">Services</center></A>\n";
print '</td></tr>';
print "<TR><TD valign=\"top\" align=\"right\">";
@ -86,13 +89,5 @@ function llxHeader($head = "") {
*/
print "</TD>\n<TD valign=\"top\" width=\"85%\">\n";
}
function llxFooter($foot='') {
print "</TD></TR></TABLE>\n";
print "$foot</BODY></HTML>";
}
?>

View File

@ -57,9 +57,6 @@ function llxHeader($head = "", $urlp = "") {
print "<TR><TD valign=\"top\" align=\"right\">";
print "<div align=\"center\"><A href=\"".$urlp."actioncomm.php3\">Actions</A></div>\n";
print "<A href=\"".$urlp."actioncomm.php3?type=9\">Factures</A><BR>\n";
print "<A href=\"".$urlp."actioncomm.php3?type=5\">Propal FE</A><BR>\n";
print "<A href=\"".$urlp."actioncomm.php3?type=11\">Cl&ocirc;ture</A><p>\n";
print "</TD></TR>";
/*
*
@ -73,12 +70,6 @@ function llxHeader($head = "", $urlp = "") {
print "<TR><TD valign=\"top\" align=\"right\">";
print '<div align="center"><A href="'.$urlp.'../compta/\">Factures</A></div>';
print "</TD></TR>";
/*
*
*/
print "<TR><TD valign=\"top\" align=\"right\">";
print '<div align="center"><A href="'.$urlp.'product.php3">Produits</A></div>';
print "</td></tr>";
/*
*
*/
@ -86,14 +77,9 @@ function llxHeader($head = "", $urlp = "") {
print "<A href=\"projet/\">Projets</A><BR>\n";
print "</td></tr>";
print "<tr><td align=\"right\" valign=\"top\">";
print "<A href=\"".$urlp."stats/\">Stats</A><BR>\n";
print "</td></tr>";
print "<tr><td align=\"right\" valign=\"top\">";
print "<CENTER><A href=\"".$urlp."index.php3\">Societes</A></CENTER>\n";
print "<form action=\"index.php3\">";
print "<CENTER><A href=\"".$urlp."../comm/index.php3\">Societes</A></CENTER>\n";
print "<form action=\"../comm/index.php3\">";
print '<input type="hidden" name="mode" value="search">';
print '<input type="hidden" name="mode-search" value="soc">';
print '<input type="text" name="socname" size="8">&nbsp;';
@ -123,14 +109,7 @@ function llxHeader($head = "", $urlp = "") {
print "<TD valign=\"top\" width=\"85%\">\n";
}
function llxFooter($foot='') {
print "</TD></TR>";
/*
*
*/
print "</TABLE>\n";
print "$foot</BODY></HTML>";
}
/*
* $Id$
* $Source$

174
htdocs/service.class.php3 Normal file
View File

@ -0,0 +1,174 @@
<?PHP
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* $Id$
* $Source$
*
* 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.
*
*/
class Service {
var $db;
var $id;
var $libelle;
var $price;
var $tms;
var $debut;
var $fin;
var $debut_epoch;
var $fin_epoch;
Function Service($DB, $id=0) {
$this->db = $DB;
$this->id = $id;
return 1;
}
/*
*
*
*
*/
Function create($userid) {
$sql = "INSERT INTO llx_service (datec, fk_user_author) VALUES (now(), $userid)";
if ($this->db->query($sql) ) {
$id = $this->db->last_insert_id();
if ( $this->update($id, $userid) ) {
return $id;
}
} else {
print $this->db->error() . ' in ' . $sql;
}
}
/*
*
*
*
*/
Function update($id, $userid) {
$sql = "UPDATE llx_service ";
$sql .= " SET label = '" . trim($this->libelle) ."'";
$sql .= ",ref = '" . trim($this->ref) ."'";
$sql .= ",price = " . $this->price ;
$sql .= ",fk_user_modif = " . $userid ;
$sql .= " WHERE rowid = " . $id;
if ( $this->db->query($sql) ) {
return 1;
} else {
print $this->db->error() . ' in ' . $sql;
}
}
/*
*
*
*
*/
Function start_comm($id, $userid, $datedeb=0) {
$sql = "UPDATE llx_service ";
if ($datedeb) {
$sql .= " SET debut_comm = '$datedeb'";
} else {
$sql .= " SET debut_comm = now()";
}
$sql .= ",fk_user_modif = " . $userid ;
$sql .= " WHERE rowid = " . $id;
if ( $this->db->query($sql) ) {
return 1;
} else {
print $this->db->error() . ' in ' . $sql;
}
}
/*
*
*
*
*/
Function stop_comm($id, $userid, $datefin=0) {
$sql = "UPDATE llx_service ";
if ($datefin) {
$sql .= " SET fin_comm = '$datefin'";
} else {
$sql .= " SET fin_comm = now()";
}
$sql .= ",fk_user_modif = " . $userid ;
$sql .= " WHERE rowid = " . $id;
if ( $this->db->query($sql) ) {
return 1;
} else {
print $this->db->error() . ' in ' . $sql;
}
}
/*
*
*
*
*/
Function fetch($id) {
$sql = "SELECT s.ref,s.label,s.price,s.tms,s.debut_comm,s.fin_comm,";
$sql .= $this->db->pdate("s.debut_comm") . ' as debut_epoch,';
$sql .= $this->db->pdate("s.fin_comm") . ' as fin_epoch';
$sql .= " FROM llx_service as s";
$sql .= " WHERE s.rowid = $id";
$result = $this->db->query($sql);
if ($result) {
if ($this->db->num_rows()) {
$obj = $this->db->fetch_object($result , 0);
$this->id = $obj->rowid;
$this->ref = $obj->ref;
$this->libelle = $obj->label;
$this->price = $obj->price;
$this->tms = $obj->tms;
$this->debut = $obj->debut_comm;
$this->fin = $obj->fin_comm;
$this->debut_epoch = $obj->debut_epoch;
$this->fin_epoch = $obj->fin_epoch;
}
$this->db->free();
} else {
print $this->db->error();
}
}
}
/*
* $Id$
* $Source$
*/
?>

View File

@ -21,21 +21,46 @@
*/
require("./pre.inc.php3");
require("../service.class.php3");
llxHeader();
$db = new Db();
if ($action == "create") {
if ($action == 'add') {
$service = new Service($db);
$service->ref = $ref;
$service->libelle = $label;
$service->price = $price;
$service->description = $desc;
$id = $service->create($user->id);
if ($comm_now && $id) {
$service->start_comm($id, $user->id);
}
}
if ($action == 'set_datedeb') {
$service = new Service($db);
$service->start_comm($id, $user->id, $datedeb);
}
if ($action == 'set_datefin') {
$service = new Service($db);
$service->stop_comm($id, $user->id, $datefin);
}
if ($action == 'create') {
print "Nouveau service<br>";
print "<form action=\"$PHP_SELF?rowid=$rowid\" method=\"post\">\n";
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
print '<form action="'.$PHP_SELF.'" method="post">';
print '<input type="hidden" name="action" value="add">';
print '<table border="1" cellpadding="3" cellspacing="0">';
print '<tr><td valign="top">Référence</td>';
print '<td><input size="12" type="text" name="label"</td></tr>';
print '<td><input size="12" type="text" name="ref"</td></tr>';
print '<tr><td valign="top">Libelle</td>';
print '<td><input size="30" type="text" name="label"</td></tr>';
@ -46,11 +71,99 @@ if ($action == "create") {
print '<tr><td valign="top">Description</td><td>';
print "<textarea name=\"desc\" rows=\"12\" cols=\"40\">";
print "</textarea></td></tr>";
print '<tr><td valign="top">Commercialisé</td>';
print '<td><select name="comm_now">';
print '<option value="1">oui';
print '<option value="0">non';
print '</td></tr>';
print '<tr><td align="center" colspan="2"><input type="submit"></td></tr>';
print '</form>';
print '</table>';
} else {
if ($id) {
print "<table width=\"100%\" border=\"0\" cellspacing=\"1\">\n";
print '<tr><td><a href="index.php3">Liste</a></td>';
print '<td width="20%" bgcolor="#e0E0E0" align="center">[<a href="fiche.php3?action=datedeb&id='.$id.'">Date de debut</a>]</td>';
print '<td width="20%">&nbsp;</td>';
print '<td width="20%" bgcolor="#e0E0E0" align="center">[<a href="fiche.php3?action=datefin&id='.$id.'">Date de fin</a>]</td>';
print '<td></td>';
print '<td></td>';
print '</table><br>';
$service = new Service($db);
$service->fetch($id);
print '<table width="100%" border="1" cellpadding="3" cellspacing="0">';
print '<tr><td valign="top">Référence</td>';
print '<td bgcolor="#e0e0e0">'.$service->ref.'</td>';
print '<td valign="top">Créé le</td>';
print '<td>'.$service->tms.'</td></tr>';
print '<tr><td valign="top">Libelle</td>';
print '<td bgcolor="#e0e0e0">'.$service->libelle.'</td>';
print '<td valign="top">Début comm</td>';
print '<td>'.$service->debut.'</td></tr>';
print '<tr><td valign="top">Prix</td>';
print '<td>'.price($service->price).'</td>';
print '<td valign="top">Fin comm</td>';
if ($service->fin_epoch < time()) {
print '<td bgcolor="#99ffff"><b>'.$service->fin.'&nbsp;</b></td></tr>';
} else {
print '<td>'.$service->fin.'&nbsp;</td></tr>';
}
print '<tr><td valign="top">Description</td><td colspan="3">';
print "<textarea name=\"desc\" rows=\"12\" cols=\"40\">";
print "</textarea></td></tr>";
print '</table>';
/*
*
*
*
*/
if ($action == 'datedeb') {
print '<p><b>Affectation de la date de début de commercialisation</b></p>';
print '<form action="'.$PHP_SELF.'?id='.$id.'" method="post">';
print '<input type="hidden" name="action" value="set_datedeb">';
print '<table width="100%" border="1" cellpadding="3" cellspacing="0">';
print '<tr><td>Date de debut de commercialisation</td>';
print '<td><input size="10" type="text" name="datedeb" value="'.strftime("%Y-%m-%d", time()).'"></td>';
print '<td><input type="submit"></td></tr>';
print '</table></form><br>';
}
/*
*
*
*
*/
if ($action == 'datefin') {
print '<p><b>Affectation de la date de fin de commercialisation</b></p>';
print '<form action="'.$PHP_SELF.'?id='.$id.'" method="post">';
print '<input type="hidden" name="action" value="set_datefin">';
print '<table width="100%" border="1" cellpadding="3" cellspacing="0">';
print '<tr><td>Date de fin de commercialisation</td>';
print '<td><input size="10" type="text" name="datefin" value="'.strftime("%Y-%m-%d", time()).'"></td>';
print '<td><input type="submit"></td></tr>';
print '</table></form><br>';
}
}
}
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");

View File

@ -35,14 +35,6 @@ if ($sortorder == "") {
$sortorder="ASC";
}
if ($action == 'update') {
$sql = "UPDATE llx_product SET description='$desc' where rowid = $rowid";
$db->query($sql);
}
$yn["t"] = "oui";
$yn["f"] = "non";
if ($page == -1) { $page = 0 ; }
$limit = 26;
$offset = $limit * $page ;
@ -57,89 +49,81 @@ print "<a href=\"$PHP_SELF\">Liste</a></td>";
print "<td bgcolor=\"#e0E0E0\" align=\"center\">[<a href=\"fiche.php3?action=create\">Nouveau service</a>]</td>";
print '</table>';
/*
* Fiche
*
*/
if ($rowid) {
$sql = "SELECT p.rowid, p.label, p.price, p.description, p.duration,p.ref FROM llx_product as p";
$sql .= " WHERE p.rowid = $rowid;";
if ( $db->query($sql) ) {
$num = $db->num_rows();
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<TR bgcolor=\"orange\">";
print "<TD>Réf</TD>";
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Nom</a></td>";
print "</TR>\n";
$var=True;
if ( $num ) {
$objp = $db->fetch_object(0);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"$PHP_SELF?rowid=$objp->rowid\">$objp->ref</a></TD>\n";
print "<TD>$objp->label</TD></tr>\n";
print "<tr><td>prix</td><TD>$objp->price</td></tr>\n";
print "<tr><td>duree</td><TD>$objp->duration</td></tr>\n";
print "<tr><td>desc</td><td>".nl2br($objp->description)."</td></tr>";
$i++;
}
print "</TABLE>";
$db->free();
print "<hr><form action=\"$PHP_SELF?rowid=$rowid\" method=\"post\">\n";
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
print "<textarea name=\"desc\" rows=\"12\" cols=\"40\">";
print nl2br($objp->description);
print "</textarea><br>";
print "<input type=\"submit\">";
print "</form>";
}
/*
*
* Liste
*
*/
} else {
$now = strftime ("%Y-%m-%d %H:%M", time());
$sql = "SELECT p.rowid, p.label, p.price, p.duration,p.ref FROM llx_product as p";
$sql .= " ORDER BY $sortfield $sortorder ";
$sql .= $db->plimit( $limit ,$offset);
$sql = "SELECT p.rowid, p.label, p.price, p.duration,p.ref FROM llx_service as p";
$sql .= " WHERE p.fin_comm >= '$now'";
$sql .= " ORDER BY $sortfield $sortorder ";
$sql .= $db->plimit( $limit ,$offset);
if ( $db->query($sql) ) {
$num = $db->num_rows();
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<TR bgcolor=\"orange\">";
print "<TD>Réf</TD>";
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Nom</a></td>";
print "<TD align=\"right\">Prix</TD>";
print "<TD align=\"right\">Durée</TD>";
print "</TR>\n";
$var=True;
while ($i < $num) {
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"$PHP_SELF?rowid=$objp->rowid\">$objp->ref</a></TD>\n";
print "<TD>$objp->label</TD>\n";
print '<TD align="right">'.price($objp->price).'</TD>';
print "<TD align=\"right\">$objp->duration</TD>\n";
print "</TR>\n";
$i++;
}
print "</TABLE>";
$db->free();
}
if ( $db->query($sql) ) {
$num = $db->num_rows();
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<TR bgcolor=\"orange\">";
print "<TD>Réf</TD>";
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Nom</a></td>";
print "<TD align=\"right\">Prix</TD>";
print "</TR>\n";
$var=True;
while ($i < $num) {
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"fiche.php3?id=$objp->rowid\">$objp->ref</a></TD>\n";
print "<TD>$objp->label</TD>\n";
print '<TD align="right">'.price($objp->price).'</TD>';
print "</TR>\n";
$i++;
}
print "</TABLE>";
$db->free();
} else {
print $this->db->error() . ' in ' . $sql;
}
$sql = "SELECT p.rowid, p.label, p.fin_comm, p.price, p.duration,p.ref FROM llx_service as p";
$sql .= " WHERE p.fin_comm < '$now'";
$sql .= " ORDER BY $sortfield $sortorder ";
$sql .= $db->plimit( $limit ,$offset);
if ( $db->query($sql) ) {
$num = $db->num_rows();
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<TR bgcolor=\"orange\">";
print "<TD>Réf</TD>";
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Nom</a></td>";
print "<TD align=\"right\">Prix</TD>";
print "<TD align=\"right\">Fin</TD>";
print "</TR>\n";
$var=True;
while ($i < $num) {
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"fiche.php3?id=$objp->rowid\">$objp->ref</a></TD>\n";
print "<TD>$objp->label</TD>\n";
print '<TD align="right">'.price($objp->price).'</TD>';
print "<TD align=\"right\">$objp->fin_comm</TD>\n";
print "</TR>\n";
$i++;
}
print "</TABLE>";
$db->free();
} else {
print $this->db->error() . ' in ' . $sql;
}
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");

View File

@ -50,7 +50,7 @@ function llxHeader($head = "", $urlp = "") {
print "</td></tr>";
print "<tr><td valign=\"top\" align=\"right\">";
print "<CENTER><A href=\"".$urlp."index.php3\">Societe</A></CENTER>\n";
print "<CENTER><A href=\"".$urlp."../comm/index.php3\">Societe</A></CENTER>\n";
print "<A href=\"".$urlp."contact.php3\">Contact</A><BR>\n";
print "</TD></TR>";
@ -62,20 +62,13 @@ function llxHeader($head = "", $urlp = "") {
*
*/
print "<TR><TD valign=\"top\" align=\"right\">";
print '<div align="center"><A href="'.$urlp.'propal.php3">Propal</A></div>';
print "<center><A href=\"/product/\">Produits</center></A>\n";
print "</TD></TR>";
/*
*
*/
print "<TR><TD valign=\"top\" align=\"right\">";
print '<div align="center"><A href="'.$urlp.'../compta/\">Factures</A></div>';
print "</TD></TR>";
/*
*
*/
print "<tr><td align=\"right\" valign=\"top\">";
print "<A href=\"projet/\">Projets</A><BR>\n";
print "</td></tr>";
print '<TR><TD valign="top" bgcolor="#e0e0e0" align="right">';
print '<div align="center"><A href="/service/">Services</A></div><br>';
print '<a href="fiche.php3?action=create">Nouveau service</a>';
print '</td></tr>';
print "<tr><td align=\"right\" valign=\"top\">";
print "<CENTER><A href=\"".$urlp."../comm/index.php3\">Societes</A></CENTER>\n";
@ -109,14 +102,6 @@ function llxHeader($head = "", $urlp = "") {
print "<TD valign=\"top\" width=\"85%\">\n";
}
function llxFooter($foot='') {
print "</TD></TR>";
/*
*
*/
print "</TABLE>\n";
print "$foot</BODY></HTML>";
}
/*
* $Id$
* $Source$

46
mysql/data/data_dev.sql Normal file
View File

@ -0,0 +1,46 @@
--
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- $Id$
-- $Source$
--
-- 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.
--
--
-- Valeurs pour les bases de langues francaises
--
delete from llx_user;
insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta)
values ('Quiedeville','Rodolphe','RQ','rodo','rodo',1,1);
insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta)
values ('demo','demo','demo','demo','demo',1,1);
delete from societe;
insert into societe (nom,datec,cp,ville,tel,fax, client)
values ('Lolix',now(),'75001','Paris','01 40 15 03 18','01 40 15 06 18',1);
insert into societe (nom,cp,ville,tel,fax,client)
values ('Easter-Eggs','75013','Paris','01 55 55 03 18','01 55 55 55 55',1);
insert into societe (nom,cp,ville,tel,fax,fournisseur)
values ('JPG','75013','Paris','01 55 55 03 18','01 55 55 55 55',1);
insert into llx_product (ref, label, description, price, duration)
values ('CC-2M','Compilo','Compilateur GCC',10,'1 mois');
insert into llx_product (ref, label, description, price, duration)
values ('CC-2M','Config Alpha','Configurations a base de proc alpha',1000,'1 mois');

View File

@ -1,6 +1,24 @@
-- ===================================================================
-- $Id$
-- $Source$
--
-- $Id$
-- $Source$
--
-- 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.
--
-- ===================================================================
create table llx_product

View File

@ -32,6 +32,10 @@ create table llx_service
price smallint,
duration varchar(32),
debut_comm datetime,
fin_comm datetime
fin_comm datetime,
fk_user_auhtor integer,
fk_user_modif integer,
UNIQUE INDEX(ref)
);