Skip to content

Commit

Permalink
Fix Buchung Duplizieren (#302)
Browse files Browse the repository at this point in the history
* Fix Buchung Duplizieren

* Update BuchungDuplizierenAction.java
  • Loading branch information
JohannMaierhofer authored Aug 21, 2024
1 parent 0c0547d commit 1ff4425
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/de/jost_net/JVerein/gui/action/BuchungDuplizierenAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
**********************************************************************/
package de.jost_net.JVerein.gui.action;

import de.jost_net.JVerein.Einstellungen;
import de.jost_net.JVerein.gui.view.BuchungView;
import de.jost_net.JVerein.rmi.Buchung;
import de.willuhn.jameica.gui.Action;
Expand All @@ -32,12 +33,27 @@ public void handleAction(Object context) throws ApplicationException
{
throw new ApplicationException("keine Buchung ausgewählt");
}
Buchung b = null;
Buchung b = (Buchung) context;
try
{
b = (Buchung) context;
b.setID(null);
GUI.startView(new BuchungView(), b);
Buchung bu = (Buchung) Einstellungen.getDBService().createObject(Buchung.class,
null);
bu.setKonto(b.getKonto());
bu.setName(b.getName());
bu.setIban(b.getIban());
bu.setBetrag(b.getBetrag());
bu.setZweck(b.getZweck());
bu.setDatum(b.getDatum());
bu.setArt(b.getArt());
bu.setKommentar(b.getKommentar());
if (b.getBuchungsart() != null)
bu.setBuchungsart(b.getBuchungsartId());
if (b.getProjekt() != null)
bu.setProjektID(b.getProjektID());
bu.setAuszugsnummer(b.getAuszugsnummer());
bu.setBlattnummer(b.getBlattnummer());
bu.setVerzicht(b.getVerzicht());
GUI.startView(new BuchungView(), bu);
}
catch (Exception e)
{
Expand Down

0 comments on commit 1ff4425

Please sign in to comment.