OP Listen Update , Invoice XML Import

This commit is contained in:
Ralph Soika 2024-05-14 15:37:08 +02:00
parent d176d3be39
commit c3a8957c25
9 changed files with 561 additions and 195 deletions

View file

@ -1,8 +1,13 @@
# Versionen # Versionen
### 1.2.19 (Development)
### 1.2.18 (Development) - Neue XML Invoice Schnittstelle
- Mahnwesen englisch (noch nicht begonnen!)
### 1.2.18
- Fix in Archiv Suche CustomSearchController.java - requestscoped - Fix in Archiv Suche CustomSearchController.java - requestscoped

View file

@ -6,7 +6,7 @@
<parent> <parent>
<artifactId>office-alexander-logistics</artifactId> <artifactId>office-alexander-logistics</artifactId>
<groupId>com.alexander-logistics</groupId> <groupId>com.alexander-logistics</groupId>
<version>1.2.18</version> <version>1.2.19</version>
</parent> </parent>
<artifactId>office-alexander-logistics-app</artifactId> <artifactId>office-alexander-logistics-app</artifactId>
<packaging>war</packaging> <packaging>war</packaging>

View file

@ -195,10 +195,8 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
} else { } else {
catSumUSD = catSumUSD + invoice.getItemValueDouble("invoice.saldo"); catSumUSD = catSumUSD + invoice.getItemValueDouble("invoice.saldo");
} }
} }
categoryRow.getCell(6).setCellValue(catSumEUR); categoryRow.getCell(6).setCellValue(catSumEUR);
categoryRow.getCell(8).setCellValue(catSumUSD); categoryRow.getCell(8).setCellValue(catSumUSD);

View file

