This commit is contained in:
Rodolphe Quiedeville 2002-12-19 18:59:23 +00:00
parent ba356bb107
commit c81f1f7b32
15 changed files with 414 additions and 239 deletions

View File

@ -0,0 +1,70 @@
<?PHP
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/
require("./pre.inc.php3");
require("../contact.class.php3");
llxHeader();
$db = new Db();
if ($sortorder == "")
{
$sortorder="ASC";
}
if ($sortfield == "")
{
$sortfield="nom";
}
print_titre("Liste des adherents");
$ds=ldap_connect("localhost");
if ($ds)
{
print "Connected";
// bind with appropriate dn to give update access
$r=ldap_bind($ds,"cn=admin,dc=rodo,dc=lan", "gnu8lx");
// prepare data
$info["cn"]="John Jones";
$info["sn"]="Jones";
$info["mail"]="jonj@here.and.now";
$info["objectclass"]="person";
// add data to directory
// $r=ldap_add($ds, "cn=John Jones, o=Adherents, c=FR", $info);
ldap_close($ds);
}
else
{
echo "Unable to connect to LDAP server";
}
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>

View File

@ -0,0 +1,42 @@
<?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);
$menu = new Menu();
$menu->add("/adherents/", "Adherents");
left_menu($menu->liste);
}
?>

View File

