export schnittstelle

This commit is contained in:
Ralph Soika 2021-01-29 14:43:16 +01:00
parent 268f24fafc
commit c5d54fffc9
2 changed files with 17 additions and 3 deletions

View file

@ -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<ItemCollection> childs = explodeChildList(workitem);
for (ItemCollection posItem : childs) {
@ -47,6 +47,20 @@ public class InvoicePlugin extends AbstractPlugin {
+ " 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!
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,

View file

@ -17,8 +17,8 @@
<tr>
<th style="">#</th>
<th style="">Positionsnummer<span class="imixs-required"> *</span></th>
<th style="width: 100px;">Steuer</th>
<th style="width: 100px;">Leistungsart</th>
<th style="width: 100px;">Steuer<span class="imixs-required"> *</span></th>
<th style="width: 100px;">Leistungsart<span class="imixs-required"> *</span></th>
<th style="width: 150px;text-align:right;">Netto</th>
<th style="width: 150px;text-align:right;">Brutto</th>
<th style="">