@ -23,7 +23,6 @@ import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType; import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -156,8 +155,12 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
private void insertInvoiceRows(ItemCollection document, String fileName) private void insertInvoiceRows(ItemCollection document, String fileName)
throws PluginException, QueryException { throws PluginException, QueryException {
double saldoUSD = 0; double saldoUSD1 = 0;
double saldoEUR = 0; double saldoEUR1 = 0;
double saldoUSD2 = 0;
double saldoEUR2 = 0;
double saldoUSD3 = 0;
double saldoEUR3 = 0;
List<String> spaceNames = new ArrayList<String>(); List<String> spaceNames = new ArrayList<String>();
// compute all departments // compute all departments
@ -196,12 +199,23 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
// First we create a column for each Space..... // First we create a column for each Space.....
XSSFRow rowSpacesLabels = sheet.getRow(9); XSSFRow rowSpacesLabels = sheet.getRow(9);
XSSFCellStyle superDuperStyle = rowSpacesLabels.getCell(0).getCellStyle(); XSSFRow referenceRowSpacesCurrencies = sheet.getRow(10);
XSSFRow rowSpacesCurrencies = sheet.getRow(10); XSSFRow referenceRowValues = sheet.getRow(11);
XSSFRow rowValues = sheet.getRow(11); XSSFRow referenceRowCurrentWeek = sheet.getRow(12);
// Aktuelle KW berechnen
calendar.setTime(new Date());
int currentWeekNumber = calendar.get(Calendar.WEEK_OF_YEAR);
int currentYear = calendar.get(Calendar.YEAR);
String currentWeekCategory = currentYear + "/";
if (currentWeekNumber < 10) {
currentWeekCategory = currentWeekCategory + "0" + currentWeekNumber;
} else {
currentWeekCategory = currentWeekCategory + currentWeekNumber;
}
XSSFCell cellSpaceLabelReference = rowSpacesLabels.getCell(2); XSSFCell cellSpaceLabelReference = rowSpacesLabels.getCell(2);
XSSFCell cellSpaceCurrencyReference = rowSpacesCurrencies.getCell(1); XSSFCell cellSpaceCurrencyReference = referenceRowSpacesCurrencies.getCell(1);
int column = 1; int column = 1;
for (ItemCollection space : spaces) { for (ItemCollection space : spaces) {
XSSFCell cell = null; XSSFCell cell = null;
@ -210,13 +224,13 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
spaceNames.add(spaceName); spaceNames.add(spaceName);
// Space currency EUR // Space currency EUR
cell = rowSpacesCurrencies.getCell(column); cell = referenceRowSpacesCurrencies.getCell(column);
cell.copyCellFrom(cellSpaceCurrencyReference, new CellCopyPolicy()); cell.copyCellFrom(cellSpaceCurrencyReference, new CellCopyPolicy());
cell.setCellValue("EUR"); cell.setCellValue("EUR");
// Space currency USD // Space currency USD
column++; column++;
cell = rowSpacesCurrencies.getCell(column); cell = referenceRowSpacesCurrencies.getCell(column);
cell.copyCellFrom(cellSpaceCurrencyReference, new CellCopyPolicy()); cell.copyCellFrom(cellSpaceCurrencyReference, new CellCopyPolicy());
cell.setCellValue("USD"); cell.setCellValue("USD");
@ -255,11 +269,31 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
Collections.sort(sortedWeekList); Collections.sort(sortedWeekList);
int rowPos = 11; int rowPos = 11;
/*
* Nun müssen wir so viele Zeilen nach unten schieben wie wir gleich einfügen.
* Dazu müssen wir kurz einen Probelauf machen um die geplante Anzahl zu
* errechnen....
*/
int insertCount = sortedWeekList.size();
sheet.shiftRows(rowPos + 1, 2999, insertCount, true, true);
/*
* Jetzt Zeile für Zeile einfügen....
*/
boolean ueberFaellig = true;
for (String week : sortedWeekList) { for (String week : sortedWeekList) {
// now create a new line.. // now create a new line..
rowPos++; rowPos++;
logger.info("--> Zeile " + rowPos + " Week=" + week);
XSSFRow row = sheet.createRow(rowPos); XSSFRow row = sheet.createRow(rowPos);
row.copyRowFrom(rowValues, new CellCopyPolicy());
if (week.equals(currentWeekCategory)) {
row.copyRowFrom(referenceRowCurrentWeek, new CellCopyPolicy());
ueberFaellig = false;
} else {
row.copyRowFrom(referenceRowValues, new CellCopyPolicy());
}
// insert values // insert values
row.getCell(0).setCellValue(week); row.getCell(0).setCellValue(week);
@ -275,8 +309,21 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
if (weekData != null) { if (weekData != null) {
logger.info(" EUR=" + weekData.totalEUR + " USD=" + weekData.totalUSD); logger.info(" EUR=" + weekData.totalEUR + " USD=" + weekData.totalUSD);
row.getCell(column).setCellValue(weekData.totalEUR); row.getCell(column).setCellValue(weekData.totalEUR);
column++; column++;
row.getCell(column).setCellValue(weekData.totalUSD); row.getCell(column).setCellValue(weekData.totalUSD);
saldoUSD3 = InvoiceUtil.round(saldoUSD3 + weekData.totalUSD);
if (ueberFaellig) {
saldoEUR1 = InvoiceUtil.round(saldoEUR1 + weekData.totalEUR);
saldoUSD1 = InvoiceUtil.round(saldoUSD1 + weekData.totalUSD);
} else {
saldoEUR2 = InvoiceUtil.round(saldoEUR2 + weekData.totalEUR);
saldoUSD2 = InvoiceUtil.round(saldoUSD2 + weekData.totalUSD);
}
column++; column++;
} else { } else {
@ -286,14 +333,27 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
} }
} }
// update style
// if (currentWeek.equals(week)) {
// for (int i = 0; i < 15; i++) {
// row.getCell(i).setCellStyle(superDuperStyle);
// }
// }
} }
// delete reference rows
logger.info("..shift 12 to " + rowPos);
sheet.shiftRows(12, rowPos, -1, true, true);
sheet.shiftRows(rowPos + 2, rowPos + 6, -3, true, true);
// now lets update the totals...
// Überfällig
XSSFCell cTotalEUR1 = getCellByRef(doc, sheet, "TOTALEUR1");
XSSFCell cTotalUSD1 = getCellByRef(doc, sheet, "TOTALUSD1");
cTotalEUR1.setCellValue(saldoEUR1);
cTotalUSD1.setCellValue(saldoUSD1);
XSSFCell cTotalEUR2 = getCellByRef(doc, sheet, "TOTALEUR2");
XSSFCell cTotalUSD2 = getCellByRef(doc, sheet, "TOTALUSD2");
cTotalEUR2.setCellValue(saldoEUR2);
cTotalUSD2.setCellValue(saldoUSD2);
XSSFCell cTotalEUR3 = getCellByRef(doc, sheet, "TOTALEUR3");
XSSFCell cTotalUSD3 = getCellByRef(doc, sheet, "TOTALUSD3");
cTotalEUR3.setCellValue(InvoiceUtil.round(saldoEUR1 + saldoEUR2));
cTotalUSD3.setCellValue(InvoiceUtil.round(saldoUSD1 + saldoUSD2));
// write back the file // write back the file
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

View file

@ -132,8 +132,8 @@ public class OPListExportScheduler implements Scheduler {
} }
/** /**
* Prüfen ob es Rechnugen in diesem Space gibt die entweder die 2. Mahnstufe * Prüfen ob es Rechnungen in diesem Space gibt die entweder die 2. Mahnstufe
* erreicht habne oder deren Fälligkeit um mehr als 21 Tage überschritten ist. * erreicht haben oder deren Fälligkeit um mehr als 21 Tage überschritten ist.
* *
* @param space * @param space
* @return * @return

View file

@ -0,0 +1,297 @@
/*
* Imixs-Workflow
*
* Copyright (C) 2001-2020 Imixs Software Solutions GmbH,
* http://www.imixs.com
*
* 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 2
* 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 can receive a copy of the GNU General Public
* License at http://www.gnu.org/licenses/gpl.html
*
* Project:
* https://www.imixs.org
* https://github.com/imixs/imixs-workflow
*
* Contributors:
* Imixs Software Solutions GmbH - Project Management
* Ralph Soika - Software Developer
*/
package com.alexanderlogistics.xml;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.enterprise.event.Observes;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPSClient;
import org.imixs.archive.importer.DocumentImportEvent;
import org.imixs.archive.importer.DocumentImportService;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.ModelService;
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.exceptions.AccessDeniedException;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.ProcessingErrorException;
/**
* Der CargosoftXMLInvoiceImportImportService erweitert den FTPImportService und
* kann XML Invoice Dokumente von Cargosoft importieren.
* Der Service reagiert auf DocumentImportEvents und kann über das Options Feld
* konfiguriert werden.
* <p>
* Im Gegensatz zum FTPImportService werden die XML Dateien nach einem
* speziellen
* Verfahren geparsed und dann als Ausgangsrechnungen importiert.
* Der Service ersetzt den alten DATEV Import. Falls eine Rechnung schon
* existiert (Rechnungsnummer) wird der Datensatz vom FTP Laufwerk gelöscht und
* nicht importiert.
* <p>
* In den Optionen muss die option "mandant.id" hinterlegt sein. Stimmt
* diese beim Import nicht mit der Mandanten Nummer in der XML Datei überein,
* wird das XML Dokument gelöscht und nicht importiert.
*
*
*
* @author rsoika
*
*/
@Stateless
public class CargosoftXMLInvoiceImportImportService {
private static Logger logger = Logger.getLogger(CargosoftXMLInvoiceImportImportService.class.getName());
public static final String OPTION_MANDANT_ID = "mandant.id";
@EJB
WorkflowService workflowService;
@EJB
ModelService modelService;
@EJB
DocumentImportService documentImportService;
/**
* This method reacts on a CDI ImportEvent and reads documents form a ftp
* server.
*
*
*/
public void onEvent(@Observes DocumentImportEvent event) {
// check if source is already completed
if (event.getResult() == DocumentImportEvent.PROCESSING_COMPLETED) {
logger.finest("...... import source already completed - no processing will be performed.");
return;
}
if (!"CARGOSOFT_INVOICE_XML".equalsIgnoreCase(event.getSource().getItemValueString("type"))) {
// ignore data source
logger.finest("...... type '" + event.getSource().getItemValueString("type") + "' skipped.");
return;
}
Properties sourceOptions = documentImportService.getOptionsProperties(event.getSource());
// Read Mandand ID form Option list
String mandantID = sourceOptions.getProperty(OPTION_MANDANT_ID, "");
if (mandantID == null || mandantID.isEmpty()) {
documentImportService.logMessage("...CARGOSOFT_INVOICE_XML Import failed - missing mandant.id in options!",
event);
event.setResult(DocumentImportEvent.PROCESSING_ERROR);
return;
}
documentImportService.logMessage("...CARGOSOFT_INVOICE_XML Import started: mandant.id=" + mandantID,
event);
String ftpServer = event.getSource().getItemValueString(DocumentImportService.SOURCE_ITEM_SERVER);
String ftpPort = event.getSource().getItemValueString(DocumentImportService.SOURCE_ITEM_PORT);
String ftpUser = event.getSource().getItemValueString(DocumentImportService.SOURCE_ITEM_USER);
String ftpPassword = event.getSource().getItemValueString(DocumentImportService.SOURCE_ITEM_PASSWORD);
String ftpPath = event.getSource().getItemValueString(DocumentImportService.SOURCE_ITEM_SELECTOR);
if (!ftpPath.startsWith("/") && !ftpPath.startsWith("./")) {
ftpPath = "/" + ftpPath;
}
if (!ftpPath.endsWith("/")) {
ftpPath = ftpPath + "/";
}
// if no server is given we exit
if (ftpServer.isEmpty()) {
logger.warning("...... no server specified!");
return;
}
if (ftpPort.isEmpty()) {
// set default port
ftpPort = "21";
}
FTPClient ftpClient = null;
try {
logger.finest("......read directories ...");
documentImportService.logMessage("...connecting to FTP server: " + ftpServer, event);
// TLS
ftpClient = new FTPSClient("TLS", false);
ftpClient.setControlEncoding("UTF-8");
ftpClient.connect(ftpServer, Integer.parseInt(ftpPort));
if (ftpClient.login(ftpUser, ftpPassword) == false) {
documentImportService.logMessage("FTP file transfer failed: login failed!", event);
event.setResult(DocumentImportEvent.PROCESSING_ERROR);
return;
}
ftpClient.enterLocalPassiveMode();
logger.finest("...... FileType=" + FTP.BINARY_FILE_TYPE);
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
ftpClient.setControlEncoding("UTF-8");
// try to enter the working directory....
boolean bWorkingDir = ftpClient.changeWorkingDirectory(ftpPath);
if (bWorkingDir == true) {
documentImportService.logMessage("...working directory: " + ftpClient.printWorkingDirectory(), event);
// scann directories...
FTPFile[] subDirectories = ftpClient.listDirectories(ftpPath);
for (FTPFile ftpSubDirectory : subDirectories) {
ItemCollection space = null;
String ftpSubDirectoryName = ftpSubDirectory.getName();
logger.info("......scan files from path=" + ftpPath
+ ftpSubDirectory.getName());
/*
* Nun importieren wir alle Files
*/
FTPFile[] allFiles = ftpClient.listFiles(ftpPath + ftpSubDirectory.getName());
/*
* create a new workitem for each document
*/
int count = 0;
if (allFiles.length > 0) {
documentImportService.logMessage("..." + allFiles.length + " files found ", event);
ftpClient.changeWorkingDirectory(ftpPath + ftpSubDirectory.getName());
for (FTPFile file : allFiles) {
// if this is a directory or symlink then we do ignore this entry
if (!file.isFile()) {
documentImportService.logMessage(
"...'" + file.getName() + "' is not a valid file, object will be ignored!",
event);
continue;
}
logger.info("import file " + file.getName() + "...");
// String fullFileName = ftpPath + "/" + file.getName();
try (ByteArrayOutputStream is = new ByteArrayOutputStream();) {
ftpClient.retrieveFile(file.getName(), is);
byte[] rawData = is.toByteArray();
if (rawData != null && rawData.length > 0) {
logger.finest("......file '" + file.getName() + "' successfull read - bytes size = "
+ rawData.length);
// create new workitem
createWorkitem(event.getSource(), file.getName(), rawData, space);
// documentImportService.logMessage("....imported '" + file.getName() + "'",
// event);
count++;
} else {
documentImportService.logMessage("...Warning - invalid file content '"
+ file.getName() + "' - file will be deleted!", event);
}
// finally delete the file....
ftpClient.deleteFile(file.getName());
} catch (AccessDeniedException | ProcessingErrorException | PluginException
| ModelException e) {
documentImportService.logMessage("...FTP import failed: " + e.getMessage(), event);
event.setResult(DocumentImportEvent.PROCESSING_ERROR);
return;
}
}
documentImportService.logMessage("..." + count + " new files imported.", event);
} else {
documentImportService.logMessage("...no files found, directory '" + ftpPath + "' is empty",
event);
}
}
} else {
documentImportService.logMessage("...failed to change into working directory: " + ftpPath, event);
}
} catch (IOException e) {
logger.severe("FTP I/O Error: " + e.getMessage());
int r = ftpClient.getReplyCode();
logger.severe("FTP ReplyCode=" + r);
documentImportService.logMessage("...FTP file transfer failed (replyCode=" + r + ") : " + e.getMessage(),
event);
event.setResult(DocumentImportEvent.PROCESSING_ERROR);
return;
} finally {
// do logout....
try {
ftpClient.logout();
ftpClient.disconnect();
} catch (IOException e) {
documentImportService.logMessage("...FTP file transfer failed: " + e.getMessage(), event);
event.setResult(DocumentImportEvent.PROCESSING_ERROR);
return;
}
}
// completed
event.setResult(DocumentImportEvent.PROCESSING_COMPLETED);
}
/**
* Creates and processes a new workitem with a given xml information from the
* filedata
*
*
* @return
* @throws ModelException
* @throws PluginException
* @throws ProcessingErrorException
* @throws AccessDeniedException
*/
public ItemCollection createWorkitem(ItemCollection source, String fileName, byte[] rawData, ItemCollection space)
throws AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
ItemCollection workitem = new ItemCollection();
workitem.model(source.getItemValueString(DocumentImportService.SOURCE_ITEM_MODELVERSION));
workitem.task(source.getItemValueInteger(DocumentImportService.SOURCE_ITEM_TASK));
workitem.event(source.getItemValueInteger(DocumentImportService.SOURCE_ITEM_EVENT));
workitem.setWorkflowGroup(source.getItemValueString("workflowgroup"));
return workitem;
}
}

