From 1e0a73dc3e7bf25709b497eb8c98a572264bcdd1 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Fri, 19 Oct 2012 18:42:46 +0200 Subject: [PATCH] Zjednoduseni naskladnovani + hadani dodavatele (Wolfovo zadost) --- assistants/store.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assistants/store.inc.php b/assistants/store.inc.php index 6c11653..a105f1a 100644 --- a/assistants/store.inc.php +++ b/assistants/store.inc.php @@ -18,6 +18,8 @@ switch($SUBPATH[0]) { $model_price_out = $this->db->map_unique('model_id', $model_id, 'model_price_out', 'model'); $item_price_in = $this->db->map_unique('item_serial', $barcode, 'item_price_in', 'item', false); $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'); @@ -27,7 +29,7 @@ switch($SUBPATH[0]) { foreach($serials as $serial) { $serial=trim($serial); - $disable_cols = array('status_id','item_price_out','item_customer', 'model_id','item_quantity','item_date_sold'); + $disable_cols = array('barcode_id','status_id','item_price_out','item_customer', 'model_id','item_quantity','item_date_sold','location_id'); if($countable) { $multi_insert = true; //$disable_cols[] = 'item_quantity'; @@ -63,7 +65,8 @@ switch($SUBPATH[0]) { 'item_price_out' => $item_price_out + ($quantity_added * $model_price_out), 'item_author' => $this->db->auth->get_user_id(), 'item_date_bought' => date('Y-m-d'), - 'location_id' => 0 + 'location_id' => 0, + 'vendor_id' => $vendor_id )); $insert_form[]=array('item', $columns, $selectbox, $current, $disable_cols, $action, $multi_insert); -- 2.30.2