mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Remove empty check for item_id and quantity_id when saving item_quantities
Add configuration key to database script
This commit is contained in:
@@ -13,7 +13,7 @@ class Item_quantities extends CI_Model
|
||||
|
||||
function save($location_detail, $item_id, $location_id)
|
||||
{
|
||||
if (!($item_id && $location_id) or !$this->exists($item_id,$location_id))
|
||||
if (!$this->exists($item_id,$location_id))
|
||||
{
|
||||
if($this->db->insert('item_quantities',$location_detail))
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ class Stock_locations extends CI_Model
|
||||
|
||||
$this->db->update('stock_locations',array('location_name'=>$db['location_name'],'deleted'=>0));
|
||||
// remmove module (and permissions) for stock location
|
||||
//$this->db->delete('modules', array('module_id' => 'items_stock'.$db['location_id']));
|
||||
$this->db->delete('permissions', array('module_id' => 'items_'.$db['location_name']));
|
||||
}
|
||||
$to_create = false;
|
||||
break;
|
||||
|
||||
@@ -37,7 +37,9 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
('return_policy', 'Test'),
|
||||
('timezone', 'America/New_York'),
|
||||
('website', ''),
|
||||
('tax_included', '0');
|
||||
('tax_included', '0'),
|
||||
('recv_invoice_format', '');
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user