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