fix
This commit is contained in:
parent
dc0d71da44
commit
2f2d2eef55
1 changed files with 14 additions and 12 deletions
|
|
@ -143,19 +143,21 @@ public class InvoicePlugin extends AbstractPlugin {
|
||||||
// Im folgenden überprüfen wir ob eine Buchungszeile vorkommt in der keine oder
|
// Im folgenden überprüfen wir ob eine Buchungszeile vorkommt in der keine oder
|
||||||
// die Hauptbuchunsperiode ausgewählt wurde. Ist das nicht der Fal gibt es eine
|
// die Hauptbuchunsperiode ausgewählt wurde. Ist das nicht der Fal gibt es eine
|
||||||
// Fehlermeldung für den Anwendere
|
// Fehlermeldung für den Anwendere
|
||||||
String hauptBuchungsperiode = workitem.getItemValueString("invoice.period");
|
if (childs.size() > 0) {
|
||||||
boolean buchungsperiodenValid = false;
|
String hauptBuchungsperiode = workitem.getItemValueString("invoice.period");
|
||||||
for (ItemCollection posItem : childs) {
|
boolean buchungsperiodenValid = false;
|
||||||
String posBuchungsperiode = posItem.getItemValueString("invoice.period");
|
for (ItemCollection posItem : childs) {
|
||||||
if (posBuchungsperiode.isEmpty() || posBuchungsperiode.equals(hauptBuchungsperiode)) {
|
String posBuchungsperiode = posItem.getItemValueString("invoice.period");
|
||||||
// alles fein!
|
if (posBuchungsperiode.isEmpty() || posBuchungsperiode.equals(hauptBuchungsperiode)) {
|
||||||
buchungsperiodenValid = true;
|
// alles fein!
|
||||||
|
buchungsperiodenValid = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (buchungsperiodenValid == false) {
|
||||||
|
// fehlerhafte Buchungsperioden.
|
||||||
|
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,
|
||||||
|
"Eingabefehler - Bitte überprüfen Sie die Hauptbuchungsperiode mit den Buchugnsperioden der einzelnen Positionen!");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (buchungsperiodenValid == false) {
|
|
||||||
// fehlerhafte Buchungsperioden.
|
|
||||||
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,
|
|
||||||
"Eingabefehler - Bitte überprüfen Sie die Hauptbuchungsperiode mit den Buchugnsperioden der einzelnen Positionen!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue