spree_invoice 1.1.12 → 1.1.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ module Spree
5
5
  @order = Order.find_by_id(params[:order_id])
6
6
  @order.create_invoice(:user => @order.user)
7
7
  @address = @order.bill_address
8
- @invoice_print = current_user.has_role?(:admin) ? Spree::Invoice.find_or_create_by_order_id({:order_id => order_id, :user_id => @order ? @order.user_id : nil}) : current_user.invoices.find_or_create_by_order_id(order_id)
8
+ @invoice_print = current_user.has_role?(:admin) ? Spree::Invoice.find_or_create_by_order_id({:order_id => @order.id, :user_id => @order ? @order.user_id : nil}) : current_user.invoices.find_or_create_by_order_id(@order.id)
9
9
  if @invoice_print
10
10
  respond_to do |format|
11
11
  format.pdf { send_data @invoice_print.generate_pdf, :filename => "#{@invoice_print.invoice_number}.pdf", :type => 'application/pdf' }
@@ -1,3 +1,3 @@
1
1
  module SpreeInvoice
2
- VERSION = "1.1.12"
2
+ VERSION = "1.1.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_invoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.1.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-12-07 00:00:00.000000000 Z
14
+ date: 2013-01-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: spree_core