mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-20 07:14:33 -04:00
Only show item suggestions with associated id in register and receiving (#540)
Use correct tabindex numbering in sale register
This commit is contained in:
1 parent
53060397e5
commit
fdb826a8c4
3 files changed
+12
-11
No files matched your search
@@ -16,7 +16,9 @@ class Receivings extends Secure_area
|
||||
|
||||
function item_search()
|
||||
{
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->get('term'));
|
||||
$suggestions = $this->Item->get_search_suggestions($this->input->get('term'), array(
|
||||
'search_custom' => FALSE, 'is_deleted' => FALSE
|
||||
), TRUE);
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_search_suggestions($this->input->get('term')));
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,10 @@ class Sales extends Secure_area
|
||||
{
|
||||
$suggestions[] = $search;
|
||||
}
|
||||
$suggestions = array_merge($suggestions, $this->Item->get_search_suggestions($search));
|
||||
$suggestions = array_merge($suggestions, $this->Item->get_search_suggestions($search, array(
|
||||
'search_custom' => FALSE,
|
||||
'is_deleted' => FALSE
|
||||
), TRUE));
|
||||
$suggestions = array_merge($suggestions, $this->Item_kit->get_search_suggestions($search));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
|
||||
@@ -117,13 +117,9 @@ if (isset($success))
|
||||
}
|
||||
else
|
||||
{
|
||||
$tabindex = 2;
|
||||
$tabindex = 2;
|
||||
foreach(array_reverse($cart, true) as $line=>$item)
|
||||
{
|
||||
if($tabindex == 3)
|
||||
{
|
||||
$tabindex = 5;
|
||||
}
|
||||
?>
|
||||
<?php echo form_open($controller_name."/edit_item/$line", array('class'=>'form-horizontal', 'id'=>'cart_'.$line)); ?>
|
||||
<tr>
|
||||
@@ -369,12 +365,12 @@ if (isset($success))
|
||||
<tr>
|
||||
<td><span id="amount_tendered_label"><?php echo $this->lang->line('sales_amount_tendered'); ?></span></td>
|
||||
<td>
|
||||
<?php echo form_input(array('name'=>'amount_tendered', 'id'=>'amount_tendered', 'class'=>'form-control input-sm disabled', 'disabled'=>'', 'value'=>to_currency_no_money($amount_due), 'size'=>'5', 'tabindex'=>3)); ?>
|
||||
<?php echo form_input(array('name'=>'amount_tendered', 'id'=>'amount_tendered', 'class'=>'form-control input-sm disabled', 'disabled'=>'', 'value'=>to_currency_no_money($amount_due), 'size'=>'5', 'tabindex'=>$tabindex)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class='btn btn-sm btn-success pull-right' id='finish_sale_button' tabindex='4'><span class="glyphicon glyphicon-ok"> </span><?php echo $this->lang->line('sales_complete_sale'); ?></div>
|
||||
<div class='btn btn-sm btn-success pull-right' id='finish_sale_button' tabindex='<?php echo $tabindex+1; ?>'><span class="glyphicon glyphicon-ok"> </span><?php echo $this->lang->line('sales_complete_sale'); ?></div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
@@ -390,12 +386,12 @@ if (isset($success))
|
||||
<tr>
|
||||
<td><span id="amount_tendered_label"><?php echo $this->lang->line('sales_amount_tendered'); ?></span></td>
|
||||
<td>
|
||||
<?php echo form_input(array('name'=>'amount_tendered', 'id'=>'amount_tendered', 'class'=>'form-control input-sm', 'value'=>to_currency_no_money($amount_due), 'size'=>'5', 'tabindex'=>3)); ?>
|
||||
<?php echo form_input(array('name'=>'amount_tendered', 'id'=>'amount_tendered', 'class'=>'form-control input-sm', 'value'=>to_currency_no_money($amount_due), 'size'=>'5', 'tabindex'=>5)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class='btn btn-sm btn-success pull-right' id='add_payment_button' tabindex='4'><span class="glyphicon glyphicon-credit-card"> </span><?php echo $this->lang->line('sales_add_payment'); ?></div>
|
||||
<div class='btn btn-sm btn-success pull-right' id='add_payment_button' tabindex='<?php echo $tabindex+2; ?>'><span class="glyphicon glyphicon-credit-card"> </span><?php echo $this->lang->line('sales_add_payment'); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in new issue
Block a user