xrechnung 0.7.2 → 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: bf7b2b0425ffb15eefdf3c311b4880aa2f55ad7c080f15ae853f597451f175fa
4
- data.tar.gz: b25e7331e0c5a19ead78358dda7d6fe600d7463531d5c375f5749c3aba455d30
3
+ metadata.gz: e33586c50ada6dde264adee80c71b6f9607ff0b4c23d8546bcba12d9ca3d6a11
4
+ data.tar.gz: 8232e6894531759fb8505ffe1b70cf3ed2a870042ac7c84bf6bf8d2ba861792d
5
5
  SHA512:
6
- metadata.gz: b8cf3e9c4b1e05ff361597ab9b7fd0fde10d1b3dfcf308111c0b3fb38eff48ec3d65fb050d8f799d2890b75c7fcb3543f3424b2b25f6a47fde38beb2bac5da54
7
- data.tar.gz: fad567481b7393fe3fb7ee28c09006ca11779080a4681cf2f9d4fe487c745fdaf08cb4b764696e2a4b28f1bac7351b0f598c2b69579835eea505030585f8a9db
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
data/README.md CHANGED
@@ -1,44 +1,5 @@
1
1
  # Xrechnung
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/xrechnung`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'xrechnung'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install xrechnung
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/digineo/xrechnung. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/digineo/xrechnung/blob/master/CODE_OF_CONDUCT.md).
36
-
37
-
38
- ## License
39
-
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
-
42
- ## Code of Conduct
43
-
44
- Everyone interacting in the Xrechnung project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/digineo/xrechnung/blob/master/CODE_OF_CONDUCT.md).
3
+ This repository has been archived.
4
+ Please migrate to https://github.com/AlexZeitler/zugpferd
5
+ which supports XRechnung and ZUGFeRD.
@@ -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.2".freeze
2
+ VERSION = "0.7.4".freeze
3
3
  end
data/lib/xrechnung.rb CHANGED
@@ -172,6 +172,9 @@ module Xrechnung
172
172
  # @return [String]
173
173
  member :tax_currency_code, type: String
174
174
 
175
+ # Buyer accounting reference BT-19
176
+ member :buyer_accounting_reference, type: String, optional: true
177
+
175
178
  # Buyer reference BT-10
176
179
  #
177
180
  # Ein vom Erwerber zugewiesener und für interne Lenkungszwecke benutzter Bezeichner.
@@ -331,6 +334,7 @@ module Xrechnung
331
334
  xml.cbc :TaxPointDate, tax_point_date unless tax_point_date.nil?
332
335
  xml.cbc :DocumentCurrencyCode, document_currency_code
333
336
  xml.cbc :TaxCurrencyCode, tax_currency_code unless tax_currency_code.nil?
337
+ xml.cbc :AccountingCost, buyer_accounting_reference unless buyer_accounting_reference.nil?
334
338
  xml.cbc :BuyerReference, buyer_reference
335
339
 
336
340
  invoice_period&.to_xml(xml) unless self.class.members[:invoice_period].optional && invoice_period.nil?
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.2
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: []