xrechnung 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +2 -2
- data/.github/workflows/validate-fixtures.yml +5 -5
- data/.rubocop +1 -0
- data/.rubocop.yml +4 -4
- data/Gemfile +6 -3
- data/Gemfile.lock +74 -43
- data/Rakefile +17 -18
- data/lib/xrechnung/contact.rb +2 -2
- data/lib/xrechnung/party_legal_entity.rb +1 -1
- data/lib/xrechnung/party_tax_scheme.rb +1 -1
- data/lib/xrechnung/payment_means.rb +22 -0
- data/lib/xrechnung/tax_category.rb +5 -0
- data/lib/xrechnung/version.rb +1 -1
- data/lib/xrechnung.rb +18 -14
- data/xrechnung.gemspec +6 -5
- metadata +34 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06252face0554e39218ad09f6de658da8ceefab529414974c3cbea5066c03f94
|
|
4
|
+
data.tar.gz: 37fdbaf09d8b6506f9c49bbb9951aba92fb0d640a11a235b2c4838ca9c6f7ec8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c039758300cab1eb0bfabd785a3c4efc9eba14f0c94f6f72741c0fbb922e3bc0eeab612b3a9842f66244666f230d918a226fc41741eba86005347bff8c4b1c73
|
|
7
|
+
data.tar.gz: '038c45111d8b65bc6290b78048a30aae81ff04283784efd335c73a34eede869dd9aa5adb33a9a736763065bed4345054cb614e1e23b662510d34edeb9ee3ac24'
|
data/.github/workflows/rspec.yml
CHANGED
|
@@ -7,16 +7,16 @@ jobs:
|
|
|
7
7
|
runs-on: ubuntu-latest
|
|
8
8
|
|
|
9
9
|
steps:
|
|
10
|
-
- uses: actions/checkout@
|
|
10
|
+
- uses: actions/checkout@v6
|
|
11
11
|
|
|
12
|
-
- uses: actions/setup-java@
|
|
12
|
+
- uses: actions/setup-java@v5
|
|
13
13
|
with:
|
|
14
14
|
distribution: "adopt"
|
|
15
|
-
java-version: "
|
|
15
|
+
java-version: "17"
|
|
16
16
|
|
|
17
17
|
- uses: ruby/setup-ruby@v1
|
|
18
18
|
with:
|
|
19
|
-
ruby-version: "3.
|
|
19
|
+
ruby-version: "3.4"
|
|
20
20
|
bundler-cache: true
|
|
21
21
|
|
|
22
22
|
- name: Prepare validator
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
- name: Run validator
|
|
26
26
|
run: bundle exec rake validator:run
|
|
27
27
|
|
|
28
|
-
- uses: actions/upload-artifact@
|
|
28
|
+
- uses: actions/upload-artifact@v6
|
|
29
29
|
if: failure()
|
|
30
30
|
with:
|
|
31
31
|
name: validation-results
|
data/.rubocop
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--safe
|
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
plugins:
|
|
2
|
+
- rubocop-rspec
|
|
3
|
+
- rubocop-rake
|
|
2
4
|
|
|
3
5
|
AllCops:
|
|
4
6
|
Exclude:
|
|
@@ -13,6 +15,7 @@ AllCops:
|
|
|
13
15
|
DisplayCopNames: true
|
|
14
16
|
StyleGuideCopsOnly: false
|
|
15
17
|
TargetRubyVersion: 3.0
|
|
18
|
+
NewCops: enable
|
|
16
19
|
|
|
17
20
|
## Layout Cops - https://docs.rubocop.org/rubocop/cops_layout.html
|
|
18
21
|
|
|
@@ -344,9 +347,6 @@ Style/TrailingCommaInArrayLiteral:
|
|
|
344
347
|
Style/TrailingCommaInHashLiteral:
|
|
345
348
|
EnforcedStyleForMultiline: comma
|
|
346
349
|
|
|
347
|
-
require:
|
|
348
|
-
- rubocop-rspec
|
|
349
|
-
|
|
350
350
|
RSpec/AnyInstance:
|
|
351
351
|
Enabled: false
|
|
352
352
|
|
data/Gemfile
CHANGED
|
@@ -3,6 +3,9 @@ source "https://rubygems.org"
|
|
|
3
3
|
# Specify your gem's dependencies in xrechnung.gemspec
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
|
-
gem "rake"
|
|
7
|
-
gem "rspec"
|
|
8
|
-
gem "rubocop-rspec"
|
|
6
|
+
gem "rake"
|
|
7
|
+
gem "rspec"
|
|
8
|
+
gem "rubocop-rspec"
|
|
9
|
+
gem "rubocop-rake"
|
|
10
|
+
gem "httparty"
|
|
11
|
+
gem "rubyzip"
|
data/Gemfile.lock
CHANGED
|
@@ -1,84 +1,115 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
xrechnung (0.6.
|
|
4
|
+
xrechnung (0.6.3)
|
|
5
|
+
activesupport
|
|
6
|
+
base64
|
|
7
|
+
bigdecimal
|
|
5
8
|
builder (~> 3.2)
|
|
6
9
|
|
|
7
10
|
GEM
|
|
8
11
|
remote: https://rubygems.org/
|
|
9
12
|
specs:
|
|
10
|
-
|
|
13
|
+
activesupport (8.1.2)
|
|
14
|
+
base64
|
|
15
|
+
bigdecimal
|
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
|
+
connection_pool (>= 2.2.5)
|
|
18
|
+
drb
|
|
19
|
+
i18n (>= 1.6, < 2)
|
|
20
|
+
json
|
|
21
|
+
logger (>= 1.4.2)
|
|
22
|
+
minitest (>= 5.1)
|
|
23
|
+
securerandom (>= 0.3)
|
|
24
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
|
+
uri (>= 0.13.1)
|
|
26
|
+
ast (2.4.3)
|
|
27
|
+
base64 (0.3.0)
|
|
28
|
+
bigdecimal (4.0.1)
|
|
11
29
|
builder (3.3.0)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
30
|
+
concurrent-ruby (1.3.6)
|
|
31
|
+
connection_pool (3.0.2)
|
|
32
|
+
csv (3.3.5)
|
|
33
|
+
diff-lcs (1.6.2)
|
|
34
|
+
drb (2.2.3)
|
|
35
|
+
httparty (0.24.2)
|
|
15
36
|
csv
|
|
16
37
|
mini_mime (>= 1.0.0)
|
|
17
38
|
multi_xml (>= 0.5.2)
|
|
18
|
-
|
|
19
|
-
|
|
39
|
+
i18n (1.14.8)
|
|
40
|
+
concurrent-ruby (~> 1.0)
|
|
41
|
+
json (2.18.0)
|
|
42
|
+
language_server-protocol (3.17.0.5)
|
|
43
|
+
lint_roller (1.1.0)
|
|
44
|
+
logger (1.7.0)
|
|
20
45
|
mini_mime (1.1.5)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
46
|
+
minitest (6.0.1)
|
|
47
|
+
prism (~> 1.5)
|
|
48
|
+
multi_xml (0.8.1)
|
|
49
|
+
bigdecimal (>= 3.1, < 5)
|
|
50
|
+
parallel (1.27.0)
|
|
51
|
+
parser (3.3.10.1)
|
|
24
52
|
ast (~> 2.4.1)
|
|
25
53
|
racc
|
|
54
|
+
prism (1.9.0)
|
|
26
55
|
racc (1.8.1)
|
|
27
56
|
rainbow (3.1.1)
|
|
28
|
-
rake (13.
|
|
29
|
-
regexp_parser (2.
|
|
30
|
-
rspec (3.13.
|
|
57
|
+
rake (13.3.1)
|
|
58
|
+
regexp_parser (2.11.3)
|
|
59
|
+
rspec (3.13.2)
|
|
31
60
|
rspec-core (~> 3.13.0)
|
|
32
61
|
rspec-expectations (~> 3.13.0)
|
|
33
62
|
rspec-mocks (~> 3.13.0)
|
|
34
|
-
rspec-core (3.13.
|
|
63
|
+
rspec-core (3.13.6)
|
|
35
64
|
rspec-support (~> 3.13.0)
|
|
36
|
-
rspec-expectations (3.13.
|
|
65
|
+
rspec-expectations (3.13.5)
|
|
37
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
38
67
|
rspec-support (~> 3.13.0)
|
|
39
|
-
rspec-mocks (3.13.
|
|
68
|
+
rspec-mocks (3.13.7)
|
|
40
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
41
70
|
rspec-support (~> 3.13.0)
|
|
42
|
-
rspec-support (3.13.
|
|
43
|
-
rubocop (1.
|
|
71
|
+
rspec-support (3.13.7)
|
|
72
|
+
rubocop (1.84.0)
|
|
44
73
|
json (~> 2.3)
|
|
45
|
-
language_server-protocol (
|
|
74
|
+
language_server-protocol (~> 3.17.0.2)
|
|
75
|
+
lint_roller (~> 1.1.0)
|
|
46
76
|
parallel (~> 1.10)
|
|
47
77
|
parser (>= 3.3.0.2)
|
|
48
78
|
rainbow (>= 2.2.2, < 4.0)
|
|
49
79
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
50
|
-
rubocop-ast (>= 1.
|
|
80
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
51
81
|
ruby-progressbar (~> 1.7)
|
|
52
82
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
53
|
-
rubocop-ast (1.
|
|
54
|
-
parser (>= 3.3.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
rubocop (
|
|
59
|
-
rubocop-rspec (
|
|
60
|
-
|
|
61
|
-
rubocop
|
|
62
|
-
rubocop-factory_bot (~> 2.22)
|
|
63
|
-
rubocop-rspec_rails (~> 2.28)
|
|
64
|
-
rubocop-rspec_rails (2.29.1)
|
|
65
|
-
rubocop (~> 1.61)
|
|
83
|
+
rubocop-ast (1.49.0)
|
|
84
|
+
parser (>= 3.3.7.2)
|
|
85
|
+
prism (~> 1.7)
|
|
86
|
+
rubocop-rake (0.7.1)
|
|
87
|
+
lint_roller (~> 1.1)
|
|
88
|
+
rubocop (>= 1.72.1)
|
|
89
|
+
rubocop-rspec (3.9.0)
|
|
90
|
+
lint_roller (~> 1.1)
|
|
91
|
+
rubocop (~> 1.81)
|
|
66
92
|
ruby-progressbar (1.13.0)
|
|
67
|
-
rubyzip (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
93
|
+
rubyzip (3.2.2)
|
|
94
|
+
securerandom (0.4.1)
|
|
95
|
+
tzinfo (2.0.6)
|
|
96
|
+
concurrent-ruby (~> 1.0)
|
|
97
|
+
unicode-display_width (3.2.0)
|
|
98
|
+
unicode-emoji (~> 4.1)
|
|
99
|
+
unicode-emoji (4.2.0)
|
|
100
|
+
uri (1.1.1)
|
|
71
101
|
|
|
72
102
|
PLATFORMS
|
|
73
103
|
ruby
|
|
74
104
|
|
|
75
105
|
DEPENDENCIES
|
|
76
|
-
httparty
|
|
77
|
-
rake
|
|
78
|
-
rspec
|
|
79
|
-
rubocop-
|
|
80
|
-
|
|
106
|
+
httparty
|
|
107
|
+
rake
|
|
108
|
+
rspec
|
|
109
|
+
rubocop-rake
|
|
110
|
+
rubocop-rspec
|
|
111
|
+
rubyzip
|
|
81
112
|
xrechnung!
|
|
82
113
|
|
|
83
114
|
BUNDLED WITH
|
|
84
|
-
|
|
115
|
+
4.0.5
|
data/Rakefile
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
require "pathname"
|
|
2
2
|
require "bundler/gem_tasks"
|
|
3
3
|
require "rspec/core/rake_task"
|
|
4
|
+
require "httparty"
|
|
5
|
+
require "zip"
|
|
4
6
|
|
|
7
|
+
Zip.on_exists_proc = true
|
|
5
8
|
RSpec::Core::RakeTask.new(:spec)
|
|
6
9
|
|
|
7
10
|
task default: :spec
|
|
8
11
|
|
|
12
|
+
VALIDATOR_SOURCES = {
|
|
13
|
+
tool: {
|
|
14
|
+
filename: "validator/validator-1.6.0-standalone.jar",
|
|
15
|
+
release_url: "https://github.com/itplr-kosit/validator/releases/download/v1.6.0/validator-1.6.0.zip",
|
|
16
|
+
},
|
|
17
|
+
scenarios: {
|
|
18
|
+
filename: "validator/scenarios.xml",
|
|
19
|
+
release_url: "https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/release-2025-07-10/validator-configuration-xrechnung_3.0.2_2025-07-10.zip",
|
|
20
|
+
},
|
|
21
|
+
}.freeze
|
|
22
|
+
|
|
9
23
|
namespace :validator do
|
|
10
|
-
VALIDATOR_SOURCES
|
|
11
|
-
tool: {
|
|
12
|
-
filename: "validator/validationtool-1.5.0-standalone.jar",
|
|
13
|
-
release_url: "https://github.com/itplr-kosit/validator/releases/download/v1.5.0/validator-1.5.0-distribution.zip",
|
|
14
|
-
},
|
|
15
|
-
scenarios: {
|
|
16
|
-
filename: "validator/scenarios.xml",
|
|
17
|
-
release_url: "https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/release-2024-10-31/validator-configuration-xrechnung_3.0.2_2024-10-31.zip",
|
|
18
|
-
},
|
|
19
|
-
}.freeze
|
|
20
|
-
|
|
21
|
-
VALIDATOR_SOURCES.each do |_, v|
|
|
24
|
+
VALIDATOR_SOURCES.each_value do |v|
|
|
22
25
|
base = Pathname.new(__dir__).join("validator")
|
|
23
26
|
zipfile = base.join(File.basename(v[:release_url]))
|
|
24
27
|
|
|
25
28
|
file zipfile do
|
|
26
|
-
require "httparty"
|
|
27
|
-
|
|
28
29
|
base.mkpath unless base.exist?
|
|
29
30
|
|
|
30
31
|
res = HTTParty.get(v[:release_url], follow_redirects: true)
|
|
31
|
-
File.
|
|
32
|
+
File.binwrite(zipfile, res.body)
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
file v[:filename] => zipfile do
|
|
35
|
-
require "zip"
|
|
36
|
-
|
|
37
36
|
Zip::File.foreach(zipfile) do |entry|
|
|
38
|
-
entry.extract base
|
|
37
|
+
entry.extract destination_directory: base
|
|
39
38
|
end
|
|
40
39
|
end
|
|
41
40
|
end
|
data/lib/xrechnung/contact.rb
CHANGED
|
@@ -18,8 +18,8 @@ module Xrechnung
|
|
|
18
18
|
def to_xml(xml)
|
|
19
19
|
xml.cac :Contact do
|
|
20
20
|
xml.cbc :Name, name
|
|
21
|
-
xml.cbc :Telephone, telephone
|
|
22
|
-
xml.cbc :ElectronicMail, electronic_mail
|
|
21
|
+
xml.cbc :Telephone, telephone if telephone.present?
|
|
22
|
+
xml.cbc :ElectronicMail, electronic_mail if electronic_mail.present?
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
module Xrechnung
|
|
2
2
|
# <cac:PaymentMeans>
|
|
3
3
|
# <cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
|
|
4
|
+
# <cbc:InstructionNote>Textvermerk der Zahlung</cbc:InstructionNote>
|
|
5
|
+
# <cbc:PaymentID>Verwendungszweck</cbc:PaymentID>
|
|
4
6
|
# <cac:PayeeFinancialAccount>
|
|
5
7
|
# <cbc:ID>DE12500105170648489890</cbc:ID>
|
|
6
8
|
# <cbc:Name>Harry Hirsch</cbc:Name>
|
|
@@ -12,14 +14,32 @@ module Xrechnung
|
|
|
12
14
|
class PaymentMeans
|
|
13
15
|
include MemberContainer
|
|
14
16
|
|
|
17
|
+
# Payment means type code BT-81
|
|
18
|
+
#
|
|
15
19
|
# @!attribute payment_means_code
|
|
16
20
|
# @return [Integer]
|
|
17
21
|
member :payment_means_code, type: Integer
|
|
18
22
|
|
|
23
|
+
# Payment means text BT-82
|
|
24
|
+
#
|
|
25
|
+
# @!attribute payment_means_code
|
|
26
|
+
# @return [String]
|
|
27
|
+
member :instruction_note, type: String, optional: true
|
|
28
|
+
|
|
29
|
+
# Remittance information BT-83
|
|
30
|
+
#
|
|
31
|
+
# @!attribute payment_means_code
|
|
32
|
+
# @return [String]
|
|
33
|
+
member :payment_id, type: String, optional: true
|
|
34
|
+
|
|
35
|
+
# Credit transfer BG-17
|
|
36
|
+
#
|
|
19
37
|
# @!attribute payee_financial_account
|
|
20
38
|
# @return [Xrechnung::PayeeFinancialAccount]
|
|
21
39
|
member :payee_financial_account, type: Xrechnung::PayeeFinancialAccount
|
|
22
40
|
|
|
41
|
+
# Direct debit BG-19
|
|
42
|
+
#
|
|
23
43
|
# @!attribute payment_mandate
|
|
24
44
|
# @return [Xrechnung::PaymentMandate]
|
|
25
45
|
member :payment_mandate, type: Xrechnung::PaymentMandate, optional: true
|
|
@@ -27,6 +47,8 @@ module Xrechnung
|
|
|
27
47
|
# noinspection RubyResolve
|
|
28
48
|
def to_xml(xml)
|
|
29
49
|
xml.cbc :PaymentMeansCode, payment_means_code
|
|
50
|
+
xml.cbc :InstructionNote, instruction_note if instruction_note
|
|
51
|
+
xml.cbc :PaymentID, payment_id if payment_id
|
|
30
52
|
payee_financial_account&.to_xml(xml)
|
|
31
53
|
payment_mandate&.to_xml(xml)
|
|
32
54
|
xml.target!
|
|
@@ -17,6 +17,11 @@ module Xrechnung
|
|
|
17
17
|
# • O (Services outside scope of tax)
|
|
18
18
|
# • L (Canary Islands general indirect tax)
|
|
19
19
|
# • M (Tax for production, services and importation in Ceuta and Melilla)
|
|
20
|
+
#
|
|
21
|
+
# Note: S, Z, E, AE, K, G, L and M require either a seller VAT identifier (BT-31),
|
|
22
|
+
# a seller tax registration identifier (BT-32), or a seller tax representative
|
|
23
|
+
# party (BG-11). Xrechnung::Document currently only supports the VAT identifier.
|
|
24
|
+
#
|
|
20
25
|
# @!attribute id
|
|
21
26
|
# @return [String]
|
|
22
27
|
member :id, type: String
|
data/lib/xrechnung/version.rb
CHANGED
data/lib/xrechnung.rb
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
require "xrechnung/version"
|
|
2
1
|
require "date"
|
|
2
|
+
require "builder"
|
|
3
|
+
|
|
4
|
+
require "active_support/core_ext/object/blank"
|
|
5
|
+
|
|
6
|
+
require "xrechnung/version"
|
|
3
7
|
require "xrechnung/currency"
|
|
4
8
|
require "xrechnung/quantity"
|
|
5
9
|
require "xrechnung/id"
|
|
@@ -25,7 +29,6 @@ require "xrechnung/price"
|
|
|
25
29
|
require "xrechnung/invoice_line"
|
|
26
30
|
require "xrechnung/invoice_document_reference"
|
|
27
31
|
require "xrechnung/invoice_period"
|
|
28
|
-
require "builder"
|
|
29
32
|
|
|
30
33
|
module Xrechnung
|
|
31
34
|
class Error < StandardError; end
|
|
@@ -120,7 +123,7 @@ module Xrechnung
|
|
|
120
123
|
#
|
|
121
124
|
# @!attribute purchase_order_reference
|
|
122
125
|
# @return [String]
|
|
123
|
-
member :purchase_order_reference, type: String
|
|
126
|
+
member :purchase_order_reference, type: String
|
|
124
127
|
|
|
125
128
|
# Sales order reference BT-14
|
|
126
129
|
#
|
|
@@ -289,16 +292,19 @@ module Xrechnung
|
|
|
289
292
|
# @return [Array]
|
|
290
293
|
member :allowance_charges, type: Array, default: []
|
|
291
294
|
|
|
295
|
+
COMMON_NAMESPACES = {
|
|
296
|
+
"xmlns:ubl" => "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2",
|
|
297
|
+
"xmlns:cac" => "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
|
|
298
|
+
"xmlns:cbc" => "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
|
|
299
|
+
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
|
300
|
+
"xsi:schemaLocation" => "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd",
|
|
301
|
+
}.freeze
|
|
302
|
+
|
|
292
303
|
def to_xml(indent: 2, target: "")
|
|
293
304
|
xml = Builder::XmlMarkup.new(indent: indent, target: target)
|
|
294
305
|
xml.instruct! :xml, version: "1.0", encoding: "UTF-8"
|
|
295
306
|
|
|
296
|
-
xml.ubl :Invoice,
|
|
297
|
-
"xmlns:ubl" => "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2",
|
|
298
|
-
"xmlns:cac" => "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
|
|
299
|
-
"xmlns:cbc" => "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
|
|
300
|
-
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
|
301
|
-
"xsi:schemaLocation" => "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd" do
|
|
307
|
+
xml.ubl :Invoice, COMMON_NAMESPACES do
|
|
302
308
|
xml.cbc :CustomizationID, customization_id
|
|
303
309
|
xml.cbc :ProfileID, profile_id
|
|
304
310
|
xml.cbc :ID, id
|
|
@@ -317,14 +323,12 @@ module Xrechnung
|
|
|
317
323
|
|
|
318
324
|
invoice_period&.to_xml(xml) unless self.class.members[:invoice_period].optional && invoice_period.nil?
|
|
319
325
|
|
|
320
|
-
unless
|
|
326
|
+
unless purchase_order_reference.nil? &&
|
|
321
327
|
self.class.members[:sales_order_reference].optional && sales_order_reference.nil?
|
|
322
328
|
xml.cac :OrderReference do
|
|
323
|
-
|
|
324
|
-
xml.cbc :ID, purchase_order_reference
|
|
325
|
-
end
|
|
329
|
+
xml.cbc :ID, purchase_order_reference
|
|
326
330
|
unless self.class.members[:sales_order_reference].optional && sales_order_reference.nil?
|
|
327
|
-
xml.cbc :
|
|
331
|
+
xml.cbc :SalesOrderID, sales_order_reference
|
|
328
332
|
end
|
|
329
333
|
end
|
|
330
334
|
end
|
data/xrechnung.gemspec
CHANGED
|
@@ -11,8 +11,9 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.license = "MIT"
|
|
12
12
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
|
13
13
|
|
|
14
|
-
spec.metadata["homepage_uri"]
|
|
15
|
-
spec.metadata["source_code_uri"]
|
|
14
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
15
|
+
spec.metadata["source_code_uri"] = "https://github.com/digineo/xrechnung"
|
|
16
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
|
16
17
|
|
|
17
18
|
# Specify which files should be added to the gem when it is released.
|
|
18
19
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -22,8 +23,8 @@ Gem::Specification.new do |spec|
|
|
|
22
23
|
|
|
23
24
|
spec.require_paths = ["lib"]
|
|
24
25
|
|
|
26
|
+
spec.add_dependency "activesupport" # for String#blank? and #present?
|
|
27
|
+
spec.add_dependency "base64"
|
|
28
|
+
spec.add_dependency "bigdecimal"
|
|
25
29
|
spec.add_dependency "builder", "~> 3.2"
|
|
26
|
-
|
|
27
|
-
spec.add_development_dependency "httparty", "~> 0.22"
|
|
28
|
-
spec.add_development_dependency "rubyzip", "~> 2.0"
|
|
29
30
|
end
|
metadata
CHANGED
|
@@ -1,58 +1,70 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xrechnung
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Kornberger
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
13
|
+
name: activesupport
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '0'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
25
|
+
version: '0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
27
|
+
name: base64
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
|
-
- - "
|
|
30
|
+
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0
|
|
34
|
-
type: :
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
|
-
- - "
|
|
37
|
+
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0
|
|
39
|
+
version: '0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
41
|
+
name: bigdecimal
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: builder
|
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
|
44
57
|
requirements:
|
|
45
58
|
- - "~>"
|
|
46
59
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '2
|
|
48
|
-
type: :
|
|
60
|
+
version: '3.2'
|
|
61
|
+
type: :runtime
|
|
49
62
|
prerelease: false
|
|
50
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
64
|
requirements:
|
|
52
65
|
- - "~>"
|
|
53
66
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '2
|
|
55
|
-
description:
|
|
67
|
+
version: '3.2'
|
|
56
68
|
email:
|
|
57
69
|
- jk+github@digineo.de
|
|
58
70
|
executables: []
|
|
@@ -63,6 +75,7 @@ files:
|
|
|
63
75
|
- ".github/workflows/validate-fixtures.yml"
|
|
64
76
|
- ".gitignore"
|
|
65
77
|
- ".rspec"
|
|
78
|
+
- ".rubocop"
|
|
66
79
|
- ".rubocop.yml"
|
|
67
80
|
- CODE_OF_CONDUCT.md
|
|
68
81
|
- Gemfile
|
|
@@ -107,7 +120,7 @@ licenses:
|
|
|
107
120
|
metadata:
|
|
108
121
|
homepage_uri: https://github.com/digineo/xrechnung
|
|
109
122
|
source_code_uri: https://github.com/digineo/xrechnung
|
|
110
|
-
|
|
123
|
+
rubygems_mfa_required: 'true'
|
|
111
124
|
rdoc_options: []
|
|
112
125
|
require_paths:
|
|
113
126
|
- lib
|
|
@@ -122,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
122
135
|
- !ruby/object:Gem::Version
|
|
123
136
|
version: '0'
|
|
124
137
|
requirements: []
|
|
125
|
-
rubygems_version:
|
|
126
|
-
signing_key:
|
|
138
|
+
rubygems_version: 4.0.5
|
|
127
139
|
specification_version: 4
|
|
128
140
|
summary: Library to create invoices in the XRechnung format.
|
|
129
141
|
test_files: []
|