mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-25 09:38:42 -04:00
Correct issues with renaming stock locations
This commit is contained in:
1 parent
2b2396521c
commit
2f221004fb
2 files changed
+28
-3
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user