From 33c0aff32bace3828dd45100977bd61f1a919302 Mon Sep 17 00:00:00 2001 From: Jan Krutisch Date: Wed, 4 Dec 2024 16:07:51 +0100 Subject: [PATCH] Release 3.2.0 Adding infos on contributors, adapting copyright notice --- CHANGELOG.md | 6 ++++++ CONTRIBUTORS.md | 8 ++++++++ README.md | 8 ++++++-- lib/secretariat.rb | 2 +- lib/secretariat/constants.rb | 2 +- lib/secretariat/helpers.rb | 15 +++++++++++++++ lib/secretariat/invoice.rb | 2 +- lib/secretariat/line_item.rb | 3 +-- lib/secretariat/tax.rb | 3 +-- lib/secretariat/trade_party.rb | 2 +- lib/secretariat/validation_error.rb | 2 +- lib/secretariat/validator.rb | 2 +- lib/secretariat/version.rb | 4 ++-- lib/secretariat/versioner.rb | 15 +++++++++++++++ 14 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 CONTRIBUTORS.md diff --git a/CHANGELOG.md b/CHANGELOG.md index ba11c71..1d14350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 3.2.0 + +- [CHORE] Update schemas for latest Factur-X version (1.07.2) by @zealot128 +- [FEATURE] Allow for multiple tax rates in line items and correctly summarising them in invoice. PR by @SubandiK +- [CHORE] Update copyright notices and add CONTRIBUTORS.md to reflect that this isn't a solo project anymore. + ## 3.1.0 - [BUGFIX] Schematron Validator always reported valid. Fix by @SubandiK diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..56f7bd6 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,8 @@ +# Contributors + +This library has been originally developed by Jan 'half/byte' Krutisch. + +@zealot128 (Stefan Wienert) contributed a bunch of new fields on invoice and also helped keeping the specs up to date. + +@SubandiK (Subandi Khairun) added a more robust handling of tax rates and fixed bugs in the original code. + diff --git a/README.md b/README.md index dd484a1..6715401 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,18 @@ See tests for examples. -# Some words of caution +## Some words of caution 1. This is an opinionated library optimised for my very specific usecase 2. While I did start to add some validations to make sure you can't input absolute garbage into this, I cannot guarantee factual (as in taxation law) correctness of the resulting XML. 1. The library, for ZUGFeRD 2.x, currently only supports the EN16931 variant. This is probably what you want as well. PRs welcome. 3. This does not contain any code to attach the XML to a PDF file, mainly because I have yet to find a ruby library to do that. For software that does this, take a look at [this python library](https://github.com/akretion/factur-x). -# LICENSE +## Contributors + +See [CONTRIBUTORS.md](CONTRIBUTORS.md). + +## LICENSE See [LICENSE](LICENSE). diff --git a/lib/secretariat.rb b/lib/secretariat.rb index 933e0ce..11980b2 100644 --- a/lib/secretariat.rb +++ b/lib/secretariat.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/secretariat/constants.rb b/lib/secretariat/constants.rb index 5e51510..3a40a82 100644 --- a/lib/secretariat/constants.rb +++ b/lib/secretariat/constants.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/secretariat/helpers.rb b/lib/secretariat/helpers.rb index 9e678de..1d91bcc 100644 --- a/lib/secretariat/helpers.rb +++ b/lib/secretariat/helpers.rb @@ -1,3 +1,18 @@ +=begin +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=end module Secretariat module Helpers def self.format(something, round: nil, digits:2) diff --git a/lib/secretariat/invoice.rb b/lib/secretariat/invoice.rb index c1ea973..ad86208 100644 --- a/lib/secretariat/invoice.rb +++ b/lib/secretariat/invoice.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/secretariat/line_item.rb b/lib/secretariat/line_item.rb index e456581..4e8c160 100644 --- a/lib/secretariat/line_item.rb +++ b/lib/secretariat/line_item.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - =end diff --git a/lib/secretariat/tax.rb b/lib/secretariat/tax.rb index 4fc69a3..50a5fa6 100644 --- a/lib/secretariat/tax.rb +++ b/lib/secretariat/tax.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - =end require 'bigdecimal' diff --git a/lib/secretariat/trade_party.rb b/lib/secretariat/trade_party.rb index 01bf068..d061249 100644 --- a/lib/secretariat/trade_party.rb +++ b/lib/secretariat/trade_party.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/secretariat/validation_error.rb b/lib/secretariat/validation_error.rb index aeef91e..3cf6ffe 100644 --- a/lib/secretariat/validation_error.rb +++ b/lib/secretariat/validation_error.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/secretariat/validator.rb b/lib/secretariat/validator.rb index d2625b5..613a6ec 100644 --- a/lib/secretariat/validator.rb +++ b/lib/secretariat/validator.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/secretariat/version.rb b/lib/secretariat/version.rb index 22f96e5..018fb84 100644 --- a/lib/secretariat/version.rb +++ b/lib/secretariat/version.rb @@ -1,5 +1,5 @@ =begin -Copyright Jan Krutisch +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,5 +15,5 @@ =end module Secretariat - VERSION = '3.1.0' + VERSION = '3.2.0' end diff --git a/lib/secretariat/versioner.rb b/lib/secretariat/versioner.rb index cdb15ca..6e60ccf 100644 --- a/lib/secretariat/versioner.rb +++ b/lib/secretariat/versioner.rb @@ -1,3 +1,18 @@ +=begin +Copyright Jan Krutisch and contributors (see CONTRIBUTORS.md) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=end module Secretariat module Versioner def by_version(version, v1, v2)