prawn-swiss_qr_bill 0.5.1 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/prawn/swiss_qr_bill/qr/data.rb +0 -3
- data/lib/prawn/swiss_qr_bill/sections/payment_amount.rb +1 -1
- data/lib/prawn/swiss_qr_bill/sections/payment_information.rb +2 -2
- data/lib/prawn/swiss_qr_bill/sections/qr_code.rb +3 -1
- data/lib/prawn/swiss_qr_bill/sections/receipt_amount.rb +1 -1
- data/lib/prawn/swiss_qr_bill/version.rb +1 -1
- data/prawn-swiss_qr_bill.gemspec +2 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2c54f8fd1cb1646b3f2ab13cc420f47e6619c6170ae817590e251b3f1d38aca
|
4
|
+
data.tar.gz: c2494971e8184c7a67064aaee7fd7ab2b5b413fc771e1db28bc565695b22b65f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a38c973095f1b4bbc789cfc9e240e12d73ccdc024a87d8ef75858a9132350b828dba6c58ee1c7636a9874b645232d754d010a8cae6bf05a63d831c21b4ce4661
|
7
|
+
data.tar.gz: 0d7f6e0488e67c50f239da95c17756dd9d042ccded22272bfe02b2f4a1d7569575dd915427557f6f1b6bfc9d3ece166111cde67077d9c8828c725d0d7da45e5c
|
data/README.md
CHANGED
@@ -43,7 +43,9 @@ require 'prawn/swiss_qr_bill'
|
|
43
43
|
amount: 9.90,
|
44
44
|
currency: 'CHF',
|
45
45
|
reference: '00 00000 00000 02202 20202 99991',
|
46
|
-
reference_type: 'QRR'
|
46
|
+
reference_type: 'QRR',
|
47
|
+
unstructured_message: 'Bill number 2202.20202.9999',
|
48
|
+
bill_information: '//S1/10/2202202029999/11/220819'
|
47
49
|
}
|
48
50
|
|
49
51
|
Prawn::Document.generate('output.pdf', page_size: 'A4') do
|
@@ -13,7 +13,7 @@ module Prawn
|
|
13
13
|
box do
|
14
14
|
draw_payable_to
|
15
15
|
draw_reference if @data.key?(:reference)
|
16
|
-
draw_additional_information if @data.key?(:
|
16
|
+
draw_additional_information if @data.key?(:unstructured_message) || @data.key?(:bill_information)
|
17
17
|
draw_payable_by
|
18
18
|
end
|
19
19
|
end
|
@@ -37,7 +37,7 @@ module Prawn
|
|
37
37
|
|
38
38
|
def draw_additional_information
|
39
39
|
label I18n.t('additional_info', scope: i18n_scope)
|
40
|
-
content @data[:
|
40
|
+
content [@data[:unstructured_message], @data[:bill_information]].join(' ')
|
41
41
|
|
42
42
|
line_spacing
|
43
43
|
end
|
@@ -36,7 +36,9 @@ module Prawn
|
|
36
36
|
amount: [:amount],
|
37
37
|
currency: [:currency],
|
38
38
|
reference: [:reference],
|
39
|
-
reference_type: [:reference_type]
|
39
|
+
reference_type: [:reference_type],
|
40
|
+
unstructured_message: [:unstructured_message],
|
41
|
+
bill_information: [:bill_information]
|
40
42
|
}.freeze
|
41
43
|
|
42
44
|
def draw
|
@@ -38,7 +38,7 @@ module Prawn
|
|
38
38
|
doc.bounding_box([doc.bounds.left, doc.bounds.top],
|
39
39
|
width: CURRENCY_WIDTH, height: specs.height) do
|
40
40
|
doc.pad_top(1.4) { label I18n.t('currency', scope: i18n_scope) }
|
41
|
-
doc.pad_top(2.5) { content 'CHF' }
|
41
|
+
doc.pad_top(2.5) { content @data.fetch(:currency, 'CHF') }
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
data/prawn-swiss_qr_bill.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_dependency 'i18n', '~> 1.8'
|
26
26
|
spec.add_dependency 'prawn', '~> 2.0'
|
27
|
+
spec.add_dependency 'matrix', '~> 0.4'
|
27
28
|
spec.add_dependency 'rqrcode', '~> 2.0'
|
28
29
|
|
29
30
|
spec.add_development_dependency 'pdf-reader', '~> 2.3'
|
@@ -34,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
34
35
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
35
36
|
spec.add_development_dependency 'simplecov-cobertura', '~> 2.0'
|
36
37
|
|
38
|
+
|
37
39
|
spec.metadata = {
|
38
40
|
'rubygems_mfa_required' => 'true'
|
39
41
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-swiss_qr_bill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mischa Schindowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: matrix
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.4'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.4'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rqrcode
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
229
|
- !ruby/object:Gem::Version
|
216
230
|
version: '0'
|
217
231
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
232
|
+
rubygems_version: 3.4.19
|
219
233
|
signing_key:
|
220
234
|
specification_version: 4
|
221
235
|
summary: Swiss QR-Bill PDFs in Ruby with Prawn
|