Massive updates
26
INSTALL
@ -18,3 +18,29 @@ Configuration :
|
||||
Apache :
|
||||
- un fichier httpd.conf.sample est fournit vous pouvez vous en
|
||||
servir pour configurer votre serveur
|
||||
|
||||
Installation
|
||||
------------
|
||||
Base de données :
|
||||
|
||||
Vous trouverez un fichier Makefile dans le repertoire mysql/
|
||||
qui contient toutes les commandes pour creer la base, les tables et
|
||||
les data.
|
||||
|
||||
'make create' cree la base de donnee 'dolibarr' vous pouvez
|
||||
changer le nom de la base avec la commande 'make create
|
||||
BASE=autrenom', pensez a executer 'make create' avec un utilisateur
|
||||
ayant les droits de creation de base. Les droits sur la base sont cree
|
||||
en meme temps, si vous souhaitez les changer vous pouvez editer le
|
||||
fichier Makefile.
|
||||
|
||||
|
||||
'make table' cree les tables
|
||||
|
||||
'make load' charge les donnees necessaire dans les tables de
|
||||
constantes.
|
||||
|
||||
'make dev' charge un ensemble de donnees de test
|
||||
|
||||
Une fois ces 3 commandes passees votre base de donnees est
|
||||
pretes a etre utilisee.
|
||||
@ -43,10 +43,8 @@ $yn["f"] = "non";
|
||||
|
||||
llxHeader();
|
||||
|
||||
print "<table width=\"100%\">";
|
||||
print "<tr><td>Propositions commerciales pour <b><a href=\"index.php3?socid=$socidp\">$objsoc->nom</a></b></td>";
|
||||
print "</tr>";
|
||||
print "</table>";
|
||||
print_titre("Propositions commerciales pour <b><a href=\"index.php3?socid=$socidp\">$objsoc->nom</a></b>");
|
||||
|
||||
|
||||
if ($action == 'add') {
|
||||
$propal = new Propal($db, $socidp);
|
||||
@ -322,5 +320,5 @@ if ( $db->query($sql) ) {
|
||||
print "<p>$sql";
|
||||
}
|
||||
$db->close();
|
||||
llxFooter();
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
|
||||
@ -55,8 +55,8 @@ print "</DIV><P>";
|
||||
|
||||
|
||||
/*
|
||||
* Mode liste
|
||||
*
|
||||
* Mode liste
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ -81,6 +81,10 @@ if ($contactname) {
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
if ($socid) {
|
||||
$sql .= " AND s.idp = $socid";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
@ -98,7 +102,7 @@ if ($result) {
|
||||
print "<td>Action</td><TD>Nom</TD>";
|
||||
print "<TD>Prénom</TD>";
|
||||
print "<TD>email</TD>";
|
||||
print "<TD><a href=\"contact.php3?sortfield=lower(s.nom)&sortorder=$sortorder&begin=$begin\">Societe</a></td>";
|
||||
print "<TD colspan=\"2\"><a href=\"contact.php3?sortfield=lower(s.nom)&sortorder=$sortorder&begin=$begin\">Societe</a></td>";
|
||||
print '<TD align="center">Statut</TD><td> </td>';
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
@ -116,6 +120,7 @@ if ($result) {
|
||||
print "<TD>$obj->name</TD>";
|
||||
print "<TD>$obj->firstname</TD>";
|
||||
print "<TD>$obj->email </TD>\n";
|
||||
print '<TD><a href="contact.php3?socid='.$obj->idp.'"><img src="/theme/'.$conf->theme.'/img/filter.png" border="0"></a></td>';
|
||||
print "<TD><a href=\"index.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
||||
print '<TD align="center">'.$obj->stcomm.'</TD>';
|
||||
print "<TD><a href=\"addpropal.php3?socidp=$obj->idp&setcontact=$obj->cidp&action=create\">[Propal]</A></td>\n";
|
||||
|
||||
@ -31,19 +31,6 @@ if ($sortorder == "") {
|
||||
if ($sortfield == "") {
|
||||
$sortfield="nom";
|
||||
}
|
||||
$bc[0]="bgcolor=\"#c0f0c0\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
$bc2[0]="bgcolor=\"#c9f000\"";
|
||||
$bc2[1]="bgcolor=\"#b9e000\"";
|
||||
|
||||
|
||||
$yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
$yn["1"] = "oui";
|
||||
$yn["0"] = "non";
|
||||
|
||||
$deacmeth["b"] = "robots";
|
||||
$deacmeth["m"] = "manuelle";
|
||||
|
||||
if ($action == 'attribute_prefix') {
|
||||
$societe = new Societe($db, $socid);
|
||||
@ -86,7 +73,7 @@ if ($action == 'stcomm') {
|
||||
}
|
||||
}
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@ -155,8 +142,6 @@ if ($socid > 0) {
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\"><a href=\"projet/fiche.php3?socidp=$objsoc->idp&action=create\">[Projet]</a></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\"><a href=\"addpropal.php3?socidp=$objsoc->idp&action=create\">[Propal]</a></td>";
|
||||
print "<td><a href=\"socnote.php3?socid=$objsoc->idp\">Notes</a></td>";
|
||||
print "<td><a href=\"people.php3?socid=$objsoc->idp\">Contacts</a></td>";
|
||||
print "<td><a href=\"../tech/soc/soc.php3?socid=$objsoc->idp\">Fiche Technique</a></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\">[<a href=\"../soc.php3?socid=$objsoc->idp&action=edit\">Editer</a>]</td>";
|
||||
print "</tr></table>";
|
||||
/*
|
||||
@ -628,12 +613,9 @@ if ($socid > 0) {
|
||||
*
|
||||
*
|
||||
*/
|
||||
print '<div class="titre">Liste des clients</div>';
|
||||
print_barre_liste("Liste des clients", $page, $PHP_SELF);
|
||||
|
||||
$bc[1]="bgcolor=\"#90c090\"";
|
||||
$bc[0]="bgcolor=\"#b0e0b0\"";
|
||||
|
||||
$sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm FROM societe as s, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.client=1";
|
||||
$sql = "SELECT s.idp, s.nom, s.ville, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm FROM societe as s, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.client=1";
|
||||
|
||||
if (strlen($stcomm)) {
|
||||
$sql .= " AND s.fk_stcomm=$stcomm";
|
||||
@ -661,11 +643,16 @@ if ($socid > 0) {
|
||||
} else {
|
||||
$sortorder="DESC";
|
||||
}
|
||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print "<TD align=\"center\"><a href=\"index.php3?sortfield=idp&sortorder=$sortorder&begin=$begin\">Id</a></TD>";
|
||||
print "<TD><a href=\"index.php3?sortfield=lower(s.nom)&sortorder=$sortorder&begin=$begin\">Societe</a></td>";
|
||||
print "<TD>Contact</TD>";
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD valign=\"center\">Société";
|
||||
|
||||
print '<a href="index.php3?sortfield=lower(s.nom)&sortorder=asc&begin='.$begin.'">';
|
||||
print '<img src="/theme/'.$conf->theme.'/img/1downarrow.png" border="0"></a>';
|
||||
print '<a href="index.php3?sortfield=lower(s.nom)&sortorder=desc&begin='.$begin.'">';
|
||||
print '<img src="/theme/'.$conf->theme.'/img/1uparrow.png" border="0"></a>';
|
||||
|
||||
print "</td><TD>Ville</TD>";
|
||||
print "<TD>email</TD>";
|
||||
print "<TD align=\"center\">Statut</TD><td> </td><td colspan=\"2\"> </td>";
|
||||
print "</TR>\n";
|
||||
@ -676,9 +663,8 @@ if ($socid > 0) {
|
||||
$var=!$var;
|
||||
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD align=\"center\"><b>$obj->idp</b></TD>";
|
||||
print "<TD><a href=\"index.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
||||
print "<TD> </TD>\n";
|
||||
print "<TD>".$obj->ville." </TD>\n";
|
||||
print "<TD> </TD>\n";
|
||||
print "<TD align=\"center\">$obj->stcomm</TD>\n";
|
||||
print "<TD align=\"center\">$obj->prefix_comm </TD>\n";
|
||||
|
||||
@ -24,23 +24,15 @@ require("../main.inc.php3");
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $user, $conf;
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellpadding=\"0\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\" class=\"barre\">";
|
||||
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print "<center><b>" . $conf->db->name . " - " . $user->code ."</B></center>";
|
||||
print "<A href=\"".$urlp."../\">Accueil</A><br>";
|
||||
print "<A href=\"".$urlp."bookmark.php3\">Bookmark</A>";
|
||||
print "</td></tr>";
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<div align=\"center\"><A href=\"".$urlp."index.php3\">Clients</A></div>\n";
|
||||
@ -100,11 +92,6 @@ function llxHeader($head = "", $urlp = "") {
|
||||
print "<input type=\"submit\" value=\"go\">";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print "<form action=\"index.php3\">";
|
||||
print "Soc : <input type=\"text\" name=\"socid\" size=\"5\">";
|
||||
print "<input type=\"submit\" value=\"id\">";
|
||||
print "</form>";
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -23,32 +23,17 @@
|
||||
require ("../../main.inc.php3");
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $PREFIX, $user;
|
||||
global $conf, $user;
|
||||
|
||||
print "<HTML>\n<HEAD>$head\n</HEAD>\n";
|
||||
?>
|
||||
<BODY BGCOLOR="#c0c0c0" TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
|
||||
<?PHP
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
print "<TABLE border=\"0\" width=\"100%\">\n";
|
||||
print "<TR bgcolor=\"".$GLOBALS["TOPBAR_BGCOLOR"]."\">";
|
||||
|
||||
print "<TD width=\"20%\" bgcolor=\"#e0e0e0\"><B>" . $GLOBALS["MAIN_TITLE"] . "</B></TD>";
|
||||
print "<TD width=\"20%\" bgcolor=\"#e0e0e0\" align=\"center\"><A href=\"".$urlp."../tech/\">Technique</A></TD>";
|
||||
print "<TD width=\"20%\" align=\"center\"><A href=\"".$urlp."../comm/\">Commercial</A></TD>";
|
||||
print "<TD width=\"20%\" bgcolor=\"#e0e0e0\" align=\"center\"><A href=\"".$urlp."../compta/\">Compta</A></TD>";
|
||||
print "<TD width=\"20%\" bgcolor=\"#e0e0e0\" align=\"center\"><A href=\"".$urlp."../stats/\">Stats</A></TD>";
|
||||
print "</TR></TABLE>\n";
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellpadding=\"0\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print "<center><b>" . $GLOBALS["dbname"] . " - " . $user->code ."</B></center>";
|
||||
print "<A href=\"".$urlp."../\">Accueil</A><br>";
|
||||
print "<A href=\"".$urlp."bookmark.php3\">Bookmark</A>";
|
||||
print "</td></tr>";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
@ -34,10 +34,6 @@ require("./actioncomm.class.php3");
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$bc[0]="bgcolor=\"#90c090\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
|
||||
$db = new Db();
|
||||
|
||||
if ($sortfield == "") {
|
||||
@ -522,7 +518,7 @@ if ($propalid) {
|
||||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
|
||||
$oldstatut = -1;
|
||||
$subtotal = 0;
|
||||
@ -533,25 +529,24 @@ if ($propalid) {
|
||||
$oldstatut = $objp->statut;
|
||||
|
||||
if ($i > 0) {
|
||||
print "<tr><td align=\"right\" colspan=\"6\">Total : <b>".price($subtotal)."</b></td>\n";
|
||||
print "<tr><td align=\"right\" colspan=\"5\">Total : <b>".price($subtotal)."</b></td>\n";
|
||||
print "<td align=\"left\">Euros HT</td></tr>\n";
|
||||
}
|
||||
$subtotal = 0;
|
||||
|
||||
print "<TR bgcolor=\"#e0e0e0\">";
|
||||
print "<TD>[<a href=\"$PHP_SELF\">Tous</a>]</td>";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>Réf</TD>";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD align=\"right\" colspan=\"2\">Date</TD>";
|
||||
print "<TD align=\"right\">Prix</TD>";
|
||||
print "<TD align=\"center\">Statut [<a href=\"$PHP_SELF?viewstatut=$objp->statutid\">Filtre</a>]</TD>";
|
||||
print "<TD align=\"center\">Statut <a href=\"$PHP_SELF?viewstatut=$objp->statutid\">";
|
||||
print '<img src="/theme/'.$conf->theme.'/img/filter.png" border="0"></a></td>';
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD>[<a href=\"$PHP_SELF?socidp=$objp->idp\">Filtre</a>]</TD>\n";
|
||||
print "<TD><a href=\"$PHP_SELF?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
|
||||
print "<TD><a href=\"index.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||
|
||||
@ -574,8 +569,6 @@ if ($propalid) {
|
||||
print " <a href=\"propal.php3?year=$y\">";
|
||||
print strftime("%Y",$objp->dp)."</a></TD>\n";
|
||||
|
||||
//print "<TD align=\"right\">".strftime("%d %B %Y",$objp->dp)."</TD>\n";
|
||||
|
||||
print "<TD align=\"right\">".price($objp->price)."</TD>\n";
|
||||
print "<TD align=\"center\">$objp->statut</TD>\n";
|
||||
print "</TR>\n";
|
||||
@ -585,11 +578,11 @@ if ($propalid) {
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "<tr><td align=\"right\" colspan=\"6\">Total : <b>".price($subtotal)."</b></td>\n";
|
||||
print "<tr><td align=\"right\" colspan=\"5\">Total : <b>".price($subtotal)."</b></td>\n";
|
||||
print "<td align=\"left\">Euros HT</td></tr>\n";
|
||||
|
||||
|
||||
print "<tr><td></td><td>$i propales</td><td align=\"right\"><small>Soit : ".francs($total)." FF HT</small></td>";
|
||||
print "<tr><td></td><td>$i propales</td>";
|
||||
print "<td colspan=\"3\" align=\"right\"><b>Total : ".price($total)."</b></td>";
|
||||
print "<td align=\"left\"><b>Euros HT</b></td></tr>";
|
||||
print "</TABLE>";
|
||||
|
||||
@ -22,15 +22,15 @@
|
||||
require("./pre.inc.php3");
|
||||
|
||||
function pt ($db, $sql, $date) {
|
||||
$bc[0]="bgcolor=\"#90c090\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
$bc[0]="class=\"pair\"";
|
||||
$bc[1]="class=\"impair\"";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0 ;
|
||||
print "<p><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print "<p><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">";
|
||||
print "<TR class=\"liste_titre\">";
|
||||
print "<TD width=\"60%\">$date</TD>";
|
||||
print "<TD align=\"right\">Montant</TD>";
|
||||
print "<td> </td>\n";
|
||||
@ -49,7 +49,6 @@ function pt ($db, $sql, $date) {
|
||||
$i++;
|
||||
}
|
||||
print '<tr><td align="right">Total :</td><td align="right"><b>'.price($total).'</b></td><td>euros HT</td></tr>';
|
||||
print '<tr><td align="right"><small>Total :</td><td align="right"><small>'.francs($total).'</b></td><td><small>Francs HT</td></tr>';
|
||||
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
@ -71,7 +70,7 @@ if ($sortorder == "") {
|
||||
}
|
||||
|
||||
|
||||
print "<b>Chiffres d'affaires en euros HT</b><P>";
|
||||
print_titre("Chiffres d'affaires en euros HT");
|
||||
|
||||
print "<table width=\"100%\">";
|
||||
print "<tr><td valign=\"top\">";
|
||||
|
||||
@ -22,10 +22,7 @@
|
||||
require("./pre.inc.php3");
|
||||
|
||||
llxHeader();
|
||||
print '<div class="titre">Factures émises</div>';
|
||||
|
||||
$bc[0]="bgcolor=\"#90c090\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
|
||||
$db = new Db();
|
||||
if ($sortfield == "") {
|
||||
@ -39,18 +36,18 @@ $yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$limit = $conf->limit_liste;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
print "<P>Brouillons<p>";
|
||||
print_barre_liste("Factures",$page,$PHP_SELF);
|
||||
|
||||
$sep = 0;
|
||||
$sept = 0;
|
||||
|
||||
$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
|
||||
$sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp AND f.fk_statut = 0";
|
||||
$sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp";
|
||||
|
||||
if ($socidp) {
|
||||
$sql .= " AND s.idp = $socidp";
|
||||
@ -71,12 +68,12 @@ if ($result) {
|
||||
|
||||
$i = 0;
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>[<a href=\"$PHP_SELF\">Tous</a>]</td>";
|
||||
print "<TD>Numéro</TD>";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD align=\"right\">Date</TD><TD align=\"right\">Montant</TD>";
|
||||
print "<TD align=\"right\">Payé</TD><TD align=\"right\">Moyenne</TD>";
|
||||
print "<TD align=\"right\">Payé</TD>";
|
||||
print "</TR>\n";
|
||||
|
||||
if ($num > 0) {
|
||||
@ -87,17 +84,15 @@ if ($result) {
|
||||
|
||||
if ($objp->paye && !$sep) {
|
||||
print "<tr><td></td><td>$i factures</td><td colspan=\"2\" align=\"right\">";
|
||||
print "<small>Total : ".francs($total)." FF</small></td>";
|
||||
print "<td align=\"right\">Sous Total :<b> ".price($total)."</b></td><td>euros HT</td>";
|
||||
print "<td align=\"right\">Moyenne :<b> ".price($total / ($i+1))."</b></td></tr>";
|
||||
print " </small></td>";
|
||||
print "<td align=\"right\">Sous Total :<b> ".price($total)."</b></td><td>euros HT</td></tr>";
|
||||
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>[<a href=\"$PHP_SELF\">Tous</a>]</td>";
|
||||
print "<TD>Numéro</TD>";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD align=\"right\">Date</TD><TD align=\"right\">Montant</TD>";
|
||||
print "<TD align=\"right\">Payé</TD><TD align=\"right\">Moyenne</TD>";
|
||||
print "</TR>\n";
|
||||
print "<TD align=\"right\">Payé</TD></TR>\n";
|
||||
$sep = 1 ; $j = 0;
|
||||
$subtotal = 0;
|
||||
}
|
||||
@ -129,7 +124,7 @@ if ($result) {
|
||||
$total = $total + $objp->amount;
|
||||
$subtotal = $subtotal + $objp->amount;
|
||||
print "<TD align=\"right\">".$yn[$objp->paye]."</TD>\n";
|
||||
print "<TD align=\"right\">".price($subtotal / ($j + 1))."</TD>\n";
|
||||
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
$j++;
|
||||
@ -137,15 +132,11 @@ if ($result) {
|
||||
}
|
||||
}
|
||||
if ($i == 0) { $i=1; } if ($j == 0) { $j=1; }
|
||||
print "<tr><td></td><td>$j factures</td><td colspan=\"2\" align=\"right\">";
|
||||
print "<small>Total : ".francs($subtotal)." FF</small></td>";
|
||||
print "<td align=\"right\">Sous Total :<b> ".price($subtotal)."</b></td><td>euros HT</td>";
|
||||
print "<td align=\"right\">Moyenne :<b> ".price($subtotal/ $j)."</b></td></tr>";
|
||||
print "<tr><td></td><td>$j factures</td><td colspan=\"2\" align=\"right\"> </td>";
|
||||
print "<td align=\"right\">Sous Total :<b> ".price($subtotal)."</b></td><td>euros HT</td></tr>";
|
||||
|
||||
print "<tr bgcolor=\"#d0d0d0\"><td></td><td>$i factures</td><td colspan=\"2\" align=\"right\">";
|
||||
print "<small>Total : ".francs($total)." FF</small></td>";
|
||||
print "<td align=\"right\"><b>Total : ".price($total)."</b></td><td>euros HT</td>";
|
||||
print "<td align=\"right\"><b>Moyenne : ".price($total/ $i)."</b></td></tr>";
|
||||
print "<tr bgcolor=\"#d0d0d0\"><td></td><td>$i factures</td><td colspan=\"2\" align=\"right\"> </td>";
|
||||
print "<td align=\"right\"><b>Total : ".price($total)."</b></td><td>euros HT</td></tr>";
|
||||
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
@ -153,122 +144,6 @@ if ($result) {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print "<P>Validées<br>";
|
||||
|
||||
$sep = 0;
|
||||
$sept = 0;
|
||||
$subtotal=0;
|
||||
|
||||
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount,".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid ";
|
||||
$sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp AND f.fk_statut > 0";
|
||||
|
||||
if ($socidp) {
|
||||
$sql .= " AND s.idp = $socidp";
|
||||
}
|
||||
|
||||
if ($month > 0) {
|
||||
$sql .= " AND date_part('month', date(f.datef)) = $month";
|
||||
}
|
||||
if ($year > 0) {
|
||||
$sql .= " AND date_part('year', date(f.datef)) = $year";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY f.paye, f.datef DESC ";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
|
||||
$l=0;
|
||||
$k=0;
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print "<TD>[<a href=\"$PHP_SELF\">Tous</a>]</td>";
|
||||
print "<TD>Numéro</TD>";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD align=\"right\">Date</TD><TD align=\"right\">Montant</TD>";
|
||||
print "<TD align=\"right\">Payé</TD><TD align=\"right\">Moyenne</TD>";
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
if ($num > 0) {
|
||||
while ($l < $num) {
|
||||
$objp = $db->fetch_object( $l);
|
||||
$var=!$var;
|
||||
|
||||
if ($objp->paye && !$sep) {
|
||||
print "<tr><td></td><td>$l factures</td><td colspan=\"2\" align=\"right\">";
|
||||
print "<small>Total : ".francs($total)." FF</small></td>";
|
||||
print "<td align=\"right\">Sous Total :<b> ".price($total)."</b></td><td>euros HT</td>";
|
||||
print "<td align=\"right\">Moyenne :<b> ".price($total / ($l+1))."</b></td></tr>";
|
||||
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print "<TD>[<a href=\"$PHP_SELF\">Tous</a>]</td>";
|
||||
print "<TD>Numéro</TD>";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD align=\"right\">Date</TD><TD align=\"right\">Montant</TD>";
|
||||
print "<TD align=\"right\">Payé</TD><TD align=\"right\">Moyenne</TD>";
|
||||
print "</TR>\n";
|
||||
$sep = 1 ; $k = 0;
|
||||
$subtotal = 0;
|
||||
}
|
||||
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD>[<a href=\"$PHP_SELF?socidp=$objp->idp\">Filtre</a>]</TD>\n";
|
||||
print "<td><a href=\"facture.php3?facid=$objp->facid\">$objp->facnumber</a></TD>\n";
|
||||
print "<TD><a href=\"../comm/index.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||
|
||||
if ($objp->df > 0 ) {
|
||||
print "<TD align=\"right\">";
|
||||
$y = strftime("%Y",$objp->df);
|
||||
$m = strftime("%m",$objp->df);
|
||||
|
||||
print strftime("%d",$objp->df)."\n";
|
||||
print " <a href=\"facture.php3?year=$y&month=$m\">";
|
||||
print strftime("%B",$objp->df)."</a>\n";
|
||||
print " <a href=\"facture.php3?year=$y\">";
|
||||
print strftime("%Y",$objp->df)."</a></TD>\n";
|
||||
} else {
|
||||
print "<TD align=\"right\"><b>!!!</b></TD>\n";
|
||||
}
|
||||
|
||||
print "<TD align=\"right\">".price($objp->amount)."</TD>\n";
|
||||
|
||||
$yn[1] = "oui";
|
||||
$yn[0] = "<b>non</b>";
|
||||
|
||||
$total = $total + $objp->amount;
|
||||
$subtotal = $subtotal + $objp->amount;
|
||||
print "<TD align=\"right\">".$yn[$objp->paye]."</TD>\n";
|
||||
print "<TD align=\"right\">".price($subtotal / ($k + 1))."</TD>\n";
|
||||
print "</TR>\n";
|
||||
$l++;
|
||||
$k++;
|
||||
|
||||
}
|
||||
}
|
||||
if ($l == 0) { $l=1; } if ($k == 0) { $k=1; }
|
||||
print "<tr><td></td><td>$k factures</td><td colspan=\"2\" align=\"right\">";
|
||||
print "<small>Total : ".francs($subtotal)." FF</small></td>";
|
||||
print "<td align=\"right\">Sous Total :<b> ".price($subtotal)."</b></td><td>euros HT</td>";
|
||||
print "<td align=\"right\">Moyenne :<b> ".price($subtotal/ $k)."</b></td></tr>";
|
||||
|
||||
print "<tr bgcolor=\"#d0d0d0\"><td></td><td>".($l+$i)." factures</td><td colspan=\"2\" align=\"right\">";
|
||||
print "<small>Total : ".francs($total)." FF</small></td>";
|
||||
print "<td align=\"right\"><b>Total : ".price($total)."</b></td><td>euros HT</td>";
|
||||
print "<td align=\"right\"><b>Moyenne : ".price($total/ ($l+$i))."</b></td></tr>";
|
||||
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -29,10 +29,8 @@
|
||||
require("./pre.inc.php3");
|
||||
|
||||
llxHeader();
|
||||
$db = new Db();
|
||||
|
||||
$bc[0]="bgcolor=\"#90c090\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
$db = new Db();
|
||||
|
||||
|
||||
if ($action == 'add') {
|
||||
@ -171,8 +169,11 @@ if ($action == '') {
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
print "<p><b>Paiements</b><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
|
||||
print_barre_liste("Paiements", $page, $PHP_SELF);
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
|
||||
print '<TR class="liste_titre">';
|
||||
print "<td>Facture</td>";
|
||||
print "<td>Date</td>";
|
||||
print "<td>Type</TD>";
|
||||
|
||||
@ -32,50 +32,40 @@ function llxHeader($head = "") {
|
||||
top_menu($head);
|
||||
|
||||
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<center><b>" . $conf->db->name . " - " . $user->code ."</B></center>";
|
||||
print "<A href=\"/\">Accueil</A>";
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
print '<TR><TD bgcolor="#e0e0e0" valign="top" align="right">';
|
||||
print '<TR><TD class="barre_select" valign="top" align="right">';
|
||||
print '<div align="center"><A href="/compta/index.php3">Factures</A></div><p>';
|
||||
print "<A href=\"paiement.php3\">Paiements</A><BR>\n";
|
||||
print "<A href=\"fac.php3\">admin fac</A><BR>\n";
|
||||
|
||||
print "</td></tr>";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<CENTER>Chiffres d'affaires</CENTER><br>\n";
|
||||
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
||||
print "<div align=\"center\">Chiffres d'affaires</div><br>\n";
|
||||
print "<A href=\"ca.php3\">Réalisé</A><BR>\n";
|
||||
print "<A href=\"prev.php3\">Prévisionnel</A><BR>\n";
|
||||
print "<A href=\"comp.php3\">Comparatif</A>\n";
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
||||
print "<CENTER>Analyses</CENTER><br>\n";
|
||||
print "<A href=\"casoc.php3\">CA par societe</A><BR>\n";
|
||||
print "<A href=\"pointmort.php3\">Point mort</A><BR>\n";
|
||||
print "<A href=\"tva.php3\">TVA</A><BR>\n";
|
||||
print "</td></tr>";
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"center\">";
|
||||
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
||||
print "<A href=\"/comm/propal.php3\">Propal</A><BR>\n";
|
||||
print "</td></tr>";
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"center\">";
|
||||
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
||||
print "<A href=\"bank/index.php3\">Bank</A><BR>\n";
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"center\">";
|
||||
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
||||
print "<A href=\"/comm/index.php3\">Societes</A>\n";
|
||||
print "<form action=\"/comm/index.php3\">";
|
||||
print "<input type=\"text\" name=\"socname\" size=\"8\">";
|
||||
|
||||
@ -28,6 +28,10 @@ class Conf {
|
||||
|
||||
Function Conf() {
|
||||
|
||||
$this->theme = "dolibarr";
|
||||
|
||||
$this->liste_limit = 10;
|
||||
|
||||
$this->db = new DbConf();
|
||||
|
||||
$this->propal = new PropalConf();
|
||||
|
||||
462
htdocs/fourn/fiche.php3
Normal file
@ -0,0 +1,462 @@
|
||||
<?PHP
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
require("../contact.class.php3");
|
||||
require("../societe.class.php3");
|
||||
|
||||
llxHeader();
|
||||
$db = new Db();
|
||||
if ($sortorder == "") {
|
||||
$sortorder="ASC";
|
||||
}
|
||||
if ($sortfield == "") {
|
||||
$sortfield="nom";
|
||||
}
|
||||
$bc[0]="bgcolor=\"#c0f0c0\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
$bc2[0]="bgcolor=\"#c9f000\"";
|
||||
$bc2[1]="bgcolor=\"#b9e000\"";
|
||||
|
||||
|
||||
$yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
$yn["1"] = "oui";
|
||||
$yn["0"] = "non";
|
||||
|
||||
$deacmeth["b"] = "robots";
|
||||
$deacmeth["m"] = "manuelle";
|
||||
|
||||
if ($action == 'attribute_prefix') {
|
||||
$societe = new Societe($db, $socid);
|
||||
$societe->attribute_prefix($db, $socid);
|
||||
//$prefix_attrib = soc_attribute_prefix($db, $socid);
|
||||
}
|
||||
|
||||
if ($action == 'recontact') {
|
||||
$dr = mktime(0, 0, 0, $remonth, $reday, $reyear);
|
||||
$sql = "INSERT INTO llx_soc_recontact (fk_soc, datere, author) VALUES ($socid, $dr,'". $GLOBALS["REMOTE_USER"]."')";
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
|
||||
if ($action == 'note') {
|
||||
$sql = "UPDATE societe SET note='$note' WHERE idp=$socid";
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
|
||||
if ($action == 'stcomm') {
|
||||
if ($stcommid <> 'null' && $stcommid <> $oldstcomm) {
|
||||
$sql = "INSERT INTO socstatutlog (datel, fk_soc, fk_statut, author) ";
|
||||
$sql .= " VALUES ('$dateaction',$socid,$stcommid,'" . $GLOBALS["REMOTE_USER"] . "')";
|
||||
$result = @$db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$sql = "UPDATE societe SET fk_stcomm=$stcommid WHERE idp=$socid";
|
||||
$result = $db->query($sql);
|
||||
} else {
|
||||
$errmesg = "ERREUR DE DATE !";
|
||||
}
|
||||
}
|
||||
|
||||
if ($actioncommid) {
|
||||
$sql = "INSERT INTO actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')";
|
||||
$result = @$db->query($sql);
|
||||
|
||||
if (!$result) {
|
||||
$errmesg = "ERREUR DE DATE !";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
/*
|
||||
* Recherche
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($mode == 'search') {
|
||||
if ($mode-search == 'soc') {
|
||||
$sql = "SELECT s.idp FROM 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();
|
||||
}
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Mode fiche
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($socid > 0) {
|
||||
$societe = new Societe($db, $socid);
|
||||
|
||||
|
||||
$sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM societe as s, c_stcomm as st, c_typent as t, c_effectif as e ";
|
||||
$sql .= " WHERE s.fk_stcomm=st.id AND s.fk_typent = t.id AND s.fk_effectif = e.id";
|
||||
|
||||
if ($to == 'next') {
|
||||
$sql .= " AND s.idp > $socid ORDER BY idp ASC LIMIT 1";
|
||||
} elseif ($to == 'prev') {
|
||||
$sql .= " AND s.idp < $socid ORDER BY idp DESC LIMIT 1";
|
||||
} else {
|
||||
$sql .= " AND s.idp = $socid";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$objsoc = $db->fetch_object(0);
|
||||
|
||||
$dac = strftime("%Y-%m-%d %H:%M", time());
|
||||
if ($errmesg) {
|
||||
print "<b>$errmesg</b><br>";
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print "<table width=\"100%\" border=\"0\" cellspacing=\"1\">\n";
|
||||
|
||||
print "<tr><td><div class=\"titre\">Fiche fournisseur : $objsoc->nom</div></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\"><a href=\"bookmark.php3?socidp=$objsoc->idp&action=add\">[Bookmark]</a></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\"><a href=\"projet/fiche.php3?socidp=$objsoc->idp&action=create\">[Projet]</a></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\"><a href=\"addpropal.php3?socidp=$objsoc->idp&action=create\">[Propal]</a></td>";
|
||||
print "<td><a href=\"socnote.php3?socid=$objsoc->idp\">Notes</a></td>";
|
||||
print "<td><a href=\"people.php3?socid=$objsoc->idp\">Contacts</a></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\">[<a href=\"../soc.php3?socid=$objsoc->idp&action=edit\">Editer</a>]</td>";
|
||||
print "</tr></table>";
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print "<hr>";
|
||||
print "<table width=\"100%\" border=0><tr>\n";
|
||||
print "<td valign=\"top\">";
|
||||
print "<table cellspacing=\"0\" border=\"1\" width=\"100%\">";
|
||||
|
||||
print "<tr><td>Type</td><td> $objsoc->typent</td><td>Effectif</td><td>$objsoc->effectif</td></tr>";
|
||||
print "<tr><td>Tel</td><td> $objsoc->tel </td><td>fax</td><td>$objsoc->fax </td></tr>";
|
||||
print "<tr><td>Ville</td><td colspan=\"3\">".nl2br($objsoc->address)."<br>$objsoc->cp $objsoc->ville</td></tr>";
|
||||
|
||||
print "<tr><td>siren</td><td><a href=\"http://www.societe.com/cgi-bin/recherche?rncs=$objsoc->siren\">$objsoc->siren</a> </td>";
|
||||
print "<td>prefix</td><td>";
|
||||
if ($objsoc->prefix_comm) {
|
||||
print $objsoc->prefix_comm;
|
||||
} else {
|
||||
print "[<a href=\"$PHP_SELF?socid=$objsoc->idp&action=attribute_prefix\">Attribuer</a>]";
|
||||
}
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
print "<tr><td>Site</td><td colspan=\"3\"><a href=\"http://$objsoc->url\">$objsoc->url</a> </td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print "</td>\n";
|
||||
print '<td valign="top" width="50%">';
|
||||
print '<table border=0 width="100%" cellspacing=0 bgcolor=#e0e0e0>';
|
||||
print "<tr><td>Créée le</td><td align=center><b>" . strftime("%d %b %Y %H:%M", $objsoc->dc) . "</b></td></tr>";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print '</table>';
|
||||
print '</td></tr>';
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print "<tr><td valign=\"top\">";
|
||||
|
||||
/*
|
||||
* Propales
|
||||
*/
|
||||
$var=!$var;
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"1\">";
|
||||
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.remise, ".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
|
||||
$sql .= " FROM societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id";
|
||||
$sql .= " AND s.idp = $objsoc->idp ORDER BY p.datep DESC";
|
||||
|
||||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows();
|
||||
if ($num >0 ) {
|
||||
print "<tr $bc[$var]><td colspan=\"4\"><a href=\"propal.php3?socidp=$objsoc->idp\">liste des propales ($num)</td></tr>";
|
||||
}
|
||||
$i = 0; $now = time(); $lim = 3600 * 24 * 15 ;
|
||||
while ($i < $num && $i < 2) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD><a href=\"propal.php3?propalid=$objp->propalid\">$objp->ref</a>\n";
|
||||
if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 ) {
|
||||
print " <b>> 15 jours</b>";
|
||||
}
|
||||
print "</td><TD align=\"right\">".strftime("%d %B %Y",$objp->dp)."</TD>\n";
|
||||
print "<TD align=\"right\">".price($objp->price - $objp->remise)."</TD>\n";
|
||||
print "<TD align=\"center\">$objp->statut</TD></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
/*
|
||||
* Factures
|
||||
*/
|
||||
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid ";
|
||||
$sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp AND s.idp = $objsoc->idp ORDER BY f.datef DESC";
|
||||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows(); $i = 0;
|
||||
if ($num > 0) {
|
||||
print "<tr $bc2[$var]>";
|
||||
print "<td colspan=\"3\"><a href=\"../compta/index.php3?socidp=$objsoc->idp\">liste des factures ($num)</td></tr>";
|
||||
}
|
||||
|
||||
while ($i < $num && $i < 2) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<TR $bc2[$var]>";
|
||||
print "<TD><a href=\"../compta/facture.php3?facid=$objp->facid\">$objp->facnumber</a></TD>\n";
|
||||
if ($objp->df > 0 ) {
|
||||
print "<TD align=\"right\">".strftime("%d %B %Y",$objp->df)."</TD>\n";
|
||||
} else {
|
||||
print "<TD align=\"right\"><b>!!!</b></TD>\n";
|
||||
}
|
||||
print "<TD align=\"right\">".number_format($objp->amount, 2, ',', ' ')."</TD>\n";
|
||||
$paye[1] = "payée";
|
||||
$paye[0] = "<b>non payée</b>";
|
||||
print "<TD align=\"center\">".$paye[$objp->paye]."</TD>\n";
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print "</td><td valign=\"top\">";
|
||||
/*
|
||||
*
|
||||
* Liste des projets associés
|
||||
*
|
||||
*/
|
||||
$sql = "SELECT p.rowid,p.title,p.ref,".$db->pdate("p.dateo")." as do";
|
||||
$sql .= " FROM llx_projet as p WHERE p.fk_soc = $objsoc->idp";
|
||||
if ( $db->query($sql) ) {
|
||||
print "<table border=1 cellspacing=0 width=100% cellpadding=\"1\">";
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows();
|
||||
if ($num > 0) {
|
||||
$tag = !$tag; print "<tr $bc[$tag]>";
|
||||
print "<td colspan=\"2\"><a href=\"projet/index.php3?socidp=$objsoc->idp\">liste des projets ($num)</td></tr>";
|
||||
}
|
||||
while ($i < $num && $i < 5) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
$tag = !$tag;
|
||||
print "<tr $bc[$tag]>";
|
||||
print '<td><a href="projet/fiche.php3?id='.$obj->rowid.'">'.$obj->title.'</a></td>';
|
||||
|
||||
print "<td align=\"right\">".strftime("%d %b %Y", $obj->do) ."</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
print "</table>";
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print "</td></tr>";
|
||||
print "</table>\n";
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($action == 'changevalue') {
|
||||
|
||||
print "<HR noshade>";
|
||||
print "<form action=\"index.php3?socid=$objsoc->idp\" method=\"post\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"cabrecrut\">";
|
||||
print "Cette société est un cabinet de recrutement : ";
|
||||
print "<select name=\"selectvalue\">";
|
||||
print "<option value=\"\">";
|
||||
print "<option value=\"t\">Oui";
|
||||
print "<option value=\"f\">Non";
|
||||
print "</select>";
|
||||
print "<input type=\"submit\" value=\"Mettre à jour\">";
|
||||
print "</form>\n";
|
||||
} else {
|
||||
/*
|
||||
*
|
||||
* Liste des contacts
|
||||
*
|
||||
*/
|
||||
print "<table width=\"100%\" cellspacing=0 border=1 cellpadding=2>";
|
||||
|
||||
print "<tr><td><b>Prénom Nom</b></td>";
|
||||
print '<td><b>Poste</b></td><td><b>Tél</b></td>';
|
||||
print "<td><b>Fax</b></td><td><b>Email</b></td>";
|
||||
print "<td><a href=\"people.php3?socid=$objsoc->idp&action=addcontact\">Ajouter</a></td></tr>";
|
||||
|
||||
$sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note FROM socpeople as p WHERE p.fk_soc = $objsoc->idp ORDER by p.datec";
|
||||
$result = $db->query($sql);
|
||||
$i = 0 ; $num = $db->num_rows(); $tag = True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
if ($tag) {
|
||||
print "<tr bgcolor=\"e0e0e0\">";
|
||||
} else {
|
||||
print "<tr>";
|
||||
}
|
||||
print "<td>$obj->firstname $obj->name";
|
||||
if ($obj->note) {
|
||||
print "<br><b>".nl2br($obj->note);
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>$obj->poste </td>";
|
||||
print '<td><a href="actioncomm.php3?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="actioncomm.php3?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="actioncomm.php3?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->email.'</a> </td>';
|
||||
print "<td><a href=\"people.php3?socid=$objsoc->idp&action=editcontact&contactid=$obj->idp\">Modifier</a></td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$tag = !$tag;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print "\n<hr noshade size=1>\n";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print '<table width="100%" cellspacing=0 border=0 cellpadding=2>';
|
||||
print '<tr>';
|
||||
print '<td valign="top">';
|
||||
/*
|
||||
*
|
||||
* Listes des actions
|
||||
*
|
||||
*/
|
||||
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql .= " FROM actioncomm as a, c_actioncomm as c, llx_user as u ";
|
||||
$sql .= " WHERE a.fk_soc = $objsoc->idp ";
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
$sql .= " AND c.id=a.fk_action ";
|
||||
$sql .= " ORDER BY a.datea DESC, a.id DESC";
|
||||
|
||||
if ( $db->query($sql) ) {
|
||||
print "<table width=\"100%\" cellspacing=0 border=0 cellpadding=2>\n";
|
||||
print '<tr><td><a href="actioncomm.php3?socid='.$objsoc->idp.'">Actions</a></td></tr>';
|
||||
|
||||
$i = 0 ; $num = $db->num_rows(); $tag = True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
if ($tag) {
|
||||
print "<tr bgcolor=\"e0e0e0\">";
|
||||
} else {
|
||||
print "<tr>";
|
||||
}
|
||||
|
||||
if ($oldyear == strftime("%Y",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
} else {
|
||||
print "<TD align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
}
|
||||
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
} else {
|
||||
print "<TD align=\"center\">" .strftime("%b",$obj->da)."</TD>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
}
|
||||
|
||||
print "<TD>" .strftime("%d",$obj->da)."</TD>\n";
|
||||
print "<TD>" .strftime("%H:%M",$obj->da)."</TD>\n";
|
||||
|
||||
if ($obj->propalrowid) {
|
||||
print '<td width="40%"><a href="propal.php3?propalid='.$obj->propalrowid.'">'.$obj->libelle.'</a></td>';
|
||||
} else {
|
||||
print '<td width="40%">'.$obj->libelle.'</td>';
|
||||
}
|
||||
/*
|
||||
* Contact pour cette action
|
||||
*
|
||||
*/
|
||||
if ($obj->fk_contact) {
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->fk_contact);
|
||||
print '<td width="40%"><a href="people.php3?socid='.$objsoc->idp.'&contactid='.$contact->id.'">'.$contact->fullname.'</a></td>';
|
||||
} else {
|
||||
print '<td width="40%"> </td>';
|
||||
}
|
||||
/*
|
||||
*/
|
||||
print '<td width="20%"><a href="../user.php3">'.$obj->code.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$tag = !$tag;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
print "</td></tr></table>";
|
||||
/*
|
||||
*
|
||||
* Notes sur la societe
|
||||
*
|
||||
*/
|
||||
print '<table border="1" width="100%" cellspacing="0" bgcolor="#e0e0e0">';
|
||||
print "<tr><td>".nl2br($objsoc->note)."</td></tr>";
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
print $db->error() . "<br>" . $sql;
|
||||
}
|
||||
} else {
|
||||
print "Erreur";
|
||||
}
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
171
htdocs/fourn/index.php3
Normal file
@ -0,0 +1,171 @@
|
||||
<?PHP
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
require("../contact.class.php3");
|
||||
require("../societe.class.php3");
|
||||
|
||||
llxHeader();
|
||||
$db = new Db();
|
||||
if ($sortorder == "") {
|
||||
$sortorder="ASC";
|
||||
}
|
||||
if ($sortfield == "") {
|
||||
$sortfield="nom";
|
||||
}
|
||||
|
||||
if ($action == 'note') {
|
||||
$sql = "UPDATE societe SET note='$note' WHERE idp=$socid";
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
|
||||
if ($action == 'stcomm') {
|
||||
if ($stcommid <> 'null' && $stcommid <> $oldstcomm) {
|
||||
$sql = "INSERT INTO socstatutlog (datel, fk_soc, fk_statut, author) ";
|
||||
$sql .= " VALUES ('$dateaction',$socid,$stcommid,'" . $GLOBALS["REMOTE_USER"] . "')";
|
||||
$result = @$db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$sql = "UPDATE societe SET fk_stcomm=$stcommid WHERE idp=$socid";
|
||||
$result = $db->query($sql);
|
||||
} else {
|
||||
$errmesg = "ERREUR DE DATE !";
|
||||
}
|
||||
}
|
||||
|
||||
if ($actioncommid) {
|
||||
$sql = "INSERT INTO actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')";
|
||||
$result = @$db->query($sql);
|
||||
|
||||
if (!$result) {
|
||||
$errmesg = "ERREUR DE DATE !";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
/*
|
||||
* Recherche
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($mode == 'search') {
|
||||
if ($mode-search == 'soc') {
|
||||
$sql = "SELECT s.idp FROM 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();
|
||||
}
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Mode fiche
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($socid > 0) {
|
||||
|
||||
} else {
|
||||
/*
|
||||
* Mode Liste
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print_barre_liste("Liste des fournisseurs",$page, $PHP_SELF);
|
||||
|
||||
$sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm FROM societe as s, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.fournisseur=1";
|
||||
|
||||
if (strlen($stcomm)) {
|
||||
$sql .= " AND s.fk_stcomm=$stcomm";
|
||||
}
|
||||
|
||||
if (strlen($begin)) {
|
||||
$sql .= " AND upper(s.nom) like '$begin%'";
|
||||
}
|
||||
|
||||
if ($socname) {
|
||||
$sql .= " AND lower(s.nom) like '%".strtolower($socname)."%'";
|
||||
$sortfield = "lower(s.nom)";
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
if ($sortorder == "DESC") {
|
||||
$sortorder="ASC";
|
||||
} else {
|
||||
$sortorder="DESC";
|
||||
}
|
||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD><a href=\"index.php3?sortfield=lower(s.nom)&sortorder=$sortorder&begin=$begin\">Societe</a></td>";
|
||||
print "<TD>Contact</TD>";
|
||||
print "<TD>email</TD>";
|
||||
print "<TD align=\"center\">Statut</TD><td> </td><td colspan=\"2\"> </td>";
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD><a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
||||
print "<TD> </TD>\n";
|
||||
print "<TD> </TD>\n";
|
||||
print "<TD align=\"center\">$obj->stcomm</TD>\n";
|
||||
print "<TD align=\"center\">$obj->prefix_comm </TD>\n";
|
||||
print "<TD align=\"center\"><a href=\"addpropal.php3?socidp=$obj->idp&action=create\">[Propal]</A></td>\n";
|
||||
if ($conf->fichinter->enabled) {
|
||||
print "<TD align=\"center\"><a href=\"../fichinter/fiche.php3?socidp=$obj->idp&action=create\">[Fiche Inter]</A></td>\n";
|
||||
} else {
|
||||
print "<TD> </TD>\n";
|
||||
}
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
}
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
271
htdocs/fourn/people.php3
Normal file
@ -0,0 +1,271 @@
|
||||
<?PHP
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
|
||||
$db = new Db();
|
||||
if ($sortorder == "") {
|
||||
$sortfield="lower(s.nom)";
|
||||
$sortorder="ASC";
|
||||
}
|
||||
|
||||
$active["1"] = "Offres en ligne";
|
||||
$active["-1"] = "Moderation";
|
||||
$active["-2"] = "Refusées";
|
||||
$active["0"] = "Rédaction";
|
||||
$active["-3"] = "Désactivées";
|
||||
$active["-4"] = "Supprimées";
|
||||
|
||||
$yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
$deacmeth["b"] = "robots";
|
||||
|
||||
if ($action == 'add') {
|
||||
|
||||
$email = trim($email);
|
||||
|
||||
if (strlen(trim($name)) + strlen(trim($firstname)) > 0) {
|
||||
$sql = "INSERT INTO socpeople (datec, fk_soc,name, firstname, poste, phone,fax,email) ";
|
||||
$sql .= " VALUES (now(),$socid,'$name','$firstname','$poste','$phone','$fax','$email')";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
Header("Location: fiche.php3?socid=$socid");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($action == 'update') {
|
||||
if (strlen(trim($name)) + strlen(trim($firstname)) > 0) {
|
||||
|
||||
$email = trim($email);
|
||||
|
||||
$sql = "UPDATE socpeople set name='$name', firstname='$firstname', poste='$poste', phone='$phone',fax='$fax',email='$email', note='$note'";
|
||||
$sql .= " WHERE idp=$contactid";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
Header("Location: fiche.php3?socid=$socid");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
llxHeader();
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
if ($socid > 0) {
|
||||
|
||||
$sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.cp,s.ville, s.note FROM societe as s, c_stcomm as st ";
|
||||
$sql .= " WHERE s.fk_stcomm=st.id";
|
||||
|
||||
if ($to == 'next') {
|
||||
$sql .= " AND s.idp > $socid ORDER BY idp ASC LIMIT 1";
|
||||
} else {
|
||||
$sql .= " AND s.idp = $socid";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$objsoc = $db->fetch_object( 0);
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n";
|
||||
print "<tr><td><div class=\"titre\">Contacts pour la société : <a href=\"fiche.php3?socid=$objsoc->idp\">$objsoc->nom</a></div></td>";
|
||||
print "<td bgcolor=\"#e0E0E0\" align=\"center\">[<a href=\"people.php3?socid=$socid&action=addcontact\">Ajouter un contact</a>]</td>";
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "<hr>";
|
||||
print "<table width=\"100%\" border=0><tr>\n";
|
||||
print "<td valign=\"top\">";
|
||||
print "tel : $objsoc->tel<br>";
|
||||
print "fax : $objsoc->fax<br>";
|
||||
print "$objsoc->cp $objsoc->ville<br>";
|
||||
if ($objsoc->url) {
|
||||
print "<a href=\"http://$objsoc->url\">$objsoc->url</a><br>";
|
||||
}
|
||||
|
||||
print "</td>\n";
|
||||
print "<td valign=\"top\"><table border=0 width=\"100%\" cellspacing=0 bgcolor=#e0e0e0>";
|
||||
print "<tr><td>Créée le</td><td align=center><b>" . strftime("%d %b %Y %H:%M", $objsoc->dc) . "</b></td></tr>";
|
||||
|
||||
print "</table></td></tr>\n";
|
||||
print "</table>";
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
print "<table border=0 width=\"100%\" cellspacing=0 bgcolor=#e0e0e0>";
|
||||
print "<tr><td>".nl2br($objsoc->note)."</td></tr>";
|
||||
print "</table>";
|
||||
|
||||
$bc1="bgcolor=\"#c0f0c0\"";
|
||||
$bc3="bgcolor=\"#90c090\"";
|
||||
$bc2="bgcolor=\"#b0e0b0\"";
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
print "<P><table width=\"100%\" cellspacing=0 border=1 cellpadding=2>";
|
||||
|
||||
print "<tr><td><b>Prénom Nom</b></td>";
|
||||
print "<td><b>Poste</b></td><td><b>Tel</b></td>";
|
||||
print "<td><b>Fax</b></td><td><b>Email</b></td>";
|
||||
|
||||
$sql = "SELECT p.name, p.firstname, p.poste, p.phone, p.fax, p.email ";
|
||||
$sql .= " FROM socpeople as p WHERE p.fk_soc = $objsoc->idp";
|
||||
|
||||
if ($contactid) {
|
||||
$sql .= " AND p.idp = $contactid";
|
||||
}
|
||||
$sql .= " ORDER by p.datec";
|
||||
$result = $db->query($sql);
|
||||
$i = 0 ; $num = $db->num_rows(); $tag = True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
if ($tag) {
|
||||
print "<tr bgcolor=\"e0e0e0\">";
|
||||
} else {
|
||||
print "<tr>";
|
||||
}
|
||||
print "<td>$obj->firstname $obj->name</td>";
|
||||
print "<td>$obj->poste </td>";
|
||||
print "<td>$obj->phone </td>";
|
||||
print "<td>$obj->fax </td>";
|
||||
print "<td><a href=\"mailto:$obj->email\">$obj->email</a> </td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$tag = !$tag;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
if ($action == 'addcontact') {
|
||||
print "<br><form method=\"post\" action=\"people.php3?socid=$socid\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
||||
print "<table border=0>";
|
||||
print "<tr><td colspan=\"2\"><div class=\"titre\">Ajouter le contact</div></td>";
|
||||
print "<tr><td>Nom</td><td><input name=\"name\" type=\"text\" size=\"20\" maxlength=\"80\"></td>";
|
||||
print "<td>Prenom</td><td><input name=\"firstname\" type=\"text\" size=\"15\" maxlength=\"80\"></td></tr>";
|
||||
print "<tr><td>Poste</td><td colspan=\"3\"><input name=\"poste\" type=\"text\" size=\"50\" maxlength=\"80\"></td></tr>";
|
||||
print "<tr><td>Tel</td><td><input name=\"phone\" type=\"text\" size=\"18\" maxlength=\"80\"></td>";
|
||||
print "<td>Fax</td><td><input name=\"fax\" type=\"text\" size=\"18\" maxlength=\"80\"></td></tr>";
|
||||
print "<tr><td>Email</td><td colspan=\"3\"><input name=\"email\" type=\"text\" size=\"50\" maxlength=\"80\"></td></tr>";
|
||||
print "</table>";
|
||||
print "<input type=\"submit\" value=\"Ajouter\">";
|
||||
print "</form>";
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Edition du contact
|
||||
*
|
||||
*/
|
||||
if ($action == 'editcontact') {
|
||||
$sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note";
|
||||
$sql .= " FROM socpeople as p WHERE p.idp = $contactid";
|
||||
$result = $db->query($sql);
|
||||
$num = $db->num_rows();
|
||||
if ( $num >0 ) {
|
||||
$obj = $db->fetch_object( 0);
|
||||
}
|
||||
|
||||
print "<form method=\"post\" action=\"people.php3?socid=$socid\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"contactid\" value=\"$contactid\">";
|
||||
print "<table border=0>";
|
||||
print "<tr><td>Numéro</td><td>$obj->idp</td>";
|
||||
print "<tr><td>Nom</td><td><input name=\"name\" type=\"text\" size=\"20\" maxlength=\"80\" value=\"$obj->name\"></td>";
|
||||
print "<td>Prenom</td><td><input name=\"firstname\" type=\"text\" size=\"15\" maxlength=\"80\" value=\"$obj->firstname\"></td></tr>";
|
||||
print "<tr><td>Poste</td><td colspan=\"3\"><input name=\"poste\" type=\"text\" size=\"50\" maxlength=\"80\" value=\"$obj->poste\"></td></tr>";
|
||||
print "<tr><td>Tel</td><td><input name=\"phone\" type=\"text\" size=\"18\" maxlength=\"80\" value=\"$obj->phone\"></td>";
|
||||
print "<td>Fax</td><td><input name=\"fax\" type=\"text\" size=\"18\" maxlength=\"80\" value=\"$obj->fax\"></td></tr>";
|
||||
print "<tr><td>Email</td><td colspan=\"3\"><input name=\"email\" type=\"text\" size=\"50\" maxlength=\"80\" value=\"$obj->email\"></td></tr>";
|
||||
print '<tr><td valign="top">Note</td><td colspan="3"><textarea wrap="soft" cols="40" rows="10" name="note">'.$obj->note.'</textarea></td></tr>';
|
||||
print "</table>";
|
||||
print "<input type=\"submit\" value=\"Modifier\">";
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print "<P><table width=\"100%\" cellspacing=0 border=1 cellpadding=2>";
|
||||
|
||||
print "<tr><td><b>Action</b></td>";
|
||||
print "<td><b>Fax</b></td><td><b>Email</b></td>";
|
||||
|
||||
|
||||
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||
$sql .= " FROM actioncomm as a, c_actioncomm as c, llx_user as u ";
|
||||
$sql .= " WHERE a.fk_soc = $objsoc->idp ";
|
||||
$sql .= " AND u.rowid = a.fk_user_author";
|
||||
$sql .= " AND c.id=a.fk_action ";
|
||||
|
||||
if ($contactid) {
|
||||
$sql .= " AND fk_contact = $contactid";
|
||||
}
|
||||
$sql .= " ORDER BY a.datea DESC, a.id DESC";
|
||||
|
||||
if ( $db->query($sql) ) {
|
||||
$i = 0 ; $num = $db->num_rows(); $tag = True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
if ($tag) {
|
||||
print "<tr bgcolor=\"e0e0e0\">";
|
||||
} else {
|
||||
print "<tr>";
|
||||
}
|
||||
print "<td>". strftime("%d %b %Y %H:%M", $obj->da) ."</td>";
|
||||
if ($obj->propalrowid) {
|
||||
print "<td><a href=\"propal.php3?propalid=$obj->propalrowid\">$obj->libelle</a></td>";
|
||||
} else {
|
||||
print "<td>$obj->libelle</td>";
|
||||
}
|
||||
|
||||
print "<td>$obj->code </td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$tag = !$tag;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td>' . $db->error() . '</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
print "Error";
|
||||
}
|
||||
$db->free();
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
105
htdocs/fourn/pre.inc.php3
Normal file
@ -0,0 +1,105 @@
|
||||
<?PHP
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
require("../main.inc.php3");
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $user, $conf;
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
|
||||
print '<TR><TD class="barre_select" valign="top" align="right">';
|
||||
print "<div align=\"center\"><A href=\"".$urlp."index.php3\">Fournisseur</A></div>\n";
|
||||
print "<A href=\"".$urlp."../soc.php3?&action=create\">Nouvelle société</A><BR>\n";
|
||||
print "<A href=\"".$urlp."contact.php3\">Contacts</A><BR><br>\n";
|
||||
|
||||
print "</TD></TR>";
|
||||
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<div align=\"center\"><A href=\"".$urlp."actioncomm.php3\">Actions</A></div>\n";
|
||||
print "</TD></TR>";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print '<div align="center"><A href="'.$urlp.'../compta/">Factures</A></div>';
|
||||
print "</TD></TR>";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print '<TR><TD class="barre" 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>";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<CENTER><A href=\"".$urlp."index.php3\">Societes</A></CENTER>\n";
|
||||
print "<form action=\"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"> ';
|
||||
print "<input type=\"submit\" value=\"go\">";
|
||||
print "</form>";
|
||||
|
||||
print "<CENTER><A href=\"".$urlp."contact.php3\">Contacts</A></CENTER>\n";
|
||||
print "<form action=\"".$urlp."contact.php3\">";
|
||||
print '<input type="hidden" name="mode" value="search">';
|
||||
print '<input type="hidden" name="mode-search" value="contact">';
|
||||
print "<input type=\"text\" name=\"contactname\" size=\"8\"> ";
|
||||
print "<input type=\"submit\" value=\"go\">";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print "<form action=\"index.php3\">";
|
||||
print "Soc : <input type=\"text\" name=\"socid\" size=\"5\">";
|
||||
print "<input type=\"submit\" value=\"id\">";
|
||||
print "</form>";
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print "</td>";
|
||||
|
||||
|
||||
print "<TD valign=\"top\" width=\"85%\">\n";
|
||||
}
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
?>
|
||||
@ -24,7 +24,31 @@
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
function print_titre($titre) {
|
||||
global $conf;
|
||||
print '<table width="100%" border="0" cellpadding="3" cellspacing="0">';
|
||||
print '<tr><td><div class="titre">'.$titre.'</div></td>';
|
||||
print '</tr></table>';
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function print_barre_liste($titre,$page,$file) {
|
||||
global $conf;
|
||||
print '<table width="100%" border="0" cellpadding="3" cellspacing="0">';
|
||||
print '<tr><td><div class="titre">'.$titre.'</div></td>';
|
||||
print '<td align="right">';
|
||||
if ($page > 0) {
|
||||
print '<a href="'.$file.'?page='.($page-1).'"><img src="/theme/'.$conf->theme.'/img/1leftarrow.png" border="0"></a>';
|
||||
}
|
||||
print '<a href="'.$file.'?page='.($page+1).'"><img src="/theme/'.$conf->theme.'/img/1rightarrow.png" border="0"></a>';
|
||||
print '</td></tr></table>';
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function print_date_select() {
|
||||
$strmonth[1] = "Janvier";
|
||||
$strmonth[2] = "Février";
|
||||
|
||||
@ -35,6 +35,10 @@ $db = new Db();
|
||||
$user = new User($db);
|
||||
$user->fetch($GLOBALS["REMOTE_USER"]);
|
||||
|
||||
$bc[0]="class=\"impair\"";
|
||||
$bc[1]="class=\"pair\"";
|
||||
|
||||
|
||||
function llxFooter($foot='') {
|
||||
print "</TD></TR>";
|
||||
/*
|
||||
@ -57,28 +61,47 @@ function top_menu($head) {
|
||||
print "</HEAD>\n";
|
||||
|
||||
print '<BODY BGCOLOR="#c0c0c0" TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">';
|
||||
/*
|
||||
* Barre superieure
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
print "<TABLE border=\"0\" width=\"100%\">\n";
|
||||
print '<TABLE border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0">';
|
||||
print '<tr><td>';
|
||||
print '<TABLE border="0" width="100%" cellspacing="1" cellpadding="2">';
|
||||
|
||||
print "<TR>";
|
||||
print '<TD width="15%" class="menu" align="center"><A class="menu" href="/">Accueil</A></TD>';
|
||||
|
||||
print '<TD width="20%" class="menu"> </td>';
|
||||
|
||||
print '<TD width="20%" class="menu" align="center">';
|
||||
print '<TD width="15%" class="menu" align="center">';
|
||||
if ($user->comm > 0) {
|
||||
print '<A href="../comm/">Commercial</A></TD>';
|
||||
print '<A class="menu" href="../comm/">Commercial</A></TD>';
|
||||
} else {
|
||||
print 'Commercial';
|
||||
print '-';
|
||||
}
|
||||
|
||||
print '<TD width="20%" class="menu" align="center">-</TD>';
|
||||
print '<TD width="20%" class="menu" align="center"><A href="../compta/">Compta</A></TD>';
|
||||
print '<TD width="20%" class="menu" align="center">-</TD>';
|
||||
print '<TD width="15%" class="menu" align="center">';
|
||||
if ($user->compta > 0) {
|
||||
print '<A class="menu" href="../compta/">Compta</A></TD>';
|
||||
} else {
|
||||
print '-';
|
||||
}
|
||||
|
||||
|
||||
print '<TD width="15%" class="menu" align="center">-</TD>';
|
||||
print '<TD width="15%" class="menu" align="center">-</TD>';
|
||||
print '<TD width="15%" class="menu" align="center">-</TD>';
|
||||
|
||||
print '<TD width="10%" class="menu" align="center">'.$user->code.'</td>';
|
||||
print '</TR>';
|
||||
|
||||
print '</TABLE>';
|
||||
|
||||
print '</table>';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
/*
|
||||
* Table principale
|
||||
*
|
||||
*/
|
||||
print '<TABLE border="0" width="100%">';
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -31,21 +31,22 @@ function llxHeader($head = "") {
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
/*
|
||||
* Colonne de gauche
|
||||
*
|
||||
*/
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<center><b>" . $conf->db->name . " - " . $user->code ."</B></center>";
|
||||
print "<A href=\"/\">Accueil</A><br>";
|
||||
|
||||
print "<div align=\"center\"><A href=\"/comm/index.php3\">Clients</A></div>\n";
|
||||
print '</td></tr>';
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print "<div align=\"center\"><A href=\"/fourn/index.php3\">Fournisseurs</A></div>\n";
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print "<center><A href=\"/comm/propal.php3\">Propales</A></center>\n";
|
||||
print '</td></tr>';
|
||||
@ -70,7 +71,7 @@ function llxHeader($head = "") {
|
||||
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
print '<div align="center"><A href="user.php3">Utilisateurs</div></A>';
|
||||
print '<div align="center"><A href="user/index.php3">Utilisateurs</div></A>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<TR><TD valign="top" align="center">';
|
||||
|
||||
@ -45,14 +45,14 @@ class Service {
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function create($userid) {
|
||||
Function create($user) {
|
||||
|
||||
$sql = "INSERT INTO llx_service (datec, fk_user_author) VALUES (now(), $userid)";
|
||||
$sql = "INSERT INTO llx_service (datec, fk_user_author) VALUES (now(), ".$user->id.")";
|
||||
|
||||
if ($this->db->query($sql) ) {
|
||||
$id = $this->db->last_insert_id();
|
||||
|
||||
if ( $this->update($id, $userid) ) {
|
||||
if ( $this->update($id, $user) ) {
|
||||
return $id;
|
||||
}
|
||||
} else {
|
||||
@ -86,7 +86,7 @@ class Service {
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function start_comm($id, $userid, $datedeb=0) {
|
||||
Function start_comm($id, $user, $datedeb=0) {
|
||||
|
||||
$sql = "UPDATE llx_service ";
|
||||
if ($datedeb) {
|
||||
@ -94,7 +94,7 @@ class Service {
|
||||
} else {
|
||||
$sql .= " SET debut_comm = now()";
|
||||
}
|
||||
$sql .= ",fk_user_modif = " . $userid ;
|
||||
$sql .= ",fk_user_modif = " . $user->id ;
|
||||
|
||||
$sql .= " WHERE rowid = " . $id;
|
||||
|
||||
@ -109,7 +109,7 @@ class Service {
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function stop_comm($id, $userid, $datefin=0) {
|
||||
Function stop_comm($id, $user, $datefin=0) {
|
||||
|
||||
$sql = "UPDATE llx_service ";
|
||||
if ($datefin) {
|
||||
@ -117,7 +117,7 @@ class Service {
|
||||
} else {
|
||||
$sql .= " SET fin_comm = now()";
|
||||
}
|
||||
$sql .= ",fk_user_modif = " . $userid ;
|
||||
$sql .= ",fk_user_modif = " . $user->id ;
|
||||
|
||||
$sql .= " WHERE rowid = " . $id;
|
||||
|
||||
|
||||
@ -35,10 +35,10 @@ if ($action == 'add') {
|
||||
$service->price = $price;
|
||||
$service->description = $desc;
|
||||
|
||||
$id = $service->create($user->id);
|
||||
$id = $service->create($user);
|
||||
|
||||
if ($comm_now && $id) {
|
||||
$service->start_comm($id, $user->id);
|
||||
$service->start_comm($id, $user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ if ($sortorder == "") {
|
||||
}
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@ -76,7 +76,7 @@ if ( $db->query($sql) ) {
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
} else {
|
||||
print $this->db->error() . ' in ' . $sql;
|
||||
print $db->error() . ' in ' . $sql;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,15 +31,10 @@ function llxHeader($head = "", $urlp = "") {
|
||||
top_menu($head);
|
||||
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellpadding=\"0\">";
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<center><b>" . $GLOBALS["dbname"] . " - " . $user->code ."</B></center>";
|
||||
print "<A href=\"".$urlp."../\">Accueil</A><br>";
|
||||
print "<A href=\"".$urlp."bookmark.php3\">Bookmark</A>";
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<CENTER><A href=\"".$urlp."../comm/index.php3\">Societe</A></CENTER>\n";
|
||||
|
||||
35
htdocs/theme/dolibarr/dolibarr.css
Normal file
@ -0,0 +1,35 @@
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
TD.barre_select { background: #d9dcc2 }
|
||||
|
||||
TD.barre { background: #e0e0e0 }
|
||||
|
||||
.menu { background: #d9dcc2; font-family: Helvetica, Verdana; font-size: 14px; font-weight: bold; color: #391ff2; text-decoration: none }
|
||||
|
||||
DIV.titre { font-family: Helvetica, Verdana; font-size: 16px; font-weight: bold; color: #101010; text-decoration: none }
|
||||
/*
|
||||
*
|
||||
*/
|
||||
TR.liste_titre { background: #b0b0b0; font-family: Helvetica, Verdana; font-weight: bold; font-size: 14px; text-decoration: none }
|
||||
TR.pair { background: #d0d0d0; font-family: Helvetica, Verdana; font-size: 12px; text-decoration: none }
|
||||
TR.impair { background: #e0e0e0; font-family: Helvetica, Verdana; font-size: 12px; text-decoration: none }
|
||||
BIN
htdocs/theme/dolibarr/img/1downarrow.png
Normal file
|
After Width: | Height: | Size: 520 B |
BIN
htdocs/theme/dolibarr/img/1leftarrow.png
Normal file
|
After Width: | Height: | Size: 700 B |
BIN
htdocs/theme/dolibarr/img/1rightarrow.png
Normal file
|
After Width: | Height: | Size: 431 B |
BIN
htdocs/theme/dolibarr/img/1uparrow.png
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
htdocs/theme/dolibarr/img/filter.png
Normal file
|
After Width: | Height: | Size: 253 B |
BIN
htdocs/theme/dolibarr/img/player_start.png
Normal file
|
After Width: | Height: | Size: 722 B |
BIN
htdocs/theme/dolibarr/img/start.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@ -31,8 +31,10 @@ class User {
|
||||
var $code;
|
||||
var $email;
|
||||
var $admin;
|
||||
var $login;
|
||||
var $comm;
|
||||
var $compta;
|
||||
var $webcal_login;
|
||||
|
||||
Function User($DB, $id=0) {
|
||||
|
||||
@ -47,9 +49,9 @@ class User {
|
||||
*
|
||||
*/
|
||||
|
||||
Function fetch($login) {
|
||||
Function fetch($login='') {
|
||||
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.code, u.admin, u.module_comm, u.module_compta,webcal_login";
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.code, u.admin, u.module_comm, u.module_compta, u.login, u.webcal_login";
|
||||
$sql .= " FROM llx_user as u";
|
||||
|
||||
if ($this->id) {
|
||||
@ -76,6 +78,10 @@ class User {
|
||||
|
||||
$this->comm = $obj->module_comm;
|
||||
$this->compta = $obj->module_compta;
|
||||
|
||||
$this->login = $obj->login;
|
||||
$this->webcal_login = $obj->webcal_login;
|
||||
|
||||
}
|
||||
$this->db->free();
|
||||
|
||||
|
||||
179
htdocs/user/fiche.php3
Normal file
@ -0,0 +1,179 @@
|
||||
<?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.
|
||||
*
|
||||
*/
|
||||
|
||||
require("./pre.inc.php3");
|
||||
require("../service.class.php3");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$db = new Db();
|
||||
|
||||
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 == 'update') {
|
||||
$service = new Service($db);
|
||||
|
||||
$service->ref = $ref;
|
||||
$service->libelle = $label;
|
||||
$service->price = $price;
|
||||
$service->description = $desc;
|
||||
|
||||
$service->update($id, $user);
|
||||
}
|
||||
/*
|
||||
* Nouvel utilisateur
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($action == 'create') {
|
||||
|
||||
print '<div class="titre">Nouveau service</div><br>';
|
||||
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="ref"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">Libelle</td>';
|
||||
print '<td><input size="30" type="text" name="label"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">Prix</td>';
|
||||
print '<td><input size="8" type="text" name="price"></td></tr>';
|
||||
|
||||
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) {
|
||||
$fuser = new User($db, $id);
|
||||
$fuser->fetch();
|
||||
|
||||
print '<div class="titre">Fiche utilisateur</div><br>';
|
||||
|
||||
print '<table width="100%" border="1" cellpadding="3" cellspacing="0">';
|
||||
|
||||
print '<tr><td valign="top">Nom</td>';
|
||||
print '<td bgcolor="#e0e0e0">'.$fuser->nom.'</td>';
|
||||
print '<td valign="top">Prénom</td>';
|
||||
print '<td>'.$fuser->prenom.'</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">Login</td>';
|
||||
print '<td bgcolor="#e0e0e0">'.$fuser->login.'</td>';
|
||||
print '<td valign="top">Pass</td>';
|
||||
print '<td>'.$fuser->pass.'</td></tr>';
|
||||
|
||||
print '<tr><td width="25%" valign="top">Webcal Login</td>';
|
||||
print '<td width="25%" bgcolor="#e0e0e0">'.$fuser->webcal_login.'</td>';
|
||||
print '<td width="25%" valign="top">Pass</td>';
|
||||
print '<td width="25%">'.$fuser->pass.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br><table width="100%" border="1" cellspacing="0" cellpadding="2">';
|
||||
|
||||
print '<td width="20%">Barre d\'action</td>';
|
||||
print '<td width="20%" bgcolor="#e0E0E0" align="center">[<a href="fiche.php3?action=edit&id='.$id.'">Editer</a>]</td>';
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
|
||||
|
||||
print '</table><br>';
|
||||
/*
|
||||
*
|
||||
* Mode edition
|
||||
*
|
||||
*/
|
||||
|
||||
if ($action == 'edit') {
|
||||
print '<hr><div class="titre">Editer la fiche service</div><br>';
|
||||
print '<form action="'.$PHP_SELF.'?id='.$id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
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="ref" value="'.$service->ref.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">Libelle</td>';
|
||||
print '<td><input size="30" type="text" name="label" value="'.$service->libelle.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">Prix</td>';
|
||||
print '<td><input size="8" type="text" name="price" value="'.$service->price.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">Description</td><td>';
|
||||
print "<textarea name=\"desc\" rows=\"12\" cols=\"40\">";
|
||||
print $service->description;
|
||||
print "</textarea></td></tr>";
|
||||
|
||||
print '<tr><td align="center" colspan="2"><input type="submit"></td></tr>';
|
||||
print '</form>';
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
71
htdocs/user/index.php3
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
|
||||
llxHeader();
|
||||
$db = new Db();
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT u.rowid, u.name, u.firstname, u.code, u.login, u.module_comm, u.module_compta FROM llx_user as u";
|
||||
$sql .= " ORDER BY u.name";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>Prenom</TD>";
|
||||
print "<TD>Nom</TD>";
|
||||
print "<TD>code</TD>";
|
||||
print '<TD>login</TD><td align="center">Comm.</td><td align="center">Compta</td>';
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
|
||||
print "<TR $bc[$var]>";
|
||||
print '<TD><a href="fiche.php3?id='.$obj->rowid.'">'.$obj->firstname.'</a></td>';
|
||||
print '<TD>'.$obj->name.'</TD>';
|
||||
print '<TD>'.$obj->code.'</TD>';
|
||||
print '<TD>'.$obj->login.'</TD>';
|
||||
print '<TD align="center">'.$obj->module_comm.'</TD>';
|
||||
print '<TD align="center">'.$obj->module_compta.'</TD>';
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
88
htdocs/user/pre.inc.php3
Normal file
@ -0,0 +1,88 @@
|
||||
<?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.
|
||||
*
|
||||
*/
|
||||
require("../main.inc.php3");
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $user, $conf;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
|
||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||
|
||||
print "<TABLE border=\"1\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\">";
|
||||
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
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>";
|
||||
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<div align=\"center\"><A href=\"".$urlp."actioncomm.php3\">Actions</A></div>\n";
|
||||
print "</TD></TR>";
|
||||
/*
|
||||
*
|
||||
*/
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
print "<center><A href=\"/product/\">Produits</center></A>\n";
|
||||
print "</TD></TR>";
|
||||
|
||||
|
||||
print '<TR><TD class="barre" valign="top" align="right">';
|
||||
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"> ';
|
||||
print "<input type=\"submit\" value=\"go\">";
|
||||
print "</form>";
|
||||
|
||||
print "<CENTER><A href=\"".$urlp."contact.php3\">Contacts</A></CENTER>\n";
|
||||
print "<form action=\"".$urlp."contact.php3\">";
|
||||
print '<input type="hidden" name="mode" value="search">';
|
||||
print '<input type="hidden" name="mode-search" value="contact">';
|
||||
print "<input type=\"text\" name=\"contactname\" size=\"8\"> ";
|
||||
print "<input type=\"submit\" value=\"go\">";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print "<form action=\"index.php3\">";
|
||||
print "Soc : <input type=\"text\" name=\"socid\" size=\"5\">";
|
||||
print "<input type=\"submit\" value=\"id\">";
|
||||
print "</form>";
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print "</td>";
|
||||
|
||||
|
||||
print "<TD valign=\"top\" width=\"85%\">\n";
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,6 +1,4 @@
|
||||
#
|
||||
# General Makefile for Mysql database
|
||||
#
|
||||
# Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
#
|
||||
# $Id$
|
||||
@ -20,6 +18,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# General Makefile for Mysql database
|
||||
#
|
||||
|
||||
MYSQL=mysql
|
||||
BASE=dolibarr
|
||||
@ -79,10 +79,3 @@ createpriv:
|
||||
$(MYSQL) mysql -e "update db set index_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(MYSQL) mysql -e "update db set alter_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(MYSQL) mysql -e "flush privileges ; "
|
||||
|
||||
|
||||
|
||||
#
|
||||
# $Id$
|
||||
# $Source$
|
||||
#
|
||||
28
mysql/data/Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# General Makefile for Mysql database
|
||||
#
|
||||
|
||||
MYSQL=mysql
|
||||
BASE=dolibarr
|
||||
|
||||
dev:
|
||||
$(MYSQL) $(BASE) < data_dev.sql
|
||||
@ -30,38 +30,67 @@ values ('Quiedeville','Rodolphe','RQ','rodo','rodo',1,1,1,'rodo');
|
||||
|
||||
insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login)
|
||||
values ('demo','demo','demo','demo','demo',1,1,'demo');
|
||||
|
||||
insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login)
|
||||
values ('demo1','demo','demo1','demo1','demo',1,1,'demo1');
|
||||
insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login)
|
||||
values ('demo2','demo','demo2','demo2','demo',1,1,'demo2');
|
||||
--
|
||||
-- Societe
|
||||
--
|
||||
delete from societe;
|
||||
insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm)
|
||||
values ('Lolix',now(),'75001','Paris','01 40 15 03 18','01 40 15 06 18',1,'LO');
|
||||
insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm, fournisseur)
|
||||
values ('Lolix',now(),'75001','Paris','01 40 15 03 18','01 40 15 06 18',1,'LO',1);
|
||||
|
||||
insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm)
|
||||
values ('Doli Inc.',now(),'56400','Auray','01 40 15 03 18','01 40 15 06 18',1,'DO');
|
||||
|
||||
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,datec,cp,ville,tel,fax, client, prefix_comm)
|
||||
values ('Alphinfo',now(),'75001','Paris','01 40 15 03 18','01 40 15 06 18',1,'AP');
|
||||
|
||||
insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm)
|
||||
values ('Alpha',now(),'75001','Paris','01 40 15 03 18','01 40 15 06 18',1,'AL');
|
||||
values ('Alpha',now(),'75001','Loctudy','01 40 15 03 18','01 40 15 06 18',1,'AL');
|
||||
|
||||
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);
|
||||
values ('Turin','75013','Montpellier','01 55 55 03 18','01 55 55 55 55',1);
|
||||
|
||||
insert into societe (nom,cp,ville,tel,fax,client)
|
||||
values ('Bratin SA','75013','Strasbourg','01 55 55 03 18','01 55 55 55 55',1);
|
||||
|
||||
insert into societe (nom,cp,ville,tel,fax,client)
|
||||
values ('Eaggos SARL','75013','Auray','01 55 55 03 18','01 55 55 55 55',1);
|
||||
|
||||
insert into societe (nom,cp,ville,tel,fax,client)
|
||||
values ('Pruitosa','75013','Lorient','01 55 55 03 18','01 55 55 55 55',1);
|
||||
|
||||
insert into societe (nom,cp,ville,tel,fax,client)
|
||||
values ('ZXP Tune','75013','Vannes','01 55 55 03 18','01 55 55 55 55',1);
|
||||
|
||||
|
||||
|
||||
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('JPG','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'JP');
|
||||
--
|
||||
-- Contact
|
||||
--
|
||||
delete from socpeople;
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (1,'Durand','Paul','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (1,'Tourin','Pierre','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (1,'Patrick','Paul','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (1,'Myriam','Isabelle','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (2,'Corin','Arnaud','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (3,'Phil','Breizh','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
insert into socpeople (fk_soc, name, firstname, phone,fax,email)
|
||||
values (3,'Marie','Jeanne','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net');
|
||||
--
|
||||
--
|
||||
-- Produits
|
||||
@ -85,6 +114,20 @@ insert into llx_propal values (4,2,1,0,'PR-DO-010303','2001-03-03 13:44:04','200
|
||||
insert into llx_propal values (5,1,1,0,'PR-LO-010301','2001-03-01 13:44:04','2001-03-01 15:45:29',NULL,'2001-03-01',2,2,NULL,2,400,0,78.4,478.40,'');
|
||||
insert into llx_propal values (6,1,1,0,'PR-LO-020301','2002-03-01 13:44:04','2002-03-01 15:45:29',NULL,'2002-03-01',2,2,NULL,2,400,0,78.4,478.40,'');
|
||||
insert into llx_propal values (7,1,1,0,'PR-LO-010307','2001-07-01 13:44:04','2001-07-01 15:45:29',NULL,'2001-07-01',2,2,NULL,2,4000,0,784,4784,'');
|
||||
--
|
||||
-- Factures
|
||||
--
|
||||
delete from llx_facture;
|
||||
INSERT INTO llx_facture VALUES (1,'F-LO-020502',1,'2002-05-06 18:28:34','2002-05-02',1,400,0,78.4,478.4,1,'rodo',NULL,NULL,NULL,'');
|
||||
INSERT INTO llx_facture VALUES (2,'F-LO-020310',1,'2002-05-06 18:29:37','2002-03-10',1,4000,0,784,4784,1,'rodo',NULL,NULL,NULL,'');
|
||||
INSERT INTO llx_facture VALUES (3,'F-LO-020506',1,'2002-05-06 18:33:37','2002-05-06',0,400,0,78.4,478.4,0,'rodo',NULL,NULL,NULL,'');
|
||||
--
|
||||
-- Paiements
|
||||
--
|
||||
delete from llx_paiement;
|
||||
INSERT INTO llx_paiement VALUES (1,1,'2002-05-06 18:28:54','2002-05-06 12:00:00',478.4,'rodo',0,'4322222','');
|
||||
INSERT INTO llx_paiement VALUES (2,2,'2002-05-06 18:30:03','2002-04-06 12:00:00',2500,'rodo',0,'3245','');
|
||||
INSERT INTO llx_paiement VALUES (3,2,'2002-05-06 18:32:59','2002-05-02 12:00:00',2284,'rodo',0,'87645','');
|
||||
|
||||
--
|
||||
--
|
||||
@ -94,7 +137,10 @@ insert into llx_propal values (7,1,1,0,'PR-LO-010307','2001-07-01 13:44:04','200
|
||||
delete from llx_fichinter;
|
||||
insert into llx_fichinter (fk_soc, ref, datec, date_valid, datei, fk_user_author, fk_user_valid, fk_statut, duree, note)
|
||||
values (1, 'FI-LP-1','2001-12-05','2001-12-05','2001-12-05',1,1,1,4,'Mise à jour de la doc');
|
||||
|
||||
--
|
||||
-- Actions commerciales
|
||||
--
|
||||
delete from actioncomm;
|
||||
insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact)
|
||||
values ('2002-04-06',1,1,1,1);
|
||||
insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact)
|
||||
@ -111,3 +157,35 @@ insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact)
|
||||
values ('2002-03-04',1,1,1,1);
|
||||
insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact)
|
||||
values ('2001-03-05',1,1,1,1);
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
insert into societe (idp,nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values (20,'Bouleau','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'BTP');
|
||||
insert into societe (idp,nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values (101,'Cerisier','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'CER');
|
||||
|
||||
insert into societe (idp,nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values (100,'Chêne','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'DEL');
|
||||
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm,datec)
|
||||
values ('Peuplier','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'JP',now());
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm,datec)
|
||||
values ('Poirier','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'PO',now());
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Orme','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'ORM');
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Pin','27500','Pont-Audemer','01 55 55 03 18','01 55 55 55 55',1,'PIN');
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Merisier','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'IKE');
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Hêtre','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'CAS');
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Saule','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'ME');
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Poirier','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'CEG');
|
||||
insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm)
|
||||
values ('Tek','75013','Paris','01 55 55 03 18','01 55 55 55 55',1,'LMT');
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@ create:
|
||||
$(MYSQL) $(BASE) < c_effectif.sql
|
||||
$(MYSQL) $(BASE) < c_paiement.sql
|
||||
$(MYSQL) $(BASE) < c_pays.sql
|
||||
|
||||
$(MYSQL) $(BASE) < c_propalst.sql
|
||||
$(MYSQL) $(BASE) < c_stcomm.sql
|
||||
$(MYSQL) $(BASE) < c_typent.sql
|
||||
@ -40,6 +39,7 @@ create:
|
||||
$(MYSQL) $(BASE) < llx_bookmark.sql
|
||||
$(MYSQL) $(BASE) < llx_fa_pr.sql
|
||||
$(MYSQL) $(BASE) < llx_facture.sql
|
||||
$(MYSQL) $(BASE) < llx_facture_fourn.sql
|
||||
$(MYSQL) $(BASE) < llx_fichinter.sql
|
||||
$(MYSQL) $(BASE) < llx_paiement.sql
|
||||
$(MYSQL) $(BASE) < llx_pointmort.sql
|
||||
@ -47,6 +47,7 @@ create:
|
||||
$(MYSQL) $(BASE) < llx_projet.sql
|
||||
$(MYSQL) $(BASE) < llx_propal.sql
|
||||
$(MYSQL) $(BASE) < llx_propaldet.sql
|
||||
$(MYSQL) $(BASE) < llx_service.sql
|
||||
$(MYSQL) $(BASE) < llx_soc_recontact.sql
|
||||
$(MYSQL) $(BASE) < llx_user.sql
|
||||
$(MYSQL) $(BASE) < llx_ventes.sql
|
||||
|
||||
@ -81,6 +81,8 @@ drop table if exists llx_fa_pr;
|
||||
|
||||
drop table if exists llx_facture;
|
||||
|
||||
drop table if exists llx_facture_fourn;
|
||||
|
||||
drop table if exists llx_fichinter;
|
||||
|
||||
drop table if exists llx_paiement;
|
||||
@ -95,6 +97,8 @@ drop table if exists llx_propal;
|
||||
|
||||
drop table if exists llx_propaldet;
|
||||
|
||||
drop table if exists llx_service;
|
||||
|
||||
drop table if exists llx_soc_recontact;
|
||||
|
||||
drop table if exists llx_user;
|
||||
@ -103,34 +107,6 @@ drop table if exists llx_ventes;
|
||||
|
||||
drop table if exists login ;
|
||||
|
||||
drop table if exists of_statutlog;
|
||||
|
||||
drop table if exists offre;
|
||||
|
||||
drop table if exists outil ;
|
||||
|
||||
drop table if exists outiloffre;
|
||||
|
||||
drop table if exists poste_resume ;
|
||||
|
||||
drop table if exists typent_resume ;
|
||||
|
||||
drop table if exists rech_cand;
|
||||
|
||||
drop table if exists rech_soc;
|
||||
|
||||
drop table if exists rescontact;
|
||||
|
||||
drop table if exists rescontactinfo;
|
||||
|
||||
drop table if exists resmessage;
|
||||
|
||||
drop table if exists res_appoint;
|
||||
|
||||
drop table if exists res_statutlog;
|
||||
|
||||
drop table if exists secteur_resume ;
|
||||
|
||||
drop table if exists socappoint ;
|
||||
|
||||
drop table if exists soccontact;
|
||||
|
||||
43
mysql/tables/llx_facture_fourn.sql
Normal file
@ -0,0 +1,43 @@
|
||||
-- ===========================================================================
|
||||
-- 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.
|
||||
--
|
||||
-- ===========================================================================
|
||||
|
||||
create table llx_facture_fourn
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
facnumber varchar(50) NOT NULL,
|
||||
fk_soc integer NOT NULL,
|
||||
datec datetime, -- date de creation de la facture
|
||||
datef date, -- date de la facture
|
||||
paye smallint default 0 NOT NULL,
|
||||
amount real default 0 NOT NULL,
|
||||
remise real default 0,
|
||||
tva real default 0,
|
||||
total real default 0,
|
||||
fk_statut smallint default 0 NOT NULL,
|
||||
|
||||
fk_user_author integer, -- createur de la propale
|
||||
fk_user_valid integer, -- valideur de la propale
|
||||
|
||||
note text,
|
||||
|
||||
UNIQUE INDEX (facnumber)
|
||||
);
|
||||
@ -32,7 +32,7 @@ create table llx_service
|
||||
duration varchar(32),
|
||||
debut_comm datetime,
|
||||
fin_comm datetime,
|
||||
fk_user_auhtor integer,
|
||||
fk_user_author integer,
|
||||
fk_user_modif integer,
|
||||
|
||||
UNIQUE INDEX(ref)
|
||||
|
||||