Add total waste and spoil in close cashier and Closing Balance မွာ Character ေတြ ရိုက္လို႕ရေန
This commit is contained in:
@@ -24,14 +24,14 @@
|
||||
<span style='font-size:20px;'><b><%= t :closing_balance %></b></span>
|
||||
</div>
|
||||
<div class='col-md-6'>
|
||||
<span style='font-size:20px;'><b><input type='text' class="form-control" id='closing_balance_amount' value=''></b></span>
|
||||
<span style='font-size:20px;'><b><input type='number' class="form-control" id='closing_balance_amount' value='' onkeypress="return isNumberKey(event);" onkeyup="notNegative(this.value);"></b></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<button type="button" class="btn bg-default btn-block" id='back'><i class="material-icons">reply</i> <%= t("views.btn.back") %> </button>
|
||||
<button type="button" class="btn bg-blue btn-block green" id='close_cashier'> <%= t("views.btn.close_cashier") %> </button>
|
||||
<% if @bank_integration == '1' %>
|
||||
<% if @bank_integration == '1' && @cashier_type!="ordering" %>
|
||||
<button type="button" class="btn bg-blue btn-block green" id="card_settlement"> <%= t("views.btn.card_settle") %> </button>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -58,6 +58,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function isNumberKey(evt) {
|
||||
var charCode = (evt.which) ? evt.which : event.keyCode;
|
||||
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function greaterThanOne(val){
|
||||
if(parseInt(val)==0) $("#closing_balance_amount").val(1);
|
||||
}
|
||||
|
||||
var cashier_type = '<%= @cashier_type %>';
|
||||
$('#close_cashier').on('click',function(){
|
||||
var amount = $('#closing_balance_amount').val();
|
||||
@@ -73,10 +87,12 @@
|
||||
});
|
||||
|
||||
$('#back').on('click',function(){
|
||||
if(cashier_type!='quick_service'){
|
||||
if(cashier_type=='cashier'){
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
}else if(cashier_type=='quick_service'){
|
||||
window.location.href = '/origami/quick_service';
|
||||
}else{
|
||||
window.location.href = '/origami/order_reservation';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user