shift sale
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
<h1>Open Cashier</h1>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<table class='table table-striped'>
|
||||
<tr>
|
||||
<th>Cashier Terminal</th>
|
||||
<th>
|
||||
<select class='form-control' id='cashier_terminal'>
|
||||
<% @terminal.each do |ter| %>
|
||||
<option value="<%= ter.id %>"><%= ter.name %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</th>
|
||||
</tr>
|
||||
<% @float.each do |float| %>
|
||||
<tr>
|
||||
<th><%= float.name %></th>
|
||||
@@ -69,10 +76,12 @@ $(document).on('focusout', '.float-value', function(event){
|
||||
|
||||
})
|
||||
$('#open_cashier').on('click',function(){
|
||||
var cashier_terminal = $('#cashier_terminal').val();
|
||||
alert(cashier_terminal)
|
||||
var amount = $('#total').text();
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_shifts_path %>",
|
||||
data: "opening_balance=" + amount,
|
||||
data: "opening_balance=" + amount + "&cashier_terminal="+ cashier_terminal,
|
||||
success:function(result){
|
||||
if(result){
|
||||
window.location.href = '/origami';
|
||||
|
||||
Reference in New Issue
Block a user