Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
| than english.
|
*/
$config['language'] = 'english';
// SAS - Because language has a en folder instead of english :( We may rename it or do like this.
// $config['language'] = 'english';
$config['language'] = 'en';
// EAS - Because language has a en folder instead of english :( We may rename it or do like this.

/*
|--------------------------------------------------------------------------
Expand Down
61 changes: 55 additions & 6 deletions application/views/sales/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
}
?>
</label>
<?php echo form_input(array('name'=>'item','id'=>'item','size'=>'40'));?>
<?php
// SAS
//echo form_input(array('name'=>'item','id'=>'item','size'=>'40'));
echo form_input(array('name'=>'item','id'=>'item','size'=>'40','tabindex'=>'1'));
// EAS
?>
<div id="new_item_button_register" >
<?php echo anchor("items/view/-1/width:360",
"<div class='small_button'><span>".$this->lang->line('sales_new_item')."</span></div>",
Expand Down Expand Up @@ -75,8 +80,18 @@
}
else
{
// SAS
//$tabindex = count($cart) + 1;
$tabindex = 2;
// EAS
foreach(array_reverse($cart, true) as $line=>$item)
{
// SAS
if($tabindex == 3)
{
$tabindex = 5;
}
// EAS
$cur_item_info = $this->Item->get_info($item['item_id']);
echo form_open("sales/edit_item/$line");
?>
Expand Down Expand Up @@ -110,8 +125,11 @@
echo form_hidden('quantity',$item['quantity']);
}
else
{
echo form_input(array('name'=>'quantity','value'=>$item['quantity'],'size'=>'2'));
{
// SAS
//echo form_input(array('name'=>'quantity','value'=>$item['quantity'],'size'=>'2'));
echo form_input(array('name'=>'quantity','value'=>$item['quantity'],'size'=>'2','tabindex'=>$tabindex));
// EAS
}
?>
</td>
Expand Down Expand Up @@ -172,6 +190,9 @@
<td colspan=8 style="background-color:white"> </td>
</tr> </form>
<?php
// SAS
$tabindex = $tabindex + 1;
// EAS
}
}
?>
Expand Down Expand Up @@ -259,8 +280,15 @@
}

if ($payments_cover_total)
{
echo "<div class='small_button' id='finish_sale_button' style='float:left;margin-top:5px;'><span>".$this->lang->line('sales_complete_sale')."</span></div>";
{
// SAS
//echo "<div class='small_button' id='finish_sale_button' style='float:left;margin-top:5px;'><span>".$this->lang->line('sales_complete_sale')."</span></div>";
echo "
<div class='small_button' id='finish_sale_button' style='float:left;margin-top:5px;' tabindex='3'>
<span>".$this->lang->line('sales_complete_sale')."
</span>
</div>";
// EAS
}
echo "<div class='small_button' id='suspend_sale_button' style='float:right;margin-top:5px;'><span>".$this->lang->line('sales_suspend_sale')."</span></div>";
?>
Expand Down Expand Up @@ -300,7 +328,12 @@
<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', 'value'=>to_currency_no_money($amount_due), 'size'=>'10' ) ); ?>
<?php
// SAS
//echo form_input( array( 'name'=>'amount_tendered', 'id'=>'amount_tendered', 'value'=>to_currency_no_money($amount_due), 'size'=>'10' ) );
echo form_input( array( 'name'=>'amount_tendered', 'id'=>'amount_tendered', 'value'=>to_currency_no_money($amount_due), 'size'=>'10','tabindex'=>4 ) );
// EAS
?>
</td>
</tr>
</table>
Expand Down Expand Up @@ -432,6 +465,22 @@
$('#finish_sale_form').submit();
}
});
// SAS
$( "#finish_sale_button" ).keypress(function( event ) {
if ( event.which == 13 ) {
if (confirm('<?php echo $this->lang->line("sales_confirm_finish_sale"); ?>'))
{
$('#finish_sale_form').submit();
}
}
});

//$( "#amount_tendered" ).keypress(function( event ) {
//if ( event.which == 13 ) {
//$( "#finish_sale_button" ).trigger( "click" );
//}
//});
// EAS

$("#suspend_sale_button").click(function()
{
Expand Down