ascii_invoicer 2.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/ascii +722 -0
- data/latex/ascii-brief.cls +425 -0
- data/latex/ascii-brief.sty +46 -0
- data/lib/ascii_invoicer.rb +17 -0
- data/lib/ascii_invoicer/InvoiceProject.rb +356 -0
- data/lib/ascii_invoicer/ascii_logger.rb +64 -0
- data/lib/ascii_invoicer/filters.rb +129 -0
- data/lib/ascii_invoicer/generators.rb +209 -0
- data/lib/ascii_invoicer/hash_transformer.rb +23 -0
- data/lib/ascii_invoicer/mixins.rb +268 -0
- data/lib/ascii_invoicer/projectFileReader.rb +106 -0
- data/lib/ascii_invoicer/rfc5322_regex.rb +40 -0
- data/lib/ascii_invoicer/settings_manager.rb +62 -0
- data/lib/ascii_invoicer/texwriter.rb +105 -0
- data/lib/ascii_invoicer/tweaks.rb +25 -0
- data/lib/ascii_invoicer/version.rb +3 -0
- data/repl/ascii +2 -0
- data/settings/default-settings.yml +76 -0
- data/settings/settings_template.yml +54 -0
- data/templates/default.yml.erb +74 -0
- data/templates/document.tex.erb +87 -0
- metadata +297 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
--- # ascii invoicer document (version: <%= version %>, template: <%= template %>)
|
2
|
+
format: 2.4.0
|
3
|
+
created: <%= Date.today.strftime "%d.%m.%Y" %>
|
4
|
+
|
5
|
+
client:
|
6
|
+
title: Herr # Frau, Professor, Professorin
|
7
|
+
first_name: John
|
8
|
+
last_name: Doe
|
9
|
+
|
10
|
+
email: jon.doe@example.com
|
11
|
+
address: |
|
12
|
+
John Doe
|
13
|
+
Nöthnitzerstraße 46
|
14
|
+
01187 Dresden
|
15
|
+
|
16
|
+
event:
|
17
|
+
name: "<%= project_name %>"
|
18
|
+
location: # might be a list
|
19
|
+
dates:
|
20
|
+
- begin: <%= (Date.today+ 14).strftime "%d.%m.%Y" %> # bezieht sich auf die veranstaltung selbst
|
21
|
+
#end:
|
22
|
+
times:
|
23
|
+
- begin: "9:00"
|
24
|
+
end: "17:00"
|
25
|
+
|
26
|
+
description: |
|
27
|
+
|
28
|
+
offer:
|
29
|
+
date: <%= Date.today.strftime "%d.%m.%Y" %>
|
30
|
+
appendix: 1
|
31
|
+
|
32
|
+
invoice:
|
33
|
+
number: #27
|
34
|
+
date: #leave empty for auto date
|
35
|
+
payed_date:
|
36
|
+
|
37
|
+
cataloge:
|
38
|
+
product: &kaffee { name: Kaffee , price: 2.5 , unit: 1l }
|
39
|
+
product: &tee { name: Tee , price: 1.75 , unit: 1l }
|
40
|
+
product: &wasser_gross { name: Mineralwasser , price: 0.61 , unit: 1l }
|
41
|
+
product: &wasser_klein { name: Mineralwasser , price: 0.59 , unit: 1l }
|
42
|
+
product: &apfelsaft { name: Apfelsaft , price: 1.64 , unit: 1l }
|
43
|
+
product: &orangensaft { name: Orangensaft , price: 1.86 , unit: 1l }
|
44
|
+
product: &bagel { name: Bagel , price: 2.19 , unit: stk }
|
45
|
+
product: &kekse { name: Kekse Lamberts , price: 3.40 , unit: 400g}
|
46
|
+
product: &broetchen { name: halbe Brötchen , price: 1.16 , unit: stk }
|
47
|
+
product: &kuchen { name: Kuchen , price: 0.94 , unit: stk }
|
48
|
+
product: &suppe { name: Suppe , price: 3.10 , unit: Portion }
|
49
|
+
product: &obstplatte { name: Obstplatte , price: 30.00 , unit: stk }
|
50
|
+
|
51
|
+
products:
|
52
|
+
|
53
|
+
*kaffee: { amount: 4, sold: 5 }
|
54
|
+
*wasser_gross:
|
55
|
+
amount: 4
|
56
|
+
returned: 3
|
57
|
+
*kekse:
|
58
|
+
amount: 4
|
59
|
+
sold: 2
|
60
|
+
|
61
|
+
hours:
|
62
|
+
salary: 8.00
|
63
|
+
caterers:
|
64
|
+
"unknown" : 0 #Stunden
|
65
|
+
|
66
|
+
manager: <%= manager_name %>
|
67
|
+
|
68
|
+
#canceled: yes
|
69
|
+
#lang:
|
70
|
+
#tax:
|
71
|
+
|
72
|
+
#messages: # read default-settings.yml on how to overwrite
|
73
|
+
|
74
|
+
...
|
@@ -0,0 +1,87 @@
|
|
1
|
+
\documentclass[11pt,utf8]{<%= File.join $SETTINGS.plumber_dirs.templates, "latex/ascii-brief" %>}
|
2
|
+
\Logo {<%= File.join $SETTINGS.plumber_dirs.templates, @data[:includes][:logopath] %>}
|
3
|
+
|
4
|
+
\lochermarke
|
5
|
+
\faltmarken
|
6
|
+
\fenstermarken
|
7
|
+
\trennlinien
|
8
|
+
%%\klassisch
|
9
|
+
|
10
|
+
\Name {<%= @data[:includes][:name] %>}
|
11
|
+
\Strasse {<%= @data[:includes][:strasse] %>}
|
12
|
+
\Universitaet {<%= @data[:includes][:universitaet] %>}
|
13
|
+
\Fakultaet {<%= @data[:includes][:fakultaet] %>}
|
14
|
+
\Zusatz {<%= @data[:includes][:zusatz] %>}
|
15
|
+
\RetourAdresse {<%= @data[:includes][:retouradresse] %>}
|
16
|
+
\Ort {<%= @data[:includes][:ort] %>}
|
17
|
+
\Land {<%= @data[:includes][:land] %>}
|
18
|
+
\Telefon {<%= @data[:includes][:telefon] %>}
|
19
|
+
\Telefax {<%= @data[:includes][:telefax] %>}
|
20
|
+
\Telex {<%= @data[:includes][:telex] %>}
|
21
|
+
\HTTP {<%= @data[:includes][:http] %>}
|
22
|
+
\EMail {<%= @data[:includes][:email] %>}
|
23
|
+
\Bank {<%= @data[:includes][:bank] %>}
|
24
|
+
\BLZ {<%= @data[:includes][:blz] %>}
|
25
|
+
\IBAN {<%= @data[:includes][:iban] %>}
|
26
|
+
\BIC {<%= @data[:includes][:bic] %>}
|
27
|
+
\Konto {<%= @data[:includes][:konto] %>}
|
28
|
+
\Steuernummer {<%= @data[:includes][:steuernummer] %>}
|
29
|
+
|
30
|
+
\Unterschrift {<%= @data[:manager] %>}
|
31
|
+
\Postvermerk {}
|
32
|
+
\Adresse {<%= @data[:client][:address].gsub("\n","\\newline ") %>}
|
33
|
+
|
34
|
+
\Betreff {<%= @data[:messages][document_type][0] %>} %% [Angebot|Rechnung]
|
35
|
+
|
36
|
+
\Datum {<%= @data[type][:date] %>}
|
37
|
+
\AngebotManuel {<%= @data[:offer][:number] if type == :offer %>} %% Manuel ueberschreibbar ansonsten automatisch heute
|
38
|
+
\Veranstaltung {<%= @data[:event][:name] %>}
|
39
|
+
\RechnungsNummer {<%= @data[:invoice][:longnumber] %>} %% bei Angeboten leer lassen
|
40
|
+
\Anrede {<%= @data[:client][:addressing] %>,}
|
41
|
+
\Gruss {<%= @data[:messages][:signature] %> <%= @data[:signature] %>}{1cm}
|
42
|
+
|
43
|
+
%\Anlagen {Anlagen}
|
44
|
+
%\Verteiler {Verteiler}
|
45
|
+
|
46
|
+
\begin{document}
|
47
|
+
\begin{ascii-brief}
|
48
|
+
|
49
|
+
|
50
|
+
<%= @data[:messages][document_type][1] %>
|
51
|
+
|
52
|
+
\begin{center}
|
53
|
+
\begin{tabular}{rp{7cm}rrr}
|
54
|
+
\textbf{Nr.} & \textbf{Bezeichnung}& \textbf{Menge} & \textbf{EP}& \textbf{Preis} \\
|
55
|
+
\midrule
|
56
|
+
<% @data[:products].each_index do |i|
|
57
|
+
product = @data[:products][i] %>
|
58
|
+
<%= i + 1 %> & <%= product.name %> <%if product.unit %>
|
59
|
+
(<%= product.unit %>)
|
60
|
+
<% end %> & <%= product.amount type %> & <%= product.price %> & <%= product.cost type %> \\
|
61
|
+
<% end %>
|
62
|
+
<% if @data[:hours][:time] >0%>
|
63
|
+
<%= @data[:products].count + 1 %> & Betreuung (Stunden) & <%= @data[:hours][:time] %> & <%= @data[:hours][:salary] %> & <%= @data[:hours][:total] %> \\
|
64
|
+
<% end %>
|
65
|
+
|
66
|
+
\bottomrule[1pt]
|
67
|
+
\multicolumn{4}{r}{Netto MwSt.} & <%= @data[type][:costs] %> \\
|
68
|
+
%\multicolumn{4}{r}{Brutto MwSt. 19\%} & <%= @data[type][:total] %> \\
|
69
|
+
|
70
|
+
<% @data[:productsbytax].each {|tax,products|
|
71
|
+
t = 0 .to_euro
|
72
|
+
products.each {|p| t+= p.tax(type)}
|
73
|
+
%>
|
74
|
+
\multicolumn{4}{r}{+MwSt. <%= (tax.rationalize*100).to_f %>\%} & <%= t %> \\
|
75
|
+
<% } %>
|
76
|
+
|
77
|
+
<% if @data[:hours][:time] >0%>
|
78
|
+
\multicolumn{4}{r}{MwSt 0\%} & <%= @data[:hours][:total] %> \\
|
79
|
+
<% end %>
|
80
|
+
\multicolumn{4}{r}{Gesamtpreis} & <%= @data[type][:final] %> \\
|
81
|
+
\end{tabular}
|
82
|
+
\end{center}
|
83
|
+
|
84
|
+
<%= @data[:messages][document_type][2] %>
|
85
|
+
|
86
|
+
\end{ascii-brief}
|
87
|
+
\end{document}
|
metadata
ADDED
@@ -0,0 +1,297 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ascii_invoicer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.5.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Hendrik Sollich
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec-core
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.1'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: git
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.2'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.2.8
|
65
|
+
type: :runtime
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '1.2'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.2.8
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: thor
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0.19'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.19'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: icalendar
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '2.1'
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 2.1.1
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '2.1'
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 2.1.1
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: textboxes
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0.0'
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 0.0.1
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0.0'
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 0.0.1
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: euro
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - "~>"
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0.3'
|
136
|
+
type: :runtime
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - "~>"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0.3'
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: hash-graft
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - "~>"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0.9'
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.9.0
|
153
|
+
type: :runtime
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.9'
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: 0.9.0
|
163
|
+
- !ruby/object:Gem::Dependency
|
164
|
+
name: luigi
|
165
|
+
requirement: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - "~>"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '1.1'
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 1.1.0
|
173
|
+
type: :runtime
|
174
|
+
prerelease: false
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '1.1'
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: 1.1.0
|
183
|
+
- !ruby/object:Gem::Dependency
|
184
|
+
name: paint
|
185
|
+
requirement: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - "~>"
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0.8'
|
190
|
+
- - ">="
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: 0.8.7
|
193
|
+
type: :runtime
|
194
|
+
prerelease: false
|
195
|
+
version_requirements: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - "~>"
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0.8'
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: 0.8.7
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: hashr
|
205
|
+
requirement: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - "~>"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: 0.0.22
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: 0.0.22
|
213
|
+
type: :runtime
|
214
|
+
prerelease: false
|
215
|
+
version_requirements: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - "~>"
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: 0.0.22
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 0.0.22
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: repl
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '1.0'
|
230
|
+
- - ">="
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 1.0.0
|
233
|
+
type: :runtime
|
234
|
+
prerelease: false
|
235
|
+
version_requirements: !ruby/object:Gem::Requirement
|
236
|
+
requirements:
|
237
|
+
- - "~>"
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: '1.0'
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: 1.0.0
|
243
|
+
description: "\n A commandline project management tool.\n It manages future and
|
244
|
+
past projects, can create invoice documents, csv and ical overviews.\n All from
|
245
|
+
the commandline, syncs via git.\n "
|
246
|
+
email: hendrik@hoodie.de
|
247
|
+
executables:
|
248
|
+
- ascii
|
249
|
+
extensions: []
|
250
|
+
extra_rdoc_files: []
|
251
|
+
files:
|
252
|
+
- bin/ascii
|
253
|
+
- latex/ascii-brief.cls
|
254
|
+
- latex/ascii-brief.sty
|
255
|
+
- lib/ascii_invoicer.rb
|
256
|
+
- lib/ascii_invoicer/InvoiceProject.rb
|
257
|
+
- lib/ascii_invoicer/ascii_logger.rb
|
258
|
+
- lib/ascii_invoicer/filters.rb
|
259
|
+
- lib/ascii_invoicer/generators.rb
|
260
|
+
- lib/ascii_invoicer/hash_transformer.rb
|
261
|
+
- lib/ascii_invoicer/mixins.rb
|
262
|
+
- lib/ascii_invoicer/projectFileReader.rb
|
263
|
+
- lib/ascii_invoicer/rfc5322_regex.rb
|
264
|
+
- lib/ascii_invoicer/settings_manager.rb
|
265
|
+
- lib/ascii_invoicer/texwriter.rb
|
266
|
+
- lib/ascii_invoicer/tweaks.rb
|
267
|
+
- lib/ascii_invoicer/version.rb
|
268
|
+
- repl/ascii
|
269
|
+
- settings/default-settings.yml
|
270
|
+
- settings/settings_template.yml
|
271
|
+
- templates/default.yml.erb
|
272
|
+
- templates/document.tex.erb
|
273
|
+
homepage: https://github.com/ascii-dresden/ascii-invoicer
|
274
|
+
licenses:
|
275
|
+
- GPL
|
276
|
+
metadata: {}
|
277
|
+
post_install_message:
|
278
|
+
rdoc_options: []
|
279
|
+
require_paths:
|
280
|
+
- lib
|
281
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '2.1'
|
286
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
|
+
requirements:
|
288
|
+
- - ">="
|
289
|
+
- !ruby/object:Gem::Version
|
290
|
+
version: '0'
|
291
|
+
requirements: []
|
292
|
+
rubyforge_project:
|
293
|
+
rubygems_version: 2.4.5
|
294
|
+
signing_key:
|
295
|
+
specification_version: 4
|
296
|
+
summary: ascii-invoicer
|
297
|
+
test_files: []
|