Fix: Ventilation des commandes fournisseurs bloqués si status "livré" mis avant validation
This commit is contained in:
parent
5466182a2c
commit
3e71a86acd
@ -17,16 +17,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* 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$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/fourn/commande/fiche.php
|
\file htdocs/fourn/commande/fiche.php
|
||||||
\ingroup commande
|
\ingroup commande
|
||||||
\brief Fiche de ventilation des commandes fournisseurs
|
\brief Fiche de ventilation des commandes fournisseurs
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('./pre.inc.php');
|
require('./pre.inc.php');
|
||||||
@ -85,15 +82,16 @@ if ($_POST["action"] == 'dispatch' && $user->rights->fournisseur->commande->rece
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
/* *************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* Mode vue et edition */
|
|
||||||
/* */
|
|
||||||
/* *************************************************************************** */
|
|
||||||
|
|
||||||
$id = $_GET['id'];
|
$id = $_GET['id'];
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
@ -184,7 +182,7 @@ if ($id > 0)
|
|||||||
/*
|
/*
|
||||||
* Lignes de commandes
|
* Lignes de commandes
|
||||||
*/
|
*/
|
||||||
if ($commande->statut == 3 || $commande->statut == 4)
|
if ($commande->statut == 3 || $commande->statut == 4 || $commande->statut == 5)
|
||||||
{
|
{
|
||||||
print '<form method="POST" action="dispatch.php?id='.$commande->id.'">';
|
print '<form method="POST" action="dispatch.php?id='.$commande->id.'">';
|
||||||
print '<input type="hidden" name="action" value="dispatch">';
|
print '<input type="hidden" name="action" value="dispatch">';
|
||||||
@ -232,10 +230,9 @@ if ($id > 0)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$var=false;
|
|
||||||
|
|
||||||
$entrepot = new Entrepot($db);
|
$entrepot = new Entrepot($db);
|
||||||
|
|
||||||
|
$var=true;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
@ -243,7 +240,7 @@ if ($id > 0)
|
|||||||
if ($objp->fk_product)
|
if ($objp->fk_product)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$objp->ref.'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$objp->ref.'</a>';
|
||||||
print ' - '.$objp->label;
|
print ' - '.$objp->label;
|
||||||
@ -281,10 +278,12 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print '<center><input type="submit" value="'.$langs->trans("Save").'"></center></form>';
|
|
||||||
}
|
|
||||||
print "<br/>\n";
|
print "<br/>\n";
|
||||||
print '<table class="noborder" width="100%">';
|
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center></form>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "<br/>\n";
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT p.ref,cfd.fk_product, cfd.qty";
|
$sql = "SELECT p.ref,cfd.fk_product, cfd.qty";
|
||||||
|
|||||||
@ -829,7 +829,7 @@ class CommandeFournisseur extends Commande
|
|||||||
|
|
||||||
dolibarr_syslog("CommandeFournisseur::DispatchProduct");
|
dolibarr_syslog("CommandeFournisseur::DispatchProduct");
|
||||||
|
|
||||||
if ( ($this->statut == 3 || $this->statut == 4) && $qty > 0)
|
if ( ($this->statut == 3 || $this->statut == 4 || $this->statut == 5) && $qty > 0)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user