req bill bugs fixing
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
<% if @booking_orders %>
|
||||
<% @booking_orders.each do |booking_order| %>
|
||||
<% if !booking_order.order_status = 'new'%>
|
||||
<% if booking_order.order_status != "new" %>
|
||||
<div style="background-color: red;color: white;" class="card" id="table-order-<%=booking_order.sale_id%>" onclick="callOrderDetails('sale_<%=booking_order.sale_id%>')">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">
|
||||
@@ -204,14 +204,17 @@
|
||||
var old_order_id = 0
|
||||
var old_table_name = ""
|
||||
var table_or_order_id = 0
|
||||
|
||||
var pay_sale_id = 0
|
||||
|
||||
function callOrderDetails(sale_order_id){
|
||||
|
||||
var order_id = 0
|
||||
var sale_id = 0
|
||||
var data_val = ""
|
||||
sale_order = sale_order_id.split("_")[0]
|
||||
|
||||
if (sale_order == 'sale') {
|
||||
order_id = sale_order_id.split("_")[1]
|
||||
sale_id = sale_order_id.split("_")[1]
|
||||
url = "origami/"+sale_order_id.split("_")[1]
|
||||
data_val = { sale_id: sale_order_id.split("_")[1]}
|
||||
|
||||
@@ -221,7 +224,9 @@ function callOrderDetails(sale_order_id){
|
||||
data_val = { order_id: sale_order_id.split("_")[1]}
|
||||
|
||||
}
|
||||
|
||||
table_or_order_id = order_id
|
||||
pay_sale_id = sale_id
|
||||
var tbody = ""
|
||||
$("#append-table").html("")
|
||||
if (old_order_id != order_id){
|
||||
@@ -305,6 +310,7 @@ function callOrderDetails(sale_order_id){
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('#request_bills').click(function() {
|
||||
console.log(table_or_order_id);
|
||||
window.location.href = '/origami/request_bills/'+ table_or_order_id
|
||||
return false;
|
||||
});
|
||||
@@ -312,7 +318,7 @@ $( document ).ready(function() {
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('#pay').click(function() {
|
||||
window.location.href = '/origami/sale/'+ 10 + "/payment"
|
||||
window.location.href = '/origami/sale/'+ pay_sale_id + "/payment"
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user