forked from jverein/jverein
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verrechnungskonto für Lastschriften (#561)
* Verrechnungskont für Lastschriften * Schreibfehler, Konto-import * Rechtschreibung * Funktionen umbenannt * Update Verrechnungskonto. NPE test
- Loading branch information
Showing
6 changed files
with
102 additions
and
29 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
44 changes: 44 additions & 0 deletions
44
src/de/jost_net/JVerein/server/DDLTool/Updates/Update0456.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,44 @@ | ||
/********************************************************************** | ||
* 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/>. | ||
* | ||
**********************************************************************/ | ||
package de.jost_net.JVerein.server.DDLTool.Updates; | ||
|
||
import java.sql.Connection; | ||
|
||
import de.jost_net.JVerein.server.DDLTool.AbstractDDLUpdate; | ||
import de.jost_net.JVerein.server.DDLTool.Column; | ||
import de.willuhn.util.ApplicationException; | ||
import de.willuhn.util.ProgressMonitor; | ||
|
||
public class Update0456 extends AbstractDDLUpdate | ||
{ | ||
public Update0456(String driver, ProgressMonitor monitor, Connection conn) | ||
{ | ||
super(driver, monitor, conn); | ||
} | ||
|
||
@Override | ||
public void run() throws ApplicationException | ||
{ | ||
{ | ||
execute(addColumn("einstellung", new Column("verrechnungskonto", | ||
COLTYPE.BIGINT, 20, null, false, false))); | ||
|
||
// Standard Verrechnungskonto setzen wie es auch bisher bestimmt wurde | ||
execute("UPDATE einstellung SET verrechnungskonto = " | ||
+ " (SELECT konto.id from konto" | ||
+ " JOIN einstellung ON einstellung.iban LIKE CONCAT('%', konto.nummer)" | ||
+ " ORDER by length(konto.nummer) DESC LIMIT 1)"); | ||
} | ||
} | ||
} |
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