Look: Modifications esthétiques mineures
This commit is contained in:
parent
b0f8a31e9b
commit
d64e8457f6
@ -115,38 +115,42 @@ if ($conf->contrat->enabled) {
|
|||||||
/*
|
/*
|
||||||
* Liste des propal brouillons
|
* Liste des propal brouillons
|
||||||
*/
|
*/
|
||||||
if ($conf->propal->enabled && $user->rights->propale->lire) {
|
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||||
$sql = "SELECT p.rowid, p.ref, p.price, s.nom";
|
{
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s";
|
$sql = "SELECT p.rowid, p.ref, p.price, s.nom";
|
||||||
$sql .= " WHERE p.fk_statut = 0 and p.fk_soc = s.idp";
|
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s";
|
||||||
|
$sql .= " WHERE p.fk_statut = 0 and p.fk_soc = s.idp";
|
||||||
if ( $db->query($sql) )
|
|
||||||
{
|
$resql=$db->query($sql);
|
||||||
$total = 0;
|
if ($resql)
|
||||||
$num = $db->num_rows();
|
{
|
||||||
$i = 0;
|
$var=true;
|
||||||
$var=true;
|
|
||||||
if ($num > 0 )
|
$total = 0;
|
||||||
{
|
$num = $db->num_rows($resql);
|
||||||
print '<table class="noborder" width="100%">';
|
$i = 0;
|
||||||
print "<tr class=\"liste_titre\">";
|
if ($num > 0)
|
||||||
print "<td colspan=\"3\">".$langs->trans("ProposalsDraft")."</td></tr>";
|
{
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
while ($i < $num)
|
print "<tr class=\"liste_titre\">";
|
||||||
{
|
print "<td colspan=\"3\">".$langs->trans("ProposalsDraft")."</td></tr>";
|
||||||
$obj = $db->fetch_object();
|
|
||||||
$var=!$var;
|
while ($i < $num)
|
||||||
print '<tr '.$bc[$var].'><td width="25%" nowrap>'."<a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref."</a></td><td>".$obj->nom."</td><td align=\"right\">".price($obj->price)."</td></tr>";
|
{
|
||||||
$i++;
|
$obj = $db->fetch_object($resql);
|
||||||
$total += $obj->price;
|
$var=!$var;
|
||||||
}
|
print '<tr '.$bc[$var].'><td width="25%" nowrap>'."<a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref."</a></td><td>".$obj->nom."</td><td align=\"right\">".price($obj->price)."</td></tr>";
|
||||||
if ($total>0) {
|
$i++;
|
||||||
$var=!$var;
|
$total += $obj->price;
|
||||||
print '<tr '.$bc[$var]."><td colspan=\"2\"><i>".$langs->trans("Total")."</i></td><td align=\"right\"><i>".price($total)."</i></td></tr>";
|
}
|
||||||
}
|
if ($total>0) {
|
||||||
print "</table><br>";
|
$var=!$var;
|
||||||
}
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
|
print "</table><br>";
|
||||||
|
}
|
||||||
|
$db->free($resql);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -393,48 +397,48 @@ if ($conf->contrat->enabled && 0) // \todo A REFAIRE DEPUIS NOUVEAU CONTRAT
|
|||||||
* Dernières propales ouvertes
|
* Dernières propales ouvertes
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($conf->propal->enabled && $user->rights->propale->lire) {
|
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||||
|
{
|
||||||
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
|
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c";
|
||||||
$sql .= " WHERE p.fk_soc = s.idp AND p.fk_statut = c.id AND p.fk_statut = 1";
|
$sql .= " WHERE p.fk_soc = s.idp AND p.fk_statut = c.id AND p.fk_statut = 1";
|
||||||
if ($socidp) $sql .= " AND s.idp = $socidp";
|
if ($socidp) $sql .= " AND s.idp = $socidp";
|
||||||
$sql .= " ORDER BY p.rowid DESC";
|
$sql .= " ORDER BY p.rowid DESC";
|
||||||
|
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
print '<table class="noborder" width="100%">';
|
$var=true;
|
||||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
|
||||||
$var=false;
|
print '<table class="noborder" width="100%">';
|
||||||
while ($i < $num)
|
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
||||||
{
|
while ($i < $num)
|
||||||
$obj = $db->fetch_object($result);
|
{
|
||||||
print "<tr $bc[$var]><td width=\"15%\" nowrap><a href=\"propal.php?propalid=".$obj->propalid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref."</a></td>";
|
$obj = $db->fetch_object($result);
|
||||||
print "<td><a href=\"fiche.php?socid=$obj->idp\">".img_object($langs->trans("ShowCompany"),"company")." ".$obj->nom."</a></td>\n";
|
$var=!$var;
|
||||||
print "<td align=\"right\">";
|
print "<tr $bc[$var]><td width=\"15%\" nowrap><a href=\"propal.php?propalid=".$obj->propalid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref."</a></td>";
|
||||||
print strftime("%d %b %Y",$obj->dp)."</td>\n";
|
print "<td><a href=\"fiche.php?socid=$obj->idp\">".img_object($langs->trans("ShowCompany"),"company")." ".$obj->nom."</a></td>\n";
|
||||||
print "<td align=\"right\">".price($obj->price)."</td></tr>\n";
|
print "<td align=\"right\">";
|
||||||
$var=!$var;
|
print dolibarr_print_date($obj->dp)."</td>\n";
|
||||||
$i++;
|
print "<td align=\"right\">".price($obj->price)."</td></tr>\n";
|
||||||
$total += $obj->price;
|
$i++;
|
||||||
}
|
$total += $obj->price;
|
||||||
if ($total>0) {
|
}
|
||||||
print "<tr $bc[$var]><td colspan=\"3\" align=\"right\"><i>".$langs->trans("Total")."</i></td><td align=\"right\"><i>".price($total)."</i></td></tr>";
|
if ($total>0) {
|
||||||
}
|
print '<tr class="liste_total"><td colspan="3" align="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td></tr>";
|
||||||
print "</table><br>";
|
}
|
||||||
}
|
print "</table><br>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user