From c5d54fffc93c06423cc24d6b87b6d21ade0d1cac Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Fri, 29 Jan 2021 14:43:16 +0100 Subject: [PATCH] export schnittstelle --- .../com/alexanderlogistics/InvoicePlugin.java | 16 +++++++++++++++- .../forms/alexander/sub_positionen.xhtml | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java index 8f59abe..2f1560b 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java @@ -36,7 +36,7 @@ public class InvoicePlugin extends AbstractPlugin { @Override public ItemCollection run(ItemCollection workitem, ItemCollection documentActivity) throws PluginException { - // die prüfung der positionsnummern erfolgt nur im Status 5200 ! + // die prüfung der positionsnummern und Category erfolgt nur im Status 5200 ! if (workitem.getTaskID() == 5200) { List childs = explodeChildList(workitem); for (ItemCollection posItem : childs) { @@ -46,6 +46,20 @@ public class InvoicePlugin extends AbstractPlugin { "Eingabefehler - Die Positionsnummer in Zeile " + posItem.getItemValueString("numpos") + " muss aufgefüllt sein!"); } + + if (posItem.getItemValueString("category").trim().isEmpty()) { + // throw a plugin exception - because name is missing! + throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, + "Eingabefehler - Die Leistungsart in Zeile " + posItem.getItemValueString("numpos") + + " muss aufgefüllt sein!"); + } + + if (posItem.getItemValueString("tax").trim().isEmpty()) { + // throw a plugin exception - because name is missing! + throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, + "Eingabefehler - Die Steuer in Zeile " + posItem.getItemValueString("numpos") + + " muss aufgefüllt sein!"); + } if (posItem.getItemValueFloat("amount") == 0) { // throw a plugin exception - because name is missing! diff --git a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_positionen.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_positionen.xhtml index bfce698..0a430ab 100644 --- a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_positionen.xhtml +++ b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_positionen.xhtml @@ -17,8 +17,8 @@ # Positionsnummer * - Steuer - Leistungsart + Steuer * + Leistungsart * Netto Brutto