Skip to content
Snippets Groups Projects
Commit 5b158fc8 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Link to wiki help

parent 3d09d885
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -19,11 +19,11 @@
*/
/**
\file htdocs/expedition/index.php
\ingroup expedition
\brief Page accueil du module expedition
\version $Id$
*/
* \file htdocs/expedition/index.php
* \ingroup expedition
* \brief Page accueil du module expedition
* \version $Id$
*/
require("./pre.inc.php");
......@@ -31,10 +31,11 @@ $langs->load("sendings");
/*
* View
*/
* View
*/
llxHeader('',$langs->trans("Sendings"),'ch-expedition.html',$form_search);
$helpurl='EN:Module_Shipments|FR:Module_Exp&eacute;ditions|ES:M&oacute;dulo_Expediciones';
llxHeader('',$langs->trans("Sendings"),$helpurl);
print_fiche_titre($langs->trans("SendingsArea"));
......@@ -51,7 +52,7 @@ print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_r
print "</form></table><br />\n";
/*
* Expeditions valider
* Shipments to validate
*/
$clause = " WHERE ";
......@@ -60,7 +61,7 @@ $sql.= ", s.nom, s.rowid as socid";
$sql.= ", c.ref as commande_ref, c.rowid as commande_id";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."co_exp as ce ON e.rowid = ce.fk_expedition";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON ce.fk_commande = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON ce.fk_commande = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
if (!$user->rights->societe->client->voir && !$socid)
{
......@@ -76,30 +77,30 @@ if ($socid) $sql.= " AND c.fk_soc = ".$socid;
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
if ($num)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("SendingsToValidate").'</td></tr>';
$i = 0;
$var = True;
while ($i < $num)
{
$var=!$var;
$obj = $db->fetch_object($resql);
print "<tr $bc[$var]><td nowrap=\"nowrap\"><a href=\"fiche.php?id=".$obj->rowid."\">".$obj->ref."</a></td>";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.$obj->nom.'</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$obj->commande_id.'">'.$obj->commande_ref.'</a></td></tr>';
$i++;
}
print "</table><br>";
}
$num = $db->num_rows($resql);
if ($num)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("SendingsToValidate").'</td></tr>';
$i = 0;
$var = True;
while ($i < $num)
{
$var=!$var;
$obj = $db->fetch_object($resql);
print "<tr $bc[$var]><td nowrap=\"nowrap\"><a href=\"fiche.php?id=".$obj->rowid."\">".$obj->ref."</a></td>";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.$obj->nom.'</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$obj->commande_id.'">'.$obj->commande_ref.'</a></td></tr>';
$i++;
}
print "</table><br>";
}
}
/*
* Commandes traiter
* Commandes a traiter
*/
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
......@@ -112,20 +113,20 @@ if ($socid) $sql.= " AND c.fk_soc = ".$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql.= " ORDER BY c.rowid ASC";
if ( $db->query($sql) )
if ( $db->query($sql) )
{
$num = $db->num_rows();
if ($num)
{
$langs->load("orders");
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>';
$var = True;
while ($i < $num)
$num = $db->num_rows();
if ($num)
{
$langs->load("orders");
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>';
$var = True;
while ($i < $num)
{
$var=!$var;
$obj = $db->fetch_object();
print "<tr $bc[$var]>";
......@@ -133,9 +134,9 @@ if ( $db->query($sql) )
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->socid.'">'.dol_trunc($obj->nom,20).'</a></td></tr>';
$i++;
}
print "</table><br>";
}
print "</table><br>";
}
}
......@@ -159,34 +160,34 @@ if ($socid) $sql.= " AND c.fk_soc = ".$socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$resql = $db->query($sql);
if ( $resql )
if ( $resql )
{
$langs->load("orders");
$num = $db->num_rows($resql);
if ($num)
{
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersInProcess").'</td></tr>';
$var = True;
while ($i < $num)
$langs->load("orders");
$num = $db->num_rows($resql);
if ($num)
{
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersInProcess").'</td></tr>';
$var = True;
while ($i < $num)
{
$var=!$var;
$obj = $db->fetch_object($resql);
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->socid.'">'.$obj->nom.'</a></td></tr>';
$i++;
}
print "</table><br>";
}
print "</table><br>";
}
}
/*
* Expeditions valider
* Last shipments
*/
$clause = " WHERE ";
$sql = "SELECT e.rowid, e.ref";
......@@ -194,7 +195,7 @@ $sql.= ", s.nom, s.rowid as socid";
$sql.= ", c.ref as commande_ref, c.rowid as commande_id";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."co_exp as ce ON e.rowid = ce.fk_expedition";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON ce.fk_commande = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON ce.fk_commande = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
if (!$user->rights->societe->client->voir && !$socid)
{
......@@ -209,29 +210,35 @@ $sql.= " ORDER BY e.date_expedition DESC";
$sql.= $db->plimit(5, 0);
$resql = $db->query($sql);
if ($resql)
if ($resql)
{
$num = $db->num_rows($resql);
if ($num)
{
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("LastSendings",$num).'</td></tr>';
$var = True;
while ($i < $num)
{
$var=!$var;
$obj = $db->fetch_object($resql);
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->socid.'">'.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>";
}
$db->free($resql);
$num = $db->num_rows($resql);
if ($num)
{
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("LastSendings",$num).'</td></tr>';
$var = True;
while ($i < $num)
{
$var=!$var;
$obj = $db->fetch_object($resql);
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->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
print '<td>';
if ($obj->commande_id)
{
print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$obj->commande_id.'">';
print img_object($langs->trans("ShowOrder"),"order").' '.$obj->commande_ref.'</a>';
} else print '&nbsp;';
print '</td></tr>';
$i++;
}
print "</table><br>";
}
$db->free($resql);
}
print '</td></tr></table>';
......
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -19,11 +19,11 @@
*/
/**
\file htdocs/expedition/liste.php
\ingroup expedition
\brief Page de la liste des expditions/livraisons
\version $Id$
*/
* \file htdocs/expedition/liste.php
* \ingroup expedition
* \brief Page de la liste des expditions/livraisons
* \version $Id$
*/
require("./pre.inc.php");
......@@ -44,15 +44,12 @@ $limit = $conf->liste_limit;
$offset = $limit * $_GET["page"] ;
/*
* View
*/
/******************************************************************************/
/* */
/* Fin des Actions */
/* */
/******************************************************************************/
llxHeader('',$langs->trans('ListOfSendings'));
$helpurl='EN:Module_Shipments|FR:Module_Exp&eacute;ditions|ES:M&oacute;dulo_Expediciones';
llxHeader('',$langs->trans('ListOfSendings'),$helpurl);
$sql = "SELECT e.rowid, e.ref,".$db->pdate("e.date_expedition")." as date_expedition, e.fk_statut";
$sql.= ", s.nom as socname, s.rowid as socid";
......@@ -61,7 +58,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
if ($conf->commande->enabled)
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."co_exp as ce ON e.rowid = ce.fk_expedition";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as ori ON ce.fk_commande = ori.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as ori ON ce.fk_commande = ori.rowid";
}
else
{
......@@ -76,8 +73,8 @@ if (!$user->rights->societe->client->voir && !$socid)
$sql.= " AND sc.fk_user = " .$user->id;
}
if ($socid)
{
$sql.= " AND e.fk_soc = ".$socid;
{
$sql.= " AND e.fk_soc = ".$socid;
}
if ($_POST["sf_ref"])
{
......@@ -91,14 +88,14 @@ $resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$expedition = new Expedition($db);
print_barre_liste($langs->trans('ListOfSendings'), $_GET["page"], "liste.php","&amp;socid=$socid",$sortfield,$sortorder,'',$num);
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),"liste.php","e.ref","","&amp;socid=$socid",'width="15%"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom", "", "&amp;socid=$socid",'width="25%" align="left"',$sortfield,$sortorder);
......@@ -114,11 +111,11 @@ if ($resql)
print_liste_field_titre($langs->trans("Status"),"liste.php","e.fk_statut","","&amp;socid=$socid",'width="10%" align="right"',$sortfield,$sortorder);
print "</tr>\n";
$var=True;
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"fiche.php?id=".$objp->rowid."\">".img_object($langs->trans("ShowSending"),"sending").'</a>&nbsp;';
......@@ -135,7 +132,7 @@ if ($resql)
$now = time();
$lim = 3600 * 24 * 15 ;
if ( ($now - $objp->date_expedition) > $lim && $objp->statutid == 1 )
{
print "<td><b> &gt; 15 jours</b></td>";
......@@ -144,7 +141,7 @@ if ($resql)
{
print "<td>&nbsp;</td>";
}
print "<td align=\"right\">";
$y = dol_print_date($objp->date_expedition,"%Y");
$m = dol_print_date($objp->date_expedition,"%m");
......@@ -154,14 +151,14 @@ if ($resql)
print " <a href=\"propal.php?year=$y&amp;month=$m\">";
print $b."</a>\n";
print " <a href=\"propal.php?year=$y\">";
print $y."</a></TD>\n";
print $y."</a></TD>\n";
print '<td align="right">'.$expedition->LibStatut($objp->fk_statut,5).'</td>';
print "</tr>\n";
$i++;
}
print "</table>";
$db->free($resql);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment