Modif affichage
This commit is contained in:
parent
a2acd3dddf
commit
a674c1442d
@ -40,36 +40,25 @@ if ($user->societe_id > 0)
|
|||||||
$socidp = $user->societe_id;
|
$socidp = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Fin des Actions */
|
/* Fin des Actions */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
llxHeader();
|
||||||
* *
|
|
||||||
* *
|
|
||||||
* *
|
|
||||||
* *
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
if ($sortfield == "")
|
if ($_GET["sortfield"] == "")
|
||||||
{
|
{
|
||||||
$sortfield="e.rowid";
|
$sortfield="e.rowid";
|
||||||
}
|
}
|
||||||
if ($sortorder == "")
|
if ($_GET["sortorder"] == "")
|
||||||
{
|
{
|
||||||
$sortorder="DESC";
|
$sortorder="DESC";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($page == -1) { $page = 0 ; }
|
|
||||||
|
|
||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $_GET["page"] ;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $_GET["page"] - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $_GET["page"] + 1;
|
||||||
|
|
||||||
$sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition" ;
|
$sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition" ;
|
||||||
$sql .= " FROM llx_expedition as e ";
|
$sql .= " FROM llx_expedition as e ";
|
||||||
@ -91,18 +80,15 @@ $sql .= $db->plimit($limit + 1,$offset);
|
|||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
print_barre_liste("Expeditions", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
print_barre_liste("Expeditions", $_GET["page"], $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
|
|
||||||
print '<TR class="liste_titre">';
|
print '<TR class="liste_titre">';
|
||||||
|
|
||||||
print_liste_field_titre_new ("Réf",$PHP_SELF,"p.ref","","&socidp=$socidp",'width="15%"',$sortfield);
|
print_liste_field_titre_new ("Réf",$PHP_SELF,"p.ref","","&socidp=$socidp",'width="15%"',$sortfield);
|
||||||
|
|
||||||
print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socidp=$socidp",'width="30%"',$sortfield);
|
|
||||||
|
|
||||||
print_liste_field_titre_new ("Date",$PHP_SELF,"c.date_expedition","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield);
|
print_liste_field_titre_new ("Date",$PHP_SELF,"c.date_expedition","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield);
|
||||||
|
|
||||||
print_liste_field_titre_new ("Statut",$PHP_SELF,"p.fk_statut","","&socidp=$socidp",'width="10%" align="center"',$sortfield);
|
print_liste_field_titre_new ("Statut",$PHP_SELF,"p.fk_statut","","&socidp=$socidp",'width="10%" align="center"',$sortfield);
|
||||||
@ -113,47 +99,46 @@ if ( $db->query($sql) )
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR $bc[$var]>";
|
print "<TR $bc[$var]>";
|
||||||
print "<TD><a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></TD>\n";
|
print "<TD><a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></TD>\n";
|
||||||
print "<TD><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
|
||||||
|
|
||||||
$now = time();
|
$now = time();
|
||||||
$lim = 3600 * 24 * 15 ;
|
$lim = 3600 * 24 * 15 ;
|
||||||
|
|
||||||
if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 )
|
if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 )
|
||||||
{
|
{
|
||||||
print "<td><b> > 15 jours</b></td>";
|
print "<td><b> > 15 jours</b></td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
}
|
|
||||||
|
|
||||||
print "<TD align=\"right\">";
|
|
||||||
$y = strftime("%Y",$objp->date_expedition);
|
|
||||||
$m = strftime("%m",$objp->date_expedition);
|
|
||||||
|
|
||||||
print strftime("%d",$objp->date_expedition)."\n";
|
|
||||||
print " <a href=\"propal.php?year=$y&month=$m\">";
|
|
||||||
print strftime("%B",$objp->date_expedition)."</a>\n";
|
|
||||||
print " <a href=\"propal.php?year=$y\">";
|
|
||||||
print strftime("%Y",$objp->date_expedition)."</a></TD>\n";
|
|
||||||
|
|
||||||
print "<td align=\"center\">$objp->statut</TD>\n";
|
|
||||||
print "</TR>\n";
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "<TD align=\"right\">";
|
||||||
$db->free();
|
$y = strftime("%Y",$objp->date_expedition);
|
||||||
}
|
$m = strftime("%m",$objp->date_expedition);
|
||||||
else
|
|
||||||
{
|
print strftime("%d",$objp->date_expedition)."\n";
|
||||||
print $db->error();
|
print " <a href=\"propal.php?year=$y&month=$m\">";
|
||||||
|
print strftime("%B",$objp->date_expedition)."</a>\n";
|
||||||
|
print " <a href=\"propal.php?year=$y\">";
|
||||||
|
print strftime("%Y",$objp->date_expedition)."</a></TD>\n";
|
||||||
|
|
||||||
|
print '<td align="center">'.$objp->statut.'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
$db->free();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $db->error();
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user