ubill 0.1.1 → 0.1.3

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
  SHA256:
3
- metadata.gz: 4c6122ed87965944ddec1e509f656649357dc23f13aca8255eca59af8f940c8e
4
- data.tar.gz: 96fd9f5d487a4d1bc6a626bfeb688f94d6a1e464f508ef4c8e28838427b9dfec
3
+ metadata.gz: 19061eeff34de42457b509953beb27e3fc11685aa052d3ac4adcbaa441eb3987
4
+ data.tar.gz: be2306c0b4556e3f91071f447366143d6cbfd8957474700d4b1c489d3a821da3
5
5
  SHA512:
6
- metadata.gz: 4dc36844a1114e04a33a30ebf398a0a498a3f4e4dcac4faae8604014921dd01f278690f352a7ae01e0986130a5b862fb060d448b2b234a57bb03d230452dd00e
7
- data.tar.gz: 6d54a2e72cbc7bba4e1df58ff18d760b5b019a4b06516ffdfe84680fd7a885ef51595c9b91bc8e19cb283fcaa3a82754e8dc1ce6e8caec3dedf5e12bab9e3ceb
6
+ metadata.gz: ea3bf18d1d4c1950786796c1e64961d5c61070e3e21f044eea7e5fbbac52e15400ed513918b37cd9810eab368f5ab7a6b5acc66b0c325c4273299bdda900b2dd
7
+ data.tar.gz: 3fbff914a714388bc10b4eaa166d39e4c77c0675d29adb2349ec70b646c2fe795587e58e03df60f619006332d350b985999064dbab936c94a320f84b090d1420
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ubill (0.1.1)
4
+ ubill (0.1.3)
5
5
  matrix (~> 0.4)
6
6
  prawn (~> 2.4)
7
7
  prawn-table (~> 0.2)
data/README.md CHANGED
@@ -80,7 +80,7 @@ doc = Ubill::Invoice.new do
80
80
  subject("Rechnung R1234567890", "Rechnungsdatum 01.01.2100")
81
81
  # recipient address
82
82
  recipient(
83
- company: "Spielvereinigung Demoburg e.V.",
83
+ organisation: "Spielvereinigung Demoburg e.V.",
84
84
  name: "Tobi Ornottobi",
85
85
  department: "Dept. Purchase",
86
86
  street_1: "Highwaytohell 2",
data/lib/ubill/invoice.rb CHANGED
@@ -12,18 +12,19 @@ module Ubill
12
12
  COLOR_SECONDARY = "777777"
13
13
  EXTERNAL_FONTS_DIR = File.join(__dir__, "fonts")
14
14
 
15
- def initialize(&block)
16
- super
15
+ def initialize
16
+ super()
17
17
  @recipient = {}
18
18
  @subject = ""
19
19
  @subject_info = ""
20
20
  @positions = [["#", "Beschreibung", "Einzelpreis", "Menge", "Gesamt"]]
21
21
  @total = ""
22
22
  @due = ""
23
+ @addendum = ""
23
24
 
24
25
  load_external_font_families
25
26
 
26
- configure(&block) unless block.nil?
27
+ yield(self) if block_given?
27
28
  end
28
29
 
29
30
  def recipient(**options)
@@ -53,6 +54,10 @@ module Ubill
53
54
  @due = value
54
55
  end
55
56
 
57
+ def addendum(value)
58
+ @addendum = value
59
+ end
60
+
56
61
 
57
62
  def config
58
63
  Ubill.config
@@ -126,6 +131,9 @@ module Ubill
126
131
  pad 9.mm do
127
132
  describe_positions
128
133
  end
134
+ pad 2.mm do
135
+ describe_addendum
136
+ end
129
137
  pad 2.mm do
130
138
  describe_terms
131
139
  end
@@ -150,7 +158,7 @@ module Ubill
150
158
 
151
159
  def describe_address
152
160
  @recipient.each_with_filter(
153
- :company, :name, [:firstname, :lastname], :department, :street_1, :street_2, [:zip, :city], :country
161
+ :organisation, :name, [:firstname, :lastname], :department, :street_1, :street_2, [:zip, :city], :country
154
162
  ) do |key, value|
155
163
  move_down 0.3.cm if key.is_a?(Array) && key.eql?([:zip, :city])
156
164
  text value, size: 10
@@ -198,6 +206,11 @@ module Ubill
198
206
  end
199
207
  end
200
208
 
209
+ def describe_addendum
210
+ font_size 10
211
+ text @addendum
212
+ end
213
+
201
214
  def describe_terms
202
215
  font_size 10
203
216
  text "Es wird gemäß §19 Abs. 1 Umsatzsteuergesetz keine Umsatzsteuer erhoben. Der Gesamtbetrag der Rechnung ist zahlbar bis zum #{@due} ohne Abzug. Wenn nicht anders angegeben, entspricht das Leistungsdatum dem Rechnungsdatum."
data/lib/ubill/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ubill
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - couchbelag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-12 00:00:00.000000000 Z
11
+ date: 2023-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prawn