Look: Modif esthétiques mineures

This commit is contained in:
Laurent Destailleur 2005-06-11 11:57:29 +00:00
parent 6b9a6059df
commit aa013f14ac
6 changed files with 1637 additions and 1641 deletions

View File

@ -66,7 +66,8 @@ print '<table class="noborder" width="50%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Status").'</td>'; print '<td>'.$langs->trans("Status").'</td>';
print '<td align="right">'.$langs->trans("Number").'</td>'; print '<td align="right">'.$langs->trans("Number").'</td>';
print '<td align="right">'.$langs->trans("Amount").'</td>'; print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
print '<td align="right">'.$langs->trans("Average").'</td>';
print "</tr>\n"; print "</tr>\n";
$var=True; $var=True;
@ -77,22 +78,22 @@ for ($i = 0 ; $i < 3 ; $i++)
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td><a href="liste.php?statut='.$i.'">'.$libelle[$i].'</a></td>'; print '<td><a href="liste.php?statut='.$i.'">'.$libelle[$i].'</a></td>';
print '<td align="right">'.$nb[$i].'</td>'; print '<td align="right">'.$nb[$i].'</td>';
print '<td align="right">'.price($somme[$i]).'</td>'; print '<td align="right">'.($nb[$i]?price($somme[$i]):'&nbsp;').'</td>';
print '<td align="right">'.($nb[$i]?(price($somme[$i])/$nb[$i]):'&nbsp;').'</td>';
$totalnb += $nb[$i]; $totalnb += $nb[$i];
$total += $somme[$i]; $total += $somme[$i];
print "</tr>"; print "</tr>";
} }
$var=!$var; print '<tr class="liste_total">';
print "<tr $bc[$var]>";
print '<td>'.$langs->trans("Total").'</td>'; print '<td>'.$langs->trans("Total").'</td>';
print '<td align="right">'.$totalnb.'</td>'; print '<td align="right">'.$totalnb.'</td>';
print '<td align="right">'.price($total).'</td>'; print '<td align="right">'.price($total).'</td>';
print '<td align="right">'.($totalnb?(price($total)/$totalnb):'&nbsp;').'</td>';
print '</tr>'; print '</tr>';
print "</table>"; print "</table>";
$db->close(); $db->close();
llxFooter('$Date$ - $Revision$'); llxFooter('$Date$ - $Revision$');

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -21,7 +21,7 @@
* *
*/ */
/*! /**
\file htdocs/compta/dons/stats.php \file htdocs/compta/dons/stats.php
\ingroup don \ingroup don
\brief Page des statistiques de dons \brief Page des statistiques de dons
@ -36,6 +36,8 @@ llxHeader();
print_titre($langs->trans("Statistics")); print_titre($langs->trans("Statistics"));
print '<br>';
$sql = "SELECT d.amount"; $sql = "SELECT d.amount";
$sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."don_projet as p"; $sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."don_projet as p";
@ -44,8 +46,9 @@ $sql .= " ON p.rowid = d.fk_don_projet";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$num = $db->num_rows(); $num = $db->num_rows($result);
$var=true;
$i=0; $i=0;
$total=0; $total=0;
while ($i < $num) while ($i < $num)
@ -55,12 +58,17 @@ if ($result)
$i++; $i++;
} }
print '<table class="border">'; print '<table class="noborder" width="50%">';
print "<tr $bc[1]>"; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td align="right">'.$langs->trans("Value").'</td></tr>';
$var=!$var;
print "<tr $bc[$var]>";
print '<td>'.$langs->trans("DonationsNumber").'</td><td align="right">'.$num.'</td></tr>'; print '<td>'.$langs->trans("DonationsNumber").'</td><td align="right">'.$num.'</td></tr>';
print "<tr $bc[0]>".'<td>'.$langs->trans("Total").'</td><td align="right">'.price($total).'</td>'; $var=!$var;
print "<tr $bc[1]>".'<td>'.$langs->trans("Average").'</td><td align="right">'.price($total / ($num?$num:1)).'</td>'; print "<tr $bc[$var]>".'<td>'.$langs->trans("AmountTotal").'</td><td align="right">'.price($total).'</td>';
$var=!$var;
print "<tr $bc[$var]>".'<td>'.$langs->trans("Average").'</td><td align="right">'.price($total / ($num?$num:1)).'</td>';
print "</tr>"; print "</tr>";
print "</table>"; print "</table>";
@ -73,5 +81,5 @@ else
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter('$Date$ - $Revision$');
?> ?>

View File

@ -19,7 +19,6 @@
* *
* $Id$ * $Id$
* $Source$ * $Source$
*
*/ */
/** /**
@ -45,7 +44,7 @@ if ($conf->projet->enabled) require_once "../project.class.php";
if ($conf->propal->enabled) require_once "../propal.class.php"; if ($conf->propal->enabled) require_once "../propal.class.php";
if ($conf->contrat->enabled) require_once "../contrat/contrat.class.php"; if ($conf->contrat->enabled) require_once "../contrat/contrat.class.php";
if ($conf->commande->enabled) require_once "../commande/commande.class.php"; if ($conf->commande->enabled) require_once "../commande/commande.class.php";
require_once "../lib/CMailFile.class.php"; require_once DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php";
@ -53,9 +52,7 @@ require_once "../lib/CMailFile.class.php";
if ($_GET["socidp"]) { $socidp=$_GET["socidp"]; } if ($_GET["socidp"]) { $socidp=$_GET["socidp"]; }
if (isset($_GET["msg"])) { $msg=urldecode($_GET["msg"]); } if (isset($_GET["msg"])) { $msg=urldecode($_GET["msg"]); }
/* // Sécurité accés client
* Sécurité accés client
*/
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
$action = ''; $action = '';
@ -67,7 +64,7 @@ $NBLINES=4;
/* /*
* * Actions
*/ */
if ($_POST["action"] == 'classin') if ($_POST["action"] == 'classin')
{ {
@ -91,9 +88,7 @@ if ($_POST["action"] == 'add')
if ($_POST["fac_rec"] > 0) if ($_POST["fac_rec"] > 0)
{ {
/* // Facture récurrente
* Facture récurrente
*/
$facture->fac_rec = $_POST["fac_rec"]; $facture->fac_rec = $_POST["fac_rec"];
$facid = $facture->create($user); $facid = $facture->create($user);
} }
@ -128,6 +123,7 @@ if ($_POST["action"] == 'add')
if ($facid) if ($facid)
{ {
Header("Location: facture.php?facid=".$facid); Header("Location: facture.php?facid=".$facid);
exit;
} }
} }
else else
@ -206,6 +202,7 @@ if ($_POST["action"] == 'add')
if ($facid) if ($facid)
{ {
Header("Location: facture.php?facid=".$facid); Header("Location: facture.php?facid=".$facid);
exit;
} }
} }
} }
@ -214,8 +211,7 @@ if ($_POST["action"] == 'add')
/* /*
* *
*/ */
if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes' && $user->rights->facture->valider)
if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == "yes" && $user->rights->facture->valider)
{ {
$fac = new Facture($db); $fac = new Facture($db);
$fac->fetch($_GET["facid"]); $fac->fetch($_GET["facid"]);
@ -272,6 +268,7 @@ if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer && $_POST
{ {
$fac = new Facture($db,"",$_POST["facid"]); $fac = new Facture($db,"",$_POST["facid"]);
$fac->fetch($_POST["facid"]); $fac->fetch($_POST["facid"]);
$datestart=''; $datestart='';
$dateend=''; $dateend='';
if ($_POST["date_startyear"] && $_POST["date_startmonth"] && $_POST["date_startday"]) { if ($_POST["date_startyear"] && $_POST["date_startmonth"] && $_POST["date_startday"]) {
@ -296,6 +293,7 @@ if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer && $_POST
if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer && $_POST["cancel"] == $langs->trans("Cancel")) if ($_POST["action"] == 'updateligne' && $user->rights->facture->creer && $_POST["cancel"] == $langs->trans("Cancel"))
{ {
Header("Location: facture.php?facid=".$_POST["facid"]); // Pour réaffichage de la fiche en cours d'édition Header("Location: facture.php?facid=".$_POST["facid"]); // Pour réaffichage de la fiche en cours d'édition
exit;
} }
if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer) if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer)
@ -305,7 +303,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer)
$result = $fac->deleteline($_GET["rowid"]); $result = $fac->deleteline($_GET["rowid"]);
} }
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes) if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
{ {
if ($user->rights->facture->supprimer ) if ($user->rights->facture->supprimer )
{ {
@ -313,10 +311,11 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes)
$fac->delete($_GET["facid"]); $fac->delete($_GET["facid"]);
$_GET["facid"] = 0 ; $_GET["facid"] = 0 ;
Header("Location: facture.php"); Header("Location: facture.php");
exit;
} }
} }
if ($_POST["action"] == 'confirm_canceled' && $_POST["confirm"] == yes) if ($_POST["action"] == 'confirm_canceled' && $_POST["confirm"] == 'yes')
{ {
if ($user->rights->facture->supprimer ) if ($user->rights->facture->supprimer )
{ {
@ -324,6 +323,7 @@ if ($_POST["action"] == 'confirm_canceled' && $_POST["confirm"] == yes)
$result = $fac->set_canceled($_GET["facid"]); $result = $fac->set_canceled($_GET["facid"]);
$_GET["facid"] = 0 ; $_GET["facid"] = 0 ;
Header("Location: facture.php"); Header("Location: facture.php");
exit;
} }
} }
@ -416,6 +416,7 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
{ {
// Renvoie sur la page de la facture // Renvoie sur la page de la facture
Header("Location: facture.php?facid=".$fac->id."&msg=".urlencode($msg)); Header("Location: facture.php?facid=".$fac->id."&msg=".urlencode($msg));
exit;
} }
} }
else else
@ -461,7 +462,7 @@ $html = new Form($db);
* *
* Mode creation * Mode creation
* *
************************************************************************/ **********************************************************************/
if ($_GET["action"] == 'create') if ($_GET["action"] == 'create')
{ {
@ -567,8 +568,6 @@ if ($_GET["action"] == 'create')
$html->select_array("mode_reglement",$modesregl); $html->select_array("mode_reglement",$modesregl);
print "</td></tr>"; print "</td></tr>";
/* -- */
if ($conf->projet->enabled) if ($conf->projet->enabled)
{ {
$langs->load("projects"); $langs->load("projects");
@ -616,7 +615,8 @@ if ($_GET["action"] == 'create')
print '<table class="noborder">'; print '<table class="noborder">';
print '<tr><td>Services/Produits prédéfinis</td><td>'.$langs->trans("Qty").'</td><td>'.$langs->trans("Discount").'</td><td> &nbsp; &nbsp; </td>'; print '<tr><td>Services/Produits prédéfinis</td><td>'.$langs->trans("Qty").'</td><td>'.$langs->trans("Discount").'</td><td> &nbsp; &nbsp; </td>';
if ($conf->service->enabled) { if ($conf->service->enabled)
{
print '<td>Si produit de type service à durée limitée</td></tr>'; print '<td>Si produit de type service à durée limitée</td></tr>';
} }
for ($i = 1 ; $i <= $NBLINES ; $i++) for ($i = 1 ; $i <= $NBLINES ; $i++)
@ -642,9 +642,9 @@ if ($_GET["action"] == 'create')
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';
} }
/* /*
* Factures récurrentes * Factures récurrentes
*
*/ */
if ($_GET["propalid"] == 0 && $_GET["commandeid"] == 0) if ($_GET["propalid"] == 0 && $_GET["commandeid"] == 0)
{ {
@ -674,6 +674,7 @@ if ($_GET["action"] == 'create')
dolibarr_print_error($db); dolibarr_print_error($db);
} }
} }
/* /*
* *
*/ */
@ -802,9 +803,7 @@ else
if ($_GET["facid"] > 0) if ($_GET["facid"] > 0)
{ {
if ($msg) { if ($msg) print "$msg<br>";
print "$msg<br>";
}
$fac = New Facture($db); $fac = New Facture($db);
if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0) if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0)
@ -855,7 +854,7 @@ else
} }
/* /*
* Confirmation du classement abandonné * Confirmation du classement abandonn
* *
*/ */
if ($_GET["action"] == 'canceled') if ($_GET["action"] == 'canceled')
@ -871,7 +870,7 @@ else
if ($_GET["action"] == 'valid') if ($_GET["action"] == 'valid')
{ {
$numfa = facture_get_num($soc); $numfa = facture_get_num($soc);
$html->form_confirm("facture.php?facid=$fac->id","Valider la facture sous la référence no ".$numfa,"Etes-vous sûr de vouloir valider cette facture avec la référence no $numfa ?","confirm_valid"); $html->form_confirm("facture.php?facid=$fac->id",$langs->trans("ValidateBill"),$langs->trans("ConfirmValidateBill",$numfa),"confirm_valid");
print '<br />'; print '<br />';
} }
@ -890,7 +889,8 @@ else
print "<td>Date limite de réglement : " . strftime("%d %B %Y",$fac->date_lim_reglement) ."</td></tr>"; print "<td>Date limite de réglement : " . strftime("%d %B %Y",$fac->date_lim_reglement) ."</td></tr>";
print '<tr>'; print '<tr>';
if ($conf->projet->enabled) { if ($conf->projet->enabled)
{
$langs->load("projects"); $langs->load("projects");
print '<td height=\"10\">'.$langs->trans("Project").'</td><td colspan="3">'; print '<td height=\"10\">'.$langs->trans("Project").'</td><td colspan="3">';
if ($fac->projetid > 0) if ($fac->projetid > 0)
@ -956,7 +956,7 @@ else
print "<td align=\"right\" style=\"border: 1px solid;\" bgcolor=\"#f0f0f0\"><b>".price($resteapayer)."</b></td><td>".$conf->monnaie."</td></tr>\n"; print "<td align=\"right\" style=\"border: 1px solid;\" bgcolor=\"#f0f0f0\"><b>".price($resteapayer)."</b></td><td>".$conf->monnaie."</td></tr>\n";
} }
print "</table>"; print "</table>";
$db->free(); $db->free($result);
} else { } else {
dolibarr_print_error($db); dolibarr_print_error($db);
} }
@ -1145,7 +1145,7 @@ else
$i++; $i++;
} }
$db->free(); $db->free($resql);
} }
else else
{ {
@ -1154,7 +1154,6 @@ else
/* /*
* Ajouter une ligne * Ajouter une ligne
*
*/ */
if ($fac->statut == 0 && $user->rights->facture->creer && $_GET["action"] <> 'valid') if ($fac->statut == 0 && $user->rights->facture->creer && $_GET["action"] <> 'valid')
{ {
@ -1185,7 +1184,8 @@ else
print '<td align="right"><input type="text" name="qty" value="1" size="2"></td>'; print '<td align="right"><input type="text" name="qty" value="1" size="2"></td>';
print '<td align="right" nowrap><input type="text" name="remise_percent" size="2" value="0">%</td>'; print '<td align="right" nowrap><input type="text" name="remise_percent" size="2" value="0">%</td>';
print '<td align="center" valign="middle" rowspan="2" colspan="4"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>'; print '<td align="center" valign="middle" rowspan="2" colspan="4"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
if ($conf->service->enabled) { if ($conf->service->enabled)
{
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td colspan="5">Si produit de type service à durée limitée: Du '; print '<td colspan="5">Si produit de type service à durée limitée: Du ';
print $html->select_date('',"date_start",0,0,1); print $html->select_date('',"date_start",0,0,1);
@ -1204,7 +1204,6 @@ else
/* /*
* Boutons actions * Boutons actions
*
*/ */
if ($user->societe_id == 0 && $_GET["action"] <> 'valid' && $_GET["action"] <> 'editline') if ($user->societe_id == 0 && $_GET["action"] <> 'valid' && $_GET["action"] <> 'editline')
@ -1453,7 +1452,8 @@ else
print_titre($langs->trans("SendReminderBillByMail")); print_titre($langs->trans("SendReminderBillByMail"));
$liste[0]="&nbsp;"; $liste[0]="&nbsp;";
foreach ($soc->contact_email_array() as $key=>$value) { foreach ($soc->contact_email_array() as $key=>$value)
{
$liste[$key]=$value; $liste[$key]=$value;
} }
@ -1491,7 +1491,7 @@ else
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows(); $num = $db->num_rows($resql);
if ($num) if ($num)
{ {
$i = 0; $total = 0; $i = 0; $total = 0;
@ -1508,7 +1508,7 @@ else
$var=True; $var=True;
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object(); $objp = $db->fetch_object($resql);
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td><a href=\"propal.php?propalid=$objp->propalid\">$objp->ref</a></td>\n"; print "<td><a href=\"propal.php?propalid=$objp->propalid\">$objp->ref</a></td>\n";
@ -1521,7 +1521,9 @@ else
print "<tr><td align=\"right\" colspan=\"3\">".$langs->trans("TotalHT").": <b>".price($total)."</b> ".$conf->monnaie."</td></tr>\n"; print "<tr><td align=\"right\" colspan=\"3\">".$langs->trans("TotalHT").": <b>".price($total)."</b> ".$conf->monnaie."</td></tr>\n";
print "</table>"; print "</table>";
} }
} else { }
else
{
dolibarr_print_error($db); dolibarr_print_error($db);
} }
} }
@ -1533,7 +1535,6 @@ else
} }
else else
{ {
/*************************************************************************** /***************************************************************************
* * * *
* Mode Liste * * Mode Liste *
@ -1566,11 +1567,8 @@ else
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture "; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture ";
$sql .= " WHERE f.fk_soc = s.idp"; $sql .= " WHERE f.fk_soc = s.idp";
if ($socidp) if ($socidp) $sql .= " AND s.idp = $socidp";
$sql .= " AND s.idp = $socidp"; if ($month > 0) $sql .= " AND date_format(f.datef, '%m') = $month";
if ($month > 0)
$sql .= " AND date_format(f.datef, '%m') = $month";
if ($_GET["filtre"]) if ($_GET["filtre"])
{ {
@ -1602,8 +1600,7 @@ else
$sql .= " AND f.total_ttc = '".$_GET["search_montant_ttc"]."'"; $sql .= " AND f.total_ttc = '".$_GET["search_montant_ttc"]."'";
} }
if ($year > 0) if ($year > 0) $sql .= " AND date_format(f.datef, '%Y') = $year";
$sql .= " AND date_format(f.datef, '%Y') = $year";
if (strlen($_POST["sf_ref"]) > 0) if (strlen($_POST["sf_ref"]) > 0)
{ {
@ -1622,10 +1619,9 @@ else
$sql .= $db->plimit($limit+1,$offset); $sql .= $db->plimit($limit+1,$offset);
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows(); $num = $db->num_rows($resql);
if ($socidp) if ($socidp)
{ {
@ -1749,12 +1745,12 @@ else
if ($num <= $limit) { if ($num <= $limit) {
// Print total // Print total
print "<tr ".$bc[!$var].">"; print '<tr class="liste_total">';
print "<td colspan=3 align=\"left\"><i>".$langs->trans("Total").":</i></td>"; print '<td class="liste_total" colspan="3" align="left">'.$langs->trans("Total").'</td>';
print "<td align=\"right\"><i><b>".price($total)."</b></i></td>"; print '<td class="liste_total" align="right">'.price($total).'</td>';
print "<td align=\"right\"><i><b>".price($total_ttc)."</b></i></td>"; print '<td class="liste_total" align="right">'.price($total_ttc).'</td>';
print "<td align=\"right\"><i><b>".price($totalrecu)."</b></i></td>"; print '<td class="liste_total" align="right">'.price($totalrecu).'</td>';
print '<td align="center">&nbsp;</td>'; print '<td class="liste_total" align="center">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }
} }
@ -1766,11 +1762,8 @@ else
{ {
dolibarr_print_error($db); dolibarr_print_error($db);
} }
} }
} }
} }
$db->close(); $db->close();

View File

@ -266,7 +266,7 @@ if ($socid > 0)
*/ */
if ($conf->facture->enabled && $user->rights->facture->lire) if ($conf->facture->enabled && $user->rights->facture->lire)
{ {
print '<table class="border" width="100%">'; print '<table class="noborder" width="100%">';
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, f.total, f.total_ttc, ".$db->pdate("f.datef")." as df, f.paye as paye, f.fk_statut as statut, f.rowid as facid "; $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, f.total, f.total_ttc, ".$db->pdate("f.datef")." as df, f.paye as paye, f.fk_statut as statut, f.rowid as facid ";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
@ -476,34 +476,40 @@ if ($socid > 0)
$sql .= " AND c.id=a.fk_action "; $sql .= " AND c.id=a.fk_action ";
$sql .= " ORDER BY a.datea DESC, a.id DESC"; $sql .= " ORDER BY a.datea DESC, a.id DESC";
if ( $db->query($sql) ) { $result=$db->query($sql);
if ($result)
{
$i = 0 ;
$num = $db->num_rows($result);
$var=true;
$i = 0 ; $num = $db->num_rows(); while ($i < $num)
while ($i < $num) { {
$var = !$var; $var = !$var;
$obj = $db->fetch_object(); $obj = $db->fetch_object($result);
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
if ($oldyear == strftime("%Y",$obj->da) ) { if ($oldyear == strftime("%Y",$obj->da) ) {
print '<td align="center">|</td>'; print '<td width="30" align="center">|</td>';
} else { } else {
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</td>\n"; print '<td width="30" align="center">'.strftime("%Y",$obj->da)."</td>\n";
$oldyear = strftime("%Y",$obj->da); $oldyear = strftime("%Y",$obj->da);
} }
if ($oldmonth == strftime("%Y%b",$obj->da) ) { if ($oldmonth == strftime("%Y%b",$obj->da) ) {
print '<td align="center">|</td>'; print '<td width="30" align="center">|</td>';
} else { } else {
print "<td align=\"center\">" .strftime("%b",$obj->da)."</td>\n"; print '<td width="30" align="center">'.strftime("%b",$obj->da)."</td>\n";
$oldmonth = strftime("%Y%b",$obj->da); $oldmonth = strftime("%Y%b",$obj->da);
} }
print "<td>" .strftime("%d",$obj->da)."</td>\n"; print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
print "<td>" .strftime("%H:%M",$obj->da)."</td>\n"; print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
print '<td width="10%">&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td width="40%">';
print '<td>';
if ($obj->propalrowid) if ($obj->propalrowid)
{ {
print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowTask"),"task"); print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowTask"),"task");
@ -521,20 +527,16 @@ if ($socid > 0)
print '</a></td>'; print '</a></td>';
} }
/* // Contact pour cette action
* Contact pour cette action
*
*/
if ($obj->fk_contact) { if ($obj->fk_contact) {
$contact = new Contact($db); $contact = new Contact($db);
$contact->fetch($obj->fk_contact); $contact->fetch($obj->fk_contact);
print '<td width="40%"><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>';
} else { } else {
print '<td width="40%">&nbsp;</td>'; print '<td>&nbsp;</td>';
} }
/*
*/ print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.$obj->code.'</a></td>';
print '<td width="20%"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.$obj->code.'</a></td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }
@ -545,20 +547,13 @@ if ($socid > 0)
} }
print "</table>"; print "</table>";
// Notes sur la societe
/* /*
*
* Notes sur la societe
*
*/
if ($societe->note) { if ($societe->note) {
print '<table class="border" width="100%" bgcolor="#e0e0e0">'; print '<table class="border" width="100%" bgcolor="#e0e0e0">';
print "<tr><td>".nl2br($societe->note)."</td></tr>"; print "<tr><td>".nl2br($societe->note)."</td></tr>";
print "</table>"; print "</table>";
} }
/*
*
*
*
*/ */
} }
@ -568,5 +563,7 @@ if ($socid > 0)
} }
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
llxFooter('$Date$ - $Revision$');
?> ?>

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Destailleur Laurent <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -34,13 +34,10 @@ if (!$user->rights->propale->lire)
accessforbidden(); accessforbidden();
require("../lib/CMailFile.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
/* require_once("../project.class.php");
* Modules optionnels require_once("../propal.class.php");
*/ require_once("../actioncomm.class.php");
require("../project.class.php");
require("../propal.class.php");
require("../actioncomm.class.php");
/* /*
* Sécurité accés client * Sécurité accés client

View File

@ -142,7 +142,7 @@ if ($socid > 0)
print "</td></tr>"; print "</td></tr>";
print '<tr><td>Code compta</td><td>'.$societe->code_compta.'</td>'; print '<tr><td>'.$langs->trans("AccountancyCode").'</td><td>'.$societe->code_compta.'</td>';
print '<td>'.$langs->trans("CustomerCode").'</td><td>'; print '<td>'.$langs->trans("CustomerCode").'</td><td>';
print $societe->code_client; print $societe->code_client;
print "</td></tr>"; print "</td></tr>";