Fix: Corrige mauvaise affichage erreur sur wrapper document et mauvais chargement droit pour livraisons
This commit is contained in:
parent
ef82553324
commit
49d541c573
@ -19,7 +19,6 @@
|
|||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,16 +30,12 @@
|
|||||||
|
|
||||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
|
||||||
require_once("main.inc.php");
|
require_once("./main.inc.php");
|
||||||
|
|
||||||
|
|
||||||
function llxHeader()
|
// C'est un wrapper, donc header vierge
|
||||||
{
|
function llxHeader() { }
|
||||||
global $user,$langs;
|
|
||||||
top_menu($head, $title);
|
|
||||||
$menu = new Menu();
|
|
||||||
left_menu($menu->liste);
|
|
||||||
}
|
|
||||||
|
|
||||||
$action = $_GET["action"];
|
$action = $_GET["action"];
|
||||||
$original_file = urldecode($_GET["file"]);
|
$original_file = urldecode($_GET["file"]);
|
||||||
@ -204,14 +199,14 @@ if ($modulepart)
|
|||||||
// Wrapping pour les bons de livraison
|
// Wrapping pour les bons de livraison
|
||||||
if ($modulepart == 'livraison')
|
if ($modulepart == 'livraison')
|
||||||
{
|
{
|
||||||
$user->getrights('livraison');
|
$user->getrights('expedition');
|
||||||
if ($user->rights->expedition->livraison->lire || eregi('^specimen',$original_file))
|
if ($user->rights->expedition->livraison->lire || eregi('^specimen',$original_file))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
$original_file=$conf->livraison->dir_output.'/'.$original_file;
|
$original_file=$conf->livraison->dir_output.'/'.$original_file;
|
||||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour la telephonie
|
// Wrapping pour la telephonie
|
||||||
if ($modulepart == 'telephonie')
|
if ($modulepart == 'telephonie')
|
||||||
@ -332,7 +327,7 @@ if ($modulepart)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Basic protection (against external users only)
|
// Basic protection (against external users only)
|
||||||
if ($user->societe_id>0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
if ($sqlprotectagainstexternals)
|
if ($sqlprotectagainstexternals)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,7 +19,6 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Code identique a /expedition/commande.php
|
// Code identique a /expedition/commande.php
|
||||||
@ -274,14 +273,12 @@ if ($_GET["action"] == 'create')
|
|||||||
echo '<br><table class="noborder" width="100%">';
|
echo '<br><table class="noborder" width="100%">';
|
||||||
|
|
||||||
$lignes = $commande->fetch_lines(1);
|
$lignes = $commande->fetch_lines(1);
|
||||||
|
$numcommandes = sizeof($commande->lignes);
|
||||||
|
|
||||||
/* Lecture des expeditions déjà effectuées */
|
/* Lecture des expeditions déjà effectuées */
|
||||||
$commande->loadExpeditions();
|
$commande->loadExpeditions();
|
||||||
|
|
||||||
$num = sizeof($commande->lignes);
|
if ($numcommandes)
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
if ($num)
|
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
@ -301,10 +298,12 @@ if ($_GET["action"] == 'create')
|
|||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
while ($i < $num)
|
$indicecommande = 0;
|
||||||
|
while ($indicecommande < $numcommandes)
|
||||||
{
|
{
|
||||||
$ligne = $commande->lignes[$i];
|
$ligne = $commande->lignes[$indicecommande];
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>\n";
|
print "<tr $bc[$var]>\n";
|
||||||
if ($ligne->fk_product > 0)
|
if ($ligne->fk_product > 0)
|
||||||
@ -344,8 +343,8 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
// Quantité à livrer
|
// Quantité à livrer
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<input name="idl'.$i.'" type="hidden" value="'.$ligne->id.'">';
|
print '<input name="idl'.$indicecommande.'" type="hidden" value="'.$ligne->id.'">';
|
||||||
print '<input name="qtyl'.$i.'" type="text" size="4" value="'.$defaultqty.'">';
|
print '<input name="qtyl'.$indicecommande.'" type="text" size="4" value="'.$defaultqty.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Stock
|
// Stock
|
||||||
@ -396,14 +395,14 @@ if ($_GET["action"] == 'create')
|
|||||||
{
|
{
|
||||||
// Quantité à livrer
|
// Quantité à livrer
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<input name="idl'.$i.'" type="hidden" value="'.$ligne->id.'">';
|
print '<input name="idl'.$indicecommande.'" type="hidden" value="'.$ligne->id.'">';
|
||||||
print '<input name="qtyl'.$i.'" type="text" size="6" value="'.$quantite_a_livrer.'">';
|
print '<input name="qtyl'.$indicecommande.'" type="text" size="6" value="'.$quantite_a_livrer.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$indicecommande++;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user