Look: Modif esthtiques crans recap-client

This commit is contained in:
Laurent Destailleur 2006-04-02 01:53:51 +00:00
parent 3f6c192643
commit 0c18b66975
6 changed files with 127 additions and 87 deletions

View File

@ -784,7 +784,7 @@ if ($socidp > 0)
*
*/
print '<table width="100%" class="noborder">';
print '<tr class="liste_titre"><td colspan="9"><a href="action/index.php?socid='.$objsoc->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right">&nbsp;</td></tr>';
print '<tr class="liste_titre"><td colspan="10"><a href="action/index.php?socid='.$objsoc->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right">&nbsp;</td></tr>';
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
@ -828,15 +828,13 @@ if ($socidp > 0)
}
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
if (date("U",$obj->da) < time())
{
print "<td>".img_warning("Late")."</td>";
}
else
{
print '<td>&nbsp;</td>';
}
print '<td width="30" nowrap="nowrap">'.strftime("%H:%M",$obj->da).'</td>';
// Picto warning
print '<td width="16">';
if (date("U",$obj->da) < time()) print ' '.img_warning("Late");
else print '&nbsp;';
print '</td>';
// Status/Percent
print '<td width="30">&nbsp;</td>';
@ -857,7 +855,7 @@ if ($socidp > 0)
print $libelle;
print '</a></td>';
}
print "<td>$obj->label</td>";
print '<td colspan="2">'.$obj->label.'</td>';
// Contact pour cette action
if ($obj->fk_contact) {
@ -887,12 +885,15 @@ if ($socidp > 0)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="11"><a href="action/index.php?socid='.$objsoc->id.'">'.$langs->trans("ActionsDone").'</a></td></tr>';
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
$sql .= " WHERE a.fk_soc = ".$objsoc->id;
$sql .= " AND u.rowid = a.fk_user_author";
$sql .= " AND c.id=a.fk_action AND a.percent = 100";
$sql .= " ORDER BY a.datea DESC, a.id DESC";
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,";
$sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.code, u.rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
$sql.= " WHERE a.fk_soc = ".$objsoc->id;
$sql.= " AND u.rowid = a.fk_user_author";
$sql.= " AND c.id=a.fk_action AND a.percent = 100";
$sql.= " ORDER BY a.datea DESC, a.id DESC";
$result=$db->query($sql);
if ($result)
@ -932,7 +933,9 @@ if ($socidp > 0)
}
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
print "<td>&nbsp;</td>";
// Picto
print '<td width="16">&nbsp;</td>';
// Espace
print '<td width="30">&nbsp;</td>';
@ -946,6 +949,7 @@ if ($socidp > 0)
print '</a>';
print '</td>';
// Objet lié
print '<td>';
if ($obj->propalrowid)
{
@ -953,9 +957,16 @@ if ($socidp > 0)
print $langs->trans("Propal");
print '</a>';
}
if ($obj->fk_facture)
{
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->fk_facture.'">'.img_object($langs->trans("ShowBill"),"bill");
print $langs->trans("Invoice");
print '</a>';
}
else print '&nbsp;';
print '</td>';
// Libellé
print "<td>$obj->label</td>";
// Contact pour cette action
@ -970,7 +981,8 @@ if ($socidp > 0)
print '<td>&nbsp;</td>';
}
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
// Auteur
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
print "</tr>\n";
$i++;
}

View File

