forked from jverein/jverein
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formularfeld Zähler & Formularverknüpfungen (#72)
* Formularfeld Zähler & Formularverknüpfungen - Neues Formularfeld "zaehler" eingefügt - Feld "zaehler" wird in Formularübersicht als "Fortlaufende Nr." ausgegeben - Bei Formularen vom Typ Rechnung und Mahnung wird die Fortlaufende Nr. automatisch hochgezählt - Formulare können verknüpft werden - Bei verknüpften Formularen werden die zaehler gleichgesetzt und untereinander aktualisiert - Eine Vererbung der Verknüpfung ist nicht implementiert * Fix: Show zaehler length in bills settings --------- Co-authored-by: Alexander Dippe <[email protected]>
- Loading branch information
Showing
18 changed files
with
452 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/de/jost_net/JVerein/gui/formatter/FormularLinkFormatter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/********************************************************************** | ||
* Copyright (c) by Heiner Jostkleigrewe | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the | ||
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
* the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, | ||
* see <http://www.gnu.org/licenses/>. | ||
* | ||
* [email protected] | ||
* www.jverein.de | ||
**********************************************************************/ | ||
package de.jost_net.JVerein.gui.formatter; | ||
|
||
import java.rmi.RemoteException; | ||
|
||
import de.jost_net.JVerein.Einstellungen; | ||
import de.jost_net.JVerein.rmi.Formular; | ||
import de.willuhn.jameica.gui.formatter.Formatter; | ||
import de.willuhn.logging.Logger; | ||
|
||
public class FormularLinkFormatter implements Formatter | ||
{ | ||
@Override | ||
public String format(Object o) | ||
{ | ||
if (o == null) | ||
{ | ||
return ""; | ||
} | ||
if (o instanceof Long) | ||
{ | ||
try | ||
{ | ||
Formular f = (Formular) Einstellungen.getDBService() | ||
.createObject(Formular.class, o.toString()); | ||
if (f == null) | ||
{ | ||
return "Das Formular mit der ID " + o.toString() + " wurde gelöscht."; | ||
} | ||
return f.getBezeichnung(); | ||
} | ||
catch (RemoteException e) | ||
{ | ||
Logger.error("Fehler", e); | ||
} | ||
} | ||
|
||
return ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.