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
|
||||
// die Hauptbuchunsperiode ausgewählt wurde. Ist das nicht der Fal gibt es eine
|
||||
// Fehlermeldung für den Anwendere
|
||||
String hauptBuchungsperiode = workitem.getItemValueString("invoice.period");
|
||||
boolean buchungsperiodenValid = false;
|
||||
for (ItemCollection posItem : childs) {
|
||||
String posBuchungsperiode = posItem.getItemValueString("invoice.period");
|
||||
if (posBuchungsperiode.isEmpty() || posBuchungsperiode.equals(hauptBuchungsperiode)) {
|
||||
// alles fein!
|
||||
buchungsperiodenValid = true;
|
||||
if (childs.size() > 0) {
|
||||
String hauptBuchungsperiode = workitem.getItemValueString("invoice.period");
|
||||
boolean buchungsperiodenValid = false;
|
||||
for (ItemCollection posItem : childs) {
|
||||
String posBuchungsperiode = posItem.getItemValueString("invoice.period");
|
||||
if (posBuchungsperiode.isEmpty() || posBuchungsperiode.equals(hauptBuchungsperiode)) {
|
||||
// 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