View file

@ -1,13 +1,8 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml" <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:i="http://java.sun.com/jsf/composite/imixs" xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions"
xmlns:i="http://java.sun.com/jsf/composite/imixs" xmlns:marty="http://java.sun.com/jsf/composite/marty" template="/layout/template.xhtml">
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions"
xmlns:marty="http://java.sun.com/jsf/composite/marty"
template="/layout/template.xhtml">
<ui:define name="content"> <ui:define name="content">
<f:view> <f:view>
@ -16,22 +11,22 @@
<script type="text/javascript"> <script type="text/javascript">
/*<![CDATA[*/ /*<![CDATA[*/
$(document).ready(function() { $(document).ready(function () {
//$('.imixsdatatable').layoutImixsTable(); //$('.imixsdatatable').layoutImixsTable();
}); });
// This method refreshs the layout
function updateOptions(data) { // This method refreshs the layout
if (data.status === 'success') { function updateOptions(data) {
$('[id$=Optionlist]').imixsLayout(); if (data.status === 'success') {
$('[id$=Optionlist]').imixsLayout();
/* var id='#'+data.source.id;
if (id.indexOf("input")>-1) { /* var id='#'+data.source.id;
$(id).focus(); if (id.indexOf("input")>-1) {
} */ $(id).focus();
} } */
} }
}
/*]]>*/ /*]]>*/
</script> </script>
@ -62,175 +57,189 @@
<!-- ### Timer ### --> <!-- ### Timer ### -->
<div id="tab-1"> <div id="tab-1">
<div class="ui-state-highlight ui-corner-all" <div class="ui-state-highlight ui-corner-all"
style="margin-bottom: 10px; padding: .5em;"> style="margin-bottom: 10px; padding: .5em;">
<p><span class="typcn typcn-lightbulb"></span> Define a crontab to schedule the import processor.</p> <p><span class="typcn typcn-lightbulb"></span> Define a crontab to schedule the
import processor.</p>
</div> </div>
<ui:include src="sub_scheduler_control.xhtml"> <ui:include src="sub_scheduler_control.xhtml">
<ui:param name="schedulerController" <ui:param name="schedulerController" value="#{documentImportController}" />
value="#{documentImportController}" />
</ui:include> </ui:include>
</div> </div>
<!-- ### SMTP ### --> <!-- ### SMTP ### -->
<div id="tab-2"> <div id="tab-2">
<div class="ui-state-highlight ui-corner-all" <div class="ui-state-highlight ui-corner-all"
style="margin-bottom: 10px; padding: .5em;"> style="margin-bottom: 10px; padding: .5em;">
<p><span class="typcn typcn-lightbulb"></span> Define a destination IMAP server and assign mail addresses to specific workflow groups.</p> <p><span class="typcn typcn-lightbulb"></span> Define a destination IMAP server and
assign mail addresses to specific workflow groups.</p>
</div> </div>
<div class="imixs-form-panel"> <div class="imixs-form-panel">
<!-- ### Sources ### --> <!-- ### Sources ### -->
<h:panelGroup layout="block" <h:panelGroup layout="block" id="imapOptionlist"
id="imapOptionlist" binding="#{imapOptionlistContainer}"> binding="#{imapOptionlistContainer}">
<f:ajax onevent="updateOptions"> <f:ajax onevent="updateOptions">
<table class="imixsdatatable" <table class="imixsdatatable" style="width: 100%;">
style="width: 100%;">
<thead> <thead>
<tr> <tr>
<th style="width: 10px;text-align: center;">Pos</th> <th style="width: 10px;text-align: center;">Pos</th>
<th style="width: 100px;text-align: center;">Type</th> <th style="width: 100px;text-align: center;">Type</th>
<th style="">Workflowgroup</th> <th style="">Workflowgroup</th>
<th style="">Modelversion</th> <th style="">Modelversion</th>
<th style="">Task</th> <th style="">Task</th>
<th style="">Event</th> <th style="">Event</th>
<th style="width: 110px;"> <th style="width: 110px;">
<!-- delete --> <!-- delete -->
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<ui:repeat var="source" value="#{documentImportController.sources}"> <ui:repeat var="source" value="#{documentImportController.sources}">
<tr> <tr>
<!-- pos --> <!-- pos -->
<td style=" text-align: center;"> <td style=" text-align: center;">
<h:commandLink <h:commandLink
actionListener="#{documentImportController.selectSource(source.item['index'])}">#<h:outputText actionListener="#{documentImportController.selectSource(source.item['index'])}">
value="#{source.item['index']}" /> #
<f:ajax render="#{imapOptionlistContainer.clientId}" <h:outputText value="#{source.item['index']}" />
onevent="updateOptions" /> <f:ajax render="#{imapOptionlistContainer.clientId}"
</h:commandLink> onevent="updateOptions" />
</td> </h:commandLink>
</td>
<!-- type -->
<td style="text-align: center;"> <!-- type -->
<h:outputText value="#{source.item['type']}" /> <td style="text-align: center;">
</td> <h:outputText value="#{source.item['type']}" />
<!-- Workflowgroup --> </td>
<td><h:outputText <!-- Workflowgroup -->
value="#{source.item['workflowgroup']}" /> <td>
</td> <h:outputText value="#{source.item['workflowgroup']}" />
</td>
<td><h:outputText
value="#{source.item['workflowmodel']}" /> <td>
</td> <h:outputText value="#{source.item['workflowmodel']}" />
<td><h:outputText </td>
value="#{source.item['task']}" /> <td>
</td> <h:outputText value="#{source.item['task']}" />
<td><h:outputText </td>
value="#{source.item['event']}" /> <td>
</td> <h:outputText value="#{source.item['event']}" />
</td>
<td>
<h:commandLink <td>
actionListener="#{documentImportController.moveSourceDown(source.item['index'])}"> <h:commandLink
<span class="typcn typcn-arrow-down-thick imixs-state-info"></span> actionListener="#{documentImportController.moveSourceDown(source.item['index'])}">
<f:ajax render="#{imapOptionlistContainer.clientId}" <span
onevent="updateOptions" /> class="typcn typcn-arrow-down-thick imixs-state-info"></span>
</h:commandLink> <f:ajax render="#{imapOptionlistContainer.clientId}"
<h:commandLink onevent="updateOptions" />
actionListener="#{documentImportController.moveSourceUp(source.item['index'])}"> </h:commandLink>
<span class="typcn typcn-arrow-up-thick imixs-state-info"></span> <h:commandLink
<f:ajax render="#{imapOptionlistContainer.clientId}" actionListener="#{documentImportController.moveSourceUp(source.item['index'])}">
onevent="updateOptions" /> <span
</h:commandLink> class="typcn typcn-arrow-up-thick imixs-state-info"></span>
<f:ajax render="#{imapOptionlistContainer.clientId}"
<h:commandLink onevent="updateOptions" />
actionListener="#{documentImportController.removeSource(source.item['index'])}"> </h:commandLink>
<span class="typcn typcn-trash imixs-state-info"></span>
<f:ajax render="#{imapOptionlistContainer.clientId}" <h:commandLink
onevent="updateOptions" /> actionListener="#{documentImportController.removeSource(source.item['index'])}">
</h:commandLink></td> <span
</tr> class="typcn typcn-trash imixs-state-info"></span>
<f:ajax render="#{imapOptionlistContainer.clientId}"
onevent="updateOptions" />
</ui:repeat> </h:commandLink>
</td>
</tr>
</ui:repeat>
</tbody> </tbody>
</table> </table>
<!-- add button --> <!-- add button -->
<h:commandButton <h:commandButton value="#{message.add}"
value="#{message.add}"
actionListener="#{documentImportController.addSource()}"> actionListener="#{documentImportController.addSource()}">
<f:ajax render="#{imapOptionlistContainer.clientId}" <f:ajax render="#{imapOptionlistContainer.clientId}"
onevent="updateOptions" /> onevent="updateOptions" />
</h:commandButton> </h:commandButton>
<!-- ### Subform for selected source ### --> <!-- ### Subform for selected source ### -->
<h:panelGroup layout="block" rendered="#{! empty documentImportController.source}" styleClass="imixs-form-panel"> <h:panelGroup layout="block"
<h3>Order ID #<h:outputText value="#{documentImportController.source.item['index']}"/></h3> rendered="#{! empty documentImportController.source}"
styleClass="imixs-form-panel">
<h3>Order ID #
<h:outputText
value="#{documentImportController.source.item['index']}" />
</h3>
<div class="imixs-form-section-3"> <div class="imixs-form-section-3">
<dl> <dl>
<dt>Type</dt> <dt>Type</dt>
<dd> <dd>
<h:selectOneRadio value="#{documentImportController.source.item['type']}"> <h:selectOneRadio
<f:selectItem itemLabel="IMAP" itemValue="IMAP"/> value="#{documentImportController.source.item['type']}">
<f:selectItem itemLabel="FTP" itemValue="FTP"/> <f:selectItem itemLabel="IMAP" itemValue="IMAP" />
<f:selectItem itemLabel="CSV" itemValue="CSV"/> <f:selectItem itemLabel="FTP" itemValue="FTP" />
<f:selectItem itemLabel="CSV" itemValue="CSV" />
<f:selectItem itemLabel="Cargosoft Invoice Import"
itemValue="CARGOSOFT_INVOICE_XML" />
</h:selectOneRadio> </h:selectOneRadio>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>Workflowgroup</dt> <dt>Workflowgroup</dt>
<dd> <dd>
<h:selectOneMenu <h:selectOneMenu
value="#{documentImportController.source.item['workflowgroup']}"> value="#{documentImportController.source.item['workflowgroup']}">
<f:selectItem itemLabel=" - " itemValue=""/> <f:selectItem itemLabel=" - " itemValue="" />
<c:forEach items="#{modelController.workflowGroups}" var="group"> <c:forEach items="#{modelController.workflowGroups}"
<f:selectItem itemLabel="#{group}" itemValue="#{group}" /> var="group">
<f:selectItem itemLabel="#{group}"
itemValue="#{group}" />
</c:forEach> </c:forEach>
</h:selectOneMenu> </h:selectOneMenu>
</dd> </dd>
</dl> </dl>
</div> </div>
<div class="imixs-form-section-3"> <div class="imixs-form-section-3">
<dl> <dl>
<dt>Workflowmodel</dt> <dt>Workflowmodel</dt>
<dd> <dd>
<h:inputText <h:inputText
value="#{documentImportController.source.item['workflowmodel']}"/> value="#{documentImportController.source.item['workflowmodel']}" />
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>Task ID</dt> <dt>Task ID</dt>
<dd> <dd>
<h:inputText <h:inputText
value="#{documentImportController.source.item['task']}"/> value="#{documentImportController.source.item['task']}" />
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>Event ID</dt> <dt>Event ID</dt>
<dd> <dd>
<h:inputText <h:inputText
value="#{documentImportController.source.item['event']}"/> value="#{documentImportController.source.item['event']}" />
</dd> </dd>
</dl> </dl>
</div> </div>
<hr /> <hr />
<!-- IMAP --> <!-- IMAP -->
<div class="imixs-form-section-3"> <div class="imixs-form-section-3">
@ -239,13 +248,13 @@
<dd> <dd>
<h:inputText style="width:80%;" <h:inputText style="width:80%;"
value="#{documentImportController.source.item['server']}"> value="#{documentImportController.source.item['server']}">
</h:inputText> : <h:inputText style="width:15%;" </h:inputText> : <h:inputText style="width:15%;"
value="#{documentImportController.source.item['port']}"> value="#{documentImportController.source.item['port']}">
</h:inputText> </h:inputText>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>User</dt> <dt>User</dt>
<dd> <dd>
@ -254,11 +263,11 @@
</h:inputText> </h:inputText>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>Password</dt> <dt>Password</dt>
<dd> <dd>
<h:inputSecret required="false" redisplay="true" <h:inputSecret required="false" redisplay="true"
value="#{documentImportController.source.item['password']}"> value="#{documentImportController.source.item['password']}">
</h:inputSecret> </h:inputSecret>
</dd> </dd>
@ -271,7 +280,8 @@
<h:inputText required="false" <h:inputText required="false"
value="#{documentImportController.source.item['selector']}"> value="#{documentImportController.source.item['selector']}">
</h:inputText> </h:inputText>
<p class="small">A selector can be an optional regular expression to be used to select a subset of data</p> <p class="small">A selector can be an optional regular
expression to be used to select a subset of data</p>
</dd> </dd>
</dl> </dl>
<dl> <dl>
@ -287,35 +297,34 @@
</dl> </dl>
</div> </div>
</h:panelGroup> <!-- end of source subform --> </h:panelGroup> <!-- end of source subform -->
</f:ajax> </f:ajax>
</h:panelGroup>
</div>
</div>
</h:panelGroup>
</div>
</div>
</div> </div>
</div> </div>
<div class="imixs-footer"> <div class="imixs-footer">
<h:outputLabel value="#{message.modified}: " /> <h:outputLabel value="#{message.modified}: " />
<h:outputText <h:outputText value="#{documentImportController.configuration.item['$modified']}">
value="#{documentImportController.configuration.item['$modified']}">
<f:convertDateTime timeZone="#{message.timeZone}" type="both" <f:convertDateTime timeZone="#{message.timeZone}" type="both"
pattern="#{message.dateTimePattern}" /> pattern="#{message.dateTimePattern}" />
</h:outputText> </h:outputText>
@ -323,12 +332,10 @@
<br /> <br />
<h:commandButton <h:commandButton actionListener="#{documentImportController.saveConfiguration()}"
actionListener="#{documentImportController.saveConfiguration()}" action="/pages/admin/document_import" value="#{message.save}">
action="/pages/admin/document_import"
value="#{message.save}">
</h:commandButton> </h:commandButton>
<h:commandButton value="#{message.close}" action="notes" /> <h:commandButton value="#{message.close}" action="notes" />
@ -341,4 +348,4 @@
</ui:composition> </ui:composition>

