<?php
include('../include/session.php');



date_default_timezone_set('Africa/Gaborone');
$entry_date = date("Y-m-d H:i:s", time()); 

$design_no = $_GET['design_no'];
$mix_design = $_GET['mix_design'];
$store_item_id = $_GET['store_item_id_select'];
$qty = $_GET['qty_text'];


$table_name = $_SESSION['db_prefix']."_mix_design_lines";
$add_query = "INSERT INTO $table_name (design_no, store_item_id, quantity, mix_design) VALUES ('".$design_no."', '".$store_item_id."', '".$qty."', '".$mix_design."') ";
execsql($add_query);

$table_name = $_SESSION['db_prefix']."_tracking_production";
$trackingQuery = "INSERT INTO $table_name (entry_date, user_name, action, details_1, details_2, details_3, details_4) VALUES ('".$entry_date."' ,'".$_SESSION['username']."', '68', '".$design_no."' , '".$store_item_id."','','".$qty."' )";
execsql($trackingQuery);


?>


<script language="javascript" type="text/javascript">
         window.location="../production/mix_design_edit.php?design_no=<?php echo $design_no ?>";
</script>