mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-05 07:34:49 -04:00
Fix supplier selection
This commit is contained in:
@@ -265,7 +265,7 @@ $config['sess_use_database'] = TRUE;
|
||||
$config['sess_table_name'] = 'ospos_sessions';
|
||||
$config['sess_match_ip'] = FALSE;
|
||||
$config['sess_match_useragent'] = FAlSE;
|
||||
$config['sess_time_to_update'] = 86400;
|
||||
$config['sess_time_to_update'] = 0;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -120,6 +120,7 @@ class Receivings extends Secure_area
|
||||
|
||||
function delete_supplier()
|
||||
{
|
||||
$this->receiving_lib->clear_invoice_number();
|
||||
$this->receiving_lib->delete_supplier();
|
||||
$this->_reload();
|
||||
}
|
||||
@@ -246,7 +247,7 @@ class Receivings extends Secure_area
|
||||
|
||||
$invoice_number=$this->receiving_lib->get_invoice_number();
|
||||
if (empty($invoice_number))
|
||||
{
|
||||
{
|
||||
$invoice_number=$this->config->config['recv_invoice_format'];
|
||||
}
|
||||
$invoice_count=$this->Receiving->get_invoice_count();
|
||||
@@ -266,8 +267,10 @@ class Receivings extends Secure_area
|
||||
}
|
||||
$invoice_number=str_replace('$SI',$acronym,$invoice_number);
|
||||
}
|
||||
$this->receiving_lib->set_invoice_number($invoice_number);
|
||||
$data['invoice_number']=$invoice_number;
|
||||
|
||||
|
||||
$this->load->view("receivings/receiving",$data);
|
||||
$this->_remove_duplicate_cookies();
|
||||
}
|
||||
|
||||
@@ -6,19 +6,10 @@ define("FORM_WIDTH", "400");
|
||||
|
||||
class Reports extends Secure_area
|
||||
{
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct('reports');
|
||||
$method_name = $this->uri->segment(2);
|
||||
$exploder = explode('_', $method_name);
|
||||
$submodule_id = preg_match("/([^_.]*)(?:_graph)?$/", $method_name, $matches);
|
||||
$employee_id=$this->Employee->get_logged_in_employee_info()->person_id;
|
||||
// check access to report submodule
|
||||
if (sizeof($exploder) > 1 && !$this->Employee->has_permission('reports_'.$matches[1],$employee_id))
|
||||
{
|
||||
redirect('no_access/'.$submodule_id);
|
||||
}
|
||||
$this->load->helper('report');
|
||||
}
|
||||
|
||||
|
||||
@@ -324,6 +324,10 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
|
||||
('reports_employees', 'reports'),
|
||||
('reports_suppliers', 'reports'),
|
||||
('reports_sales', 'reports'),
|
||||
('reports_discounts', 'reports'),
|
||||
('reports_taxes', 'reports'),
|
||||
('reports_inventory', 'reports'),
|
||||
('reports_categories', 'reports'),
|
||||
('customers', 'customers'),
|
||||
('employees', 'employees'),
|
||||
('giftcards', 'giftcards'),
|
||||
@@ -362,7 +366,11 @@ INSERT INTO `ospos_grants` (`permission_id`, `person_id`) VALUES
|
||||
('reports_inventory', 1),
|
||||
('reports_employees', 1),
|
||||
('reports_suppliers', 1),
|
||||
('reports_sales', 1),
|
||||
('reports_sales', 1),
|
||||
('reports_discounts', 1),
|
||||
('reports_taxes', 1),
|
||||
('reports_inventory', 1),
|
||||
('reports_categories', 1),
|
||||
('customers', 1),
|
||||
('employees', 1),
|
||||
('giftcards', 1),
|
||||
|
||||
Reference in New Issue
Block a user