Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into ui_ux_changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!-- Column One -->
|
||||
<div class="row clearfix" style="margin-top:-50px !important">
|
||||
<div class="row clearfix" style="">
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
<div class="body p-l-10">
|
||||
<div class="row clearfix">
|
||||
@@ -20,7 +20,6 @@
|
||||
<select class="form-control select tables" name="table_id" id="tables">
|
||||
<option value="">Select Table</option>
|
||||
<% @tables.each do |table| %>
|
||||
|
||||
<option value="<%= table.id %>" data-id="<%= table.id %>"> <%= table.name %></option>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -332,10 +332,10 @@
|
||||
<td class="charges-name"><strong>Tax:
|
||||
(<% @i = 0
|
||||
@account_arr.each do |ct| %>
|
||||
<%=ct.name%>
|
||||
<% if @account_arr.count != @i+1%>
|
||||
+ <% @i =+1 %>
|
||||
<%end%>
|
||||
<%=ct.name%>
|
||||
<% if @account_arr.count != @i+1%>
|
||||
+ <% @i =+1 %>
|
||||
<%end%>
|
||||
<%end %>)
|
||||
</strong></td>
|
||||
<td class="item-attr"><strong id="order-Tax"><%= @obj_sale.total_tax rescue 0 %></strong></td>
|
||||
@@ -424,6 +424,7 @@
|
||||
<i class="material-icons">reply</i>
|
||||
<%= t("views.btn.back") %>
|
||||
</button>
|
||||
<a href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect" style="height: 45px">Customer View</a>
|
||||
<button type="button" id="add_order" class="btn btn-block bg-blue waves-effect"><%= t("views.btn.add") %> <%= t("views.right_panel.detail.order") %></button>
|
||||
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
||||
<% if @dining.status != "available" %>
|
||||
|
||||
@@ -501,6 +501,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
|
||||
$("#back").on('click', function() {
|
||||
localStorage.removeItem('cash');
|
||||
customer_display_view(null,"reload");
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami/table/'+ dining_id;
|
||||
}else{
|
||||
@@ -608,6 +609,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
$("#changed_amount").text('Changed amount ' + parseFloat($('#balance').text() * (-1)));
|
||||
<% end %>
|
||||
}
|
||||
|
||||
//PDF lightbox data
|
||||
// if($('#balance').text() < 0){
|
||||
// swal({
|
||||
@@ -684,6 +686,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
url: ajax_url,
|
||||
data: "remark="+ remark + "&sale_id=" + sale_id,
|
||||
success: function () {
|
||||
customer_display_view(null,"reload");
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
@@ -841,6 +844,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function update_balance(){
|
||||
var cash = $('#cash').text();
|
||||
var credit = $('#credit').text();
|
||||
@@ -884,7 +888,8 @@ var customer_name = "<%= @customer.name %>";
|
||||
type: "POST",
|
||||
url: "<%= origami_payment_foc_path %>",
|
||||
data: params,
|
||||
success:function(result){
|
||||
success:function(result){
|
||||
customer_display_view(null,"reload");
|
||||
if (cash >= 0) {
|
||||
swal({
|
||||
title: "Information!",
|
||||
@@ -907,6 +912,17 @@ var customer_name = "<%= @customer.name %>";
|
||||
}
|
||||
});
|
||||
|
||||
function customer_display_view(data,status) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '../../../customer_view',
|
||||
data: {"data":data,"status":status},
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function calculate_member_discount(sale_id) {
|
||||
var sub_total = $('#sub-total').text();
|
||||
var member_id = $('#membership_id').text();
|
||||
@@ -958,6 +974,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
window.location.href = '/origami';
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service';
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
60
app/views/origami/second_display/_second_display.html.erb
Normal file
60
app/views/origami/second_display/_second_display.html.erb
Normal file
@@ -0,0 +1,60 @@
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-text" >
|
||||
<div id="order-detail-slimscroll" data-height="150">
|
||||
<table class="table table-striped second_display_items" id="order-items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>#</th>
|
||||
<th class="item-name">Items</th>
|
||||
<th class="item-">QTY</th>
|
||||
<th class="item-">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<table class="table" border="0">
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Sub Total:</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="item-attr"><strong id="s_sub_total">0.00</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Discount Amount:</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="item-attr"><strong id="s_total_discount">0.00</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Tax Amount:</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="item-attr"><strong id="s_tatal_tax">0.00</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="charges-name"><strong>Grand:</strong></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="item-attr"><strong id="s_grand_total">0.00</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<%= image_tag("slider/s2.jpg", :alt => "rss feed") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
18
app/views/origami/second_display/_slider.html.erb
Normal file
18
app/views/origami/second_display/_slider.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<%= stylesheet_link_tag 'wow_style', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'wowslider', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'wow_script', 'data-turbolinks-track': 'reload' %>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div id="wowslider-container" style="max-width: 100%;">
|
||||
<div class="ws_images full_screen">
|
||||
<ul>
|
||||
<li><%= image_tag("slider/s1.jpg", :alt => "rss feed") %></li>
|
||||
<li><%= image_tag("slider/s2.jpg", :alt => "rss feed") %></li>
|
||||
<li><%= image_tag("slider/s4.jpg", :alt => "rss feed") %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ws_bullets"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
19
app/views/origami/second_display/index.html.erb
Normal file
19
app/views/origami/second_display/index.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="container-fluid">
|
||||
<button type="button" class="hidden" id="s_reload">Reload</button>
|
||||
<div class="slider" id="second_display_slider">
|
||||
<%= render 'slider' %>
|
||||
</div>
|
||||
|
||||
<div class="item hidden" id="second_display_items">
|
||||
<%= render 'second_display' %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#s_reload').on('click', function () {
|
||||
window.location.href = '/origami/second_display';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
3
app/views/origami/split_bill/index.html.erb
Executable file → Normal file
3
app/views/origami/split_bill/index.html.erb
Executable file → Normal file
@@ -387,7 +387,8 @@
|
||||
$('#order_item_split').on('click',function () {
|
||||
var cnt_order_item = "<%= @order_items.count %>";
|
||||
var order_items = get_selected_order_items();// Selected Order Items
|
||||
var cnt_items = parseInt(cnt_order_item) - parseInt(order_items.length);
|
||||
|
||||
var cnt_items = parseInt(cnt_order_item - 1) - parseInt(order_items.length);
|
||||
if (order_items.length > 0){
|
||||
// if(cnt_items > 0){
|
||||
swal({
|
||||
|
||||
76
app/views/origami/table_invoices/show.html.erb
Executable file → Normal file
76
app/views/origami/table_invoices/show.html.erb
Executable file → Normal file
@@ -157,11 +157,59 @@
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<button id="back" type="button" class="btn btn-block btn-lg bg-default"> <i class="material-icons">reply</i> <%= t("views.btn.back") %>
|
||||
<button type="button" id="pay" class="btn bg-blue btn-block">Pay</button>
|
||||
<button type="button" class="btn bg-deep-purple btn-block" id="foc" active="<%= can? :foc, :payment %>"> FOC </button>
|
||||
<button type="button" id="void" class="btn bg-danger btn-block" active="<%= can? :overall_void, :void %>" > Void </button>
|
||||
<button type="button" class="btn bg-deep-purple btn-block" data-toggle="modal" data-target="#focModal" <%= (can? :foc, :payment)? ' ': 'disabled=' %> active="true"> FOC </button>
|
||||
<button type="button" data-toggle="modal" data-target="#voidModal" class="btn bg-danger btn-block" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="voidModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="voidModalLabel">Please Enter Reason for Void</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="textarea" name="remark" class="form-control col-md-12 remark" id="remark">
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-red waves-effect " id="void" active="true">VOID</button>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="focModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="focModalLabel">Please Enter Reason for FOC</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="textarea" name="remark" class="form-control col-md-12 remark" id="foc_remark">
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link bg-red waves-effect " id="foc" active="true">FOC</button>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link bg-blue waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".tables").on('click', function(){
|
||||
@@ -177,17 +225,18 @@ $(document).ready(function(){
|
||||
$('#pay').on('click',function() {
|
||||
var sale_id = '<%= @sale.id %>';
|
||||
|
||||
var url = '<%= @calculate_rouding_adj_path %>';
|
||||
// var url = '<%= @calculate_rouding_adj_path %>';
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
success:function(result){
|
||||
// location.reload();
|
||||
}
|
||||
});
|
||||
// $.ajax({
|
||||
// type: "GET",
|
||||
// url: url,
|
||||
// success:function(result){
|
||||
// // console.log(result);
|
||||
// }
|
||||
// });
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/cashier/payment";
|
||||
});
|
||||
|
||||
$('#back').on('click',function(){
|
||||
var lookup_split_bill = '<%= @split_bill %>';
|
||||
if(lookup_split_bill == '1'){
|
||||
@@ -211,10 +260,12 @@ $('#void').on('click',function () {
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
var sale_id = $('#sale_id').val();
|
||||
var remark = $("#remark").val();
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
data: "remark="+ remark + "&sale_id=" + sale_id,
|
||||
success: function () {
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
@@ -227,13 +278,14 @@ $('#void').on('click',function () {
|
||||
});
|
||||
|
||||
$('#foc').click(function() {
|
||||
var remark = $("#foc_remark").val();
|
||||
var cash = $('#grand_total').text();
|
||||
var sub_total = $('#sub_total').text();
|
||||
var sale_id = '';
|
||||
if($('.receipt_block > div').hasClass('selected-item')){
|
||||
sale_id = $('.receipt_block > div.selected-item').parent().attr('data-id');
|
||||
}
|
||||
var params = { 'cash':cash,'sale_id':sale_id,'sub_total':sub_total };
|
||||
var params = { 'cash':cash,'sale_id':sale_id,'sub_total':sub_total,'remark':remark,'type':'cashier' };
|
||||
// console.log(sale_id);
|
||||
if(sale_id != ''){
|
||||
if ($(this).attr('active')=== "true") {
|
||||
@@ -247,7 +299,7 @@ $('#foc').click(function() {
|
||||
title: "Information!",
|
||||
text: 'Thank You !',
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user