diff --git a/application/controllers/Items.php b/application/controllers/Items.php index 1db0ee37f..ef375e411 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -194,7 +194,7 @@ class Items extends Secure_Controller $data['default_tax_2_rate'] = $this->config->item('default_tax_2_rate'); $item_info->receiving_quantity = 0; - $item_info->reorder_level = 0; + $item_info->reorder_level = 1; $item_info->item_type = '0'; // standard $item_info->stock_type = '0'; // stock $item_info->tax_category_id = 0; diff --git a/application/libraries/Receiving_lib.php b/application/libraries/Receiving_lib.php index b1fc71ac3..80a8c47b9 100644 --- a/application/libraries/Receiving_lib.php +++ b/application/libraries/Receiving_lib.php @@ -218,7 +218,7 @@ class Receiving_lib 'in_stock' => $this->CI->Item_quantity->get_item_quantity($item_id, $item_location)->quantity, 'price' => $price, 'receiving_quantity' => $receiving_quantity!=NULL ? $receiving_quantity : $item_info->receiving_quantity, - 'total' => $this->get_item_total($quantity, $price, $discount) + 'total' => $this->get_item_total($quantity, $price, $discount, $receiving_quantity) ) ); @@ -338,7 +338,7 @@ class Receiving_lib $total = 0; foreach($this->get_cart() as $item) { - $total = bcadd($total, $this->get_item_total($item['quantity'], $item['price'], $item['discount'])); + $total = bcadd($total, $this->get_item_total(($item['quantity']* $item['receiving_quantity']), $item['price'], $item['discount'])); } return $total; diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index ade9424a0..8e037851c 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -187,7 +187,7 @@ if (isset($success)) -