Look: Ajout picto
This commit is contained in:
parent
82f3aa4640
commit
93b34b5989
@ -22,17 +22,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/expedition/index.php
|
||||
\ingroup expedition
|
||||
\brief Page accueil du module expedition
|
||||
\version $Revision$
|
||||
\file htdocs/expedition/index.php
|
||||
\ingroup expedition
|
||||
\brief Page accueil du module expedition
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$langs->load("sendings");
|
||||
|
||||
llxHeader('','Expéditions','ch-expedition.html',$form_search);
|
||||
llxHeader('',$langs->trans("Sendings"),'ch-expedition.html',$form_search);
|
||||
|
||||
print_titre($langs->trans("Sendings"));
|
||||
|
||||
@ -43,14 +43,15 @@ print '<form method="post" action="liste.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchASending").'</td></tr>';
|
||||
print "<tr $bc[1]><td>";
|
||||
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print $langs->trans("Ref").' : <input type="text" class="flat" name="sf_ref" size="16"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "</table></form><br />\n";
|
||||
|
||||
/*
|
||||
* Expeditions à valider
|
||||
*/
|
||||
$sql = "SELECT e.rowid, e.ref, s.nom, s.idp, c.ref as commande_ref, c.rowid as commande_id FROM ".MAIN_DB_PREFIX."expedition as e, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= " WHERE e.fk_commande = c.rowid AND c.fk_soc = s.idp AND e.fk_statut = 0";
|
||||
$sql = "SELECT e.rowid, e.ref, s.nom, s.idp, c.ref as commande_ref, c.rowid as commande_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= " WHERE e.fk_commande = c.rowid AND c.fk_soc = s.idp AND e.fk_statut = 0";
|
||||
if ($socidp)
|
||||
{
|
||||
$sql .= " AND c.fk_soc = $socidp";
|
||||
@ -83,9 +84,10 @@ if ( $db->query($sql) )
|
||||
/*
|
||||
* Commandes à traiter
|
||||
*/
|
||||
$sql = "SELECT c.rowid, c.ref, 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 = 1";
|
||||
$sql .= " ORDER BY c.rowid ASC";
|
||||
$sql = "SELECT c.rowid, c.ref, 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 = 1";
|
||||
$sql.= " ORDER BY c.rowid ASC";
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
@ -103,8 +105,8 @@ if ( $db->query($sql) )
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object();
|
||||
print "<tr $bc[$var]><td width=\"30%\"><a href=\"commande.php?id=$obj->rowid\">".img_file()."</a> ";
|
||||
print "<a href=\"commande.php?id=$obj->rowid\">$obj->ref</a></td>";
|
||||
print "<tr $bc[$var]><td width=\"30%\">";
|
||||
print "<a href=\"commande.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -141,8 +143,8 @@ if ( $resql )
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]><td width=\"30%\"><a href=\"commande.php?id=$obj->rowid\">".img_file()."</a> ";
|
||||
print "<a href=\"commande.php?id=$obj->rowid\">$obj->ref</a></td>";
|
||||
print "<tr $bc[$var]><td width=\"30%\"><a href=\"commande.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order").' ';
|
||||
print $obj->ref.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -154,9 +156,9 @@ if ( $resql )
|
||||
/*
|
||||
* Expeditions à valider
|
||||
*/
|
||||
$sql = "SELECT e.rowid, e.ref, s.nom, s.idp, c.ref as commande_ref, c.rowid as commande_id FROM ".MAIN_DB_PREFIX."expedition as e, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= " WHERE e.fk_commande = c.rowid AND c.fk_soc = s.idp AND e.fk_statut = 1";
|
||||
|
||||
$sql = "SELECT e.rowid, e.ref, s.nom, s.idp, c.ref as commande_ref, c.rowid as commande_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e, ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= " WHERE e.fk_commande = c.rowid AND c.fk_soc = s.idp AND e.fk_statut = 1";
|
||||
$sql .= $db->plimit(5, 0);
|
||||
|
||||
if ( $db->query($sql) )
|
||||
@ -173,10 +175,10 @@ if ( $db->query($sql) )
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object();
|
||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"fiche.php?id=$obj->rowid\">".img_file()."</a> ";
|
||||
print "<a href=\"fiche.php?id=$obj->rowid\">$obj->ref</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$obj->commande_id.'">'.$obj->commande_ref.'</a></td></tr>';
|
||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowSending"),"sending").' ';
|
||||
print $obj->ref.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$obj->commande_id.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->commande_ref.'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
@ -187,5 +189,6 @@ print '</td></tr></table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user