prawn-swiss_qr_bill 0.5.1 → 0.5.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38df96b8ac1e36c19b8e887a1704dc3af8494bec29fa2cbd99f4e7d536079b09
|
4
|
+
data.tar.gz: a996978e775f4a7cbbdefce2ebec4b2e6fc1ba12d3916da6b6ee9eed22b4a754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5f1530805035de0d2a744f1ac3ed83520710dfc4de4bb3b0b01fcaf430f41fbe3fb86720c0f1dcb41cfbdfeedf9be6bdf9d28bf9bb7fe2a4c90ed32f982d48a
|
7
|
+
data.tar.gz: d2b5985d953531ad271585cdd6f7bc8f4a223a764254c5b558c87de7f9adb2035e64450410d9d100a7ed0056eb3ef676e9db22c3e7fad79ba968502b56b93828
|
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
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mischa Schindowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|