@ -249,17 +249,17 @@ if ($_GET["id"] > 0) {
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id.'">'.$societe->nom.'</a>';
print '</td>';
print '</tr>';
// Statut
print '<tr><td>'.$langs->trans("Status").'</td>';
print "<td colspan=\"2\">".$commande->getLibStatut(4)."</td>\n";
print '</tr>';
// Date
print '<tr><td>'.$langs->trans("Date").'</td>';
print "<td colspan=\"2\">".dolibarr_print_date($commande->date,"%A %d %B %Y")."</td>\n";
print '</tr>';
// ligne 6
// partie Gauche
print '<tr><td height="10" nowrap>'.$langs->trans('GlobalDiscount').'</td>';

View File

@ -547,7 +547,7 @@ if ($socid > 0)
*
*/
print '<table width="100%" class="noborder">';
print '<tr class="liste_titre"><td colspan="9"><a href="action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right">&nbsp;</td></tr>';
print '<tr class="liste_titre"><td colspan="10"><a href="action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right">&nbsp;</td></tr>';
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
@ -591,22 +591,20 @@ if ($socid > 0)
}
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
if (date("U",$obj->da) < time())
{
print "<td>".img_warning("Late")."</td>";
}
else
{
print '<td>&nbsp;</td>';
}
print '<td width="30" nowrap="nowrap">'.strftime("%H:%M",$obj->da).'</td>';
// Picto warning
print '<td width="16">';
if (date("U",$obj->da) < time()) print ' '.img_warning("Late");
else print '&nbsp;';
print '</td>';
// Status/Percent
print '<td width="30">&nbsp;</td>';
if ($obj->propalrowid)
{
print '<td><a href="propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowAction"),"task");
print '<td><a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowAction"),"task");
$transcode=$langs->trans("Action".$obj->acode);
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
print $libelle;
@ -614,24 +612,26 @@ if ($socid > 0)
}
else
{
print '<td><a href="action/fiche.php?id='.$obj->id.'">'.img_object($langs->trans("ShowAction"),"task");
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$obj->id.'">'.img_object($langs->trans("ShowAction"),"task");
$transcode=$langs->trans("Action".$obj->acode);
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
print $libelle;
print '</a></td>';
}
print "<td>$obj->label</td>";
print '<td colspan="2">'.$obj->label.'</td>';
// Contact pour cette action
if ($obj->fk_contact) {
$contact = new Contact($db);
$contact->fetch($obj->fk_contact);
print '<td><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='.$obj->fk_contact.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>';
} else {
print '<td>&nbsp;</td>';
}
print '<td width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'</a></td>';
// Auteur
print '<td width="50" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->fk_user_author.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'</a></td>';
print "</tr>\n";
$i++;
}
@ -646,14 +646,17 @@ if ($socid > 0)
* Listes des actions effectuées
*/
print '<table width="100%" class="noborder">';
print '<tr class="liste_titre"><td colspan="9"><a href="action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsDone").'</a></td></tr>';
print '<tr class="liste_titre"><td colspan="11"><a href="action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsDone").'</a></td></tr>';
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.code, u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
$sql .= " WHERE a.fk_soc = ".$societe->id;
$sql .= " AND u.rowid = a.fk_user_author";
$sql .= " AND c.id=a.fk_action AND a.percent = 100";
$sql .= " ORDER BY a.datea DESC, a.id DESC";
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,";
$sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.code, u.rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
$sql.= " WHERE a.fk_soc = ".$societe->id;
$sql.= " AND u.rowid = a.fk_user_author";
$sql.= " AND c.id=a.fk_action AND a.percent = 100";
$sql.= " ORDER BY a.datea DESC, a.id DESC";
$result=$db->query($sql);
if ($result)
@ -686,8 +689,11 @@ if ($socid > 0)
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
// Picto
print '<td width="16">&nbsp;</td>';
// Espace
print '<td>&nbsp;</td>';
print '<td width="30">&nbsp;</td>';
// Action
print '<td>';
@ -698,6 +704,7 @@ if ($socid > 0)
print '</a>';
print '</td>';
// Objet lié
print '<td>';
if ($obj->propalrowid)
{
@ -705,9 +712,18 @@ if ($socid > 0)
print $langs->trans("Propal");
print '</a>';
}
if ($obj->fk_facture)
{
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->fk_facture.'">'.img_object($langs->trans("ShowBill"),"bill");
print $langs->trans("Invoice");
print '</a>';
}
else print '&nbsp;';
print '</td>';
// Libellé
print "<td>$obj->label</td>";
// Contact pour cette action
if ($obj->fk_contact)
{
@ -720,7 +736,8 @@ if ($socid > 0)
print '<td>&nbsp;</td>';
}
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
// Auteur
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'</a></td>';
print "</tr>\n";
$i++;
}

View File