View file

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.alexander-logistics</groupId> <groupId>com.alexander-logistics</groupId>
<artifactId>office-alexander-logistics</artifactId> <artifactId>office-alexander-logistics</artifactId>
<version>1.2.18</version> <version>1.2.19</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Imixs Office Workflow - Custom Build</name> <name>Imixs Office Workflow - Custom Build</name>
@ -13,7 +13,6 @@
<module>office-alexander-logistics-app</module> <module>office-alexander-logistics-app</module>
</modules> </modules>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@ -25,10 +24,10 @@
<org.imixs.workflow.version>5.2.18</org.imixs.workflow.version> <org.imixs.workflow.version>5.2.18</org.imixs.workflow.version>
<org.imixs.marty.version>4.2.3</org.imixs.marty.version> <org.imixs.marty.version>4.2.3</org.imixs.marty.version>
<!-- 4.5.3 --> <!-- 4.5.3 -->
<org.imixs.office.version>4.6.2-SNAPSHOT</org.imixs.office.version> <org.imixs.office.version>4.6.2</org.imixs.office.version>
<org.imixs.adapters.version>2.3.3-SNAPSHOT</org.imixs.adapters.version> <org.imixs.adapters.version>2.3.3</org.imixs.adapters.version>
<!-- 2.2.14 --> <!-- 2.2.14 -->
<org.imixs.archive.version>2.4.2-SNAPSHOT</org.imixs.archive.version> <org.imixs.archive.version>2.4.2</org.imixs.archive.version>
<org.imixs.melman.version>1.0.22</org.imixs.melman.version> <org.imixs.melman.version>1.0.22</org.imixs.melman.version>
<org.imixs.ml.version>1.1.6</org.imixs.ml.version> <org.imixs.ml.version>1.1.6</org.imixs.ml.version>
<microprofile.version>2.2</microprofile.version> <microprofile.version>2.2</microprofile.version>

Binary file not shown.