From 806b326051499bb0d4a1280261c7e57919bc19ab Mon Sep 17 00:00:00 2001 From: nils Date: Tue, 14 Jan 2025 16:11:52 +0100 Subject: [PATCH] =?UTF-8?q?Fomular=20Z=C3=A4hler=20nicht=20gespeichert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JVerein/gui/action/FreiesFormularAction.java | 1 + .../gui/action/SpendenbescheinigungPrintAction.java | 1 + .../JVerein/gui/control/FreieFormulareControl.java | 5 ++++- .../JVerein/gui/control/PreNotificationControl.java | 6 ++++-- src/de/jost_net/JVerein/io/FreiesFormularAusgabe.java | 9 ++++++--- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/de/jost_net/JVerein/gui/action/FreiesFormularAction.java b/src/de/jost_net/JVerein/gui/action/FreiesFormularAction.java index 111ad9891..afceb6230 100644 --- a/src/de/jost_net/JVerein/gui/action/FreiesFormularAction.java +++ b/src/de/jost_net/JVerein/gui/action/FreiesFormularAction.java @@ -120,6 +120,7 @@ private void generiereFreiesFormular(Mitglied[] m) throws Exception Map map = new MitgliedMap().getMap(mi, null); map = new AllgemeineMap().getMap(map); fa.writeForm(fo, map); + fo.store(); } fa.showFormular(); diff --git a/src/de/jost_net/JVerein/gui/action/SpendenbescheinigungPrintAction.java b/src/de/jost_net/JVerein/gui/action/SpendenbescheinigungPrintAction.java index d64a88133..d22376737 100644 --- a/src/de/jost_net/JVerein/gui/action/SpendenbescheinigungPrintAction.java +++ b/src/de/jost_net/JVerein/gui/action/SpendenbescheinigungPrintAction.java @@ -273,6 +273,7 @@ else if (context instanceof Spendenbescheinigung[]) fa.printAnschreiben(spb, text); } fa.closeFormular(); + fo.store(); } } String erfolg = (spbArr.length > 1) ? "Die Spendenbescheinigungen wurden erstellt und unter " + path + " gespeichert." diff --git a/src/de/jost_net/JVerein/gui/control/FreieFormulareControl.java b/src/de/jost_net/JVerein/gui/control/FreieFormulareControl.java index 4af4f7369..df1bab7e5 100644 --- a/src/de/jost_net/JVerein/gui/control/FreieFormulareControl.java +++ b/src/de/jost_net/JVerein/gui/control/FreieFormulareControl.java @@ -1,12 +1,14 @@ package de.jost_net.JVerein.gui.control; import java.io.IOException; + import de.jost_net.JVerein.io.FreiesFormularAusgabe; import de.willuhn.jameica.gui.AbstractView; import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.GUI; import de.willuhn.jameica.gui.parts.Button; import de.willuhn.logging.Logger; +import de.willuhn.util.ApplicationException; public class FreieFormulareControl extends DruckMailControl { @@ -41,7 +43,8 @@ public void handleAction(Object context) return button; } - private void generiereFreieFormulare(Object currentObject) throws IOException + private void generiereFreieFormulare(Object currentObject) + throws IOException, ApplicationException { saveDruckMailSettings(); new FreiesFormularAusgabe(this); diff --git a/src/de/jost_net/JVerein/gui/control/PreNotificationControl.java b/src/de/jost_net/JVerein/gui/control/PreNotificationControl.java index b4ce62f4a..088cada86 100644 --- a/src/de/jost_net/JVerein/gui/control/PreNotificationControl.java +++ b/src/de/jost_net/JVerein/gui/control/PreNotificationControl.java @@ -65,6 +65,7 @@ import de.willuhn.jameica.system.OperationCanceledException; import de.willuhn.jameica.system.Settings; import de.willuhn.logging.Logger; +import de.willuhn.util.ApplicationException; import de.willuhn.util.ProgressMonitor; public class PreNotificationControl extends DruckMailControl @@ -251,7 +252,7 @@ public void handleAction(Object context) } private void generierePDF(Object currentObject, boolean mitMail, - String pdfMode) throws IOException + String pdfMode) throws IOException, ApplicationException { ArrayList lastschriften = new ArrayList<>(); if (currentObject instanceof Abrechnungslauf) @@ -599,11 +600,12 @@ else if (currentObject instanceof Lastschrift[]) } private void aufbereitenFormular(Lastschrift ls, Formular fo) - throws RemoteException + throws RemoteException, ApplicationException { Map map = new LastschriftMap().getMap(ls, null); map = new AllgemeineMap().getMap(map); fa.writeForm(fo, map); + fo.store(); } private void sendeMail(final ArrayList lastschriften, final String betr, diff --git a/src/de/jost_net/JVerein/io/FreiesFormularAusgabe.java b/src/de/jost_net/JVerein/io/FreiesFormularAusgabe.java index 809349598..bba4aeaa0 100644 --- a/src/de/jost_net/JVerein/io/FreiesFormularAusgabe.java +++ b/src/de/jost_net/JVerein/io/FreiesFormularAusgabe.java @@ -29,6 +29,7 @@ import de.jost_net.JVerein.util.JVDateFormatJJJJMMTT; import de.jost_net.JVerein.util.StringTool; import de.willuhn.jameica.gui.GUI; +import de.willuhn.util.ApplicationException; public class FreiesFormularAusgabe { @@ -40,7 +41,8 @@ public class FreiesFormularAusgabe ZipOutputStream zos = null; - public FreiesFormularAusgabe(FreieFormulareControl control) throws IOException + public FreiesFormularAusgabe(FreieFormulareControl control) + throws IOException, ApplicationException { this.control = control; Formular formular = (Formular) control @@ -79,7 +81,7 @@ public FreiesFormularAusgabe(FreieFormulareControl control) throws IOException } public void aufbereitung(Formular formular, ArrayList mitglieder) - throws IOException + throws IOException, ApplicationException { for (Mitglied m : mitglieder) { @@ -154,11 +156,12 @@ File getDateiAuswahl(String extension, String name) throws RemoteException } void aufbereitenFormular(Mitglied m, FormularAufbereitung fa, Formular fo) - throws RemoteException + throws RemoteException, ApplicationException { Map map = new MitgliedMap().getMap(m, null); map = new AllgemeineMap().getMap(map); fa.writeForm(fo, map); + fo.store(); } String getDateiname(Mitglied m) throws RemoteException