Novy assistent pro jednorazove naskladneni, status "deleted" presunut na id 0
[mirrors/SokoMan.git] / assistants / store.inc.php
CommitLineData
16261142
TM
1<?php
2$script = $_SERVER['SCRIPT_NAME'].'/assistant/store';
3switch($step) {
4 default: case 1:
5?>
6<form action="<?=$script?>/2" method="GET">
e390b72f 7 model_barcode: <input type="text" name="barcode" autofocus />
16261142
TM
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.12719 seconds and 4 git commands to generate.