From 50f9fe5f65cc1329786243b9551a6e769c41296a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20Sta=CC=88rk?= Date: Wed, 29 Nov 2017 17:22:45 +0100 Subject: [PATCH] Update history, prevent counting non-pdf-files as PDF in toecount, default export filename for ZF2 files now factur-x.xml in toecount --- History.md | 19 ++++++++++++++++--- .../mustangproject/toecount/FileChecker.java | 4 +++- .../org/mustangproject/toecount/Toecount.java | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/History.md b/History.md index 7f8e73ea..d68f4f8a 100644 --- a/History.md +++ b/History.md @@ -1,11 +1,24 @@ 1.5.0 ===== -Now using factory. Export now also possible on OutputStream. -Further dev improvements: no more need to call PDFattachZugferdFile(null); +Now using factory. Export is now also possible on OutputStream. +Further dev improvements: no more need to call PDFattachZugferdFile(null) or exporter close(); toecount now has options to combine documents and upgrade xml file from ZF1 to ZF2 -More unit tests, e.g. for custom xml export. +More unit tests, e.g. for custom xml export, PDF/A Schema extensions. +Toecount is now integrated and the main class so "java -jar mustang-1.5.0.jar" should suffice + +Further changes: + +be able to specify profile #50 +close pdf files automatically after export #49 +ZUGFeRDimporter does not close #48 +command line option -e does not work on all-in-one jar #47 +invoices have wrong namespaces #45 +invalid a3 #44 +warn on export #39 + + 1.4.0 ===== 2017-05-11 diff --git a/src/main/java/org/mustangproject/toecount/FileChecker.java b/src/main/java/org/mustangproject/toecount/FileChecker.java index ab0e291a..e0497b41 100755 --- a/src/main/java/org/mustangproject/toecount/FileChecker.java +++ b/src/main/java/org/mustangproject/toecount/FileChecker.java @@ -17,7 +17,9 @@ public class FileChecker { if (extIndex >= 0) { extension = filename.substring(extIndex).toLowerCase(); isPDF=extension.equals(".pdf");// alternative check for PDF: File starts with %PDF- - thisRun.incPDFCount(); + if (isPDF) { + thisRun.incPDFCount(); + } } } else { diff --git a/src/main/java/org/mustangproject/toecount/Toecount.java b/src/main/java/org/mustangproject/toecount/Toecount.java index fa2422b0..fea91d50 100755 --- a/src/main/java/org/mustangproject/toecount/Toecount.java +++ b/src/main/java/org/mustangproject/toecount/Toecount.java @@ -378,7 +378,7 @@ public class Toecount { try { xmlName = getFilenameFromUser("ZUGFeRD 1.0 XML source", "ZUGFeRD-invoice.xml", "xml", true, false); - outName = getFilenameFromUser("ZUGFeRD 2.0 XML target", "ZUGFeRD-2-invoice.xml", "xml", false, true); + outName = getFilenameFromUser("ZUGFeRD 2.0 XML target", "factur-x.xml", "xml", false, true); ZUGFeRDMigrator zmi = new ZUGFeRDMigrator(); String xml = zmi.migrateFromV1ToV2(xmlName);