qr-bills 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qr-bills/qr-html-layout.rb +13 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2d737fda0dfd7323fadbb76cbc1fa33cbfc91f05b1410e26ea616092f68180c
|
4
|
+
data.tar.gz: 7f595ca806e98e6385412339cde55d4669e9fbd0a5d28381063f038f65b8642e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 891d5013c79f6b5a1651fd24092704e192640981ec2dc7197f4eedd33c43cd40cae3f6cf65c184828621d00731b38f713d5a0b1237d761f90994e3a5b7214892
|
7
|
+
data.tar.gz: ea6c560005eb23f7538ba63095331344263b1300a37f09a9951e28e2395733e95a6a7ac6e41fc5c3b6cc4dbcb901ce78a1f7c3f71f22d394ab7786fe87ed2fdd
|
@@ -33,9 +33,7 @@ module QRHTMLLayout
|
|
33
33
|
layout += " <div class=\"subtitle payable_to\">#{I18n.t("qrbills.account").capitalize} / #{I18n.t("qrbills.payable_to").capitalize}</div>\n"
|
34
34
|
layout += " <div class=\"qrcontent\">\n"
|
35
35
|
layout += " #{params[:bill_params][:creditor][:iban]}<br/>\n"
|
36
|
-
layout +=
|
37
|
-
layout += " #{params[:bill_params][:creditor][:address][:line1]} #{params[:bill_params][:creditor][:address][:line2]}<br/>\n"
|
38
|
-
layout += " #{params[:bill_params][:creditor][:address][:postal_code]} #{params[:bill_params][:creditor][:address][:town]}<br/>\n"
|
36
|
+
layout += render_address(params[:bill_params][:creditor][:address])
|
39
37
|
layout += " </div>\n"
|
40
38
|
layout += " <div><br/></div>\n"
|
41
39
|
|
@@ -49,9 +47,7 @@ module QRHTMLLayout
|
|
49
47
|
|
50
48
|
layout += " <div class=\"subtitle payable_by\">#{I18n.t("qrbills.payable_by").capitalize}</div>\n"
|
51
49
|
layout += " <div class=\"payable_by\">\n"
|
52
|
-
layout +=
|
53
|
-
layout += " #{params[:bill_params][:debtor][:address][:line1]} #{params[:bill_params][:debtor][:address][:line2]}<br/>\n"
|
54
|
-
layout += " #{params[:bill_params][:debtor][:address][:postal_code]} #{params[:bill_params][:debtor][:address][:town]}<br/>\n"
|
50
|
+
layout += render_address(params[:bill_params][:debtor][:address])
|
55
51
|
layout += " </div>\n"
|
56
52
|
|
57
53
|
layout += " <div class=\"amount\">\n"
|
@@ -103,9 +99,7 @@ module QRHTMLLayout
|
|
103
99
|
layout += " <div class=\"subtitle payable_to\">#{I18n.t("qrbills.account").capitalize} / #{I18n.t("qrbills.payable_to").capitalize}</div>\n"
|
104
100
|
layout += " <div class=\"qrcontent\">\n"
|
105
101
|
layout += " #{params[:bill_params][:creditor][:iban]}<br/>\n"
|
106
|
-
layout +=
|
107
|
-
layout += " #{params[:bill_params][:creditor][:address][:line1]} #{params[:bill_params][:creditor][:address][:line2]}<br/>\n"
|
108
|
-
layout += " #{params[:bill_params][:creditor][:address][:postal_code]} #{params[:bill_params][:creditor][:address][:town]}<br/>\n"
|
102
|
+
layout += render_address(params[:bill_params][:creditor][:address])
|
109
103
|
layout += " </div>\n"
|
110
104
|
layout += " <div><br/></div>\n"
|
111
105
|
|
@@ -127,9 +121,7 @@ module QRHTMLLayout
|
|
127
121
|
|
128
122
|
layout += " <div class=\"subtitle payable_by\">#{I18n.t("qrbills.payable_by").capitalize}</div>\n"
|
129
123
|
layout += " <div class=\"payable_by\">\n"
|
130
|
-
layout +=
|
131
|
-
layout += " #{params[:bill_params][:debtor][:address][:line1]} #{params[:bill_params][:debtor][:address][:line2]}<br/>\n"
|
132
|
-
layout += " #{params[:bill_params][:debtor][:address][:postal_code]} #{params[:bill_params][:debtor][:address][:town]}<br/>\n"
|
124
|
+
layout += render_address(params[:bill_params][:debtor][:address])
|
133
125
|
layout += " </div>\n"
|
134
126
|
layout += " </div>\n"
|
135
127
|
layout += " </div>\n"
|
@@ -252,4 +244,13 @@ module QRHTMLLayout
|
|
252
244
|
layout
|
253
245
|
end
|
254
246
|
end
|
247
|
+
|
248
|
+
def self.render_address(address)
|
249
|
+
case address[:type]
|
250
|
+
when 'S'
|
251
|
+
format("%s<br>\n%s %s<br>\n%s %s<br>\n", address[:name], address[:line1], address[:line2], address[:postal_code], address[:town])
|
252
|
+
when 'K'
|
253
|
+
format("%s<br>\n%s<br>\n%s<br>\n", address[:name], address[:line1], address[:line2])
|
254
|
+
end
|
255
|
+
end
|
255
256
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qr-bills
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damiano Radice
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|