xrechnung 0.7.3 → 0.7.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c12b2ff2f51a6c12f63a584dddc23fd38d5c67f7c153c6c3457622438a82b348
4
- data.tar.gz: ed9e52088c5c6a821de9022b89cd201b3ef44de4591e781bee40c8bcf43ff990
3
+ metadata.gz: e33586c50ada6dde264adee80c71b6f9607ff0b4c23d8546bcba12d9ca3d6a11
4
+ data.tar.gz: 8232e6894531759fb8505ffe1b70cf3ed2a870042ac7c84bf6bf8d2ba861792d
5
5
  SHA512:
6
- metadata.gz: b58288653e2945cfd22d578e8a069b4f6b9d4a932e4b07331f03d71bf02c79aa5dc31760912fada8c3cd6314365a2f89fe27e83c0a1fd3531b9e3adc37f20cec
7
- data.tar.gz: 37465df554df646bdc974f1a0c056866f30afc6f711d88a9886330e08546e2817342ea5a1367b3b576590d3a9c753dda51dc91c8d7ed74f01a929916af7edf95
6
+ metadata.gz: a1604c366e607d18b0a06f505c7fba6d450e80e4ac8e9df89992bbfee90d0346f9474e072376378fb9424401485d05180a5fa763e7e84f9cb90bf1bf2e8cc4f4
7
+ data.tar.gz: d2d11a7f4d83f6fef572609ba7877dfb71cdefc3bdc06ee1807a67579f3568d592cf9893d98e88bbe5b46306f3d62efd75f2c0bcfcb3f45783b65a8aed9c0f17
data/.gitignore CHANGED
@@ -18,3 +18,4 @@
18
18
 
19
19
  # validator working directory
20
20
  validator/
21
+ .DS_Store
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xrechnung (0.7.2)
4
+ xrechnung (0.7.4)
5
5
  activesupport
6
6
  base64
7
7
  bigdecimal
8
8
  builder (~> 3.2)
9
+ nokogiri
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
@@ -58,6 +59,8 @@ GEM
58
59
  prism (~> 1.5)
59
60
  multi_xml (0.9.1)
60
61
  bigdecimal (>= 3.1, < 5)
62
+ nokogiri (1.19.4-arm64-darwin)
63
+ racc (~> 1.4)
61
64
  parallel (1.28.0)
62
65
  parser (3.3.12.0)
63
66
  ast (~> 2.4.1)
@@ -127,7 +130,7 @@ GEM
127
130
  uri (1.1.1)
128
131
 
129
132
  PLATFORMS
130
- ruby
133
+ arm64-darwin-25
131
134
 
132
135
  DEPENDENCIES
133
136
  debug
@@ -56,7 +56,7 @@ module Xrechnung
56
56
 
57
57
  xml.cac :CommodityClassification, commodity_classification unless commodity_classification.nil?
58
58
 
59
- classified_tax_category&.to_xml(xml, root_tag_name: :ClassifiedTaxCategory)
59
+ classified_tax_category&.to_xml(xml, root_tag_name: :ClassifiedTaxCategory, include_exemption_fields: false)
60
60
  end
61
61
  end
62
62
  end
@@ -54,12 +54,12 @@ module Xrechnung
54
54
  end
55
55
 
56
56
  # noinspection RubyResolve
57
- def to_xml(xml, root_tag_name: :TaxCategory)
57
+ def to_xml(xml, root_tag_name: :TaxCategory, include_exemption_fields: true)
58
58
  xml.cac root_tag_name do
59
59
  xml.cbc :ID, id
60
60
  xml.cbc :Percent, format("%.2f", percent) unless percent.nil?
61
61
 
62
- unless tax_exemption_reason_code.nil?
62
+ if include_exemption_fields && tax_exemption_reason_code.present?
63
63
  xml.cbc :TaxExemptionReasonCode, tax_exemption_reason_code
64
64
  xml.cbc :TaxExemptionReason, tax_exemption_reason
65
65
  end
@@ -41,7 +41,7 @@ module Xrechnung
41
41
  xml.cac :TaxSubtotal do
42
42
  xml.cbc :TaxableAmount, *taxable_amount.xml_args
43
43
  xml.cbc :TaxAmount, *tax_amount.xml_args
44
- tax_category&.to_xml(xml)
44
+ tax_category&.to_xml(xml, include_exemption_fields: true)
45
45
  end
46
46
  end
47
47
 
@@ -1,3 +1,3 @@
1
1
  module Xrechnung
2
- VERSION = "0.7.3".freeze
2
+ VERSION = "0.7.4".freeze
3
3
  end
data/xrechnung.gemspec CHANGED
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "base64"
28
28
  spec.add_dependency "bigdecimal"
29
29
  spec.add_dependency "builder", "~> 3.2"
30
+ spec.add_dependency "nokogiri"
30
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xrechnung
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Kornberger
@@ -65,6 +65,20 @@ dependencies:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '3.2'
68
+ - !ruby/object:Gem::Dependency
69
+ name: nokogiri
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
68
82
  email:
69
83
  - jk+github@digineo.de
70
84
  executables: []