<?php
include("include/data.php");
Init_boutique();
global $base, $MySQL_Host, $MySQL_User, $MySQL_Passw, $myart, $result, $NbLigne, $semaine, $limitesuivante, $limiteprecedente, $total, $page ;

// entete de la page

// cloture_lot_maj.php?ordre=1
// num_lot_entre=A49B0CA18

$date = date("Y-m-d");
$Valid_ok=0;
$refere = $_SERVER['HTTP_REFERER'] ;

if (!isset($_GET['ordre'])) { 
		// Transmis en POST
		if (isset($_POST['ordre'])) { $num_ordre=$_POST['ordre']; }  else {$num_ordre=''; }
		if (isset($_POST['num_lot_entre'])) { $num_lot_entre=$_POST['num_lot_entre']; }  else {$num_lot_entre=''; }

		$valForm="POST" ;
} else {
		// Transmis en GET
		if (isset($_GET['ordre'])) { $num_ordre=$_GET['ordre']; }  else {$num_ordre=''; }
		if (isset($_GET['num_lot_entre'])) { $num_lot_entre=$_GET['num_lot_entre']; }  else {$num_lot_entre=''; }

		$valForm="GET" ;
}
//
echo "<br>num entre : $ordre | $num_lot_entre <br><br>" ;
//
// UPDATE `plu_intrant` SET `nom_plu_intrant` = 'Poireaux ini', `num_cate_intrant` = '3', `num_unite` = '2', `dlc_plu_intrant` = '25' WHERE `plu_intrant`.`num_plu_intrant` = 4;

 $sql = "UPDATE `stock` SET `Solde` = '0'  WHERE `Num_Lot`= '".$num_lot_entre."'";
 
$res = mysqli_query($link, $sql);

echo "<br><br> resultat resquet : $sql | $res";

//$refere = $_SERVER['HTTP_REFERER'] ;
Header("Location:  $refere") ;
//Header("Location: saisie_intrants.php?limite=0");

?>
