confirm_payments.js.erb 540 B

12345678910111213
  1. <% if @sale.present? %>
  2. window.location = "<%= new_sale_path %>";
  3. $("#notice").html("<%= flash[:notice] %>");
  4. var ticket_window = window.open("<%= print_receipt_path(@sale.id, format: 'pdf') %>", 'New tab', '' );
  5. ticket_window.print();
  6. <% elsif @products_return.present? %>
  7. window.location = "<%= products_returns_path %>";
  8. $("#notice").html("<%= flash[:notice] %>");
  9. var ticket_window = window.open("<%= print_return_receipt_path(@products_return.id, format: 'pdf') %>", 'New tab', '' );
  10. ticket_window.print();
  11. <% end %>