@ -1,8 +1,5 @@
<?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
@ -18,6 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
require("./pre.inc.php3");
@ -33,7 +32,8 @@ $db = new Db();
*
*
*/
if ($action=='add_action') {
if ($action=='add_action')
{
$contact = new Contact($db);
$contact->fetch($contactid);
$societe = new Societe($db);
@ -42,13 +42,16 @@ if ($action=='add_action') {
$actioncomm = new ActionComm($db);
if ($actionid == 5) {
$actioncomm->date = $db->idate(mktime($heurehour,$heuremin,0,$remonth,$reday,$reyear));
$actioncomm->percent = 0;
} else {
$actioncomm->date = $date;
$actioncomm->percent = 100;
}
if ($actionid == 5)
{
$actioncomm->date = $db->idate(mktime($heurehour,$heuremin,0,$remonth,$reday,$reyear));
$actioncomm->percent = 0;
}
else
{
$actioncomm->date = $date;
$actioncomm->percent = 100;
}
$actioncomm->priority = 2;
$actioncomm->type = $actionid;
$actioncomm->contact = $contactid;
@ -60,46 +63,57 @@ if ($action=='add_action') {
$actioncomm->add($user);
if ($todo == 'on' ) {
if ($todo == 'on' )
{
$todo = new ActionComm($db);
$todo->type = 0;
$todo->date = $db->idate(mktime(12,0,0,$remonth, $reday, $reyear));
$todo->libelle = $todo_label;
$todo->priority = 2;
$todo->societe = $societe->id;
$todo->contact = $contactid;
$todo->user = $user;
$todo->note = $todo_note;
$todo->percent = 0;
$todo->add($user);
if ($conf->webcal && $todo_webcal == 'on') {
$webcal = new Webcal();
$webcal->heure = $heurehour . $heuremin . '00';
$webcal->duree = ($dureehour * 60) + $dureemin;
if ($actionid == 5) {
$libelle = "Rendez-vous avec ".$contact->fullname;
$libelle .= "\n" . $todo->libelle;
} else {
$libelle = $todo->libelle;
}
$todo = new ActionComm($db);
$todo->type = 0;
$todo->date = $db->idate(mktime(12,0,0,$remonth, $reday, $reyear));
$webcal->add($user, $todo->date, $societe->nom, $libelle);
}
$todo->libelle = $todo_label;
$todo->priority = 2;
$todo->societe = $societe->id;
$todo->contact = $contactid;
$todo->user = $user;
$todo->note = $todo_note;
$todo->percent = 0;
$todo->add($user);
if ($conf->webcal && $todo_webcal == 'on')
{
$webcal = new Webcal();
$webcal->heure = $heurehour . $heuremin . '00';
$webcal->duree = ($dureehour * 60) + $dureemin;
if ($actionid == 5)
{
$libelle = "Rendez-vous avec ".$contact->fullname;
$libelle .= "\n" . $todo->libelle;
}
else
{
$libelle = $todo->libelle;
}
$webcal->add($user, $todo->date, $societe->nom, $libelle);
}
}
Header("Location: /comm/fiche.php3?socid=$socid");
}
/******************************************************************************/
/* */
/* Fin des Actions */
/* */
/******************************************************************************/
llxHeader();
/*
*
@ -152,7 +166,6 @@ if ($action=='create' && $actionid && $contactid) {
print '<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"></td></tr>';
print '</form></table>';
}
/*
*
@ -204,7 +217,8 @@ if ($action=='create' && $actionid && $contactid) {
*
*
*/
if ($id) {
if ($id)
{
$act = new ActionComm($db);
$act->fetch($id);

View File

@ -38,55 +38,6 @@ if ($result)
}
if ($action == 'add') {
$propal = new Propal($db, $socidp);
$propal->remise = $remise;
$propal->datep = $db->idate(mktime(12, 1 , 1, $pmonth, $pday, $pyear));
$propal->contactid = $contactidp;
$propal->projetidp = $projetidp;
$propal->author = $user->id;
$propal->note = $note;
$propal->ref = $ref;
$propal->add_product($idprod1,$qty1);
$propal->add_product($idprod2,$qty2);
$propal->add_product($idprod3,$qty3);
$propal->add_product($idprod4,$qty4);
$id = $propal->create();
/*
*
* Generation
*
*/
if ($id)
{
//$gljroot = "/home/www/dolibarr/dolibarr/htdocs";
$command = "export DBI_DSN=\"dbi:mysql:dbname=".$conf->db->name.":host=localhost\" ";
$command .= " ; ./propal-tex.pl --propal=".$id ." --pdf --ps --output=".$conf->propal->outputdir;
$command .= " --templates=".$conf->propal->templatesdir;
$output = system($command);
//print "<p>command : $command<br>";
//print $output;
/*
* Renvoie directement sur la fiche
*/
//Header("Location: propal.php3?propalid=$id");
}
else
{
print $db->error();
}
}
llxHeader();
@ -283,51 +234,7 @@ if ($action == 'create') {
print "Vous devez d'abord associer un prefixe commercial a cette societe" ;
}
}
/*
*
* Liste des propales
*
*/
$sql = "SELECT s.nom,s.idp, p.price, p.ref,".$db->pdate("p.datep")." as dp, p.rowid as propalid, c.id as statut, c.label as lst";
$sql .= " FROM societe as s, llx_propal as p, c_propalst as c ";
$sql .= " WHERE p.fk_soc = s.idp AND p.fk_statut = c.id AND s.idp = $socidp";
$sql .= " ORDER BY p.datec DESC ;";
if ( $db->query($sql) ) {
$num = $db->num_rows();
$i = 0;
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<TR class=\"liste_titre\">";
print "<TD>Société</td>";
print "<TD>Num</TD>";
print "<TD>Statut</TD>";
print "<TD align=\"right\">Date</TD>";
print "<TD align=\"right\">Prix</TD><td>&nbsp;</td>";
print "</TR>\n";
$var=True;
while ($i < $num) {
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
print "<TD><a href=\"propal.php3?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
print "<TD>$objp->lst</TD>\n";
print "<TD align=\"right\">".strftime("%d %B %Y",$objp->dp)."</TD>\n";
print "<TD align=\"right\">".price($objp->price)."</TD><td>&nbsp;</td>\n";
print "</TR>\n";
$total = $total + $objp->price;
$i++;
}
print "<tr><td colspan=\"5\" align=\"right\"><b>Total : ".price($total)."</b></td><td>euros</td></tr>";
print "</TABLE>";
$db->free();
} else {
print $db->error();
print "<p>$sql";
}
/*
*
*/

View File

@ -39,24 +39,16 @@ function do_upload () {
$error_msg = "Sorry, your file is too large.";
return;
}
global $HTTP_POST_FILES;
$realname = $HTTP_POST_FILES['userfile']['name'];
print "$realname";
$upload_dir = "/tmp";
$local_file = "$upload_dir/TOTO";
if ( file_exists ( '$local_file' ) )
while ( file_exists ( '$local_file' ) )
{
$seq = 1;
while ( file_exists ( "$upload_dir/$the_time$seq" ) )
{
$seq++;
}
$local_file = "$upload_dir/$the_time$seq";
};
$seq++;
$local_file .= "$seq";
}
print "$local_file";
rename ( $uploadfile, $local_file );
@ -157,7 +149,7 @@ if ($socid > 0) {
<INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="2000000">
<INPUT TYPE="FILE" NAME="uploadfile" SIZE="24" MAXLENGTH="80">
<input type="file" name="uploadfile" size="24" maxlength="80">
<BR><BR>
<INPUT TYPE="SUBMIT" VALUE="Upload File!" NAME="sendit">
<INPUT TYPE="SUBMIT" VALUE="Cancel" NAME="cancelit"><BR>

View File

@ -138,6 +138,7 @@ if ($socid > 0) {
print "<tr><td><div class=\"titre\">Fiche client : $objsoc->nom</div></td>";
print "<td align=\"center\"><a href=\"index.php3?socidp=$objsoc->idp&action=add_bookmark\">[Bookmark]</a></td>";
print "<td align=\"center\"><a href=\"docsoc.php?socid=$objsoc->idp\">doc</a></td>";
print "<td align=\"center\"><a href=\"projet/fiche.php3?socidp=$objsoc->idp&action=create\">[Projet]</a></td>";
print "<td 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>";

View File

@ -34,7 +34,6 @@ function llxHeader($head = "", $urlp = "") {
$menu->add("/comm/clients.php3", "Clients");
$menu->add_submenu("../soc.php3?&action=create", "Nouvelle société");
$menu->add_submenu("contact.php3", "Contacts");
$menu->add("/comm/action/", "Actions");

View File

@ -0,0 +1,109 @@
<?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/
require("./pre.inc.php");
llxHeader();
$db = new Db();
if ($action == 'add') {
$datepaye = $db->idate(mktime(12, 0 , 0, $pmonth, $pday, $pyear));
$paiement = new Paiement($db);
$paiement->facid = $facid;
$paiement->datepaye = $datepaye;
$paiement->amount = $amount;
$paiement->author = $author;
$paiement->paiementid = $paiementid;
$paiement->num_paiement = $num_paiement;
$paiement->note = $note;
$paiement->create();
$action = '';
}
if ($sortorder == "") {
$sortorder="DESC";
}
if ($sortfield == "") {
$sortfield="d.datedon";
}
if ($page == -1) { $page = 0 ; }
$offset = $conf->liste_limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
$sql = "SELECT d.rowid, ".$db->pdate("d.datedon")." as datedon, d.nom, d.amount, p.libelle as projet";
$sql .= " FROM llx_don as d, llx_don_projet as p";
$sql .= " WHERE p.rowid = d.fk_don_projet AND d.fk_statut = $statut";
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows();
$i = 0;
print_barre_liste("Dons", $page, $PHP_SELF);
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print '<TR class="liste_titre">';
print "<td>Nom</td>";
print "<td>Date</td>";
print "<td>Projet</td>";
print "<td align=\"right\">Montant</TD>";
print '<td>&nbsp;</td>';
print "</TR>\n";
$var=True;
while ($i < $num)
{
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">$objp->nom</a></TD>\n";
print "<TD><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".strftime("%d %B %Y",$objp->datedon)."</a></td>\n";
print "<TD>$objp->projet</TD>\n";
print '<TD align="right">'.price($objp->amount).'</TD><td>&nbsp;</td>';
print "</tr>";
$i++;
}
print "</table>";
}
else
{
print $db->error();
}
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>

View File

@ -0,0 +1,45 @@
<?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/
require("../../main.inc.php3");
function llxHeader($head = "") {
global $user, $conf;
/*
*
*
*/
top_menu($head);
$menu = new Menu();
$menu->add("/compta/dons/","Dons");
$menu->add_submenu("fiche.php?action=create","Saisir un don");
$menu->add("/compta/bank/index.php3","Bank");
left_menu($menu->liste);
}
?>

View File

@ -1,8 +1,5 @@
<?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
@ -18,29 +15,31 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/
require("./pre.inc.php3");
require("../paiement.class.php");
llxHeader();
$db = new Db();
if ($action == 'add') {
$datepaye = $db->idate(mktime(12, 0 , 0, $pmonth, $pday, $pyear));
$sql = "INSERT INTO llx_paiement (fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note)";
$sql .= " VALUES ($facid, now(), $datepaye,$amount,'$author', $paiementid, '$num_paiement', '$note')";
$result = $db->query($sql);
if ($result) {
$label = "Facture $facnumber - $societe";
$sql = "INSERT INTO llx_bank (datec, dateo, amount, author, label)";
$sql .= " VALUES (now(), $datepaye, $amount,'$author', '$label')";
$result = $db->query($sql);
} else {
print "$sql";
}
$paiement = new Paiement($db);
$paiement->facid = $facid;
$paiement->datepaye = $datepaye;
$paiement->amount = $amount;
$paiement->author = $author;
$paiement->paiementid = $paiementid;
$paiement->num_paiement = $num_paiement;
$paiement->note = $note;
$paiement->create();
$action = '';
} elseif ($action == 'create') {
@ -65,20 +64,16 @@ if ($action == 'add') {
print "<tr bgcolor=\"#e0e0e0\"><td>Numéro :</td><td>$obj->facnumber</td></tr>";
print "<tr bgcolor=\"#e0e0e0\"><td>Société :</td><td>$obj->nom</td></tr>";
print "<tr bgcolor=\"#e0e0e0\"><td>Montant :</td><td align=\"right\">".price($obj->total)." euros TTC</td></tr>";
print "<tr bgcolor=\"#f0f0f0\"><td colspan=\"3\">Paiement</td>";
print "<tr bgcolor=\"#e0e0e0\"><td>Montant :</td><td>".price($obj->total)." euros TTC</td></tr>";
$sql = "SELECT sum(p.amount) FROM llx_paiement as p WHERE p.fk_facture = $facid;";
$result = $db->query($sql);
if ($result) {
$sumpayed = $db->result(0,0);
$db->free();
}
print '<tr><td>Déjà payé</td><td align="right">'.price($sumpayed).' euros TTC</td></tr>';
print '<tr><td>Déjà payé</td><td><b>'.price($sumpayed).'</b> euros TTC</td></tr>';
print "<tr bgcolor=\"#f0f0f0\"><td colspan=\"3\">Paiement</td>";
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
print "<input type=\"hidden\" name=\"facid\" value=\"$facid\">";
@ -133,7 +128,7 @@ if ($action == 'add') {
print "</select></td>";
print "<td rowspan=\"5\">Commentaires :<br>";
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"30\" rows=\"15\"></textarea></td></tr>";
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\"></textarea></td></tr>";
$author = $GLOBALS["REMOTE_USER"];
print "<input type=\"hidden\" name=\"author\" value=\"$author\">\n";
@ -155,8 +150,9 @@ if ($action == 'add') {
print "</select><br>";
print "</td></tr>\n";
print "<tr><td>Numéro :</td><td><input name=\"num_paiement\" type=\"text\"><br><em>Num du cheque ou virement</em></td></tr>\n";
print "<tr><td valign=\"top\">Montant :</td><td>Reste à payer : ".price($total - $sumpayed)." euros TTC<br><input name=\"amount\" type=\"text\"></td></tr>\n";
print "<tr><td colspan=\"3\" align=\"center\"><input type=\"submit\" value=\"Enregistrer\"></td></tr>\n";
print "<tr><td valign=\"top\">&nbsp;</td><td>Reste à payer : <b>".price($total - $sumpayed)."</b> euros TTC</td></tr>\n";
print "<tr><td valign=\"top\">Montant :</td><td><input name=\"amount\" type=\"text\"></td></tr>\n";
print "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Enregistrer\"></td></tr>\n";
print "</form>\n";
print "</table>\n";

View File

@ -49,6 +49,8 @@ function llxHeader($head = "") {
$menu->add("/compta/facture.php3","Factures");
$menu->add_submenu("paiement.php3","Paiements");
$menu->add("/compta/propal.php3","Propales");
$menu->add("charges/index.php3","Charges");
$menu->add_submenu("sociales/","Prest. Sociales");
@ -65,7 +67,7 @@ function llxHeader($head = "") {
$menu->add("resultat/","Résultats");
$menu->add("/compta/propal.php3","Propales");
$menu->add("bank/index.php3","Bank");

View File

@ -36,22 +36,6 @@ llxHeader();
$db = new Db();
if ($sortfield == "") {
$sortfield="lower(p.label)";
}
if ($sortorder == "") {
$sortorder="ASC";
}
$yn["t"] = "oui";
$yn["f"] = "non";
if ($page == -1) { $page = 0 ; }
$limit = 26;
$offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($action == 'setstatut') {
/*
* Cloture de la propale
@ -204,7 +188,7 @@ if ($propalid) {
if ($result) {
$num = $db->num_rows();
$i = 0; $total = 0;
print "<p><b>Facture(s) associée(s)</b><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">";
print "<br><b>Facture(s) associée(s)</b><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">";
print "<tr>";
print "<td>Num</td>";
print "<td>Date</td>";
@ -237,38 +221,30 @@ if ($propalid) {
*/
print "<p><TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
if ($obj->statut == 0) {
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?propalid=$propalid&action=delete\">Supprimer</a>]</td>";
} else {
if ($obj->statut == 1) {
print "<td bgcolor=\"#e0e0e0\" align=center>[<a href=\"$PHP_SELF?propalid=$propalid&action=statut\">Cloturer</a>]</td>";
} else {
if ($obj->statut == 2)
{
print '<td bgcolor="#e0e0e0" align="center" width=\"25%\">';
print "<a href=\"facture.php3?propalid=$propalid&action=create\">Emettre une facture</td>";
}
else
{
print '<td align="center" width="25%">-</td>';
}
print "<td align=\"center\" width=\"25%\">-</td>";
if ($obj->statut == 2)
{
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?propalid=$propalid&action=setstatut&statut=4\">Facturée</a>]</td>";
}
else
{
print "<td align=\"center\" width=\"25%\">-</td>";
}
}
if ($obj->statut == 2) {
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\"><a href=\"facture.php3?propalid=$propalid&action=create\">Emettre une facture</td>";
} else {
print "<td align=\"center\" width=\"25%\">-</td>";
}
if ($obj->statut == 1) {
$file = $conf->propal->outputdir. "/$obj->ref/$obj->ref.pdf";
if (file_exists($file)) {
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\">";
print "[<a href=\"$PHP_SELF?propalid=$propalid&action=presend\">Envoyer la propale par mail</a>]</td>";
} else {
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\">! Propale non generee !</td>";
}
} else {
print "<td align=\"center\" width=\"25%\">-</td>";
}
if ($obj->statut == 0) {
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?propalid=$propalid&valid=1\">Valider</a>]</td>";
} elseif ($obj->statut == 2) {
print "<td bgcolor=\"#e0e0e0\" align=\"center\" width=\"25%\">[<a href=\"$PHP_SELF?propalid=$propalid&action=setstatut&statut=4\">Facturée</a>]</td>";
} else {
print "<td align=\"center\" width=\"25%\">-</td>";
}
print "</tr></table>";
/*
*
@ -325,6 +301,29 @@ if ($propalid) {
*
*
*/
if ($sortfield == "")
{
$sortfield="lower(p.label)";
}
if ($sortorder == "")
{
$sortorder="ASC";
}
$yn["t"] = "oui";
$yn["f"] = "non";
if ($page == -1)
{
$page = 0 ;
}
$limit = 26;
$offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
print "<table width=\"100%\">";
print "<tr><td><div class=\"titre\">Propositions commerciales</div></td>";
print "</table>";

View File

@ -176,7 +176,11 @@ class Facture {
}
/*
*
*
*
*/
Function set_payed($rowid)
{
$sql = "UPDATE llx_facture set paye = 1 WHERE rowid = $rowid ;";

View File

@ -35,7 +35,7 @@ print '<tr><td>pass</td><td>' . $conf->db->pass . '&nbsp;</td></tr>';
print '<tr><td>Database name</td><td>' . $conf->db->name . '</td></tr>';
print '<tr><td bgcolor="#e0e0e0" colspan="2">Propale</td></tr>';
print '<tr class="list_sep"><td colspan="2">Propale</td></tr>';
print '<tr><td>templates</td><td>' . $conf->propal->templatesdir . '</td></tr>';
print '<tr><td>output dir</td><td>' . $conf->propal->outputdir . '</td></tr>';
print '<tr><td>output url</td><td>' . $conf->propal->outputurl . '</td></tr>';

View File

@ -1,8 +1,5 @@
<?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
@ -18,17 +15,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/
require("./pre.inc.php3");
llxHeader();
$db = new Db();
/*
* Mode Liste
*
*/
print_titre("Liste des utilisateurs");
$sql = "SELECT u.rowid, u.name, u.firstname, u.code, u.login, u.module_comm, u.module_compta FROM llx_user as u";