back btn for pending
This commit is contained in:
@@ -1091,7 +1091,12 @@ $(function() {
|
|||||||
if (type == true) {
|
if (type == true) {
|
||||||
var table_type = $('#table_id').find("option:selected").data('type');
|
var table_type = $('#table_id').find("option:selected").data('type');
|
||||||
var table_id = $('#table_id').val();
|
var table_id = $('#table_id').val();
|
||||||
|
if(window.location.href.includes("modify_order")){
|
||||||
|
var link_url = window.location.href.split("/");
|
||||||
|
window.location.href = "/origami/quick_service/pending_order/"+link_url[link_url.length - 1];
|
||||||
|
}else{
|
||||||
window.location.href = "/origami/dashboard";
|
window.location.href = "/origami/dashboard";
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
var table_type = $('#table_type').text();
|
var table_type = $('#table_type').text();
|
||||||
var table_id = $('#table_id').text();
|
var table_id = $('#table_id').text();
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ class PrintSetting < ApplicationRecord
|
|||||||
validates_presence_of :name, :unique_code, :printer_name, :api_settings, :page_width, :page_height, :print_copies, :header_font_size, :item_font_size
|
validates_presence_of :name, :unique_code, :printer_name, :api_settings, :page_width, :page_height, :print_copies, :header_font_size, :item_font_size
|
||||||
|
|
||||||
def self.get_precision_delimiter
|
def self.get_precision_delimiter
|
||||||
PrintSetting.find_by_unique_code("ReceiptBillPdf")
|
PrintSetting.find_by_unique_code("CloseCashierPdf")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -550,7 +550,7 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if sale_data.payment_status == "foc"
|
if sale_data.payment_status == "foc" || sale_data.payment_status == "waste" || sale_data.payment_status == "spoile"
|
||||||
|
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
@@ -560,12 +560,19 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if sale_data.payment_status == "foc"
|
||||||
bounding_box([self.label_width,y_position], :width =>self.description_width) do
|
bounding_box([self.label_width,y_position], :width =>self.description_width) do
|
||||||
move_down 73
|
move_down 73
|
||||||
text "Acknowledged By" , :size => self.item_font_size,:align => :center
|
text "Acknowledged By" , :size => self.item_font_size,:align => :center
|
||||||
end
|
end
|
||||||
|
elsif sale_data.payment_status == "waste" || sale_data.payment_status == "spoile"
|
||||||
|
bounding_box([self.label_width,y_position], :width =>self.description_width) do
|
||||||
|
move_down 73
|
||||||
|
text "Approved By" , :size => self.item_font_size,:align => :center
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -346,12 +346,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
|
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
|
||||||
<% if @cashier_type!="quick_service" %>
|
|
||||||
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
|
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
|
||||||
<i class="material-icons">reply</i>
|
<i class="material-icons">reply</i>
|
||||||
Back
|
Back
|
||||||
</button>
|
</button>
|
||||||
<% end %>
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<% if current_login_employee.role == "cashier" %>
|
<% if current_login_employee.role == "cashier" %>
|
||||||
<a class="btn btn-block bg-deep-purple waves-effect access_modal" data-toggle="modal" data-type="foc"> FOC</a>
|
<a class="btn btn-block bg-deep-purple waves-effect access_modal" data-toggle="modal" data-type="foc"> FOC</a>
|
||||||
@@ -603,10 +601,11 @@ var customer_name = "<%= @customer.name %>";
|
|||||||
$("#back").on('click', function() {
|
$("#back").on('click', function() {
|
||||||
localStorage.removeItem('cash');
|
localStorage.removeItem('cash');
|
||||||
customer_display_view(null,"reload");
|
customer_display_view(null,"reload");
|
||||||
|
var sale_id = $('#sale_id').text();
|
||||||
if (cashier_type=="cashier") {
|
if (cashier_type=="cashier") {
|
||||||
window.location.href = '/origami/table/'+ dining_id;
|
window.location.href = '/origami/table/'+ dining_id;
|
||||||
}else{
|
}else{
|
||||||
window.location.href = '/origami/quick_service';
|
window.location.href = '/origami/quick_service/pending_order/'+sale_id;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||||
<% if current_user.role != "waiter" || @status != "sale"%>
|
<% if current_user.role != "waiter" || @status != "sale"%>
|
||||||
<button type="button" id="addorder" class="btn bg-blue btn-block">Add Order</button>
|
<button type="button" id="addorder" class="btn bg-blue btn-block">Update Order</button>
|
||||||
<%end%>
|
<%end%>
|
||||||
<!-- <% if @status != "order"%>
|
<!-- <% if @status != "order"%>
|
||||||
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
||||||
@@ -215,10 +215,11 @@ $(document).ready(function(){
|
|||||||
$('#addorder').on('click', function () {
|
$('#addorder').on('click', function () {
|
||||||
var table_id = "<%=@table_id%>";
|
var table_id = "<%=@table_id%>";
|
||||||
var booking_id = "<%=@bookings.booking_id%>";
|
var booking_id = "<%=@bookings.booking_id%>";
|
||||||
|
var sale_id = $("#sale_id").val();
|
||||||
if (table_id) {
|
if (table_id) {
|
||||||
window.location.href = '/origami/quick_service/modify_order/' + table_id+"/"+$('#sale_id').val();
|
window.location.href = '/origami/quick_service/modify_order/' + table_id+"/"+sale_id;
|
||||||
}else{
|
}else{
|
||||||
window.location.href = '/origami/quick_service/modify_order/'+ booking_id+"/" +$('#sale_id').val();
|
window.location.href = '/origami/quick_service/modify_order/'+ booking_id+"/" +sale_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ class ActionController::Base
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
#check for license file
|
#check for license file
|
||||||
# if check_license
|
if check_license
|
||||||
# current_license(ENV["SX_PROVISION_URL"])
|
current_license(ENV["SX_PROVISION_URL"])
|
||||||
# else
|
else
|
||||||
# redirect_to activate_path
|
redirect_to activate_path
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user