X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=assistants%2Fsell.inc.php;h=73e096e3fae2a3475384aa8255a2999dc87aace3;hb=7661315fc5e169b250fb080552d18050040d9108;hp=e79e234dec83eccc519a8b0c9c9515fed90a19d5;hpb=5389f01c3b0714f0d9c68739b60c456928d963bf;p=mirrors%2FSokoMan.git diff --git a/assistants/sell.inc.php b/assistants/sell.inc.php index e79e234..73e096e 100644 --- a/assistants/sell.inc.php +++ b/assistants/sell.inc.php @@ -29,7 +29,8 @@ switch($SUBPATH[0]) { $current[$item_id]['item_author'] = $this->db->auth->get_user_id(); $forked_item = $current; - $model_id = $this->db->map_unique('item_serial', $item_serial, 'model_id', 'item'); + $barcode_id = $this->db->map_unique('item_id', $item_id, 'barcode_id', 'item'); + $model_id = $this->db->map_unique('barcode_id', $barcode_id, 'model_id', 'barcode'); $model_price_in = $this->db->map_unique('model_id', $model_id, 'model_price_in', 'model'); $model_price_out = $this->db->map_unique('model_id', $model_id, 'model_price_out', 'model'); @@ -42,7 +43,7 @@ switch($SUBPATH[0]) { $current[$item_id]['item_date_sold'] = date('Y-m-d'); $hide_cols = $hide_cols_common; } else { - $hide_cols = array_merge($hide_cols_common,array('item_price_out','item_note','item_customer','item_date_sold')); + $hide_cols = array_merge($hide_cols_common,array('item_price_out','item_note','item_customer','item_date_sold','location_id')); $quantity_removed = $_GET['quantity']; if($quantity_removed <= 0) $this->post_redirect_get("$URL_INTERNAL/1","Can't dispose non-possitive amount of items!"); if(!is_numeric($quantity_removed)) $quantity_removed = 1;