Add Office Menu

This commit is contained in:
Steve Ireland
2017-09-02 13:31:33 -04:00
committed by FrancescoUK
parent 5a9aa96b7e
commit de91510beb
18 changed files with 342 additions and 107 deletions

View File

@@ -206,6 +206,7 @@ class Config extends Secure_Controller
$data['register_mode_options'] = $this->sale_lib->get_register_mode_options();
$data['rounding_options'] = Rounding_mode::get_rounding_options();
$data['tax_codes'] = $this->get_tax_code_options();
$data['show_office_group'] = $this->Module->get_show_office_group();
$data = $this->xss_clean($data);
@@ -308,6 +309,8 @@ class Config extends Secure_Controller
'custom10_name' => $this->input->post('custom10_name')
);
$this->Module->set_show_office_group($this->input->post('show_office_group') != NULL);
$result = $this->Appconfig->batch_save($batch_save_data);
$success = $result ? TRUE : FALSE;

View File

@@ -61,6 +61,7 @@ class Employees extends Persons
{
$module->module_id = $this->xss_clean($module->module_id);
$module->grant = $this->xss_clean($this->Employee->has_grant($module->module_id, $person_info->person_id));
$module->menu_group = $this->xss_clean($this->Employee->get_menu_group($module->module_id, $person_info->person_id));
$modules[] = $module;
}
@@ -134,6 +135,16 @@ class Employees extends Persons
'comments' => $this->input->post('comments'),
);
$grants_data = $this->input->post('grants') != NULL ? $this->input->post('grants') : array();
$menu_groups = $this->input->post('menu_groups') != NULL ? $this->input->post('menu_groups') : array();
$grants_array = array();
foreach ($grants_data as $key => $value)
{
$grants = array();
$grants['permission_id'] = $value;
$grants['menu_group'] = $menu_groups[$key];
$grants_array[] = $grants;
}
//Password has been changed OR first time password set
if($this->input->post('password') != '')
@@ -149,7 +160,7 @@ class Employees extends Persons
$employee_data = array('username' => $this->input->post('username'));
}
if($this->Employee->save_employee($person_data, $employee_data, $grants_data, $employee_id))
if($this->Employee->save_employee($person_data, $employee_data, $grants_array, $employee_id))
{
// New employee
if($employee_id == -1)

View File

@@ -4,6 +4,11 @@ require_once("Secure_Controller.php");
class Home extends Secure_Controller
{
function __construct()
{
parent::__construct(NULL,NULL,'home');
}
public function index()
{
$this->load->view('home');

View File

@@ -0,0 +1,24 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once("Secure_Controller.php");
class Office extends Secure_Controller
{
function __construct()
{
parent::__construct('office',NULL,'office');
}
public function index()
{
$this->load->view('office');
}
public function logout()
{
$this->track_page('logout', 'logout');
$this->Employee->logout();
}
}
?>

View File

@@ -6,7 +6,7 @@ class Secure_Controller extends CI_Controller
* Controllers that are considered secure extend Secure_Controller, optionally a $module_id can
* be set to also check if a user can access a particular module in the system.
*/
public function __construct($module_id = NULL, $submodule_id = NULL)
public function __construct($module_id = NULL, $submodule_id = NULL, $menu_group = NULL)
{
parent::__construct();
@@ -28,7 +28,24 @@ class Secure_Controller extends CI_Controller
}
// load up global data visible to all the loaded views
$data['allowed_modules'] = $this->Module->get_allowed_modules($logged_in_employee_info->person_id);
$this->load->library('session');
if($menu_group == NULL)
{
$menu_group = $this->session->userdata('menu_group');
}
else
{
$this->session->set_userdata('menu_group', $menu_group);
}
if($menu_group == 'home')
{
$data['allowed_modules'] = $this->Module->get_allowed_home_modules($logged_in_employee_info->person_id);
}
else
{
$data['allowed_modules'] = $this->Module->get_allowed_office_modules($logged_in_employee_info->person_id);
}
$data['user_info'] = $logged_in_employee_info;
$data['controller_name'] = $module_id;

View File

@@ -225,6 +225,7 @@ $lang["config_sales_invoice_format"] = "Sales Invoice Format";
$lang["config_sales_quote_format"] = "Sales Quote Format";
$lang["config_saved_successfully"] = "Configuration save successful.";
$lang["config_saved_unsuccessfully"] = "Configuration save failed.";
$lang["config_show_office_group"] = "Show office icon";
$lang["config_statistics"] = "Send Statistics";
$lang["config_statistics_tooltip"] = "Send statistics for development and feature improvement purposes.";
$lang["config_stock_location"] = "Stock location";

View File

@@ -1,5 +1,6 @@
<?php
$lang["module_both"] = "Both";
$lang["module_config"] = "Store Config";
$lang["module_config_desc"] = "Change the store's configuration";
$lang["module_customers"] = "Customers";
@@ -9,6 +10,7 @@ $lang["module_employees_desc"] = "Add, Update, Delete, and Search Employees.";
$lang["module_giftcards"] = "Gift Cards";
$lang["module_giftcards_desc"] = "Add, Update, Delete and Search Gift Cards.";
$lang["module_home"] = "Home";
$lang["module_home_desc"] = "List home menu modules.";
$lang["module_item_kits"] = "Item Kits";
$lang["module_item_kits_desc"] = "Add, Update, Delete and Search Item Kits.";
$lang["module_items"] = "Items";
@@ -17,6 +19,8 @@ $lang["module_messages"] = "Messages";
$lang["module_messages_desc"] = "Send Messages to Customers, Suppliers and Employees.";
$lang["module_migrate"] = "Migrate";
$lang["module_migrate_desc"] = "Update the OSPOS Database.";
$lang["module_office"] = "Office";
$lang["module_office_desc"] = "List office menu modules.";
$lang["module_receivings"] = "Receivings";
$lang["module_receivings_desc"] = "Process Purchase Orders.";
$lang["module_reports"] = "Reports";

View File

@@ -119,9 +119,11 @@ class Employee extends Person
//Now insert the new grants
if($success)
{
foreach($grants_data as $permission_id)
$count = 0;
foreach($grants_data as $grant)
{
$success = $this->db->insert('grants', array('permission_id' => $permission_id, 'person_id' => $employee_id));
$success = $this->db->insert('grants', array('permission_id' => $grant['permission_id'], 'person_id' => $employee_id, 'menu_group' => $grant['menu_group']));
$count = $count+ 1;
}
}
}
@@ -390,9 +392,9 @@ class Employee extends Person
return ($this->db->get()->num_rows() == 0);
}
/*
Determines whether the employee specified employee has access the specific module.
*/
/**
* Determines whether the employee specified employee has access the specific module.
*/
public function has_grant($permission_id, $person_id)
{
//if no module_id is null, allow access
@@ -406,9 +408,32 @@ class Employee extends Person
return ($query->num_rows() == 1);
}
/*
Gets employee permission grants
*/
/**
* Returns the menu group designation that this module is to appear in
*/
public function get_menu_group($permission_id, $person_id)
{
$this->db->select('menu_group');
$this->db->from('grants');
$this->db->where('permission_id', $permission_id);
$this->db->where('person_id', $person_id);
$row = $this->db->get()->row();
// If no grants are assigned yet then set the default to 'home'
if ($row == null)
{
return "home";
}
else
{
return $row->menu_group;
}
}
/*
Gets employee permission grants
*/
public function get_employee_grants($person_id)
{
$this->db->from('grants');

View File

@@ -6,6 +6,11 @@
class Module extends CI_Model
{
function __construct()
{
parent::__construct();
}
public function get_module_name($module_id)
{
$query = $this->db->get_where('modules', array('module_id' => $module_id), 1);
@@ -55,19 +60,69 @@ class Module extends CI_Model
{
$this->db->from('modules');
$this->db->order_by('sort', 'asc');
return $this->db->get();
}
public function get_allowed_modules($person_id)
public function get_allowed_home_modules($person_id)
{
$menus = array('home', 'both');
$this->db->from('modules');
$this->db->join('permissions', 'permissions.permission_id = modules.module_id');
$this->db->join('grants', 'permissions.permission_id = grants.permission_id');
$this->db->where('person_id', $person_id);
$this->db->where_in('menu_group', $menus);
$this->db->where('sort !=', 0);
$this->db->order_by('sort', 'asc');
return $this->db->get();
}
public function get_allowed_office_modules($person_id)
{
$menus = array('office', 'both');
$this->db->from('modules');
$this->db->join('permissions', 'permissions.permission_id = modules.module_id');
$this->db->join('grants', 'permissions.permission_id = grants.permission_id');
$this->db->where('person_id', $person_id);
$this->db->where_in('menu_group', $menus);
$this->db->where('sort !=', 0);
$this->db->order_by('sort', 'asc');
return $this->db->get();
}
/**
* This method is used to set the show the office navigation icon on the home page
* which happens when the sort value is greater than zero
*/
public function set_show_office_group($show_office_group)
{
if($show_office_group)
{
$sort = 1;
}
else
{
$sort = 0;
}
$modules_data = array(
'sort' => $sort
);
$this->db->where('module_id', 'office');
$this->db->update('modules', $modules_data);
}
/**
* This method is used to show the office navigation icon on the home page
* which happens when the sort value is greater than zero
*/
public function get_show_office_group()
{
$this->db->select('sort');
$this->db->from('grants');
$this->db->where('module_id', 'office');
$this->db->from('modules');
return $this->db->get()->row()->sort;
}
}
?>

View File

@@ -94,7 +94,7 @@
</div>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('config_gcaptcha_site_key'), 'config_gcaptcha_site_key', array('class' => 'required control-label col-xs-2')); ?>
<?php echo form_label($this->lang->line('config_gcaptcha_site_key'), 'config_gcaptcha_site_key', array('class' => 'required control-label col-xs-2','id' => 'config_gcaptcha_site_key')); ?>
<div class='col-xs-4'>
<?php echo form_input(array(
'name' => 'gcaptcha_site_key',
@@ -105,7 +105,7 @@
</div>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('config_gcaptcha_secret_key'), 'config_gcaptcha_secret_key', array('class' => 'required control-label col-xs-2')); ?>
<?php echo form_label($this->lang->line('config_gcaptcha_secret_key'), 'config_gcaptcha_secret_key', array('class' => 'required control-label col-xs-2','id' => 'config_gcaptcha_secret_key')); ?>
<div class='col-xs-4'>
<?php echo form_input(array(
'name' => 'gcaptcha_secret_key',
@@ -150,6 +150,17 @@
</div>
</div>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('config_show_office_group'), 'show_office_group', array('class' => 'control-label col-xs-2')); ?>
<div class='col-xs-1'>
<?php echo form_checkbox(array(
'name' => 'show_office_group',
'id' => 'show_office_group',
'value' => 'show_office_group',
'checked' => $show_office_group)); ?>
</div>
</div>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('config_custom1'), 'config_custom1', array('class' => 'control-label col-xs-2')); ?>
<div class='col-xs-2'>
@@ -284,7 +295,17 @@ $(document).ready(function()
{
var enable_disable_gcaptcha_enable = (function() {
var gcaptcha_enable = $("#gcaptcha_enable").is(":checked");
$("#gcaptcha_site_key, #gcaptcha_secret_key").prop("disabled", !gcaptcha_enable);
if(gcaptcha_enable)
{
$("#gcaptcha_site_key, #gcaptcha_secret_key").prop("disabled", !gcaptcha_enable).addClass("required");
$("#config_gcaptcha_site_key, #config_gcaptcha_secret_key").addClass("required");
}
else
{
$("#gcaptcha_site_key, #gcaptcha_secret_key").prop("disabled", gcaptcha_enable).removeClass("required");
$("#config_gcaptcha_site_key, #config_gcaptcha_secret_key").removeClass("required");
}
return arguments.callee;
})();
@@ -294,6 +315,7 @@ $(document).ready(function()
window.location='<?php echo site_url('config/backup_db') ?>';
});
$('#general_config_form').validate($.extend(form_support.handler, {
errorLabelContainer: "#general_error_message_box",
@@ -312,11 +334,11 @@ $(document).ready(function()
},
gcaptcha_site_key:
{
required: true
required: "#gcaptcha_enable:checked"
},
gcaptcha_secret_key:
{
required: true
required: "#gcaptcha_enable:checked"
}
},

View File

@@ -82,6 +82,11 @@
?>
<li>
<?php echo form_checkbox("grants[]", $module->module_id, $module->grant, "class='module'"); ?>
<?php echo form_dropdown("menu_groups[]", array(
'home' => $this->lang->line('module_home'),
'office' => $this->lang->line('module_office'),
'both' => $this->lang->line('module_both')
), $module->menu_group, "class='module'"); ?>
<span class="medium"><?php echo $this->lang->line('module_'.$module->module_id);?>:</span>
<span class="small"><?php echo $this->lang->line('module_'.$module->module_id.'_desc');?></span>
<?php
@@ -99,6 +104,7 @@
<ul>
<li>
<?php echo form_checkbox("grants[]", $permission->permission_id, $permission->grant); ?>
<?php echo form_hidden("menu_groups[]", "--"); ?>
<span class="medium"><?php echo $lang_line ?></span>
</li>
</ul>
@@ -139,20 +145,20 @@ $(document).ready(function()
$("ul#permission_list > li > input[name='grants[]']").each(function()
{
var $this = $(this);
$("ul > li > input", $this.parent()).each(function()
{
var $that = $(this);
var updateCheckboxes = function (checked)
{
var $this = $(this);
$("ul > li > input", $this.parent()).each(function()
{
var $that = $(this);
var updateCheckboxes = function (checked)
{
$that.prop("disabled", !checked);
!checked && $that.prop("checked", false);
}
$this.change(function() {
updateCheckboxes($this.is(":checked"));
});
!checked && $that.prop("checked", false);
}
$this.change(function() {
updateCheckboxes($this.is(":checked"));
});
updateCheckboxes($this.is(":checked"));
});
});
});
$('#employee_form').validate($.extend({
@@ -191,20 +197,20 @@ $(document).ready(function()
},
repeat_password:
{
equalTo: "#password"
equalTo: "#password"
},
email: "email"
},
email: "email"
},
messages:
{
first_name: "<?php echo $this->lang->line('common_first_name_required'); ?>",
last_name: "<?php echo $this->lang->line('common_last_name_required'); ?>",
username:
{
required: "<?php echo $this->lang->line('employees_username_required'); ?>",
minlength: "<?php echo $this->lang->line('employees_username_minlength'); ?>"
},
first_name: "<?php echo $this->lang->line('common_first_name_required'); ?>",
last_name: "<?php echo $this->lang->line('common_last_name_required'); ?>",
username:
{
required: "<?php echo $this->lang->line('employees_username_required'); ?>",
minlength: "<?php echo $this->lang->line('employees_username_minlength'); ?>"
},
password:
{
<?php
@@ -220,8 +226,8 @@ $(document).ready(function()
repeat_password:
{
equalTo: "<?php echo $this->lang->line('employees_password_must_match'); ?>"
},
email: "<?php echo $this->lang->line('common_email_invalid_format'); ?>"
},
email: "<?php echo $this->lang->line('common_email_invalid_format'); ?>"
}
}, form_support.error));
});

View File

@@ -0,0 +1,23 @@
<?php $this->load->view("partial/header"); ?>
<script type="text/javascript">
dialog_support.init("a.modal-dlg");
</script>
<h3 class="text-center"><?php echo $this->lang->line('common_welcome_message'); ?></h3>
<div id="office_module_list">
<?php
foreach($allowed_modules->result() as $module)
{
?>
<div class="module_item" title="<?php echo $this->lang->line('module_'.$module->module_id.'_desc');?>">
<a href="<?php echo site_url("$module->module_id");?>"><img src="<?php echo base_url().'images/menubar/'.$module->module_id.'.png';?>" border="0" alt="Menubar Image" /></a>
<a href="<?php echo site_url("$module->module_id");?>"><?php echo $this->lang->line("module_".$module->module_id) ?></a>
</div>
<?php
}
?>
</div>
<?php $this->load->view("partial/footer"); ?>

View File

@@ -124,13 +124,16 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<?php foreach($allowed_modules->result() as $module): ?>
<li class="<?php echo $module->module_id == $this->uri->segment(1)? 'active': ''; ?>">
<a href="<?php echo site_url("$module->module_id");?>" title="<?php echo $this->lang->line("module_".$module->module_id);?>" class="menu-icon">
<img src="<?php echo base_url().'images/menubar/'.$module->module_id.'.png';?>" border="0" alt="Module Icon" /><br />
<?php echo $this->lang->line("module_".$module->module_id) ?>
</a>
</li>
<?php endforeach; ?>
<li class="<?php echo $module->module_id == $this->uri->segment(1) ? 'active' : ''; ?>">
<a href="<?php echo site_url("$module->module_id"); ?>"
title="<?php echo $this->lang->line("module_" . $module->module_id); ?>"
class="menu-icon">
<img src="<?php echo base_url() . 'images/menubar/' . $module->module_id . '.png'; ?>"
border="0" alt="Module Icon"/><br/>
<?php echo $this->lang->line("module_" . $module->module_id) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>

View File

@@ -0,0 +1,20 @@
-- Add support for office menu group
ALTER TABLE `ospos_grants`
ADD COLUMN `menu_group` varchar(32) DEFAULT 'home';
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
('module_office', 'module_office_desc', 1, 'office'),
('module_home', 'module_home_desc', 1, 'home');
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
('office', 'office'),
('home', 'home');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
('office', 1, 'home'),
('home', 1, 'office');
update `ospos_grants`
set menu_group = 'office'
where permission_id in ('config', 'home', 'employees', 'taxes', 'migrate')
and person_id = 1;

View File

@@ -354,10 +354,12 @@ INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_i
('module_customers', 'module_customers_desc', 10, 'customers'),
('module_employees', 'module_employees_desc', 80, 'employees'),
('module_giftcards', 'module_giftcards_desc', 90, 'giftcards'),
('module_home', 'module_home_desc', 1, 'home'),
('module_items', 'module_items_desc', 20, 'items'),
('module_item_kits', 'module_item_kits_desc', 30, 'item_kits'),
('module_messages', 'module_messages_desc', 100, 'messages'),
('module_migrate', 'module_migrate_desc', 120, 'migrate'),
('module_office', 'module_office_desc', 1, 'office'),
('module_receivings', 'module_receivings_desc', 60, 'receivings'),
('module_reports', 'module_reports_desc', 50, 'reports'),
('module_sales', 'module_sales_desc', 70, 'sales'),
@@ -428,10 +430,12 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
('customers', 'customers'),
('employees', 'employees'),
('giftcards', 'giftcards'),
('home', 'home'),
('items', 'items'),
('item_kits', 'item_kits'),
('messages', 'messages'),
('migrate', 'migrate'),
('office', 'office'),
('receivings', 'receivings'),
('reports', 'reports'),
('sales', 'sales'),
@@ -453,6 +457,7 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VA
CREATE TABLE `ospos_grants` (
`permission_id` varchar(255) NOT NULL,
`person_id` int(10) NOT NULL,
`menu_group` varchar(32) DEFAULT 'home',
PRIMARY KEY (`permission_id`,`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -461,34 +466,36 @@ CREATE 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),
('items', 1),
('item_kits', 1),
('messages', 1),
('migrate', 1),
('receivings', 1),
('reports', 1),
('sales', 1),
('config', 1),
('items_stock', 1),
('sales_stock', 1),
('receivings_stock', 1),
('suppliers', 1),
('taxes', 1);
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, 'menu_group') VALUES
('reports_customers', 1, 'home'),
('reports_receivings', 1, 'home'),
('reports_items', 1, 'home'),
('reports_inventory', 1, 'home'),
('reports_employees', 1, 'home'),
('reports_suppliers', 1, 'home'),
('reports_sales', 1, 'home'),
('reports_discounts', 1, 'home'),
('reports_taxes', 1, 'home'),
('reports_categories', 1, 'home'),
('reports_payments', 1, 'home'),
('customers', 1, 'home'),
('employees', 1, 'office'),
('giftcards', 1, 'home'),
('items', 1, 'home'),
('item_kits', 1, 'home'),
('messages', 1, 'home'),
('migrate', 1, 'office'),
('receivings', 1, 'home'),
('reports', 1, 'home'),
('sales', 1, 'home'),
('config', 1, 'office'),
('items_stock', 1, 'home'),
('sales_stock', 1, 'home'),
('receivings_stock', 1, 'home'),
('suppliers', 1, 'home'),
('taxes', 1, 'office'),
('office', 1, 'home'),
('home', 1, 'office');
--
-- Table structure for table `ospos_receivings`

View File

@@ -354,10 +354,12 @@ INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_i
('module_customers', 'module_customers_desc', 10, 'customers'),
('module_employees', 'module_employees_desc', 80, 'employees'),
('module_giftcards', 'module_giftcards_desc', 90, 'giftcards'),
('module_home', 'module_home_desc', 1, 'home'),
('module_items', 'module_items_desc', 20, 'items'),
('module_item_kits', 'module_item_kits_desc', 30, 'item_kits'),
('module_messages', 'module_messages_desc', 100, 'messages'),
('module_migrate', 'module_migrate_desc', 120, 'migrate'),
('module_office', 'module_office_desc', 1, 'office'),
('module_receivings', 'module_receivings_desc', 60, 'receivings'),
('module_reports', 'module_reports_desc', 50, 'reports'),
('module_sales', 'module_sales_desc', 70, 'sales'),
@@ -428,10 +430,12 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
('customers', 'customers'),
('employees', 'employees'),
('giftcards', 'giftcards'),
('home', 'home'),
('items', 'items'),
('item_kits', 'item_kits'),
('messages', 'messages'),
('migrate', 'migrate'),
('office', 'office'),
('receivings', 'receivings'),
('reports', 'reports'),
('sales', 'sales'),
@@ -439,6 +443,8 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
('suppliers', 'suppliers'),
('taxes', 'taxes');
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
('items_stock', 'items', 1),
('sales_stock', 'sales', 1),
@@ -453,6 +459,7 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VA
CREATE TABLE `ospos_grants` (
`permission_id` varchar(255) NOT NULL,
`person_id` int(10) NOT NULL,
`menu_group` varchar(32) DEFAULT 'home',
PRIMARY KEY (`permission_id`,`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -461,34 +468,36 @@ CREATE 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),
('items', 1),
('item_kits', 1),
('messages', 1),
('migrate', 1),
('receivings', 1),
('reports', 1),
('sales', 1),
('config', 1),
('items_stock', 1),
('sales_stock', 1),
('receivings_stock', 1),
('suppliers', 1),
('taxes', 1);
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, 'menu_group') VALUES
('reports_customers', 1, 'home'),
('reports_receivings', 1, 'home'),
('reports_items', 1, 'home'),
('reports_inventory', 1, 'home'),
('reports_employees', 1, 'home'),
('reports_suppliers', 1, 'home'),
('reports_sales', 1, 'home'),
('reports_discounts', 1, 'home'),
('reports_taxes', 1, 'home'),
('reports_categories', 1, 'home'),
('reports_payments', 1, 'home'),
('customers', 1, 'home'),
('employees', 1, 'office'),
('giftcards', 1, 'home'),
('items', 1, 'home'),
('item_kits', 1, 'home'),
('messages', 1, 'home'),
('migrate', 1, 'office'),
('receivings', 1, 'home'),
('reports', 1, 'home'),
('sales', 1, 'home'),
('config', 1, 'office'),
('items_stock', 1, 'home'),
('sales_stock', 1, 'home'),
('receivings_stock', 1, 'home'),
('suppliers', 1, 'home'),
('taxes', 1, 'office'),
('office', 1, 'home'),
('home', 1, 'office');
--
-- Table structure for table `ospos_receivings`

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB