瀏覽代碼

now, redirect to new sale view instead of index

Jose Miguel Ledon Nieblas 8 年之前
父節點
當前提交
c8b88be36a

+ 1 - 1
app/views/cash_registers_moves/confirm_payments.js.erb

@@ -1,5 +1,5 @@
 <% if @sale.present? %>
-	window.location = "<%= sales_path %>";
+	window.location = "<%= new_sale_path %>";
 	$("#notice").html("<%= flash[:notice] %>");
 	var ticket_window = window.open("<%= print_receipt_path(@sale.id, format: 'pdf') %>", 'New tab', '' );
 	ticket_window.print();

+ 1 - 1
app/views/cash_registers_moves/confirm_reserve.js.erb

@@ -1,4 +1,4 @@
-window.location = "<%= sales_reserved_path %>"; 
+window.location = "<%= new_sale_path %>";
 $("#notice").html("<%= flash[:notice] %>");
 var ticket_window = window.open("<%= print_reserve_receipt_path(@sale.id, format: 'pdf') %>", 'New tab', '' );
 ticket_window.print();

+ 1 - 1
app/views/sales/create.js.erb

@@ -6,6 +6,6 @@ $("#error_explanation_for_sale").html("")
     <% end %>
     window.scrollTo(0,0);
 <% else %>
-  	window.location = "<%= sales_path %>"; 
+  	window.location = "<%= new_sale_path %>";
 	$("#notice").html("<%= flash[:notice] %>");
 <% end %>

+ 2 - 2
app/views/sales/create_credit_sale.js.erb

@@ -1,4 +1,4 @@
-var ticket_window = window.open("<%= print_credit_receipt_path(:sale_id => @sale.id, format: 'pdf') %>", 'New tab', '' );	
-	window.location = "<%= sales_path %>"; 
+var ticket_window = window.open("<%= print_credit_receipt_path(:sale_id => @sale.id, format: 'pdf') %>", 'New tab', '' );
+	window.location = "<%= new_sale_path %>";
 $("#notice").html("<%= flash[:notice] %>");