Pridan assistant s jedinym okynkem pro naskladneni dle caroveho kodu
[mirrors/SokoMan.git] / assistants / store.inc.php
1 <?php
2 $script = $_SERVER['SCRIPT_NAME'].'/assistant/store';
3 switch($step) {
4 default: case 1:
5 ?>
6 <form action="<?=$script?>/2" method="GET">
7 model_barcode: <input type="text" name="barcode" />
8 <input type="submit" value="STORE" />
9 </form>
10 <?php
11 break;
12 case 2:
13 $model_id = $this->db->map_unique('model_barcode', $_GET['barcode'], 'model_id', 'model');
14 $columns = $this->db->get_columns('item');
15 $selectbox = $this->db->columns_get_selectbox($columns, 'item');
16
17 //print_r(array('<pre>', $selectbox));
18 //foreach($selectbox['model_id'] as $id => $name) if($id != $model_id) unset($selectbox['model_id'][$id]);
19 $current = array(array(
20 'model_id' => $model_id,
21 'item_quantity' => 1,
22 'status_id' => 1
23 ));
24
25 $action = $_SERVER['SCRIPT_NAME'].'/item/new';
26 echo $this->html->render_insert_form('item', $columns, $selectbox, $current, false, $action);
27 break;
28 }
This page took 0.345725 seconds and 5 git commands to generate.