Look: Modif esthétiques 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)
|
if ($conf->commande->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$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 = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.idp";
|
||||||
$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 0";
|
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
||||||
if ($socidp)
|
$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);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var = true;
|
$var = true;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object($resql);
|
$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 "<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><a href="fiche.php?socid='.$obj->idp.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td></tr>';
|
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
if ($total>0)
|
if ($total>0)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,11 +143,17 @@ $result = $db->query($sql);
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$begin=$_GET["begin"];
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$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%">';
|
print '<table class="liste" width="100%">';
|
||||||
|
|
||||||
@ -176,10 +182,6 @@ if ($result)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Ligne des champs de filtres
|
// 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 '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" name="search_nom" size="12" value="'.$search_nom.'">';
|
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 ' <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 '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
@ -270,7 +271,10 @@ if ($result)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free();
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -289,92 +293,90 @@ if (2==1 && (strlen($_GET["search_nom"]) OR strlen($_GET["search_prenom"])))
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$sortfield = "p.nachname";
|
$sortfield = "p.nachname";
|
||||||
$sortorder = "ASC";
|
$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);
|
|
||||||
|
|
||||||
$var=!$var;
|
$sql = "SELECT p.vorname, p.nachname, p.firma, p.email";
|
||||||
|
$sql .= " FROM phprojekt.contacts as p";
|
||||||
print "<tr $bc[$var]>";
|
$sql .= " WHERE upper(p.nachname) like '%".$_GET["search_nom"]."%'";
|
||||||
|
|
||||||
print '<td valign="center">';
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1, $offset);
|
||||||
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>';
|
$result = $db->query($sql);
|
||||||
print '<td>'.$obj->vorname.'</td>';
|
|
||||||
|
if ($result)
|
||||||
print '<td>';
|
{
|
||||||
print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=$obj->idp\">$obj->firma</A></td>\n";
|
$num = $db->num_rows($result);
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
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>';
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre"><td>';
|
||||||
if ($_GET["view"] == 'phone')
|
print_liste_field_titre($langs->trans("Name"),"projekt.php","lower(p.name)", $begin);
|
||||||
{
|
print "</td><td>";
|
||||||
print '<td>'.dolibarr_print_phone($obj->phone_mobile).' </td>';
|
print_liste_field_titre($langs->trans("Fristname"),"projekt.php","lower(p.firstname)", $begin);
|
||||||
|
print "</td><td>";
|
||||||
print '<td>'.dolibarr_print_phone($obj->fax).' </td>';
|
print_liste_field_titre($langs->trans("Company"),"projekt.php","lower(s.nom)", $begin);
|
||||||
}
|
print '</td>';
|
||||||
else
|
print '<td>'.$langs->trans("Phone").'</td>';
|
||||||
{
|
|
||||||
print '<td><a href="mailto:'.$obj->email.'">'.$obj->email.'</a> ';
|
if ($_GET["view"] == 'phone')
|
||||||
if (!valid_email($obj->email))
|
{
|
||||||
{
|
print '<td>'.$langs->trans("Mobile").'</td>';
|
||||||
print "Email Invalide !";
|
print '<td>'.$langs->trans("Fax").'</td>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
else
|
||||||
}
|
{
|
||||||
|
print '<td>'.$langs->trans("Email").'</td>';
|
||||||
print "</tr>\n";
|
}
|
||||||
$i++;
|
|
||||||
|
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
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td><div class="titre">'.$titre.'</div></td>';
|
print '<tr><td class="notopnoleftnoright"><div class="titre">'.$titre.'</div></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($center)
|
if ($center)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user