@ -193,50 +193,44 @@ if ($socid > 0)
print '<table class="noborder" width="100%">';
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df";
$sql .= " , 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 .= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id;
$sql .= " ORDER BY f.datef DESC";
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df,";
$sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,";
$sql.= " u.code";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id;
$sql.= " AND f.fk_user_valid = u.rowid";
$sql.= " ORDER BY f.datef DESC";
$resql=$db->query($sql);
if ($resql)
{
$var=true;
$num = $db->num_rows($resql);
if ($num > 0)
print '<tr class="liste_titre">';
print '<td width="100" align="center">'.$langs->trans("Date").'</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td align="right">'.$langs->trans("Debit").'</td>';
print '<td align="right">'.$langs->trans("Credit").'</td>';
print '<td align="right">'.$langs->trans("Balance").'</td>';
print '<td>&nbsp;</td>';
print '</tr>';
if (! $num > 0)
{
print '<tr class="liste_titre">';
print '<td width="100" align="center">'.$langs->trans("Date").'</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td align="right">'.$langs->trans("Debit").'</td>';
print '<td align="right">'.$langs->trans("Credit").'</td>';
print '<td align="right">'.$langs->trans("Balance").'</td>';
print '</tr>';
}
else
{
print $langs->trans("NoBills");
print '<tr><td colspan="7">'.$langs->trans("NoInvoice").'</td></tr>';
}
$i = 0;
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$facs[$i] = $objp->facid;
$i++;
}
$db->free($resql);
$solde = 0;
// Boucle sur chaque facture
for ($i = 0 ; $i < $num ; $i++)
{
$objf = $db->fetch_object($resql);
$fac = new Facture($db);
$ret=$fac->fetch($facs[$i]);
$ret=$fac->fetch($objf->facid);
if ($ret < 0)
{
print $fac->error."<br>";
@ -255,25 +249,30 @@ if ($socid > 0)
print '<td align="right">&nbsp;</td>';
print '<td align="right">'.price($solde)."</td>\n";
// Auteur
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$objf->code.'</a></td>';
print "</tr>\n";
// Paiements
$sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, pf.amount, p.statut";
$sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, pf.amount, p.statut,";
$sql.= " p.fk_user_creat, u.code";
$sql.= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf,";
$sql.= " ".MAIN_DB_PREFIX."paiement as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON p.fk_user_creat = u.rowid";
$sql.= " WHERE pf.fk_paiement = p.rowid";
$sql.= " AND pf.fk_facture = ".$fac->id;
$sql .= " FROM ".MAIN_DB_PREFIX."paiement as p";
$sql .= ", ".MAIN_DB_PREFIX."paiement_facture as pf";
$sql .= " WHERE pf.fk_paiement = p.rowid";
$sql .= " AND pf.fk_facture = ".$fac->id;
$resql = $db->query($sql);
if ($resql)
$resqlp = $db->query($sql);
if ($resqlp)
{
$nump = $db->num_rows($resql);
$nump = $db->num_rows($resqlp);
$j = 0;
while ($j < $nump)
{
$objp = $db->fetch_object($resql);
$objp = $db->fetch_object($resqlp);
//$var=!$var;
print "<tr $bc[$var]>";
print '<td align="center">'.dolibarr_print_date($objp->dp)."</td>\n";
@ -285,10 +284,20 @@ if ($socid > 0)
print '<td align="right">'.price($objp->amount).'</td>';
$solde = $solde - $objp->amount;
print '<td align="right">'.price($solde)."</td>\n";
// Auteur
print '<td nowrap="nowrap" width="50"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),'user').' '.$objp->code.'</a></td>';
print '</tr>';
$j++;
}
$db->free($resqlp);
}
else
{
dolibarr_print_error($db);
}
}
}
@ -301,7 +310,7 @@ if ($socid > 0)
}
else
{
print "Erreur";
dolibarr_print_error($db);
}

View File

@ -103,6 +103,7 @@ DateMaxPayment=Payment due before
DateEcheance=Due date limit
DateBill=Invoice date
DateInvoice=Invoice date
NoInvoice=No invoice
ClassifyBill=Classify invoice
NoSupplierBillsUnpayed=No suppliers invoices unpayed
SupplierBillsToPay=Suppliers invoices to pay

View File

@ -103,6 +103,7 @@ DateMaxPayment=Date limite r
DateEcheance=Date échéance
DateBill=Date facturaction
DateInvoice=Date facturation
NoInvoice=Aucune facture
ClassifyBill=Classer la facture
NoSupplierBillsUnpayed=Aucune facture fournisseur impayée
SupplierBillsToPay=Factures fournisseurs à payer