Merge branch 'master' of github.com:ZUGFeRD/mustangproject
This commit is contained in:
@@ -63,7 +63,7 @@
|
|||||||
=======
|
=======
|
||||||
2022-09-22
|
2022-09-22
|
||||||
|
|
||||||
Removed a unneccessary dependency (ph-jaxb).
|
Removed an unnecessary dependency (ph-jaxb).
|
||||||
Added some javadoc.
|
Added some javadoc.
|
||||||
|
|
||||||
2.5.5
|
2.5.5
|
||||||
@@ -197,7 +197,7 @@ To prevent regressions it is recommended to re-validate your PDF output after up
|
|||||||
- allow 1.2 and 2.0 in RDF versions for XRechnung 2.0 Referenzprofil
|
- allow 1.2 and 2.0 in RDF versions for XRechnung 2.0 Referenzprofil
|
||||||
- also use shortcut "t" for extended in zf1 #230
|
- also use shortcut "t" for extended in zf1 #230
|
||||||
- falscher Text in Exception #237
|
- falscher Text in Exception #237
|
||||||
- pr 240 ignore input pdf errors when specfied on command line https://github.com/ZUGFeRD/mustangproject/pull/240
|
- pr 240 ignore input pdf errors when specified on command line https://github.com/ZUGFeRD/mustangproject/pull/240
|
||||||
- pr 241 use sepa transfer instead of bank transfer https://github.com/ZUGFeRD/mustangproject/pull/241
|
- pr 241 use sepa transfer instead of bank transfer https://github.com/ZUGFeRD/mustangproject/pull/241
|
||||||
- be able to validate Order-X files
|
- be able to validate Order-X files
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ switch
|
|||||||
- new invoicecorrection class
|
- new invoicecorrection class
|
||||||
- order-x xml read support
|
- order-x xml read support
|
||||||
- support included notes on document and item level
|
- support included notes on document and item level
|
||||||
- occurence periods setOccurrencePeriod(Date start, Date end)
|
- occurrence periods setOccurrencePeriod(Date start, Date end)
|
||||||
- automated tests zuv/verapdf validate created library test files
|
- automated tests zuv/verapdf validate created library test files
|
||||||
- trans.getTradeSettlementPayment() removed in favor of trans.getTradeSettlement()
|
- trans.getTradeSettlementPayment() removed in favor of trans.getTradeSettlement()
|
||||||
- commandline option for no notices
|
- commandline option for no notices
|
||||||
@@ -370,7 +370,7 @@ Mustangproject 1.7.6
|
|||||||
2020-02-06
|
2020-02-06
|
||||||
|
|
||||||
- support different ship to address
|
- support different ship to address
|
||||||
- allow for diffent namespace prefixes #140
|
- allow for different namespace prefixes #140
|
||||||
- include exemption reason if doing intra community supply
|
- include exemption reason if doing intra community supply
|
||||||
- allow different currencies also for ZF2 (#150)
|
- allow different currencies also for ZF2 (#150)
|
||||||
- minor correction VAT exemptions
|
- minor correction VAT exemptions
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
On it's official website you can [download](https://www.mustangproject.org/deploy/Mustang-CLI-2.0.0.jar) Mustang 2.
|
On its official website you can [download](https://www.mustangproject.org/deploy/Mustang-CLI-2.0.0.jar) Mustang 2.
|
||||||
|
|
||||||
* Factur-X/ZUGFeRD 2 is now the default. In Mustangproject 1.x one had to select ZUGFeRD version 2 if that was desired, in Mustangproject 2 one now has to select ZUGFeRD version 1 if version 2 is not appropriate.
|
* Factur-X/ZUGFeRD 2 is now the default. In Mustangproject 1.x one had to select ZUGFeRD version 2 if that was desired, in Mustangproject 2 one now has to select ZUGFeRD version 1 if version 2 is not appropriate.
|
||||||
* Mustang is now available via Maven Central, which makes it even easier to use the Mustang library. Apart from making it easier in Maven because there is no longer the need to mention the custom repository, it also makes it possible to use Mustang in Gradle projects
|
* Mustang is now available via Maven Central, which makes it even easier to use the Mustang library. Apart from making it easier in Maven because there is no longer the need to mention the custom repository, it also makes it possible to use Mustang in Gradle projects
|
||||||
* ZUGFeRD 2.1.1 is now supported with it's XRechnung "reference profile". The previous stable version, Mustang 1.7.8, only supported ZUGFeRD 2.1.
|
* ZUGFeRD 2.1.1 is now supported with its XRechnung "reference profile". The previous stable version, Mustang 1.7.8, only supported ZUGFeRD 2.1.
|
||||||
* There is now an experimental visualization feature and an improved experimental upgrade functionality from ZF1 XML to ZF2 XML.
|
* There is now an experimental visualization feature and an improved experimental upgrade functionality from ZF1 XML to ZF2 XML.
|
||||||
* Mustang now supports percentual and absolute charges and allowances on both item and document level
|
* Mustang now supports percentual and absolute charges and allowances on both item and document level
|
||||||
* Mustang can now embed additional invoice-accompanying files like plans or worklists into the PDFs
|
* Mustang can now embed additional invoice-accompanying files like plans or worklists into the PDFs
|
||||||
* Additionally to the usual interface-based architecture there are now also classes for invoice, tradeparty etc., which makes it easier to develop in the Mustang library. Please feel free to have a look at it's tests on https://github.com/ZUGFeRD/mustangproject/blob/master/library/src/test/java/org/mustangproject/ZUGFeRD/ZF2PushTest.java.
|
* Additionally to the usual interface-based architecture there are now also classes for invoice, tradeparty etc., which makes it easier to develop in the Mustang library. Please feel free to have a look at its tests on https://github.com/ZUGFeRD/mustangproject/blob/master/library/src/test/java/org/mustangproject/ZUGFeRD/ZF2PushTest.java.
|
||||||
* Mustang now includes a validator, which can check the syntactical correctness of an e-invoice.
|
* Mustang now includes a validator, which can check the syntactical correctness of an e-invoice.
|
||||||
The validator component has previously been developed under the name ZUGFeRD and VeraPDF "ZUV".
|
The validator component has previously been developed under the name ZUGFeRD and VeraPDF "ZUV".
|
||||||
It is now mature enought to be merged into the Mustang mainstream project.
|
It is now mature enough to be merged into the Mustang mainstream project.
|
||||||
ZUV already was the validator behind https://www.zugferd-community.net/de/open_community/validation with around 1,000 validations/month alone,
|
ZUV already was the validator behind https://www.zugferd-community.net/de/open_community/validation with around 1,000 validations/month alone,
|
||||||
supports ZUGFeRD 1 and ZUGFeRD 2 and can be used via commandline.
|
supports ZUGFeRD 1 and ZUGFeRD 2 and can be used via commandline.
|
||||||
Additionally, the Mustang validator now also supports XRechnung 2, can now also be used as library and supports validation of whole directory trees.
|
Additionally, the Mustang validator now also supports XRechnung 2, can now also be used as library and supports validation of whole directory trees.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Use on command line
|
### Use on command line
|
||||||
`java -jar Mustang-CLI-2.0.0-alpha3.jar --action=combine` embedds a XML into a PDF (A-1) file and exports as PDF/A-3
|
`java -jar Mustang-CLI-2.0.0-alpha3.jar --action=combine` embeds a XML into a PDF (A-1) file and exports as PDF/A-3
|
||||||
|
|
||||||
`java -jar mustang-cli.jar --action=extract` extracts XML from a ZUGFeRD file and
|
`java -jar mustang-cli.jar --action=extract` extracts XML from a ZUGFeRD file and
|
||||||
|
|
||||||
`java -jar mustang-cli.jar --action=validate` validates XML or PDF files.
|
`java -jar mustang-cli.jar --action=validate` validates XML or PDF files.
|
||||||
|
|
||||||
`java -jar mustang-cli.jar --help` still outputs the parameters which can be used
|
`java -jar mustang-cli.jar --help` still outputs the parameters which can be used
|
||||||
to for non-interactive (i.e., batch) processing.
|
to for non-interactive (i.e., batch) processing.
|
||||||
|
|
||||||
|
|
||||||
The source file parameter for validation changed
|
The source file parameter for validation changed
|
||||||
from `-f` (ZUV) to the usual `--source`.
|
from `-f` (ZUV) to the usual `--source`.
|
||||||
|
|
||||||
### Use as Library
|
### Use as Library
|
||||||
|
|
||||||
@@ -44,13 +44,13 @@ We're now on maven central, please remove the old github repository. Additionall
|
|||||||
| Version | 1.7.8 | 2.0.0-alpha3 |
|
| Version | 1.7.8 | 2.0.0-alpha3 |
|
||||||
|
|
||||||
If you want you can also embed the validator in your software using validator
|
If you want you can also embed the validator in your software using validator
|
||||||
as artifact ID. "validator" includes the library functionality but is >20 MB
|
as artifact ID. "validator" includes the library functionality but is >20 MB
|
||||||
bigger due to it's dependencies.
|
bigger due to its dependencies.
|
||||||
|
|
||||||
|
|
||||||
### Update from Mustang 1.x to 2.0
|
### Update from Mustang 1.x to 2.0
|
||||||
|
|
||||||
ZF2 was possible with Mustang 1 but it is default in Mustang 2, so
|
ZF2 was possible with Mustang 1 but it is default in Mustang 2, so
|
||||||
you will need to `.setZUGFeRDVersion(1)` if you don't want ZUGFeRD 2 files.
|
you will need to `.setZUGFeRDVersion(1)` if you don't want ZUGFeRD 2 files.
|
||||||
|
|
||||||
In the commandline, all actions will have to be invoked via --action=<theaction>, so
|
In the commandline, all actions will have to be invoked via --action=<theaction>, so
|
||||||
@@ -59,12 +59,12 @@ In the commandline, all actions will have to be invoked via --action=<theaction>
|
|||||||
`PDFattachZugferdFile` is now called `setTransaction` and instead of
|
`PDFattachZugferdFile` is now called `setTransaction` and instead of
|
||||||
a `ZUGFeRDExporterFromA1Factory` the `ZUGFeRDExporterFromA1` will now return a
|
a `ZUGFeRDExporterFromA1Factory` the `ZUGFeRDExporterFromA1` will now return a
|
||||||
a class implementing `IZUGFeRDExporter` instead of a `ZUGFeRDExporter`.
|
a class implementing `IZUGFeRDExporter` instead of a `ZUGFeRDExporter`.
|
||||||
So
|
So
|
||||||
```
|
```
|
||||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.COMFORT).load(SOURCE_PDF)) {
|
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.COMFORT).load(SOURCE_PDF)) {
|
||||||
|
|
||||||
```
|
```
|
||||||
changes to
|
changes to
|
||||||
```
|
```
|
||||||
IZUGFeRDExporter ze = new ZUGFeRDExporterFromA1().setZUGFeRDVersion(1).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
IZUGFeRDExporter ze = new ZUGFeRDExporterFromA1().setZUGFeRDVersion(1).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
||||||
|
|
||||||
@@ -75,15 +75,15 @@ If you want to use Profiles from older versions, please specify the version like
|
|||||||
`Profiles.getByName("Extended")` for an Extended profile of ZF1.
|
`Profiles.getByName("Extended")` for an Extended profile of ZF1.
|
||||||
|
|
||||||
The old Contact class has been corrected to TradeParty. The TradeParty class
|
The old Contact class has been corrected to TradeParty. The TradeParty class
|
||||||
can now refer to a (human) Contact from the new Contact() class.
|
can now refer to a (human) Contact from the new Contact() class.
|
||||||
|
|
||||||
The importer can still be used like
|
The importer can still be used like
|
||||||
|
|
||||||
```
|
```
|
||||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(inputStream);
|
ZUGFeRDImporter zi = new ZUGFeRDImporter(inputStream);
|
||||||
String amount = zi.getAmount();
|
String amount = zi.getAmount();
|
||||||
```
|
```
|
||||||
but there is also the new invoiceImporter
|
but there is also the new invoiceImporter
|
||||||
```
|
```
|
||||||
|
|
||||||
ZUGFeRDInvoiceImporter zii=new ZUGFeRDInvoiceImporter(TARGET_PDF);
|
ZUGFeRDInvoiceImporter zii=new ZUGFeRDInvoiceImporter(TARGET_PDF);
|
||||||
@@ -117,7 +117,7 @@ but there is also the new invoiceImporter
|
|||||||
TransactionCalculator tc=new TransactionCalculator(invoice);
|
TransactionCalculator tc=new TransactionCalculator(invoice);
|
||||||
assertEquals(new BigDecimal("571.04"),tc.getTotalGross());
|
assertEquals(new BigDecimal("571.04"),tc.getTotalGross());
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using the library to create e-invoices
|
### Using the library to create e-invoices
|
||||||
From maven central fetch
|
From maven central fetch
|
||||||
@@ -170,16 +170,16 @@ String theXML = new String(zf2p.getXML());
|
|||||||
or can also be used with setTransaction to generate invoice PDFs straight away.
|
or can also be used with setTransaction to generate invoice PDFs straight away.
|
||||||
### Embedding ZF1 to ZF2 migration
|
### Embedding ZF1 to ZF2 migration
|
||||||
The functionality is based on the XSLT file in library/src/main/resources/stylesheets/ZF1ToZF2.xsl,
|
The functionality is based on the XSLT file in library/src/main/resources/stylesheets/ZF1ToZF2.xsl,
|
||||||
it can be accessed via
|
it can be accessed via
|
||||||
```
|
```
|
||||||
XMLUpgrader zmi = new XMLUpgrader();
|
XMLUpgrader zmi = new XMLUpgrader();
|
||||||
String xml = zmi.migrateFromV1ToV2(xmlName);
|
String xml = zmi.migrateFromV1ToV2(xmlName);
|
||||||
Files.write(Paths.get(outName), xml.getBytes());
|
Files.write(Paths.get(outName), xml.getBytes());
|
||||||
|
|
||||||
```
|
```
|
||||||
### Embedding ZF2 visualization
|
### Embedding ZF2 visualization
|
||||||
|
|
||||||
In case you don't want to access this functionality over the
|
In case you don't want to access this functionality over the
|
||||||
commandline you can use
|
commandline you can use
|
||||||
```
|
```
|
||||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||||
@@ -187,14 +187,14 @@ commandline you can use
|
|||||||
Files.write(Paths.get("factur-x.xml"), xml.getBytes());
|
Files.write(Paths.get("factur-x.xml"), xml.getBytes());
|
||||||
```
|
```
|
||||||
for the visualizer. The output requires a CSS and a javascript file which are in the
|
for the visualizer. The output requires a CSS and a javascript file which are in the
|
||||||
jar's resources as
|
jar's resources as
|
||||||
(/src/main/resources/)xrechnung-viewer.css
|
(/src/main/resources/)xrechnung-viewer.css
|
||||||
(/src/main/respurces/)xrechnung-viewer.js
|
(/src/main/respurces/)xrechnung-viewer.js
|
||||||
|
|
||||||
|
|
||||||
### Embedding the validator
|
### Embedding the validator
|
||||||
The validator library also contains the functionality to
|
The validator library also contains the functionality to
|
||||||
read/write ZUGFeRD-invoices like the (smaller) library module.
|
read/write ZUGFeRD-invoices like the (smaller) library module.
|
||||||
```
|
```
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ You may already start developing what you wanted. Of course you can use any edit
|
|||||||
|
|
||||||
2. fork
|
2. fork
|
||||||
|
|
||||||
Once you can build, the idea is that you contribute patches via pull requests. For this you need a github account and a personal copy of the repository to store your changes in. Just klick fork on the mustangproject. On your copy you will have git write access. My suggestion as git client is sourcetree (I can send you instructions how to set it up).
|
Once you can build, the idea is that you contribute patches via pull requests. For this you need a GitHub account and a personal copy of the repository to store your changes in. Just click fork on the mustangproject. On your copy you will have git write access. My suggestion as git client is sourcetree (I can send you instructions how to set it up).
|
||||||
|
|
||||||
3. branch
|
3. branch
|
||||||
|
|
||||||
If you do a pull request, please do a feature branch, e.g. if you are working on a feature abc you could call your branch feature_abc. Merge requests unfortunately don't work if you don't have a branch you request merge of. Technically we follow the "github flow" strategy (not to be exchanged with the more sophisticated "git flow" strategy)
|
If you do a pull request, please do a feature branch, e.g. if you are working on a feature abc you could call your branch feature_abc. Merge requests unfortunately don't work if you don't have a branch you request merge of. Technically we follow the "GitHub flow" strategy (not to be exchanged with the more sophisticated "git flow" strategy)
|
||||||
|
|
||||||
4. test
|
4. test
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ library.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
The validator component embeds VeraPDF, a open-source
|
The validator component embeds VeraPDF, an open-source
|
||||||
PDF/A-validator, via maven dependency and uses standard java
|
PDF/A-validator, via maven dependency and uses standard java
|
||||||
checks against schema and ph-schematron for checks against the schematron
|
checks against schema and ph-schematron for checks against the schematron
|
||||||
to validate the XML part of the invoices.
|
to validate the XML part of the invoices.
|
||||||
@@ -151,7 +151,7 @@ The whole settings.xml then looks e.g. like this
|
|||||||
</settings>
|
</settings>
|
||||||
```
|
```
|
||||||
|
|
||||||
The TOKEN is generated on github.
|
The TOKEN is generated on GitHub.
|
||||||
Deployment to maven central is described e.g. on [dzone](https://dzone.com/articles/publish-your-artifacts-to-maven-central).
|
Deployment to maven central is described e.g. on [dzone](https://dzone.com/articles/publish-your-artifacts-to-maven-central).
|
||||||
See the following screenshot:
|
See the following screenshot:
|
||||||
Sign in in GitHub and click on the profile picture -> Settings. Now just generate a new token and set the checkboxes from the screenshot.
|
Sign in in GitHub and click on the profile picture -> Settings. Now just generate a new token and set the checkboxes from the screenshot.
|
||||||
@@ -221,7 +221,7 @@ the included file
|
|||||||
* Update documentation
|
* Update documentation
|
||||||
* write/translate announcement
|
* write/translate announcement
|
||||||
* release via/for mvn
|
* release via/for mvn
|
||||||
* Publish a github release
|
* Publish a GitHub release
|
||||||
* update mustangproject.org RE
|
* update mustangproject.org RE
|
||||||
* version number and release date
|
* version number and release date
|
||||||
* sample file?
|
* sample file?
|
||||||
|
|||||||
Reference in New Issue
Block a user