Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -913,7 +913,7 @@
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/cashier/void';
|
||||
var remark = $("#remark").val();
|
||||
|
||||
$.ajax({
|
||||
|
||||
@@ -705,7 +705,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
if (isConfirm) {
|
||||
var sale_id = $('#sale_id').text();
|
||||
var remark = $("#remark").val();
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
var ajax_url = "/origami/sale/" + sale_id +'/'+cashier_type+ '/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
@@ -913,7 +913,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
if (isConfirm) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%= origami_payment_foc_path %>",
|
||||
url: "/origami/payment/"+cashier_type+"/foc",
|
||||
data: params,
|
||||
success:function(result){
|
||||
customer_display_view(null,"reload");
|
||||
|
||||
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
@@ -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 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%>
|
||||
@@ -210,7 +212,7 @@ $(document).ready(function(){
|
||||
swal("Information!", result.error_message);
|
||||
}
|
||||
else {
|
||||
location.reload();
|
||||
window.location.href = '/origami/quick_service/pending_order';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -889,7 +889,7 @@ $('#add_invoice').on('click',function(){
|
||||
var sure = confirm("Are you sure want to Void");
|
||||
if (sure == true) {
|
||||
var sale_id = $('#sale_id').val();
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/cashier/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
|
||||
@@ -331,7 +331,7 @@ var cashier_type = "<%= @cashier_type %>";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_id=' + sale_id,
|
||||
data: 'sale_id=' + sale_id +'&type='+cashier_type,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
}
|
||||
@@ -345,7 +345,7 @@ var cashier_type = "<%= @cashier_type %>";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_id=' + sale_id,
|
||||
data: 'sale_id=' + sale_id+'&type='+cashier_type,
|
||||
success: function (result) {
|
||||
if (cashier_type=="quick_service") {
|
||||
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
|
||||
|
||||
@@ -261,7 +261,7 @@ $('#void').on('click',function () {
|
||||
if (isConfirm) {
|
||||
var sale_id = $('#sale_id').val();
|
||||
var remark = $("#remark").val();
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/cashier/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
@@ -291,7 +291,7 @@ $('#foc').click(function() {
|
||||
if ($(this).attr('active')=== "true") {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<%= origami_payment_foc_path %>",
|
||||
url: "/origami/payment/cashier/foc",
|
||||
data: params,
|
||||
success:function(result){
|
||||
if (cash >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user