diff --git a/README.md b/README.md index 76dadf863..c48e239eb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[ ![Download](https://api.bintray.com/packages/jekkos/opensourcepos/opensourcepos/images/download.svg?version=3.2.3) ](https://bintray.com/jekkos/opensourcepos/opensourcepos/3.2.3/link) [![Build Status](https://travis-ci.org/opensourcepos/opensourcepos.svg?branch=master)](https://travis-ci.org/opensourcepos/opensourcepos) [![Join the chat at https://gitter.im/jekkos/opensourcepos](https://badges.gitter.im/jekkos/opensourcepos.svg)](https://gitter.im/jekkos/opensourcepos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![devDependency Status](https://david-dm.org/jekkos/opensourcepos/dev-status.svg)](https://david-dm.org/jekkos/opensourcepos#info=dev) diff --git a/application/config/config.php b/application/config/config.php index 3a345c88d..bd72045ef 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -65,7 +65,7 @@ $config['db_log_enabled'] = FALSE; | a PHP script and you can easily do that on your own. | */ -$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || isset($_ENV['FORCE_HTTPS'])) ? 'https' : 'http'; +$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_ENV['FORCE_HTTPS']) && $_ENV['FORCE_HTTPS'] == 'true')) ? 'https' : 'http'; $config['base_url'] .= '://' . $_SERVER['HTTP_HOST']; $config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); diff --git a/application/controllers/Employees.php b/application/controllers/Employees.php index 3267f5c13..ab68faff8 100644 --- a/application/controllers/Employees.php +++ b/application/controllers/Employees.php @@ -121,7 +121,7 @@ class Employees extends Persons } //Password has been changed OR first time password set - if($this->input->post('password') != '') + if($this->input->post('password') != '' && ENVIRONMENT != 'testing') { $exploded = explode(":", $this->input->post('language')); $employee_data = array( diff --git a/application/libraries/Receiving_lib.php b/application/libraries/Receiving_lib.php index 53ba67bfd..8451330b4 100644 --- a/application/libraries/Receiving_lib.php +++ b/application/libraries/Receiving_lib.php @@ -234,6 +234,7 @@ class Receiving_lib $item = array($insertkey => array( 'item_id' => $item_id, 'item_location' => $item_location, + 'item_number' => $item_info->item_number, 'stock_name' => $this->CI->Stock_location->get_location_name($item_location), 'line' => $insertkey, 'name' => $item_info->name, diff --git a/application/models/Employee.php b/application/models/Employee.php index f5678d666..aa4dd9f07 100644 --- a/application/models/Employee.php +++ b/application/models/Employee.php @@ -119,11 +119,9 @@ class Employee extends Person //Now insert the new grants if($success) { - $count = 0; foreach($grants_data as $grant) { $success = $this->db->insert('grants', array('permission_id' => $grant['permission_id'], 'person_id' => $employee_id, 'menu_group' => $grant['menu_group'])); - $count = $count+ 1; } } } @@ -366,7 +364,7 @@ class Employee extends Person /* Determines whether the employee has access to at least one submodule - */ + */ public function has_module_grant($permission_id, $person_id) { $this->db->from('grants'); @@ -433,8 +431,8 @@ class Employee extends Person } /* - Gets employee permission grants - */ + Gets employee permission grants + */ public function get_employee_grants($person_id) { $this->db->from('grants'); @@ -443,7 +441,6 @@ class Employee extends Person return $this->db->get()->result_array(); } - /* Attempts to login employee and set session. Returns boolean based on outcome. */ @@ -473,15 +470,18 @@ class Employee extends Person { $success = FALSE; - //Run these queries as a transaction, we want to make sure we do all or nothing - $this->db->trans_start(); + if(ENVIRONMENT != 'testing') + { + //Run these queries as a transaction, we want to make sure we do all or nothing + $this->db->trans_start(); - $this->db->where('person_id', $employee_id); - $success = $this->db->update('employees', $employee_data); + $this->db->where('person_id', $employee_id); + $success = $this->db->update('employees', $employee_data); - $this->db->trans_complete(); + $this->db->trans_complete(); - $success &= $this->db->trans_status(); + $success &= $this->db->trans_status(); + } return $success; } diff --git a/application/models/Item.php b/application/models/Item.php index 1d5f91315..b9e3bf18c 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -663,7 +663,7 @@ class Item extends CI_Model $suggestions = array_slice($suggestions, 0, $limit); } - return $suggestions; + return array_unique($suggestions, SORT_REGULAR); } @@ -774,7 +774,7 @@ class Item extends CI_Model $suggestions = array_slice($suggestions, 0, $limit); } - return $suggestions; + return array_unique($suggestions, SORT_REGULAR); } public function get_kit_search_suggestions($search, $filters = array('is_deleted' => FALSE, 'search_custom' => FALSE), $unique = FALSE, $limit = 25) @@ -879,7 +879,7 @@ class Item extends CI_Model $suggestions = array_slice($suggestions, 0, $limit); } - return $suggestions; + return array_unique($suggestions, SORT_REGULAR); } public function get_low_sell_suggestions($search) diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index 5c2b934e7..ea1b6aed4 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -103,10 +103,11 @@ if (isset($success)) lang->line('common_delete'); ?> - lang->line('receivings_item_name'); ?> + lang->line('sales_item_number'); ?> + lang->line('receivings_item_name'); ?> lang->line('receivings_cost'); ?> lang->line('receivings_quantity'); ?> - lang->line('receivings_ship_pack'); ?> + lang->line('receivings_ship_pack'); ?> lang->line('receivings_discount'); ?> lang->line('receivings_total'); ?> lang->line('receivings_update'); ?> @@ -119,7 +120,7 @@ if (isset($success)) { ?> - +
lang->line('sales_no_items_in_cart'); ?>
@@ -133,6 +134,7 @@ if (isset($success)) 'form-horizontal', 'id'=>'cart_'.$line)); ?> ');?> +
diff --git a/docker-compose.yml b/docker-compose.yml index 8ebe12f8c..80421a0f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: - MYSQL_HOST_NAME=mysql mysql: - image: mariadb:10.1.21 + image: mariadb:10.3.9 environment: - MYSQL_ROOT_PASSWORD=pointofsale - MYSQL_DATABASE=ospos