Correct issues with renaming stock locations

This commit is contained in:
Steve Ireland committed 2017-10-28 19:57:36 -04:00
1 parent 2b2396521c
commit 2f221004fb
2 files changed
+28 -3

No files matched your search

+3 -1
View File
@@ -550,11 +550,13 @@ class Config extends Secure_Controller
if(strstr($key, 'stock_location'))
{
$location_id = preg_replace("/.*?_(\d+)$/", "$1", $key);
$not_to_delete[] = $location_id;
// save or update
$location_data = array('location_name' => $value);
if($this->Stock_location->save($location_data, $location_id))
{
$location_id = $this->Stock_location->get_location_id($value);
$not_to_delete[] = $location_id;
$this->_clear_session_state();
}
}