Odstraneni podpory veci na pocet z kodu (jeste je potreba odstranit podporu z modelu)
[mirrors/SokoMan.git] / assistants / store.inc.php
index 7e02e502d47565ddd3cd52733238283539cec2e9..97e8922710a788949993905f883f1ee959fee5f7 100644 (file)
@@ -26,36 +26,19 @@ switch($SUBPATH[0]) {
                $item_price_out = $this->db->map_unique('item_serial', $barcode, 'item_price_out', 'item', false);
                //$vendor_id = $this->db->map_unique('barcode_id', $barcode_id, 'vendor_id', 'item', false);
 
-               $countable = $this->db->map_unique('model_id', $model_id, 'model_countable', 'model');
-
                $serials=explode("\n",trim($_GET['serials']));
-               if(!$countable || trim($_GET['serials']) == '') $serials = array('');
+               if(trim($_GET['serials']) == '') $serials = array('');
 
                foreach($serials as $serial) {
                        $serial=trim($serial);
 
                        $disable_cols = array('barcode_id','status_id','item_price_out','item_customer', 'model_id','item_quantity','item_date_sold','location_id','vendor_id','room_id');
-                       if($countable) {
-                               $multi_insert = true;
-                               //$disable_cols[] = 'item_quantity';
-                               $item_serial = $serial;
-                               $item_quantity = $quantity_added = 1;
-                               $action = $_SERVER['SCRIPT_NAME'].'/item/new';
-                       } else {
-                               $multi_insert = false;
-                               $quantity_added = $_GET['quantity'];
-                               if($quantity_added <= 0) $this->post_redirect_get("$URL_INTERNAL/1","Can't store non-possitive amount of items!");
-                               if(!is_numeric($quantity_added)) $quantity_added = 1;
-                               $quantity_stored = $this->db->map_unique('item_serial', $barcode, 'item_quantity', 'item', false);
-                               if(!is_numeric($quantity_stored)) $quantity_stored = 0;
-
-                               $disable_cols[] = 'item_serial';
-                               $item_serial = $barcode;
-                               $item_quantity = $quantity_stored + $quantity_added;
-                               $action = $_SERVER['SCRIPT_NAME'].'/item/0/edit';
 
-                               echo('Stock: '.$quantity_stored.'<br />Storing: '.$quantity_added.'<br />Total: '.$item_quantity);
-                       }
+                       $multi_insert = true;
+                       //$disable_cols[] = 'item_quantity';
+                       $item_serial = $serial;
+                       $item_quantity = $quantity_added = 1;
+                       $action = $_SERVER['SCRIPT_NAME'].'/item/new';
 
                        //print_r(array('<pre>', $selectbox));
                        //foreach($selectbox['model_id'] as $id => $name) if($id != $model_id) unset($selectbox['model_id'][$id]);
This page took 0.095781 seconds and 4 git commands to generate.