1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| $ingredient=mysql_query("select i.Ingredient,i.NumeroLot,s.IdIngredient,s.NumeroLot,s.Unite,s.DLUO,s.Qte from Ingredients i,StockIngredients s where i.NumeroLot like s.NumeroLot and i.Ingredient like '".$row['Ing1']."%' group by s.NumeroLot order by s.DLUO");
$nombre = mysql_num_rows($ingredient);
$i=0
while ($row2=mysql_fetch_array($ingredient))
{
if($row['Unite1']=="l")
$unite="litres";
else if($row['Unite1']=="gr")
$unite="grammes";
else if($row['Unite1']=="kg")
$unite="kilos";
else if($row['Unite1']=="cl")
$unite="centilitres";
else if($row['Unite1']=="p")
$unite="pièces";
$poidsT=$_POST['Litrage']*$row['poids1'];
echo "
<tr>
<td height='10' valign='middle' class='LienBordeaux' width='20%'>
<input type='hidden' name='choixIng[<?php echo $i ?>]' value='".$row2['IdIngredient']."'>
- ".$row2['Ingredient']." </td>
<td width='15%'> ".$row2['NumeroLot']."</td>
<td width='20%'> <b>".date_to_fr($row2['DLUO'])."</b> </td>
<td width='15%'> ".number_format($row2['Qte'],2)." ".$row2['Unite']."</td>
<td width='30%'>Qté <input type='text' name='Qte[<?php echo $i ?>]' id='' size='10'> Unite <select name='Unite[<?php echo $i ?>]' class='menu'>
<option value=''> </option>";
$unite=mysql_query("select * from Unite order by IdUnite");
while ($row3=mysql_fetch_array($unite))
{
echo "<option value=".$row3['Unite'].">".$row3['Unite']."</option>";
}
echo "
</select>
</tr>";
$i++;
}} |