mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-13 00:12:43 -04:00
Add ticket suggestions for #40
This commit is contained in:
@@ -65,8 +65,10 @@ class Sales extends Secure_area
|
||||
|
||||
function item_search()
|
||||
{
|
||||
if ($this->sale_lib->get_mode() == 'return') {
|
||||
$suggestions = $this->Sale->get_search_suggestions($this->input->post('q'), $this->input->post('limit'));
|
||||
$suggestions = array();
|
||||
if ($this->sale_lib->get_mode() == 'return')
|
||||
{
|
||||
$this->sale_lib->is_valid_receipt($this->input->post('q')) && $suggestions[] = $this->input->post('q');
|
||||
} else {
|
||||
$suggestions = $this->Item->get_item_search_suggestions($this->input->post('q'),$this->input->post('limit'));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_item_kit_search_suggestions($this->input->post('q'),$this->input->post('limit')));
|
||||
|
||||
@@ -397,7 +397,7 @@ class Sale_lib
|
||||
//POS #
|
||||
$pieces = explode(' ',$receipt_sale_id);
|
||||
|
||||
if(count($pieces)==2)
|
||||
if(count($pieces)==2 && strtolower($pieces[0]) == 'pos')
|
||||
{
|
||||
return $this->CI->Sale->exists($pieces[1]);
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ $(document).ready(function()
|
||||
selectFirst: false,
|
||||
delay:10,
|
||||
formatItem: function(row) {
|
||||
return row[1];
|
||||
return (row.length > 1 && row[1]) || row[0];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user