Skip to content

Commit

Permalink
Fix Spendenbescheinigung Anzeige (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer authored Feb 18, 2024
1 parent da4fd83 commit d85b3a7
Showing 1 changed file with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import de.willuhn.jameica.gui.input.TextInput;
import de.willuhn.jameica.gui.parts.Button;
import de.willuhn.jameica.gui.parts.TablePart;
import de.willuhn.jameica.gui.parts.table.FeatureSummary;
import de.willuhn.logging.Logger;
import de.willuhn.util.ApplicationException;

Expand Down Expand Up @@ -345,12 +346,20 @@ public CheckboxInput getUnterlagenWertermittlung() throws RemoteException

public Part getBuchungsList() throws RemoteException
{
query = new SpendenbescheinigungBuchungQuery(getSpendenbescheinigung());
Spendenbescheinigung spb = getSpendenbescheinigung();
query = new SpendenbescheinigungBuchungQuery(spb);
if (buchungsList == null)
{
// buchungsList = new BuchungListTablePart(query.get(), new
// BuchungAction());
buchungsList = new BuchungListTablePart(query.get(), null);
if (spb.isNewObject())
{
buchungsList = new BuchungListTablePart(spb.getBuchungen(), null);
}
else
{
buchungsList = new BuchungListTablePart(query.get(), null);
}
buchungsList.addColumn("Nr", "id-int");
buchungsList.addColumn("Konto", "konto", new Formatter()
{
Expand Down Expand Up @@ -406,15 +415,24 @@ public String format(Object value)
buchungsList.setRememberColWidths(true);
buchungsList.setRememberOrder(true);
buchungsList.setRememberState(true);
buchungsList.setSummary(true);
buchungsList.addFeature(new FeatureSummary());
}
else
{
buchungsList.removeAll();

for (Buchung bu : query.get())
if (spb.isNewObject())
{
buchungsList.addItem(bu);
for (Buchung bu : spb.getBuchungen())
{
buchungsList.addItem(bu);
}
}
else
{
for (Buchung bu : query.get())
{
buchungsList.addItem(bu);
}
}
buchungsList.sort();
}
Expand Down Expand Up @@ -657,7 +675,7 @@ public Part getSpendenbescheinigungList() throws RemoteException
spbList.setRememberColWidths(true);
spbList.setContextMenu(new SpendenbescheinigungMenu());
spbList.setRememberOrder(true);
spbList.setSummary(false);
spbList.removeFeature(FeatureSummary.class);
spbList.setMulti(true);
return spbList;
}
Expand Down

0 comments on commit d85b3a7

Please sign in to comment.