mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-14 18:53:56 -04:00
merge branch
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
[  ](https://bintray.com/jekkos/opensourcepos/opensourcepos/3.2.3/link)
|
||||
[](https://travis-ci.org/opensourcepos/opensourcepos)
|
||||
[](https://gitter.im/jekkos/opensourcepos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://david-dm.org/jekkos/opensourcepos#info=dev)
|
||||
|
||||
@@ -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']);
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -103,10 +103,11 @@ if (isset($success))
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:5%;"><?php echo $this->lang->line('common_delete'); ?></th>
|
||||
<th style="width:35%;"><?php echo $this->lang->line('receivings_item_name'); ?></th>
|
||||
<th style="width:15%;"><?php echo $this->lang->line('sales_item_number'); ?></th>
|
||||
<th style="width:23%;"><?php echo $this->lang->line('receivings_item_name'); ?></th>
|
||||
<th style="width:10%;"><?php echo $this->lang->line('receivings_cost'); ?></th>
|
||||
<th style="width:10%;"><?php echo $this->lang->line('receivings_quantity'); ?></th>
|
||||
<th style="width:10%;"><?php echo $this->lang->line('receivings_ship_pack'); ?></th>
|
||||
<th style="width:7%;"><?php echo $this->lang->line('receivings_ship_pack'); ?></th>
|
||||
<th style="width:15%;"><?php echo $this->lang->line('receivings_discount'); ?></th>
|
||||
<th style="width:10%;"><?php echo $this->lang->line('receivings_total'); ?></th>
|
||||
<th style="width:5%;"><?php echo $this->lang->line('receivings_update'); ?></th>
|
||||
@@ -119,7 +120,7 @@ if (isset($success))
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan='8'>
|
||||
<td colspan='9'>
|
||||
<div class='alert alert-dismissible alert-info'><?php echo $this->lang->line('sales_no_items_in_cart'); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -133,6 +134,7 @@ if (isset($success))
|
||||
<?php echo form_open($controller_name."/edit_item/$line", array('class'=>'form-horizontal', 'id'=>'cart_'.$line)); ?>
|
||||
<tr>
|
||||
<td><?php echo anchor($controller_name."/delete_item/$line", '<span class="glyphicon glyphicon-trash"></span>');?></td>
|
||||
<td><?php echo $item['item_number']; ?></td>
|
||||
<td style="align:center;">
|
||||
<?php echo $item['name']; ?><br /> <?php echo '[' . to_quantity_decimals($item['in_stock']) . ' in ' . $item['stock_name'] . ']'; ?>
|
||||
<?php echo form_hidden('location', $item['item_location']); ?>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user