bookyt_salary 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/salaries_controller.rb +2 -2
- data/app/models/salary.rb +2 -2
- data/app/views/salaries/index.html.haml +3 -0
- data/lib/bookyt_salary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b8b2d458d924066900a670fb1078e04c29fe4ec
|
4
|
+
data.tar.gz: b6fec30785878fd5ed0395b2ab82f24257505a6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
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 :
|
132
|
+
scope :by_employee, lambda {|value| where(:company_id => value)}
|
133
133
|
|
134
134
|
# Accounts
|
135
135
|
# ========
|
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.
|
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-
|
11
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|