bookyt_stock 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,9 +34,6 @@ class StocksController < AuthorizedController
34
34
  end
35
35
 
36
36
  def write_downs
37
- # use current date if not specified otherwise
38
- params[:profit] ||= {}
39
-
40
37
  # use current date if not specified otherwise
41
38
  if params[:by_value_period]
42
39
  @end_date = Date.parse(params[:by_value_period][:to])
@@ -0,0 +1,10 @@
1
+ module BookytStock
2
+ module Invoice
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ has_many :stocks, :foreign_key => :purchase_invoice_id
7
+ end
8
+ end
9
+ end
10
+
@@ -0,0 +1,8 @@
1
+ .contextual
2
+ = icon_link_to :new, new_invoice_stock_path(resource, :stock => {:purchase_invoice_id => resource.id}), :remote => true
3
+ %h3= t('title.assets')
4
+
5
+ #assets_list
6
+ - unless resource.stocks.empty?
7
+ %table.list
8
+ = render :partial => 'stock', :collection => resource.stocks
@@ -0,0 +1,4 @@
1
+ %tr[stock]
2
+ %td= link_to stock.title, stock, {'data-href-container' => 'tr'}
3
+ %td= link_to stock.direct_account, stock.direct_account
4
+ %td.currency= currency_fmt(stock.amount)
@@ -6,5 +6,9 @@ module BookytStock
6
6
  initializer :after_initialize do |app|
7
7
  app.config.bookyt.engines << 'bookyt_stock'
8
8
  end
9
+
10
+ config.to_prepare do
11
+ ::Invoice.send :include, BookytStock::Invoice
12
+ end
9
13
  end
10
14
  end
@@ -1,3 +1,3 @@
1
1
  module BookytStock
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookyt_stock
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
4
+ hash: 19
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-03 00:00:00 +02:00
18
+ date: 2011-08-05 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -31,7 +31,10 @@ files:
31
31
  - app/assets/stylesheets/bookyt_stock.sass
32
32
  - app/controllers/stocks_controller.rb
33
33
  - app/helpers/stock_helper.rb
34
+ - app/models/bookyt_stock/invoice.rb
34
35
  - app/models/stock.rb
36
+ - app/views/bookyt_stock/invoices/_show.html.haml
37
+ - app/views/bookyt_stock/invoices/_stock.html.haml
35
38
  - app/views/stocks/_form.html.haml
36
39
  - app/views/stocks/_list.html.haml
37
40
  - app/views/stocks/_sidebar.html.haml
@@ -76,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
79
  requirements: []
77
80
 
78
81
  rubyforge_project:
79
- rubygems_version: 1.5.2
82
+ rubygems_version: 1.3.7
80
83
  signing_key:
81
84
  specification_version: 3
82
85
  summary: Stock plugin for bookyt