18 |
* |
* |
19 |
* $Id$ |
* $Id$ |
20 |
* $Source$ |
* $Source$ |
|
* |
|
21 |
*/ |
*/ |
22 |
|
|
23 |
/** |
/** |
57 |
llxHeader('',$langs->trans('ListOfSendings'),'ch-expedition.html'); |
llxHeader('',$langs->trans('ListOfSendings'),'ch-expedition.html'); |
58 |
|
|
59 |
$sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition, e.fk_statut" ; |
$sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition, e.fk_statut" ; |
60 |
$sql .= " FROM ".MAIN_DB_PREFIX."expedition as e "; |
$sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; |
61 |
|
if ($socidp) $sql.=", ".MAIN_DB_PREFIX."commande as c"; |
62 |
$sql_add = " WHERE "; |
$sql_add = " WHERE "; |
63 |
if ($socidp) |
if ($socidp) |
64 |
{ |
{ |
65 |
$sql .= $sql_add . " s.idp = $socidp"; |
$sql.= $sql_add . " e.fk_commande = c.rowid AND c.fk_soc = ".$socidp; |
66 |
$sql_add = " AND "; |
$sql_add = " AND "; |
67 |
} |
} |
|
|
|
68 |
if (strlen($_POST["sf_ref"]) > 0) |
if (strlen($_POST["sf_ref"]) > 0) |
69 |
{ |
{ |
70 |
$sql .= $sql_add . " e.ref like '%".$_POST["sf_ref"] . "%'"; |
$sql.= $sql_add . " e.ref like '%".$_POST["sf_ref"] . "%'"; |
71 |
} |
} |
72 |
|
|
73 |
$expedition = new Expedition($db); |
$expedition = new Expedition($db); |