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
| <?php
function picking_list
($lotno,$qte_pick,$id_connection,$sys_date)
{
if ($lotno != '')
{
$sql5="update lot_number set qte_total_out = (qte_total_out + '$qte_pick') where lot_number = '$lotno'";
mysql_query($sql5) or die(mysql_error());
$result = mysql_query("select id from lot_number where lot_number = '$lotno'") or die(mysql_error());
$id_lot = mysql_result($result,0);
$sql6= "insert into picking (id_lot, qte_pick, id_connection, date_picking) values ('$id_lot','$qte_pick','$id_connection','$sys_date')";
mysql_query($sql6) or die(mysql_error());
}
}
function return_stock
($lotno,$qte_pick,$id_connection,$sys_date,$identification,$work_order,$date,$treatment)
{
if ($lotno != '')
{
$sql5="update lot_number set qte_total_in = (qte_total_in + '$qte_pick') where lot_number = '$lotno'";
mysql_query($sql5) or die(mysql_error());
$result = mysql_query("select id from lot_number where lot_number = '$lotno'") or die(mysql_error());
$id_lot = mysql_result($result,0);
$sql6= "insert into picking (id_lot, qte_return, id_connection, date_picking, identification, work_order, date_return, treatment) values ('$id_lot','$qte_pick','$id_connection','$sys_date','$identification','$work_order','$sys_date','$treatment')";
mysql_query($sql6) or die(mysql_error());
}
}
?> |
Partager