Look: Modif esthtiques mineures
This commit is contained in:
parent
549efd4764
commit
0e4549ea19
@ -172,43 +172,44 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
*/
|
||||
if ($conf->commande->enabled)
|
||||
{
|
||||
$langs->load("orders");
|
||||
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 0";
|
||||
if ($socidp)
|
||||
$langs->load("orders");
|
||||
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.idp";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE c.fk_soc = s.idp AND c.fk_statut = 0";
|
||||
if ($socidp)
|
||||
{
|
||||
$sql .= " AND c.fk_soc = $socidp";
|
||||
$sql .= " AND c.fk_soc = $socidp";
|
||||
}
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$total = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
$total = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]><td nowrap><a href=\"../commande/fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."</a></td>";
|
||||
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td></tr>';
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]><td nowrap><a href=\"../commande/fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."</a></td>";
|
||||
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
||||
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table><br>";
|
||||
if ($total>0)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,11 +143,17 @@ $result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$begin=$_GET["begin"];
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste($titre ,$page, "index.php", '&begin='.$_GET["begin"].'&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num);
|
||||
print_barre_liste($titre ,$page, "index.php", '&begin='.$begin.'&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num);
|
||||
|
||||
print '<form method="post" action="index.php">';
|
||||
print '<input type="hidden" name="view" value="'.$view.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
@ -176,10 +182,6 @@ if ($result)
|
||||
print "</tr>\n";
|
||||
|
||||
// Ligne des champs de filtres
|
||||
print '<form method="post" action="index.php">';
|
||||
print '<input type="hidden" name="view" value="'.$view.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_nom" size="12" value="'.$search_nom.'">';
|
||||
@ -215,7 +217,6 @@ if ($result)
|
||||
print ' <input type="image" value="button_removefilter" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" alt="'.$langs->trans("RemoveFilter").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
$var=True;
|
||||
while ($i < min($num,$limit))
|
||||
@ -270,7 +271,10 @@ if ($result)
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
|
||||
print '</form>';
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -289,92 +293,90 @@ if (2==1 && (strlen($_GET["search_nom"]) OR strlen($_GET["search_prenom"])))
|
||||
{
|
||||
|
||||
|
||||
$sortfield = "p.nachname";
|
||||
$sortorder = "ASC";
|
||||
|
||||
$sql = "SELECT p.vorname, p.nachname, p.firma, p.email";
|
||||
$sql .= " FROM phprojekt.contacts as p";
|
||||
$sql .= " WHERE upper(p.nachname) like '%".$_GET["search_nom"]."%'";
|
||||
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1, $offset);
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print_liste_field_titre($langs->trans("Name"),"projekt.php","lower(p.name)", $begin);
|
||||
print "</td><td>";
|
||||
print_liste_field_titre($langs->trans("Fristname"),"projekt.php","lower(p.firstname)", $begin);
|
||||
print "</td><td>";
|
||||
print_liste_field_titre($langs->trans("Company"),"projekt.php","lower(s.nom)", $begin);
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Phone").'</td>';
|
||||
|
||||
if ($_GET["view"] == 'phone')
|
||||
{
|
||||
print '<td>Portable</td>';
|
||||
print '<td>Fax</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>email</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object( $i);
|
||||
$sortfield = "p.nachname";
|
||||
$sortorder = "ASC";
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td valign="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'">';
|
||||
print img_file();
|
||||
print '</a> <a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'">'.$obj->nachname.'</a></td>';
|
||||
print '<td>'.$obj->vorname.'</td>';
|
||||
|
||||
print '<td>';
|
||||
print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=$obj->idp\">$obj->firma</A></td>\n";
|
||||
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
|
||||
if ($_GET["view"] == 'phone')
|
||||
{
|
||||
print '<td>'.dolibarr_print_phone($obj->phone_mobile).' </td>';
|
||||
|
||||
print '<td>'.dolibarr_print_phone($obj->fax).' </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="mailto:'.$obj->email.'">'.$obj->email.'</a> ';
|
||||
if (!valid_email($obj->email))
|
||||
{
|
||||
print "Email Invalide !";
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$sql = "SELECT p.vorname, p.nachname, p.firma, p.email";
|
||||
$sql .= " FROM phprojekt.contacts as p";
|
||||
$sql .= " WHERE upper(p.nachname) like '%".$_GET["search_nom"]."%'";
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1, $offset);
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print_liste_field_titre($langs->trans("Name"),"projekt.php","lower(p.name)", $begin);
|
||||
print "</td><td>";
|
||||
print_liste_field_titre($langs->trans("Fristname"),"projekt.php","lower(p.firstname)", $begin);
|
||||
print "</td><td>";
|
||||
print_liste_field_titre($langs->trans("Company"),"projekt.php","lower(s.nom)", $begin);
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Phone").'</td>';
|
||||
|
||||
if ($_GET["view"] == 'phone')
|
||||
{
|
||||
print '<td>'.$langs->trans("Mobile").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>'.$langs->trans("Email").'</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object( $i);
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
// Nom
|
||||
print '<td valign="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'">'.img_file().' '.$obj->nachname.'</a></td>';
|
||||
print '<td>'.$obj->vorname.'</td>';
|
||||
|
||||
print '<td>';
|
||||
print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=$obj->idp\">$obj->firma</a></td>\n";
|
||||
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||
|
||||
if ($_GET["view"] == 'phone')
|
||||
{
|
||||
print '<td>'.dolibarr_print_phone($obj->phone_mobile).' </td>';
|
||||
|
||||
print '<td>'.dolibarr_print_phone($obj->fax).' </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="mailto:'.$obj->email.'">'.$obj->email.'</a> ';
|
||||
if (!valid_email($obj->email))
|
||||
{
|
||||
print "Email Invalide !";
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1433,7 +1433,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td><div class="titre">'.$titre.'</div></td>';
|
||||
print '<tr><td class="notopnoleftnoright"><div class="titre">'.$titre.'</div></td>';
|
||||
}
|
||||
|
||||
if ($center)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user