Skip to content

Commit

Permalink
Reset Filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mbmueller committed Nov 26, 2024
1 parent 53e08cb commit f140ca1
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/de/jost_net/JVerein/gui/control/BuchungsControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.List;
import java.util.Vector;

import de.jost_net.JVerein.rmi.Einstellung;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
Expand Down Expand Up @@ -899,7 +900,10 @@ public SelectInput getDatumsart()
{
return datumsart;
}
datumsart = new SelectInput(Datumsart.values(), Datumsart.BUCHUNGSDATUM);
Datumsart art = Datumsart.valueOf(
settings.getString(settingsprefix + "datumsart", "Buchungsdatum")
.toUpperCase());
datumsart = new SelectInput(Datumsart.values(), art);
return datumsart;
}

Expand Down Expand Up @@ -1266,7 +1270,15 @@ private Long getSelectedBuchungsKlasseId() throws ApplicationException

public Part getBuchungsList() throws RemoteException
{
Einstellung einstellung = Einstellungen.getEinstellung();

// Werte speichern
Datumsart art = (Datumsart) getDatumsart().getValue();
if (art == null)
{
throw new RemoteException("Keine Datumsart gewählt");
}
settings.setAttribute(settingsprefix + "datumsart", art.toString());
Date dv = (Date) getVondatum().getValue();
if (dv == null)
{
Expand Down Expand Up @@ -1373,6 +1385,12 @@ public String format(Object o)
buchungsList.addColumn("Datum", "datum",
new DateFormatter(new JVDateFormatTTMMJJJJ()));

if (einstellung.getWirtschaftsplanung())
{
buchungsList.addColumn("Leistungsdatum", "leistungsdatum",
new DateFormatter(new JVDateFormatTTMMJJJJ()));
}

if (geldkonto)
{
buchungsList.addColumn("Auszugsnummer", "auszugsnummer");
Expand Down Expand Up @@ -2280,6 +2298,7 @@ public void resetFilter()
startGJ = Datum.toDate(
Einstellungen.getEinstellung().getBeginnGeschaeftsjahr() + year);
}
datumsart.setValue(Datumsart.BUCHUNGSDATUM);
vondatum.setValue(startGJ);
calendar.setTime(startGJ);
calendar.add(Calendar.YEAR, 1);
Expand Down

0 comments on commit f140ca1

Please sign in to comment.