 --
 
 CREATE TABLE `ospos_permissions` (
+  `permission_id` varchar(255) NOT NULL,
   `module_id` varchar(255) NOT NULL,
+  `location_id` int(10) DEFAULT NULL,
+  PRIMARY KEY (`permission_id`),
+  KEY `module_id` (`module_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `ospos_permissions`
+--
+
+INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
+('reports_customers', 'reports'),
+('reports_receivings', 'reports'),
+('reports_items', 'reports'),
+('reports_employees', 'reports'),
+('reports_suppliers', 'reports'),
+('reports_sales', 'reports'),
+('reports_discounts', 'reports'),
+('reports_taxes', 'reports'),
+('reports_inventory', 'reports'),
+('reports_categories', 'reports'),
+('reports_payments', 'reports'),
+('customers', 'customers'),
+('employees', 'employees'),
+('giftcards', 'giftcards'),
+('items', 'items'),
+('item_kits', 'item_kits'),
+('receivings', 'receivings'),
+('reports', 'reports'),
+('sales', 'sales'),
+('config', 'config'),
+('suppliers', 'suppliers');
+
+INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
+('items_stock', 'items', 1);
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ospos_grants`
+--
+
+CREATE TABLE `ospos_grants` (
+  `permission_id` varchar(255) NOT NULL,
   `person_id` int(10) NOT NULL,
-  PRIMARY KEY (`module_id`,`person_id`),
-  KEY `person_id` (`person_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `ospos_permissions`
---
-
-INSERT INTO `ospos_permissions` (`module_id`, `person_id`) VALUES
-('config', 1),
+  PRIMARY KEY (`permission_id`,`person_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `ospos_grants`
+--
+-- --------------------------------------------------------
+
+INSERT INTO `ospos_grants` (`permission_id`, `person_id`) VALUES
+('reports_customers', 1),
+('reports_receivings', 1), 
+('reports_items', 1),
+('reports_inventory', 1),
+('reports_employees', 1),
+('reports_suppliers', 1),
+('reports_sales', 1),
+('reports_discounts', 1),
+('reports_taxes', 1),
+('reports_categories', 1),
+('reports_payments', 1),    
 ('customers', 1),
 ('employees', 1),
 ('giftcards', 1),

  `person_id` INT NOT NULL,
  PRIMARY KEY (`giftcard_id`),
  UNIQUE KEY `giftcard_number` (`giftcard_number`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=48 ;

--
-- Dumping data for table `ospos_giftcards`

CREATE TABLE IF NOT EXISTS `ospos_item_quantities` (
  `item_id` int(11) NOT NULL,
  `location_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`item_id`,`location_id`),
  KEY `item_id` (`item_id`),
  KEY `location_id` (`location_id`)
