bookyt_salary 0.21.0 → 0.22.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3deb668d13d35a6fd748f57b475037b07bc8b33b
4
- data.tar.gz: 5b96723ac942ffd73e800e0a809c7e9659aec329
3
+ metadata.gz: 8b8b2d458d924066900a670fb1078e04c29fe4ec
4
+ data.tar.gz: b6fec30785878fd5ed0395b2ab82f24257505a6f
5
5
  SHA512:
6
- metadata.gz: bb54ed03025868ecc32fc0f0b00c90035b3da46e8116b537f76efdc3467031e0cd5d2fa6e4eef40c4d6d004e6b1e79204506ce9760ba8ab919383c97c1754447
7
- data.tar.gz: 204c8b96120b3bb4819b6f6ce92394d649c7a069ff23b14a35919ef8efb1cb0f783126eb890897e3678a86bcc1c0e08278de45b956db32b000bac5be9d828f9a
6
+ metadata.gz: 8c04875289ec0413935b21c4344211d6df0e1490e4d7c1616138536d679605036868ee7ecd507b40c570b6527a71418906fa5765bbd2661a9b1709c8bac15f68
7
+ data.tar.gz: 339e3162875b80bc879ac7a4f5e6b4ae7b991accf66e0bf6078f753fc4108ecb002d331a657752b1199c1833df3acfb4d35fe66f21e229920e2ac5e235c9eff8
@@ -2,12 +2,12 @@ class SalariesController < InvoicesController
2
2
  defaults :resource_class => Salary
3
3
 
4
4
  respond_to :html, :pdf
5
-
5
+
6
6
  # Filter/Search
7
7
  # =============
8
8
  has_scope :invoice_state, :default => nil
9
9
  has_scope :by_value_period, :using => [:from, :to], :default => proc { |c| c.session[:has_scope] }
10
- has_scope :by_employee_id
10
+ has_scope :by_employee
11
11
 
12
12
  # Actions
13
13
  # =======
data/app/models/salary.rb CHANGED
@@ -18,7 +18,7 @@ class Salary < Invoice
18
18
  def employee_id
19
19
  company_id
20
20
  end
21
-
21
+
22
22
  # Emplyoment helpers
23
23
  def employment
24
24
  employee.employments.valid_at(value_date).last
@@ -129,7 +129,7 @@ class Salary < Invoice
129
129
  # Filter/Search
130
130
  # =============
131
131
  scope :by_value_period, lambda {|from, to| where("date(value_date) BETWEEN ? AND ?", from, to) }
132
- scope :by_employee_id, lambda {|value| where(:company_id => value)}
132
+ scope :by_employee, lambda {|value| where(:company_id => value)}
133
133
 
134
134
  # Accounts
135
135
  # ========
@@ -6,3 +6,6 @@
6
6
  = paginated_section collection do
7
7
  - if collection.any?
8
8
  = render "list"
9
+
10
+ = render 'filters/by_calendar_year'
11
+ = render 'filters/by_employee'
@@ -1,3 +1,3 @@
1
1
  module BookytSalary
2
- VERSION = '0.21.0'
2
+ VERSION = '0.22.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookyt_salary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Hürlimann (CyT)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-03 00:00:00.000000000 Z
11
+ date: 2014-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails