lohnausweis 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e972c3cb76bffb2728116a69cdf8b99d2cf2aee
4
- data.tar.gz: f36f640f550c262ac2526cdd2d971e84e70ebdf8
3
+ metadata.gz: 9921dfa356202040738e98c61270732beaae5346
4
+ data.tar.gz: 847cc468ab1db7384b21dbfbf530407f90d02491
5
5
  SHA512:
6
- metadata.gz: c401421476a17a8ec854e8748ba8be94b8cd225be83dfd744c1e36b3349f3883ba1a59154d6bc760999ebe9b3c99fdc431011cc936b6142a4c5fbe898dc41e96
7
- data.tar.gz: afede2c96a459e6c148bd727a6a8dc645916e2ec7a3998ae39c4fbb03ffd7fe91bceb0ce1232ab3c212a3f322adc3b4fb45b735728616f0346535c23a880bdb8
6
+ metadata.gz: 45b702f8773730ae17e0b5aaabf1e90cc5c4a2f8f3cd06f1288894fc7656fc3c8fedfcd215d2d73bf2f9cd9f9a239eb3c105cb722a3d3eeefb6d3304c4d66ca3
7
+ data.tar.gz: f1aa6f986d0faa20143ea6897890920ca805a4f69504ae194db3bf5615250dfcccbba8bf28b38460e6fb7d3cd964709e3b3d61a3b7fb272181b64d33d080f71f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lohnausweis (0.0.1)
4
+ lohnausweis (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -35,6 +35,7 @@ module Planik
35
35
  create_abzuege_block(bruttolohn_eintrag)
36
36
  create_ferien_block
37
37
  create_arbeitszeit_block
38
+ create_arbeitsliste
38
39
  end
39
40
 
40
41
  def create_lohn_block
@@ -98,6 +99,37 @@ module Planik
98
99
  @arbeitszeit_block = Block.new(eintraege, titel)
99
100
  end
100
101
 
102
+ def create_arbeitsliste
103
+ eintraege = []
104
+ titel = ["Datum", "Dienst/Arbeit", "Typ", "Start", "Ende", "Arbeitszeit"]
105
+ eintraege << titel
106
+
107
+ @rohdaten.arbeitsliste.each do |a|
108
+ d = []
109
+ d << a.datum.strftime("%d.%m.%Y")
110
+ d << a.name
111
+ d << a.typ
112
+ d << (a.zeit_von.nil? ? nil: a.zeit_von.strftime("%H:%M"))
113
+ d << (zeit_bis_to_s(a))
114
+ d << format('%.2f', a.arbeitszeit)
115
+ eintraege << d
116
+ end
117
+ sum = 0
118
+ @rohdaten.arbeitsliste.each{|x| sum += x.arbeitszeit}
119
+ sum = format('%.2f', sum)
120
+ eintraege << ["Arbeitszeit total", nil, nil, nil, nil, sum]
121
+ @arbeitsliste = eintraege
122
+ end
123
+
124
+ def zeit_bis_to_s(a)
125
+ if a.zeit_bis.nil?
126
+ return nil
127
+ end
128
+ s = a.zeit_bis.strftime("%H:%M")
129
+ s == "00:00" ? "24:00" : s
130
+ end
131
+
132
+
101
133
  def adresse
102
134
  @rohdaten.adresse
103
135
  end
@@ -119,6 +151,10 @@ module Planik
119
151
  @arbeitszeit_block.daten
120
152
  end
121
153
 
154
+ def arbeitsliste
155
+ @arbeitsliste
156
+ end
157
+
122
158
  def start_datum
123
159
  @rohdaten.start_datum.strftime("%d.%m.%Y")
124
160
  end
@@ -128,11 +164,10 @@ module Planik
128
164
  end
129
165
 
130
166
  def jahr
131
- @rohdaten.start_datum.strftime("%Y")
167
+ @rohdaten.start_datum.strftime("%Y")
132
168
  end
133
169
 
134
170
  def monat
135
- puts I18n.load_path
136
171
  I18n.localize @rohdaten.start_datum, :format => "%B", :locale => :de
137
172
  end
138
173
 
@@ -17,7 +17,7 @@ module Planik
17
17
  # Erstellt das PDF und liefert es zurück
18
18
  def create_pdf
19
19
  @pdf = Prawn::Document.new(page_size: "A4")
20
- @pdf.stroke_axis # Die Masse auf den Achsen
20
+ #@pdf.stroke_axis # Die Masse auf den Achsen
21
21
  @pdf.font("Helvetica", size: 8) #Default Font and size
22
22
  @pdf.default_leading = 0
23
23
  next_y = 750
@@ -26,6 +26,7 @@ module Planik
26
26
  next_y = ferien_block(next_y)
27
27
  arbeitszeit_block(next_y)
28
28
  footer()
29
+ arbeitsliste()
29
30
  @pdf
30
31
  end
31
32
 
@@ -87,11 +88,52 @@ module Planik
87
88
  end
88
89
 
89
90
  def footer
90
- ypos = 18
91
+ ypos = 26
91
92
  @pdf.bounding_box([XPOS, ypos], width: WIDTH) do
92
93
  @pdf.font("Helvetica", size: 8) do
93
94
  @pdf.text("Wir bitten Sie, die Lohnabrechnung sofort zu prüfen und Unstimmigkeiten unverzüglich mitzuteilen.")
94
- @pdf.text("Anhang: Arbeitszeit vom #{@daten.start_datum} bis #{@daten.end_datum}.")
95
+ @pdf.text("Anhang: Arbeitszeit von #{@daten.start_datum} bis #{@daten.end_datum}.")
96
+ @pdf.text("Generiert von Planik am #{Time.now.strftime("%d.%m.%Y um %H:%M Uhr")}", align: :right)
97
+ end
98
+ end
99
+ end
100
+
101
+ def arbeitsliste
102
+ @pdf.start_new_page
103
+ @pdf.text("Anhang: Arbeitszeit von #{@daten.start_datum} bis #{@daten.end_datum}", style: :bold)
104
+ arbeitsliste = @daten.arbeitsliste
105
+ make_arbeitsliste_table(XPOS, 750, arbeitsliste, true)
106
+ ypos = 18
107
+ @pdf.bounding_box([XPOS, ypos], width: WIDTH) do
108
+ @pdf.font("Helvetica", size: 8) do
109
+ @pdf.text("Generiert von Planik am #{Time.now.strftime("%d.%m.%Y um %H:%M Uhr")}", align: :right)
110
+ end
111
+ end
112
+ end
113
+
114
+
115
+
116
+ def make_arbeitsliste_table(xpos, ypos, daten, title = false)
117
+ @pdf.bounding_box([xpos, ypos], width: WIDTH) do #height dynmaisch
118
+ p_width = @pdf.bounds.width
119
+ r1 = Rational(1, 6)
120
+ r2 = r1 * Rational(1, 3)
121
+ column_width = [p_width * r1, p_width * r1, p_width * r1, p_width * r1, p_width * r1, p_width * r1]
122
+ @pdf.table(daten, column_widths: column_width,
123
+ cell_style: {
124
+ borders: [], #keine Ränder
125
+ padding_top: 3, padding_bottom: 3
126
+
127
+ }
128
+ ) do |t|
129
+ if title
130
+ t.row(0).style(font_style: :bold) #Titel bold
131
+ t.row(0).background_color = "D8D8D8"
132
+ end
133
+ t.column(5).style(align: :right)
134
+ t.cells[t.row_length-1, 0].font_style = :bold
135
+ t.cells[t.row_length-1, 5].borders = [:top]
136
+ t.cells[t.row_length-1, 5].font_style = :bold
95
137
  end
96
138
  end
97
139
  end
@@ -119,11 +161,8 @@ module Planik
119
161
  t.cells[t.row_length-1, 3].borders = [:top]
120
162
  t.cells[t.row_length-1, 3].font_style = :bold
121
163
  end
122
- # @pdf.stroke_bounds
123
164
  end
124
165
  end
125
-
126
-
127
166
  end
128
167
  end
129
168
  end
@@ -60,6 +60,14 @@ module Planik
60
60
  end
61
61
  end
62
62
 
63
+ class ArbeitsItem
64
+ attr_accessor :datum, :name, :typ, :zeit_von, :zeit_bis, :arbeitszeit
65
+
66
+ def initialize(datum, name, typ, zeit_von, zeit_bis, arbeitszeit)
67
+ @datum, @name, @typ, @zeit_von, @zeit_bis, @arbeitszeit = datum, name, typ, zeit_von, zeit_bis, arbeitszeit
68
+ end
69
+ end
70
+
63
71
  attr_accessor :start_datum, :end_datum
64
72
  attr_accessor :monatslohn
65
73
  attr_accessor :adresse
@@ -71,10 +79,12 @@ module Planik
71
79
  attr_accessor :ferien
72
80
  attr_accessor :lohn_freifelder
73
81
  attr_accessor :abzug_freifelder
82
+ attr_accessor :arbeitsliste
74
83
 
75
84
  def initialize
76
85
  @lohn_freifelder = []
77
86
  @abzug_freifelder = []
87
+ @arbeitsliste = []
78
88
  yield self
79
89
 
80
90
  end
@@ -82,6 +92,7 @@ module Planik
82
92
  def add_lohn_freifeld freifeld
83
93
  lohn_freifelder << freifeld
84
94
  end
95
+
85
96
  def add_abzug_freifeld freifeld
86
97
  abzug_freifelder << freifeld
87
98
  end
@@ -1,5 +1,5 @@
1
1
  module Planik
2
2
  module Lohnausweis
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -12,204 +12,15 @@ endobj
12
12
  endobj
13
13
  3 0 obj
14
14
  << /Type /Pages
15
- /Count 1
16
- /Kids [5 0 R]
15
+ /Count 2
16
+ /Kids [5 0 R 9 0 R]
17
17
  >>
18
18
  endobj
19
19
  4 0 obj
20
- << /Length 14434
20
+ << /Length 10967
21
21
  >>
22
22
  stream
23
23
  q
24
- q
25
- /DeviceRGB cs
26
- 0.000 0.000 0.000 scn
27
- /DeviceRGB CS
28
- 0.000 0.000 0.000 SCN
29
- [1 4] 0 d
30
- 16.000 36.000 m
31
- 559.000 36.000 l
32
- S
33
- 36.000 16.000 m
34
- 36.000 805.000 l
35
- S
36
- [ ] 0 d
37
- 37.000 36.000 m
38
- 37.000 36.552 36.552 37.000 36.000 37.000 c
39
- 35.448 37.000 35.000 36.552 35.000 36.000 c
40
- 35.000 35.448 35.448 35.000 36.000 35.000 c
41
- 36.552 35.000 37.000 35.448 37.000 36.000 c
42
- 36.000 36.000 m
43
- f
44
- 137.000 36.000 m
45
- 137.000 36.552 136.552 37.000 136.000 37.000 c
46
- 135.448 37.000 135.000 36.552 135.000 36.000 c
47
- 135.000 35.448 135.448 35.000 136.000 35.000 c
48
- 136.552 35.000 137.000 35.448 137.000 36.000 c
49
- 136.000 36.000 m
50
- f
51
-
52
- BT
53
- 131 26.0 Td
54
- /F1.0 7 Tf
55
- [<313030>] TJ
56
- ET
57
-
58
- 237.000 36.000 m
59
- 237.000 36.552 236.552 37.000 236.000 37.000 c
60
- 235.448 37.000 235.000 36.552 235.000 36.000 c
61
- 235.000 35.448 235.448 35.000 236.000 35.000 c
62
- 236.552 35.000 237.000 35.448 237.000 36.000 c
63
- 236.000 36.000 m
64
- f
65
-
66
- BT
67
- 231 26.0 Td
68
- /F1.0 7 Tf
69
- [<323030>] TJ
70
- ET
71
-
72
- 337.000 36.000 m
73
- 337.000 36.552 336.552 37.000 336.000 37.000 c
74
- 335.448 37.000 335.000 36.552 335.000 36.000 c
75
- 335.000 35.448 335.448 35.000 336.000 35.000 c
76
- 336.552 35.000 337.000 35.448 337.000 36.000 c
77
- 336.000 36.000 m
78
- f
79
-
80
- BT
81
- 331 26.0 Td
82
- /F1.0 7 Tf
83
- [<333030>] TJ
84
- ET
85
-
86
- 437.000 36.000 m
87
- 437.000 36.552 436.552 37.000 436.000 37.000 c
88
- 435.448 37.000 435.000 36.552 435.000 36.000 c
89
- 435.000 35.448 435.448 35.000 436.000 35.000 c
90
- 436.552 35.000 437.000 35.448 437.000 36.000 c
91
- 436.000 36.000 m
92
- f
93
-
94
- BT
95
- 431 26.0 Td
96
- /F1.0 7 Tf
97
- [<343030>] TJ
98
- ET
99
-
100
- 537.000 36.000 m
101
- 537.000 36.552 536.552 37.000 536.000 37.000 c
102
- 535.448 37.000 535.000 36.552 535.000 36.000 c
103
- 535.000 35.448 535.448 35.000 536.000 35.000 c
104
- 536.552 35.000 537.000 35.448 537.000 36.000 c
105
- 536.000 36.000 m
106
- f
107
-
108
- BT
109
- 531 26.0 Td
110
- /F1.0 7 Tf
111
- [<353030>] TJ
112
- ET
113
-
114
- 37.000 136.000 m
115
- 37.000 136.552 36.552 137.000 36.000 137.000 c
116
- 35.448 137.000 35.000 136.552 35.000 136.000 c
117
- 35.000 135.448 35.448 135.000 36.000 135.000 c
118
- 36.552 135.000 37.000 135.448 37.000 136.000 c
119
- 36.000 136.000 m
120
- f
121
-
122
- BT
123
- 19 134.0 Td
124
- /F1.0 7 Tf
125
- [<313030>] TJ
126
- ET
127
-
128
- 37.000 236.000 m
129
- 37.000 236.552 36.552 237.000 36.000 237.000 c
130
- 35.448 237.000 35.000 236.552 35.000 236.000 c
131
- 35.000 235.448 35.448 235.000 36.000 235.000 c
132
- 36.552 235.000 37.000 235.448 37.000 236.000 c
133
- 36.000 236.000 m
134
- f
135
-
136
- BT
137
- 19 234.0 Td
138
- /F1.0 7 Tf
139
- [<323030>] TJ
140
- ET
141
-
142
- 37.000 336.000 m
143
- 37.000 336.552 36.552 337.000 36.000 337.000 c
144
- 35.448 337.000 35.000 336.552 35.000 336.000 c
145
- 35.000 335.448 35.448 335.000 36.000 335.000 c
146
- 36.552 335.000 37.000 335.448 37.000 336.000 c
147
- 36.000 336.000 m
148
- f
149
-
150
- BT
151
- 19 334.0 Td
152
- /F1.0 7 Tf
153
- [<333030>] TJ
154
- ET
155
-
156
- 37.000 436.000 m
157
- 37.000 436.552 36.552 437.000 36.000 437.000 c
158
- 35.448 437.000 35.000 436.552 35.000 436.000 c
159
- 35.000 435.448 35.448 435.000 36.000 435.000 c
160
- 36.552 435.000 37.000 435.448 37.000 436.000 c
161
- 36.000 436.000 m
162
- f
163
-
164
- BT
165
- 19 434.0 Td
166
- /F1.0 7 Tf
167
- [<343030>] TJ
168
- ET
169
-
170
- 37.000 536.000 m
171
- 37.000 536.552 36.552 537.000 36.000 537.000 c
172
- 35.448 537.000 35.000 536.552 35.000 536.000 c
173
- 35.000 535.448 35.448 535.000 36.000 535.000 c
174
- 36.552 535.000 37.000 535.448 37.000 536.000 c
175
- 36.000 536.000 m
176
- f
177
-
178
- BT
179
- 19 534.0 Td
180
- /F1.0 7 Tf
181
- [<353030>] TJ
182
- ET
183
-
184
- 37.000 636.000 m
185
- 37.000 636.552 36.552 637.000 36.000 637.000 c
186
- 35.448 637.000 35.000 636.552 35.000 636.000 c
187
- 35.000 635.448 35.448 635.000 36.000 635.000 c
188
- 36.552 635.000 37.000 635.448 37.000 636.000 c
189
- 36.000 636.000 m
190
- f
191
-
192
- BT
193
- 19 634.0 Td
194
- /F1.0 7 Tf
195
- [<363030>] TJ
196
- ET
197
-
198
- 37.000 736.000 m
199
- 37.000 736.552 36.552 737.000 36.000 737.000 c
200
- 35.448 737.000 35.000 736.552 35.000 736.000 c
201
- 35.000 735.448 35.448 735.000 36.000 735.000 c
202
- 36.552 735.000 37.000 735.448 37.000 736.000 c
203
- 36.000 736.000 m
204
- f
205
-
206
- BT
207
- 19 734.0 Td
208
- /F1.0 7 Tf
209
- [<373030>] TJ
210
- ET
211
-
212
- Q
213
24
 
214
25
  BT
215
26
  386 707.384 Td
@@ -234,12 +45,12 @@ ET
234
45
 
235
46
  BT
236
47
  416.024 679.6399999999999 Td
237
- /F2.0 12 Tf
238
- [<204f62657275747a77696c>] TJ
48
+ /F1.0 12 Tf
49
+ [<204f626572> -15 <75747a77696c>] TJ
239
50
  ET
240
51
 
241
52
  416.024 678.390 m
242
- 480.704 678.390 l
53
+ 476.216 678.390 l
243
54
  S
244
55
 
245
56
  BT
@@ -935,7 +746,7 @@ ET
935
746
  BT
936
747
  41 247.38400000000004 Td
937
748
  /F1.0 8 Tf
938
- [<476c6569747a> 15 <656974fc626572> -40 <7472> 10 <61672056> 80 <6f72> -25 <6d6f6e6174>] TJ
749
+ [<5374756e64656e73616c646f2056> 80 <6f72> -25 <6d6f6e6174>] TJ
939
750
  ET
940
751
 
941
752
  1 w
@@ -992,7 +803,7 @@ ET
992
803
  BT
993
804
  507.53599999999994 216.88800000000003 Td
994
805
  /F1.0 8 Tf
995
- [<3135332e3636>] TJ
806
+ [<3135332e3637>] TJ
996
807
  ET
997
808
 
998
809
  1 w
@@ -1001,7 +812,7 @@ ET
1001
812
  BT
1002
813
  41 201.50400000000002 Td
1003
814
  /F2.0 8 Tf
1004
- [<476c6569747a> -10 <65697473616c646f207065722033302e30362e32303134>] TJ
815
+ [<53616c646f207065722033302e30362e32303134>] TJ
1005
816
  ET
1006
817
 
1007
818
  1 w
@@ -1027,16 +838,23 @@ ET
1027
838
  S
1028
839
 
1029
840
  BT
1030
- 36 48.256 Td
841
+ 36 56.256 Td
1031
842
  /F1.0 8 Tf
1032
843
  [<5769722062697474656e20536965> 15 <2c20646965204c6f686e6162726563686e> 10 <756e6720736f66> 30 <6f72> -40 <74207a75207072> -15 <fc66> 30 <656e20756e6420556e7374696d6d69676b> 20 <656974656e20756e> 20 <76> 25 <65727afc676c696368206d69747a757465696c656e2e>] TJ
1033
844
  ET
1034
845
 
1035
846
 
1036
847
  BT
1037
- 36 39.008 Td
848
+ 36 47.008 Td
849
+ /F1.0 8 Tf
850
+ [<416e68616e673a20417262656974737a> 15 <6569742076> 25 <6f6e2030312e30362e32303134206269732033302e30362e323031342e>] TJ
851
+ ET
852
+
853
+
854
+ BT
855
+ 357.00800000000004 37.760000000000005 Td
1038
856
  /F1.0 8 Tf
1039
- [<416e68616e673a20417262656974737a> 15 <6569742076> 25 <6f6d2030312e30362e32303134206269732033302e30362e323031342e>] TJ
857
+ [<47656e6572> -15 <696572> -40 <742076> 25 <6f6e20506c616e696b20616d2030392e30352e3230313420756d2031343a303320556872>] TJ
1040
858
  ET
1041
859
 
1042
860
  Q
@@ -1069,21 +887,318 @@ endobj
1069
887
  /Encoding /WinAnsiEncoding
1070
888
  >>
1071
889
  endobj
890
+ 8 0 obj
891
+ << /Length 3304
892
+ >>
893
+ stream
894
+ q
895
+
896
+ BT
897
+ 36 800.146 Td
898
+ /F2.0 8 Tf
899
+ [<416e68616e673a20417262656974737a> -10 <6569742076> 30 <6f6e2030312e30362e32303134206269732033302e30362e32303134>] TJ
900
+ ET
901
+
902
+ /DeviceRGB cs
903
+ 0.847 0.847 0.847 scn
904
+ 36.000 770.480 83.333 15.520 re
905
+ f
906
+ 0.000 0.000 0.000 scn
907
+ 0.847 0.847 0.847 scn
908
+ 119.333 770.480 83.333 15.520 re
909
+ f
910
+ 0.000 0.000 0.000 scn
911
+ 0.847 0.847 0.847 scn
912
+ 202.667 770.480 83.333 15.520 re
913
+ f
914
+ 0.000 0.000 0.000 scn
915
+ 0.847 0.847 0.847 scn
916
+ 286.000 770.480 83.333 15.520 re
917
+ f
918
+ 0.000 0.000 0.000 scn
919
+ 0.847 0.847 0.847 scn
920
+ 369.333 770.480 83.333 15.520 re
921
+ f
922
+ 0.000 0.000 0.000 scn
923
+ 0.847 0.847 0.847 scn
924
+ 452.667 770.480 83.333 15.520 re
925
+ f
926
+ 0.000 0.000 0.000 scn
927
+ 1 w
928
+ /DeviceRGB CS
929
+ 0.000 0.000 0.000 SCN
930
+
931
+ BT
932
+ 41 775.3679999999999 Td
933
+ /F2.0 8 Tf
934
+ [<446174756d>] TJ
935
+ ET
936
+
937
+ 1 w
938
+ 0.000 0.000 0.000 SCN
939
+
940
+ BT
941
+ 124.33333333333333 775.3679999999999 Td
942
+ /F2.0 8 Tf
943
+ [<4469656e73742f417262656974>] TJ
944
+ ET
945
+
946
+ 1 w
947
+ 0.000 0.000 0.000 SCN
948
+
949
+ BT
950
+ 207.66666666666666 775.3679999999999 Td
951
+ /F2.0 8 Tf
952
+ [<54> 60 <7970>] TJ
953
+ ET
954
+
955
+ 1 w
956
+ 0.000 0.000 0.000 SCN
957
+
958
+ BT
959
+ 291.0 775.3679999999999 Td
960
+ /F2.0 8 Tf
961
+ [<53746172> -20 <74>] TJ
962
+ ET
963
+
964
+ 1 w
965
+ 0.000 0.000 0.000 SCN
966
+
967
+ BT
968
+ 374.3333333333333 775.3679999999999 Td
969
+ /F2.0 8 Tf
970
+ [<456e6465>] TJ
971
+ ET
972
+
973
+ 1 w
974
+ 0.000 0.000 0.000 SCN
975
+
976
+ BT
977
+ 491.02399999999994 775.3679999999999 Td
978
+ /F2.0 8 Tf
979
+ [<417262656974737a> -10 <656974>] TJ
980
+ ET
981
+
982
+ 1 w
983
+ 0.000 0.000 0.000 SCN
984
+
985
+ BT
986
+ 41 759.984 Td
987
+ /F1.0 8 Tf
988
+ [<30312e30362e32303134>] TJ
989
+ ET
990
+
991
+ 1 w
992
+ 0.000 0.000 0.000 SCN
993
+
994
+ BT
995
+ 124.33333333333333 759.984 Td
996
+ /F1.0 8 Tf
997
+ [<34>] TJ
998
+ ET
999
+
1000
+ 1 w
1001
+ 0.000 0.000 0.000 SCN
1002
+
1003
+ BT
1004
+ 207.66666666666666 759.984 Td
1005
+ /F1.0 8 Tf
1006
+ [<4469656e7374>] TJ
1007
+ ET
1008
+
1009
+ 1 w
1010
+ 0.000 0.000 0.000 SCN
1011
+
1012
+ BT
1013
+ 291.0 759.984 Td
1014
+ /F1.0 8 Tf
1015
+ [<30363a3435>] TJ
1016
+ ET
1017
+
1018
+ 1 w
1019
+ 0.000 0.000 0.000 SCN
1020
+
1021
+ BT
1022
+ 374.3333333333333 759.984 Td
1023
+ /F1.0 8 Tf
1024
+ [<31363a3030>] TJ
1025
+ ET
1026
+
1027
+ 1 w
1028
+ 0.000 0.000 0.000 SCN
1029
+
1030
+ BT
1031
+ 516.432 759.984 Td
1032
+ /F1.0 8 Tf
1033
+ [<382e3234>] TJ
1034
+ ET
1035
+
1036
+ 1 w
1037
+ 0.000 0.000 0.000 SCN
1038
+
1039
+ BT
1040
+ 41 744.736 Td
1041
+ /F1.0 8 Tf
1042
+ [<30322e30362e32303134>] TJ
1043
+ ET
1044
+
1045
+ 1 w
1046
+ 0.000 0.000 0.000 SCN
1047
+
1048
+ BT
1049
+ 124.33333333333333 744.736 Td
1050
+ /F1.0 8 Tf
1051
+ [<32>] TJ
1052
+ ET
1053
+
1054
+ 1 w
1055
+ 0.000 0.000 0.000 SCN
1056
+
1057
+ BT
1058
+ 207.66666666666666 744.736 Td
1059
+ /F1.0 8 Tf
1060
+ [<4469656e7374>] TJ
1061
+ ET
1062
+
1063
+ 1 w
1064
+ 0.000 0.000 0.000 SCN
1065
+
1066
+ BT
1067
+ 291.0 744.736 Td
1068
+ /F1.0 8 Tf
1069
+ [<30373a3435>] TJ
1070
+ ET
1071
+
1072
+ 1 w
1073
+ 0.000 0.000 0.000 SCN
1074
+
1075
+ BT
1076
+ 374.3333333333333 744.736 Td
1077
+ /F1.0 8 Tf
1078
+ [<32343a3030>] TJ
1079
+ ET
1080
+
1081
+ 1 w
1082
+ 0.000 0.000 0.000 SCN
1083
+
1084
+ BT
1085
+ 516.432 744.736 Td
1086
+ /F1.0 8 Tf
1087
+ [<362e3233>] TJ
1088
+ ET
1089
+
1090
+ 1 w
1091
+ 0.000 0.000 0.000 SCN
1092
+
1093
+ BT
1094
+ 41 729.488 Td
1095
+ /F1.0 8 Tf
1096
+ [<30322e30362e32303134>] TJ
1097
+ ET
1098
+
1099
+ 1 w
1100
+ 0.000 0.000 0.000 SCN
1101
+
1102
+ BT
1103
+ 124.33333333333333 729.488 Td
1104
+ /F1.0 8 Tf
1105
+ [<32>] TJ
1106
+ ET
1107
+
1108
+ 1 w
1109
+ 0.000 0.000 0.000 SCN
1110
+
1111
+ BT
1112
+ 207.66666666666666 729.488 Td
1113
+ /F1.0 8 Tf
1114
+ [<416e6465726520417262656974>] TJ
1115
+ ET
1116
+
1117
+ 1 w
1118
+ 0.000 0.000 0.000 SCN
1119
+ 1 w
1120
+ 0.000 0.000 0.000 SCN
1121
+ 1 w
1122
+ 0.000 0.000 0.000 SCN
1123
+
1124
+ BT
1125
+ 516.432 729.488 Td
1126
+ /F1.0 8 Tf
1127
+ [<362e3234>] TJ
1128
+ ET
1129
+
1130
+ 1 w
1131
+ 0.000 0.000 0.000 SCN
1132
+
1133
+ BT
1134
+ 41 714.1039999999999 Td
1135
+ /F2.0 8 Tf
1136
+ [<417262656974737a> -10 <65697420746f74616c>] TJ
1137
+ ET
1138
+
1139
+ 1 w
1140
+ 0.000 0.000 0.000 SCN
1141
+ 1 w
1142
+ 0.000 0.000 0.000 SCN
1143
+ 1 w
1144
+ 0.000 0.000 0.000 SCN
1145
+ 1 w
1146
+ 0.000 0.000 0.000 SCN
1147
+ 1 w
1148
+ 0.000 0.000 0.000 SCN
1149
+ 452.667 724.736 m
1150
+ 536.000 724.736 l
1151
+ S
1152
+ [ ] 0 d
1153
+ 1 w
1154
+ 0.000 0.000 0.000 SCN
1155
+
1156
+ BT
1157
+ 511.9839999999999 714.1039999999999 Td
1158
+ /F2.0 8 Tf
1159
+ [<32302e3731>] TJ
1160
+ ET
1161
+
1162
+
1163
+ BT
1164
+ 357.00800000000004 48.256 Td
1165
+ /F1.0 8 Tf
1166
+ [<47656e6572> -15 <696572> -40 <742076> 25 <6f6e20506c616e696b20616d2030392e30352e3230313420756d2031343a303320556872>] TJ
1167
+ ET
1168
+
1169
+ Q
1170
+
1171
+ endstream
1172
+ endobj
1173
+ 9 0 obj
1174
+ << /Type /Page
1175
+ /Parent 3 0 R
1176
+ /MediaBox [0 0 595.28 841.89]
1177
+ /Contents 8 0 R
1178
+ /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
1179
+ /Font << /F2.0 7 0 R
1180
+ /F1.0 6 0 R
1181
+ >>
1182
+ >>
1183
+ >>
1184
+ endobj
1072
1185
  xref
1073
- 0 8
1186
+ 0 10
1074
1187
  0000000000 65535 f
1075
1188
  0000000015 00000 n
1076
1189
  0000000109 00000 n
1077
1190
  0000000158 00000 n
1078
- 0000000215 00000 n
1079
- 0000014702 00000 n
1080
- 0000014894 00000 n
1081
- 0000014991 00000 n
1191
+ 0000000221 00000 n
1192
+ 0000011241 00000 n
1193
+ 0000011433 00000 n
1194
+ 0000011530 00000 n
1195
+ 0000011632 00000 n
1196
+ 0000014988 00000 n
1082
1197
  trailer
1083
- << /Size 8
1198
+ << /Size 10
1084
1199
  /Root 2 0 R
1085
1200
  /Info 1 0 R
1086
1201
  >>
1087
1202
  startxref
1088
- 15093
1203
+ 15180
1089
1204
  %%EOF
@@ -10,7 +10,7 @@ module Planik
10
10
  r.end_datum = Date.new(2014, 06, 30)
11
11
  r.adresse = Rohdaten::Adresse.new("Margherita", "Giuba", "Mauerstrasse", "34E", "3456", "Oberutzwil")
12
12
  r.monatslohn = 4500
13
- r.arbeitszeit = Rohdaten::Arbeitszeit.new(-22.3, 150, 153.66)
13
+ r.arbeitszeit = Rohdaten::Arbeitszeit.new(-22.3, 150, 153.665)
14
14
  r.zulage_nacht = Rohdaten::MengeAnsatz.new(3.56, 8)
15
15
  r.zulage_wochenende = Rohdaten::MengeAnsatz.new(2.12, 8)
16
16
  r.kinderzulage = Rohdaten::MengeAnsatz.new(2, 260)
@@ -26,6 +26,13 @@ module Planik
26
26
  r.add_abzug_freifeld(Rohdaten::Freifeld.new("Händischer Abzug", "irgendwas", "nochmals was", 12))
27
27
 
28
28
  r.ferien = Rohdaten::Ferien.new(304, 22)
29
+
30
+ r.arbeitsliste = [
31
+ #attr_accessor :datum, :name, :typ, :zeit_von, :zeit_bis, :arbeitszeit
32
+ Rohdaten::ArbeitsItem.new(Date.new(2014, 06, 01), "4", "Dienst", Time.new(2000, 1, 1, 6, 45), Time.new(2000, 1, 1, 16, 00), 8.2388),
33
+ Rohdaten::ArbeitsItem.new(Date.new(2014, 06, 02), "2", "Dienst", Time.new(2000, 1, 1, 7, 45), Time.new(2000, 1, 1, 24, 00), 6.234),
34
+ Rohdaten::ArbeitsItem.new(Date.new(2014, 06, 02), "2", "Andere Arbeit", nil, nil, 6.235)
35
+ ]
29
36
  end
30
37
  pdf = PdfGenerator.new(rohdaten).create_pdf
31
38
  pdf.render_file "mit_korrektur_januar.pdf"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lohnausweis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Muehlethaler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler