Filter params on new stock
authorMaxime Bourget <bmx007@gmail.com>
Sat, 1 Jun 2013 22:29:54 +0000 (23:29 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Sat, 1 Jun 2013 22:29:54 +0000 (23:29 +0100)
item_schedule.php

index 4de176c997cd0776f596f6d1d1a743d9fac0e809..69a539898471dd1e00e5456e8a095a6ccc1472e9 100644 (file)
@@ -56,7 +56,8 @@ else {
 if (list_updated('stock_id') || in_ajax()) $Ajax->activate('item_schedule');
 
 //if (!@$_GET['popup'])
-       start_form();
+//     start_form();
+
 
 
 $stock_id = $_POST['stock_id'];
@@ -65,8 +66,9 @@ $stock_id = $_POST['stock_id'];
 
 end_row();
 end_table(1);
+if(isset($stock_id)) echo '<input type="hidden" name="last_stock_id" value="'.$stock_id.'">';
 
-$params = in_ajax() ? new ScheduleParameters($_POST) : null;
+$params = in_ajax() && $stock_id == @$_POST['last_stock_id'] ? new ScheduleParameters($_POST) : null;
 $scheduler = new ItemScheduler($stock_id, 'DEF', $params);
 
 start_table(TABLESTYLE);