Mise aux normes
This commit is contained in:
parent
fe4569615d
commit
64647b3b0b
@ -48,7 +48,7 @@ print '<form method="post" action="liste.php">';
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchOrder").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchOrder").'</td></tr>';
|
||||||
print "<tr $bc[1]><td>";
|
print "<tr $bc[1]><td>";
|
||||||
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>';
|
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||||
print "</table></form><br>\n";
|
print "</table></form><br>\n";
|
||||||
|
|
||||||
|
|
||||||
@ -90,11 +90,7 @@ if ( $db->query($sql) )
|
|||||||
*/
|
*/
|
||||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
$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 .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 1";
|
||||||
if ($socidp)
|
$sql .= " ORDER BY c.rowid ASC";
|
||||||
{
|
|
||||||
$sql .= " AND c.fk_soc = $socidp";
|
|
||||||
}
|
|
||||||
$sql .= " ORDER BY c.rowid DESC";
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -22,23 +22,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/expedition/index.php
|
\file htdocs/expedition/index.php
|
||||||
\ingroup expedition
|
\ingroup expedition
|
||||||
\brief Page accueil du module expedition
|
\brief Page accueil du module expedition
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
|
|
||||||
|
|
||||||
llxHeader('','Expéditions','ch-expedition.html',$form_search);
|
llxHeader('','Expéditions','ch-expedition.html',$form_search);
|
||||||
|
|
||||||
print_titre($langs->trans("Sendings"));
|
print_titre($langs->trans("Sendings"));
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%">';
|
print '<tr><td valign="top" width="30%">';
|
||||||
|
|
||||||
print '<form method="post" action="liste.php">';
|
print '<form method="post" action="liste.php">';
|
||||||
@ -46,7 +44,7 @@ print '<table class="noborder" width="100%">';
|
|||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchASending").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchASending").'</td></tr>';
|
||||||
print "<tr $bc[1]><td>";
|
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" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||||
print "</table></form>\n";
|
print "</table></form><br />\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expeditions à valider
|
* Expeditions à valider
|
||||||
@ -87,10 +85,7 @@ if ( $db->query($sql) )
|
|||||||
*/
|
*/
|
||||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
$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 .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 1";
|
||||||
if ($socidp)
|
$sql .= " ORDER BY c.rowid ASC";
|
||||||
{
|
|
||||||
$sql .= " AND c.fk_soc = $socidp";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
@ -108,7 +103,7 @@ if ( $db->query($sql) )
|
|||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"commande.php?id=$obj->rowid\">".img_file()."</a> ";
|
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 "<a href=\"commande.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></tr>';
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
@ -129,16 +124,12 @@ print '</td><td valign="top" width="70%">';
|
|||||||
*/
|
*/
|
||||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
|
$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 = 2";
|
$sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 2";
|
||||||
if ($socidp)
|
$resql = $db->query($sql);
|
||||||
{
|
if ( $resql )
|
||||||
$sql .= " AND c.fk_soc = $socidp";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($resql);
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -149,8 +140,8 @@ if ( $db->query($sql) )
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object($resql);
|
||||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"commande.php?id=$obj->rowid\">".img_file()."</a> ";
|
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 "<a href=\"commande.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></tr>';
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
@ -160,18 +151,14 @@ if ( $db->query($sql) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expeditions à valider
|
* 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 = "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 .= " WHERE e.fk_commande = c.rowid AND c.fk_soc = s.idp AND e.fk_statut = 1";
|
||||||
if ($socidp)
|
|
||||||
{
|
|
||||||
$sql .= " AND c.fk_soc = $socidp";
|
|
||||||
}
|
|
||||||
$sql .= " ORDER BY c.rowid DESC";
|
|
||||||
$sql .= $db->plimit(5, 0);
|
$sql .= $db->plimit(5, 0);
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user