update origami js and index

This commit is contained in:
Aung Myo
2017-06-12 15:39:38 +06:30
parent dc51beae43
commit 622aa4f121
2 changed files with 5 additions and 2 deletions

View File

@@ -181,7 +181,6 @@ $(document).ready(function(){
}else{
var sale_id = $(".selected-item").find(".order-cid").text();
}
alert(sale_id);
window.location.href = '/origami/'+ sale_id + "/add_customer"
return false;

View File

@@ -28,10 +28,12 @@
# ToDo no need check new
# Assigned Id for new Order? Sale?
unique_id=""
customer_id=""
# For CSS- Class for Order? Sale?
sale_status=""
if cpo.order_status == 'new'
unique_id=cpo.booking_id
customer_id=cpo.order_customer_id
# check selected item and assign
if @selected_item != nil
if cpo.order_id == @selected_item.order_id
@@ -40,6 +42,7 @@
end
else
unique_id=cpo.sale_id
customer_id=cpo.sale_customer_id
sale_status="paid"
# check selected item and assign
if @selected_item != nil
@@ -52,7 +55,8 @@
<div class="card orders <%= sale_status %>">
<div class="card-block">
<p class="hidden orders-id"><%= unique_id %></p>
<p class="hidden customer-id"><%= bko.customer_id %></p>
<p class="hidden customer-id"><%= customer_id %></p>
<p class="hidden order-cid"><%= cpo.order_id %></p>
<h4 class="card-title orders-table"><%= cpo.table_name %></h4>
<p class="card-text">
Receipt No :