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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +5 -2
- data/README.md +3 -42
- data/lib/xrechnung/item.rb +1 -1
- data/lib/xrechnung/tax_category.rb +2 -2
- data/lib/xrechnung/tax_subtotal.rb +1 -1
- data/lib/xrechnung/version.rb +1 -1
- data/lib/xrechnung.rb +4 -0
- data/xrechnung.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e33586c50ada6dde264adee80c71b6f9607ff0b4c23d8546bcba12d9ca3d6a11
|
|
4
|
+
data.tar.gz: 8232e6894531759fb8505ffe1b70cf3ed2a870042ac7c84bf6bf8d2ba861792d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1604c366e607d18b0a06f505c7fba6d450e80e4ac8e9df89992bbfee90d0346f9474e072376378fb9424401485d05180a5fa763e7e84f9cb90bf1bf2e8cc4f4
|
|
7
|
+
data.tar.gz: d2d11a7f4d83f6fef572609ba7877dfb71cdefc3bdc06ee1807a67579f3568d592cf9893d98e88bbe5b46306f3d62efd75f2c0bcfcb3f45783b65a8aed9c0f17
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
xrechnung (0.7.
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.
|
data/lib/xrechnung/item.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
data/lib/xrechnung/version.rb
CHANGED
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
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.
|
|
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: []
|