Remove empty check for item_id and quantity_id when saving item_quantities

Add configuration key to database script
This commit is contained in:
jekkos-t520
2014-10-07 08:27:31 +02:00
parent 97ff190ba5
commit a1eb735d96
3 changed files with 5 additions and 3 deletions

View File

@@ -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))
{

View File

@@ -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;

View File

@@ -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', '');
-- --------------------------------------------------------