bookyt_salary 0.14.6 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module SalaryBookingTemplateHelper
2
2
  def saldo_inclusion_flag_collection
3
- SalaryBookingTemplate.saldo_inclusion_flags.map{|flag| [t('activerecord.attributes.salary_booking_template.saldo_inclusion_flags.' + flag), flag]}
3
+ SalaryBookingTemplate.saldo_inclusion_flags.map{|flag| [flag, flag]}
4
4
  end
5
5
 
6
6
  def amount_relates_to_collection
@@ -1,7 +1,7 @@
1
1
  class SalaryBookingTemplate < BookingTemplate
2
2
  # Obligation flags
3
3
  def self.saldo_inclusion_flags
4
- ['gross_income', 'net_income', 'payment', 'ahv', 'uvg', 'uvgz', 'ktg', 'deduction_at_source']
4
+ SalaryBookingTemplate.tag_counts_on(:include_in_saldo).pluck(:name)
5
5
  end
6
6
 
7
7
  def to_s
@@ -14,7 +14,7 @@
14
14
  .span16= f.input :comments, :input_html => {:rows => 2, :class => 'span12'}
15
15
 
16
16
  .row
17
- .span8= f.input :include_in_saldo_list, :as => :check_boxes, :collection => saldo_inclusion_flag_collection
17
+ .span16= f.input :include_in_saldo_list, :input_html => {:class => 'span12'}
18
18
 
19
19
  .row
20
20
  .span8= f.input :salary_declaration_code
@@ -7,7 +7,7 @@
7
7
  %th.currency= t_attr 'amount', SalaryBookingTemplate
8
8
  %th= t_attr :amount_relates_to, SalaryBookingTemplate
9
9
  - SalaryBookingTemplate.saldo_inclusion_flags.each do |flag|
10
- %th= t('activerecord.attributes.salary_booking_template.saldo_inclusion_flags.' + flag)
10
+ %th= flag
11
11
  %th.right= t_attr :salary_declaration_code, SalaryBookingTemplate
12
12
 
13
13
  = render @salary_booking_templates
@@ -12,15 +12,6 @@ de:
12
12
  employer: Arbeitgeber
13
13
  employee: Arbeitnehmer
14
14
  salary_booking_template:
15
- saldo_inclusion_flags:
16
- ahv: AHV
17
- ktg: KTG
18
- gross_income: Bruttolohn
19
- net_income: Nettolohn
20
- payment: Auszahlung
21
- uvg: UVG
22
- uvgz: UVGZ
23
- deduction_at_source: Quellensteuer
24
15
  include_in_saldo_list: Pflichtigkeit
25
16
  salary_declaration_code: Lohnausweis
26
17
  salary_template:
@@ -0,0 +1,21 @@
1
+ class SwitchToTranslatedSaldoInclusionFlags < ActiveRecord::Migration
2
+ def up
3
+ ActsAsTaggableOn::Tag.where(:name => 'ahv').update_all(:name => 'AHV')
4
+ ActsAsTaggableOn::Tag.where(:name => 'ktg').update_all(:name => 'KTG')
5
+ ActsAsTaggableOn::Tag.where(:name => 'gross_income').update_all(:name => 'Bruttolohn')
6
+ ActsAsTaggableOn::Tag.where(:name => 'net_income').update_all(:name => 'Nettolohn')
7
+ ActsAsTaggableOn::Tag.where(:name => 'payment').update_all(:name => 'Auszahlung')
8
+ ActsAsTaggableOn::Tag.where(:name => 'uvg').update_all(:name => 'UVG')
9
+ ActsAsTaggableOn::Tag.where(:name => 'uvgz').update_all(:name => 'UVGZ')
10
+ ActsAsTaggableOn::Tag.where(:name => 'deduction_at_source').update_all(:name => 'Quellensteuer')
11
+
12
+ SalaryBookingTemplate.where(:amount_relates_to => 'ahv').update_all(:amount_relates_to => 'AHV')
13
+ SalaryBookingTemplate.where(:amount_relates_to => 'ktg').update_all(:amount_relates_to => 'KTG')
14
+ SalaryBookingTemplate.where(:amount_relates_to => 'gross_income').update_all(:amount_relates_to => 'Bruttolohn')
15
+ SalaryBookingTemplate.where(:amount_relates_to => 'net_income').update_all(:amount_relates_to => 'Nettolohn')
16
+ SalaryBookingTemplate.where(:amount_relates_to => 'payment').update_all(:amount_relates_to => 'Auszahlung')
17
+ SalaryBookingTemplate.where(:amount_relates_to => 'uvg').update_all(:amount_relates_to => 'UVG')
18
+ SalaryBookingTemplate.where(:amount_relates_to => 'uvgz').update_all(:amount_relates_to => 'UVGZ')
19
+ SalaryBookingTemplate.where(:amount_relates_to => 'deduction_at_source').update_all(:amount_relates_to => 'Quellensteuer')
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module BookytSalary
2
- VERSION = '0.14.6'
2
+ VERSION = '0.15.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookyt_salary
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 35
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 14
9
- - 6
10
- version: 0.14.6
8
+ - 15
9
+ - 0
10
+ version: 0.15.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: 2012-01-30 00:00:00 Z
18
+ date: 2012-02-01 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -147,6 +147,7 @@ files:
147
147
  - db/migrate/20120118155137_add_position_to_salary_item.rb
148
148
  - db/migrate/20120119081622_add_missing_salary_indices.rb
149
149
  - db/migrate/20120119223948_port_obligation_flags_to_tags.rb
150
+ - db/migrate/20120201104444_switch_to_translated_saldo_inclusion_flags.rb
150
151
  - db/seeds.rb
151
152
  - lib/bookyt_salary.rb
152
153
  - lib/bookyt_salary/navigation.rb