Pull from master
This commit is contained in:
0
app/views/origami/pending_order/index.html.erb
Executable file → Normal file
0
app/views/origami/pending_order/index.html.erb
Executable file → Normal file
18
app/views/origami/pending_order/show.html.erb
Executable file → Normal file
18
app/views/origami/pending_order/show.html.erb
Executable file → Normal file
@@ -97,13 +97,15 @@
|
||||
<% end%>
|
||||
<% else%>
|
||||
<% sub_total = 0
|
||||
total = 0
|
||||
@order_items.each do |order_item|
|
||||
sub_total = sub_total + order_item.price %>
|
||||
total = order_item.qty * order_item.price
|
||||
sub_total = sub_total + total %>
|
||||
<input type="hidden" id="sale_id" value="<%= @bookings.booking_id %>">
|
||||
<tr>
|
||||
<tr class="edit_order" data-id='<%= order_item.order_items_id %>'>
|
||||
<td class='item-name'><%= order_item.item_name %></td>
|
||||
<td class='item-attr'><%= order_item.qty %></td>
|
||||
<td class='item-attr'><%= order_item.price %></td>
|
||||
<td class='item-attr'><%= total %></td>
|
||||
</tr>
|
||||
<% end%>
|
||||
<% end%>
|
||||
@@ -211,7 +213,7 @@ $(document).ready(function(){
|
||||
swal("Information!", result.error_message);
|
||||
}
|
||||
else {
|
||||
window.location.href = '../pending_order/'+ result.data;
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -290,5 +292,13 @@ $(document).ready(function(){
|
||||
window.location.href = linkURL;
|
||||
});
|
||||
}
|
||||
|
||||
/*edit order in oqs*/
|
||||
$('.edit_order').on('click',function(){
|
||||
var assigned_order_item_id = $(this).attr('data-id');
|
||||
if((assigned_order_item_id!=undefined) && (assigned_order_item_id!='')){
|
||||
window.location.href = '/oqs/'+ assigned_order_item_id + "/edit/pending";
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user