update mahnlauf
This commit is contained in:
parent
1870d0856a
commit
7bc51dd69b
12 changed files with 7384 additions and 351 deletions
6
MAIL_OAUTH2.md
Normal file
6
MAIL_OAUTH2.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
|
||||
https://techcommunity.microsoft.com/t5/exchange/javamail-connecting-to-office-365-xoauth2-for-imap/m-p/1505026
|
||||
|
||||
|
||||
|
|
@ -39,109 +39,113 @@ import org.imixs.workflow.faces.data.WorkflowEvent;
|
|||
@ConversationScoped
|
||||
public class OPListController implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final int TASK_ERSTELLUNG = 1000;
|
||||
private static Logger logger = Logger.getLogger(OPListController.class.getName());
|
||||
public static final int TASK_ERSTELLUNG = 1000;
|
||||
private static Logger logger = Logger.getLogger(OPListController.class.getName());
|
||||
|
||||
private String lastDbtrNumber = null;
|
||||
private String lastDbtrNumber = null;
|
||||
|
||||
private List<ItemCollection> invoiceList = null;
|
||||
private List<ItemCollection> invoiceList = null;
|
||||
|
||||
@Inject
|
||||
protected WorkflowController workflowController;
|
||||
@Inject
|
||||
protected WorkflowController workflowController;
|
||||
|
||||
@Inject
|
||||
protected WorkflowService workflowService;
|
||||
@Inject
|
||||
protected WorkflowService workflowService;
|
||||
|
||||
@Inject
|
||||
ZahlungseingangService zahlungseingangService;
|
||||
@Inject
|
||||
ZahlungseingangService zahlungseingangService;
|
||||
|
||||
@Inject
|
||||
protected DocumentService documentService;
|
||||
@Inject
|
||||
protected DocumentService documentService;
|
||||
|
||||
/**
|
||||
* Diese Methode liefert die Rechnungen zur gegebenen dbtrNumber. Die Methode
|
||||
* nutzt einen lokalen cache um die Zugriffe zu beschleunigen.
|
||||
* <p>
|
||||
* Befindet sich der Zahlungseingang in Erstellung (Task=1000) werden alle
|
||||
* offenen Rechnungen geholt
|
||||
* <p>
|
||||
* Befindet sich der Zahlungseingang nicht mehr in erstellung werden nur die
|
||||
* Rechnugnen aus $workitemRef geholt!
|
||||
*
|
||||
* @param _dbtrNumber
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<ItemCollection> getInvoices(String _dbtrNumber) {
|
||||
/**
|
||||
* Diese Methode liefert die Rechnungen zur gegebenen dbtrNumber. Die Methode
|
||||
* nutzt einen lokalen cache um die Zugriffe zu beschleunigen.
|
||||
* <p>
|
||||
* Befindet sich der Zahlungseingang in Erstellung (Task=1000) werden alle
|
||||
* offenen Rechnungen geholt
|
||||
* <p>
|
||||
* Befindet sich der Zahlungseingang nicht mehr in erstellung werden nur die
|
||||
* Rechnugnen aus $workitemRef geholt!
|
||||
*
|
||||
* @param _dbtrNumber
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<ItemCollection> getInvoices(String _dbtrNumber) {
|
||||
|
||||
// Compute all open invoices if TASK_ERSTELLUNG....
|
||||
if (workflowController.getWorkitem().getTaskID() == TASK_ERSTELLUNG) {
|
||||
// Compute all open invoices if TASK_ERSTELLUNG....
|
||||
if (workflowController.getWorkitem().getTaskID() == TASK_ERSTELLUNG) {
|
||||
|
||||
// return empty list if dbtr is not set
|
||||
if (_dbtrNumber == null || _dbtrNumber.isEmpty()) {
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
return invoiceList;
|
||||
}
|
||||
// return empty list if dbtr is not set
|
||||
if (_dbtrNumber == null || _dbtrNumber.isEmpty()) {
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
return invoiceList;
|
||||
}
|
||||
|
||||
// if last dbtr number is equal then return the current list....
|
||||
if (invoiceList != null && lastDbtrNumber != null && lastDbtrNumber.equals(_dbtrNumber)) {
|
||||
return invoiceList;
|
||||
}
|
||||
// if last dbtr number is equal then return the current list....
|
||||
if (invoiceList != null && lastDbtrNumber != null && lastDbtrNumber.equals(_dbtrNumber)) {
|
||||
return invoiceList;
|
||||
}
|
||||
|
||||
// load new invoice list....
|
||||
// load new invoice list....
|
||||
|
||||
lastDbtrNumber = _dbtrNumber;
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
logger.info("....loading open Invoices for " + _dbtrNumber);
|
||||
lastDbtrNumber = _dbtrNumber;
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
logger.info("....loading open Invoices for " + _dbtrNumber);
|
||||
|
||||
// Aus der dbtrNummer muss das führendde D entfernt werden
|
||||
// wir speichern dieses zwar im Zahlungseingangs Workflow, aber eine
|
||||
// Ausganksrechnung kennt das nicht
|
||||
// Das ganze ist ein übles Relikt aus Cargosoft und kann nicht vermieden werden
|
||||
if (_dbtrNumber.startsWith("D")) {
|
||||
_dbtrNumber = _dbtrNumber.substring(1);
|
||||
}
|
||||
//(type:workitem OR type:workitemarchive)
|
||||
String query = "(type:workitem) AND ($modelversion:rechnungsausgang-*) AND (dbtr.number:"
|
||||
+ _dbtrNumber + ")";
|
||||
// Aus der dbtrNummer muss das führendde D entfernt werden
|
||||
// wir speichern dieses zwar im Zahlungseingangs Workflow, aber eine
|
||||
// Ausganksrechnung kennt das nicht
|
||||
// Das ganze ist ein übles Relikt aus Cargosoft und kann nicht vermieden werden
|
||||
if (_dbtrNumber.startsWith("D")) {
|
||||
_dbtrNumber = _dbtrNumber.substring(1);
|
||||
}
|
||||
// (type:workitem OR type:workitemarchive)
|
||||
String query = "(type:workitem) AND ($modelversion:rechnungsausgang-*) AND (dbtr.number:" + _dbtrNumber
|
||||
+ ")";
|
||||
|
||||
try {
|
||||
invoiceList = documentService.find(query, 999, 0, "$created", false);
|
||||
} catch (QueryException e) {
|
||||
logger.severe("Failed to get op liste:" + e.getMessage());
|
||||
}
|
||||
try {
|
||||
invoiceList = documentService.find(query, 999, 0, "$created", false);
|
||||
} catch (QueryException e) {
|
||||
logger.severe("Failed to get op liste:" + e.getMessage());
|
||||
}
|
||||
|
||||
} else {
|
||||
// We are no longer in TASK_ERSTELLUNG, so
|
||||
// fetch only selected invoices
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
for (String id : selection) {
|
||||
invoiceList.add(documentService.load(id));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// We are no longer in TASK_ERSTELLUNG, so
|
||||
// fetch only selected invoices
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
if (!workflowController.getWorkitem().isItemEmpty("$workitemref")) {
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
for (String id : selection) {
|
||||
if (id != null && !id.isEmpty()) {
|
||||
invoiceList.add(documentService.load(id));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally we set the 'selection' item depending on the $workitemList
|
||||
// and the payment amount form the 'payment.details'
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
List<ItemCollection> paymentList = zahlungseingangService.loadPaymentDetails(workflowController.getWorkitem());
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (selection.contains(invoice.getUniqueID())) {
|
||||
invoice.setItemValue("selected", true);
|
||||
// set amount
|
||||
for (ItemCollection payment : paymentList) {
|
||||
if (invoice.getUniqueID().equals(payment.getUniqueID())) {
|
||||
invoice.setItemValue("payment.amount", payment.getItemValue("payment.amount"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// finally we set the 'selection' item depending on the $workitemList
|
||||
// and the payment amount form the 'payment.details'
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
List<ItemCollection> paymentList = zahlungseingangService.loadPaymentDetails(workflowController.getWorkitem());
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (selection.contains(invoice.getUniqueID())) {
|
||||
invoice.setItemValue("selected", true);
|
||||
// set amount
|
||||
for (ItemCollection payment : paymentList) {
|
||||
if (invoice.getUniqueID().equals(payment.getUniqueID())) {
|
||||
invoice.setItemValue("payment.amount", payment.getItemValue("payment.amount"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return invoiceList;
|
||||
}
|
||||
return invoiceList;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Liefert die Payments die mit diesem workitem verbunden sind...
|
||||
|
|
@ -165,112 +169,113 @@ public class OPListController implements Serializable {
|
|||
// return result;
|
||||
// }
|
||||
|
||||
/**
|
||||
* On Before Process we store the selected invoices in $worktiemRef
|
||||
*
|
||||
* @param workflowEvent
|
||||
*/
|
||||
public void onWorkflowEvent(@Observes WorkflowEvent workflowEvent) {
|
||||
if (workflowEvent == null || workflowEvent.getWorkitem() == null) {
|
||||
return;
|
||||
}
|
||||
// store a collection of child items if you are in a Zahlungseingang
|
||||
if (workflowEvent.getWorkitem().getModelVersion().startsWith("zahlungseingang")
|
||||
&& workflowEvent.getEventType() == WorkflowEvent.WORKITEM_BEFORE_PROCESS) {
|
||||
updateChildList(workflowEvent.getWorkitem());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* On Before Process we store the selected invoices in $worktiemRef
|
||||
*
|
||||
* @param workflowEvent
|
||||
*/
|
||||
public void onWorkflowEvent(@Observes WorkflowEvent workflowEvent) {
|
||||
if (workflowEvent == null || workflowEvent.getWorkitem() == null) {
|
||||
return;
|
||||
}
|
||||
// store a collection of child items if you are in a Zahlungseingang
|
||||
if (workflowEvent.getWorkitem().getModelVersion().startsWith("zahlungseingang")
|
||||
&& workflowEvent.getEventType() == WorkflowEvent.WORKITEM_BEFORE_PROCESS) {
|
||||
updateChildList(workflowEvent.getWorkitem());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemCollection loadInvoice(String id) {
|
||||
return documentService.load(id);
|
||||
}
|
||||
public ItemCollection loadInvoice(String id) {
|
||||
return documentService.load(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Diese Methode aktualisiert das item ChildWOrkitems mit allen selektierten
|
||||
* Invoices udn berechnet den payment total
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void updateChildList(ItemCollection workitem) {
|
||||
double paymentTotal = 0;
|
||||
List<Map> mapInvoiceItems = new ArrayList<Map>();
|
||||
// convert the child ItemCollection elements into a List of Map
|
||||
logger.info("Convert child items into Map...");
|
||||
// iterate over all order items..
|
||||
List<String> selectionList = new ArrayList<String>();
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (invoice.getItemValueBoolean("selected")) {
|
||||
logger.info("calculate - " + invoice.getUniqueID());
|
||||
selectionList.add(invoice.getUniqueID());
|
||||
paymentTotal = paymentTotal + invoice.getItemValueDouble("payment.amount");
|
||||
ItemCollection invoiceStub = new ItemCollection();
|
||||
invoiceStub.setItemValue(WorkflowKernel.UNIQUEID, invoice.getUniqueID());
|
||||
invoiceStub.setItemValue("payment.amount", invoice.getItemValue("payment.amount"));
|
||||
mapInvoiceItems.add(invoiceStub.getAllItems());
|
||||
/**
|
||||
* Diese Methode aktualisiert das item ChildWOrkitems mit allen selektierten
|
||||
* Invoices udn berechnet den payment total
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void updateChildList(ItemCollection workitem) {
|
||||
double paymentTotal = 0;
|
||||
List<Map> mapInvoiceItems = new ArrayList<Map>();
|
||||
// convert the child ItemCollection elements into a List of Map
|
||||
logger.info("Convert child items into Map...");
|
||||
// iterate over all order items..
|
||||
List<String> selectionList = new ArrayList<String>();
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (invoice.getItemValueBoolean("selected")) {
|
||||
logger.info("calculate - " + invoice.getUniqueID());
|
||||
selectionList.add(invoice.getUniqueID());
|
||||
paymentTotal = paymentTotal + invoice.getItemValueDouble("payment.amount");
|
||||
ItemCollection invoiceStub = new ItemCollection();
|
||||
invoiceStub.setItemValue(WorkflowKernel.UNIQUEID, invoice.getUniqueID());
|
||||
invoiceStub.setItemValue("payment.amount", invoice.getItemValue("payment.amount"));
|
||||
mapInvoiceItems.add(invoiceStub.getAllItems());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// rond with 2 digits
|
||||
workitem.replaceItemValue("payment.total", Math.round(paymentTotal * 100.0) / 100.0);
|
||||
// update childitems
|
||||
workitem.replaceItemValue(ZahlungseingangService.ITEM_PAYMENT_DETAILS, mapInvoiceItems);
|
||||
// Update $workitemref
|
||||
workitem.setItemValue("$workitemref", selectionList);
|
||||
}
|
||||
// rond with 2 digits
|
||||
workitem.replaceItemValue("payment.total", Math.round(paymentTotal * 100.0) / 100.0);
|
||||
// update childitems
|
||||
workitem.replaceItemValue(ZahlungseingangService.ITEM_PAYMENT_DETAILS, mapInvoiceItems);
|
||||
// Update $workitemref
|
||||
workitem.setItemValue("$workitemref", selectionList);
|
||||
}
|
||||
|
||||
/**
|
||||
* This JSF backing method is called by cargosft-debitor-serach.xhtml after the
|
||||
* user has selected a new debitor.
|
||||
* <p>
|
||||
* The new dbtrNumber is slected form the curren ajax request param 'dbtrNumber'
|
||||
* <p>
|
||||
* The method just updates the dbtr.number of the current workitem. The form
|
||||
* will than rerender the opList section.
|
||||
*/
|
||||
public void updateDbtrNumber() {
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
String dbtrNumber = fc.getExternalContext().getRequestParameterMap().get("dbtrNumber");
|
||||
logger.fine(".........dbtrNumber = " + dbtrNumber);
|
||||
workflowController.getWorkitem().setItemValue("dbtr.number", dbtrNumber);
|
||||
}
|
||||
/**
|
||||
* This JSF backing method is called by cargosft-debitor-serach.xhtml after the
|
||||
* user has selected a new debitor.
|
||||
* <p>
|
||||
* The new dbtrNumber is slected form the curren ajax request param 'dbtrNumber'
|
||||
* <p>
|
||||
* The method just updates the dbtr.number of the current workitem. The form
|
||||
* will than rerender the opList section.
|
||||
*/
|
||||
public void updateDbtrNumber() {
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
String dbtrNumber = fc.getExternalContext().getRequestParameterMap().get("dbtrNumber");
|
||||
logger.fine(".........dbtrNumber = " + dbtrNumber);
|
||||
workflowController.getWorkitem().setItemValue("dbtr.number", dbtrNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsmethode delegates to ZahlungseingangServcie
|
||||
*
|
||||
* @param payment
|
||||
* @return
|
||||
*/
|
||||
public List<ItemCollection> loadPaymentDetails(ItemCollection payment) {
|
||||
return zahlungseingangService.loadPaymentDetails(payment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsmethode delegates to ZahlungseingangServcie
|
||||
* @param payment
|
||||
* @return
|
||||
*/
|
||||
public List<ItemCollection> loadPaymentDetails(ItemCollection payment) {
|
||||
return zahlungseingangService.loadPaymentDetails(payment);
|
||||
}
|
||||
/**
|
||||
* Berechnet den gesammten OP Saldo
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double calculateInvoiceTotal() {
|
||||
double result = 0;
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
result = result + invoice.getItemValueDouble("invoice.total");
|
||||
}
|
||||
// rond with 2 digits
|
||||
return Math.round(result * 100.0) / 100.0;
|
||||
/**
|
||||
* Berechnet den gesammten OP Saldo
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double calculateInvoiceTotal() {
|
||||
double result = 0;
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
result = result + invoice.getItemValueDouble("invoice.total");
|
||||
}
|
||||
// rond with 2 digits
|
||||
return Math.round(result * 100.0) / 100.0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Berechnet den gesammten OP Saldo
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double calculateInvoiceSaldo() {
|
||||
double result = 0;
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
result = result + invoice.getItemValueDouble("invoice.saldo");
|
||||
}
|
||||
// rond with 2 digits
|
||||
return Math.round(result * 100.0) / 100.0;
|
||||
/**
|
||||
* Berechnet den gesammten OP Saldo
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double calculateInvoiceSaldo() {
|
||||
double result = 0;
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
result = result + invoice.getItemValueDouble("invoice.saldo");
|
||||
}
|
||||
// rond with 2 digits
|
||||
return Math.round(result * 100.0) / 100.0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import java.io.InputStream;
|
|||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ import org.imixs.workflow.exceptions.PluginException;
|
|||
import org.imixs.workflow.exceptions.QueryException;
|
||||
|
||||
/**
|
||||
* The CargosoftExportScheduler exportier eine csv Datei auf eine FTP Laufwerk
|
||||
* The CargosoftExportScheduler exportiert eine csv Datei auf eine FTP Laufwerk
|
||||
* mit allen noch offenen Rechnungen. Diese Datei wird von Cargosoft ann
|
||||
* verwendet um den Kreditramen für einen kunden zu ermitteln. Es werden
|
||||
* praktisch von Cargosoft nur die offenen Salen aus unserer CSV Datei pro
|
||||
|
|
@ -66,191 +67,204 @@ import org.imixs.workflow.exceptions.QueryException;
|
|||
*/
|
||||
public class CargosoftExportScheduler implements Scheduler {
|
||||
|
||||
public static final int MAX_COUNT = 999;
|
||||
public static final String FTP_ERROR = "FTP_ERROR";
|
||||
public static final int MAX_COUNT = 999;
|
||||
public static final String FTP_ERROR = "FTP_ERROR";
|
||||
|
||||
public static DateFormat dateFormat = new SimpleDateFormat("ddMMyyyy");
|
||||
public static DecimalFormat decimalFormat = new DecimalFormat("0.00");
|
||||
public static DecimalFormat rateFormat = new DecimalFormat("0.000000");
|
||||
public static DateFormat dateFormat = new SimpleDateFormat("ddMMyyyy");
|
||||
public static DecimalFormat decimalFormat = new DecimalFormat("0.00");
|
||||
public static DecimalFormat rateFormat = new DecimalFormat("0.000000");
|
||||
|
||||
@EJB
|
||||
DocumentService documentService;
|
||||
@EJB
|
||||
DocumentService documentService;
|
||||
|
||||
@EJB
|
||||
WorkflowService workflowService;
|
||||
@EJB
|
||||
WorkflowService workflowService;
|
||||
|
||||
@EJB
|
||||
ModelService modelService;
|
||||
@EJB
|
||||
ModelService modelService;
|
||||
|
||||
@EJB
|
||||
ReportService reportService;
|
||||
@EJB
|
||||
ReportService reportService;
|
||||
|
||||
private static Logger logger = Logger.getLogger(CargosoftExportScheduler.class.getName());
|
||||
private static Logger logger = Logger.getLogger(CargosoftExportScheduler.class.getName());
|
||||
|
||||
/**
|
||||
* This is the method which processes the timeout event depending on the running
|
||||
* timer settings.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param timer
|
||||
* @throws QueryException
|
||||
*/
|
||||
public ItemCollection run(ItemCollection configuration) throws SchedulerException {
|
||||
List<ItemCollection> invoices = null;
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
int lines = 0;
|
||||
/**
|
||||
* This is the method which processes the timeout event depending on the running
|
||||
* timer settings.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param timer
|
||||
* @throws QueryException
|
||||
*/
|
||||
public ItemCollection run(ItemCollection configuration) throws SchedulerException {
|
||||
List<ItemCollection> invoices = null;
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
int lines = 0;
|
||||
|
||||
configuration.removeItem("_scheduler_logmessage");
|
||||
logMessage(configuration, "....export to Cargosoft...");
|
||||
// $taskID<5900
|
||||
String sQuery = "(type:workitem AND $modelversion:rechnungsausgang* AND $taskid:[5000 TO 5899])";
|
||||
configuration.removeItem("_scheduler_logmessage");
|
||||
logMessage(configuration, "....export to Cargosoft...");
|
||||
// $taskID<5900
|
||||
String sQuery = "(type:workitem AND $modelversion:rechnungsausgang* AND $taskid:[5000 TO 5899])";
|
||||
|
||||
try {
|
||||
// find the textblock...
|
||||
invoices = documentService.find(sQuery, 9999, 0);
|
||||
} catch (QueryException e) {
|
||||
logMessage(configuration, "failed to search invoices by query: " + e.getMessage());
|
||||
}
|
||||
try {
|
||||
// find the textblock...
|
||||
invoices = documentService.find(sQuery, 9999, 0);
|
||||
} catch (QueryException e) {
|
||||
logMessage(configuration, "failed to search invoices by query: " + e.getMessage());
|
||||
}
|
||||
|
||||
if (invoices != null && invoices.size() > 0) {
|
||||
// File csvOutputFile = new File(CSV_FILE_NAME);
|
||||
for (ItemCollection doc : invoices) {
|
||||
String line = "";
|
||||
line = line + doc.getItemValueString("dbtr.number") + ";";
|
||||
line = line + "\"" + doc.getItemValueString("dbtr.name") + "\";";
|
||||
line = line + "\"" + doc.getItemValueString("invoice.number") + "\";";
|
||||
line = line + dateFormat.format(doc.getItemValueDate("invoice.date")) + ";";
|
||||
line = line + dateFormat.format(doc.getItemValueDate("invoice.duedate")) + ";";
|
||||
if (invoices != null && invoices.size() > 0) {
|
||||
// File csvOutputFile = new File(CSV_FILE_NAME);
|
||||
for (ItemCollection doc : invoices) {
|
||||
String line = "";
|
||||
line = line + doc.getItemValueString("dbtr.number") + ";";
|
||||
line = line + "\"" + doc.getItemValueString("dbtr.name") + "\";";
|
||||
line = line + "\"" + doc.getItemValueString("invoice.number") + "\";";
|
||||
line = line + dateFormat.format(doc.getItemValueDate("invoice.date")) + ";";
|
||||
line = line + dateFormat.format(doc.getItemValueDate("invoice.duedate")) + ";";
|
||||
|
||||
// Betrag soll; Betrag Haben;
|
||||
double betrag = doc.getItemValueDouble("invoice.total");
|
||||
if (betrag >= 0) {
|
||||
// Soll
|
||||
line = line + decimalFormat.format(betrag) + ";0,00;";
|
||||
} else {
|
||||
// Haben
|
||||
line = line + "0,00;" + decimalFormat.format(Math.abs(betrag)) + ";";
|
||||
// Betrag soll; Betrag Haben;
|
||||
double betrag = doc.getItemValueDouble("invoice.total");
|
||||
if (betrag >= 0) {
|
||||
// Soll
|
||||
line = line + decimalFormat.format(betrag) + ";0,00;";
|
||||
} else {
|
||||
// Haben
|
||||
line = line + "0,00;" + decimalFormat.format(Math.abs(betrag)) + ";";
|
||||
|
||||
}
|
||||
// Saldo; S/H Saldo
|
||||
betrag = doc.getItemValueDouble("invoice.saldo");
|
||||
if (betrag >= 0) {
|
||||
// Soll
|
||||
line = line + decimalFormat.format(betrag) + ";S;";
|
||||
} else {
|
||||
// Haben
|
||||
line = line + decimalFormat.format(Math.abs(betrag)) + ";H;";
|
||||
}
|
||||
}
|
||||
// Saldo; S/H Saldo
|
||||
betrag = doc.getItemValueDouble("invoice.saldo");
|
||||
|
||||
// WKZ
|
||||
String wkz = doc.getItemValueString("invoice.currency");
|
||||
if (!"EUR".equals(wkz)) {
|
||||
line = line + wkz + ";" + rateFormat.format(doc.getItemValueDouble("invoice.rate")) + ";"
|
||||
+ decimalFormat.format(doc.getItemValueDouble("invoice.base.amount")) + ";";
|
||||
} else {
|
||||
line = line + ";0,000000;0,00;";
|
||||
}
|
||||
// convert to hauswahrung
|
||||
double rate = doc.getItemValueDouble("invoice.rate");
|
||||
double hausWaehrung = betrag;
|
||||
if (rate != 0.0) {
|
||||
hausWaehrung = betrag / rate;
|
||||
}
|
||||
|
||||
// auffüllen mit 77 mal ';'
|
||||
int i = 77;
|
||||
while (i > 0) {
|
||||
line = line + ";";
|
||||
i--;
|
||||
}
|
||||
buffer.append(line + "\n");
|
||||
lines++;
|
||||
}
|
||||
if (hausWaehrung >= 0) {
|
||||
// Soll
|
||||
line = line + decimalFormat.format(hausWaehrung) + ";S;";
|
||||
} else {
|
||||
// Haben
|
||||
line = line + decimalFormat.format(Math.abs(hausWaehrung)) + ";H;";
|
||||
}
|
||||
|
||||
}
|
||||
// WKZ
|
||||
String wkz = doc.getItemValueString("invoice.currency");
|
||||
if (!"EUR".equals(wkz)) {
|
||||
line = line + //
|
||||
wkz + ";" + //
|
||||
decimalFormat.format(doc.getItemValueDouble("invoice.base.amount")) + ";" + //
|
||||
rateFormat.format(doc.getItemValueDouble("invoice.rate")) + ";";
|
||||
} else {
|
||||
line = line + ";0,00;0,000000;";
|
||||
}
|
||||
line = line + ";;;;;;" +doc.getItemValueString("invoice.text");
|
||||
// auffüllen mit 77 mal ';'
|
||||
int i = 69;
|
||||
while (i > 0) {
|
||||
line = line + ";";
|
||||
i--;
|
||||
}
|
||||
buffer.append(line + "\n");
|
||||
lines++;
|
||||
}
|
||||
|
||||
// transfer file via FTP...
|
||||
FileData fileData = new FileData("OPD28.txt", String.valueOf(buffer).getBytes(), null, null);
|
||||
}
|
||||
|
||||
put(configuration, fileData);
|
||||
// transfer file via FTP...
|
||||
DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmm");
|
||||
// MMM d, yyyy HH:mm a
|
||||
FileData fileData = new FileData("OPD_" + formatter.format(new Date()) + ".txt",
|
||||
String.valueOf(buffer).getBytes(), null, null);
|
||||
|
||||
logMessage(configuration, "...Export completed: " + lines + " lines");
|
||||
return configuration;
|
||||
}
|
||||
put(configuration, fileData);
|
||||
|
||||
private void logMessage(ItemCollection configuration, String message) {
|
||||
configuration.appendItemValue("_scheduler_logmessage", message);
|
||||
logger.info(message);
|
||||
}
|
||||
logMessage(configuration, "...Export completed: " + lines + " lines");
|
||||
return configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Diese Hilfsmehtode überträgt eine Datei an einen FTP Server. Die
|
||||
* Verbindugnsdaten stehen im Configuraiton Workitem.
|
||||
*
|
||||
* @param fileData object
|
||||
* @throws PluginException
|
||||
*/
|
||||
public void put(ItemCollection configuration, FileData fileData) {
|
||||
private void logMessage(ItemCollection configuration, String message) {
|
||||
configuration.appendItemValue("_scheduler_logmessage", message);
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
String ftpServer = configuration.getItemValueString("_datev_ftp_host");
|
||||
String ftpUser = configuration.getItemValueString("_datev_ftp_userid");
|
||||
String ftpPassword = configuration.getItemValueString("_datev_ftp_password");
|
||||
String ftpWorkingPath = configuration.getItemValueString("_datev_ftp_path_buchungsstapel");
|
||||
int ftpPort = configuration.getItemValueInteger("_datev_ftp_port");
|
||||
if (ftpPort <= 0) {
|
||||
// set default port
|
||||
ftpPort = 21;
|
||||
}
|
||||
/**
|
||||
* Diese Hilfsmehtode überträgt eine Datei an einen FTP Server. Die
|
||||
* Verbindugnsdaten stehen im Configuraiton Workitem.
|
||||
*
|
||||
* @param fileData object
|
||||
* @throws PluginException
|
||||
*/
|
||||
public void put(ItemCollection configuration, FileData fileData) {
|
||||
|
||||
String fileName = fileData.getName();
|
||||
String ftpServer = configuration.getItemValueString("_datev_ftp_host");
|
||||
String ftpUser = configuration.getItemValueString("_datev_ftp_userid");
|
||||
String ftpPassword = configuration.getItemValueString("_datev_ftp_password");
|
||||
String ftpWorkingPath = configuration.getItemValueString("_datev_ftp_path_buchungsstapel");
|
||||
int ftpPort = configuration.getItemValueInteger("_datev_ftp_port");
|
||||
if (ftpPort <= 0) {
|
||||
// set default port
|
||||
ftpPort = 21;
|
||||
}
|
||||
|
||||
// Compute file path
|
||||
if (!ftpWorkingPath.startsWith("/")) {
|
||||
ftpWorkingPath = "/" + ftpWorkingPath;
|
||||
}
|
||||
if (!ftpWorkingPath.endsWith("/")) {
|
||||
ftpWorkingPath = ftpWorkingPath + "/";
|
||||
}
|
||||
InputStream writer = null;
|
||||
String fileName = fileData.getName();
|
||||
|
||||
FTPClient ftpClient = null;
|
||||
try {
|
||||
logMessage(configuration, "......put " + fileName + " to FTP server: " + ftpServer + "...");
|
||||
ftpClient = new FTPSClient("TLS", false);
|
||||
ftpClient.setBufferSize(8192);
|
||||
ftpClient.connect(ftpServer, ftpPort);
|
||||
if (ftpClient.login(ftpUser, ftpPassword) == false) {
|
||||
logMessage(configuration, "FTP file transfer failed: login failed!");
|
||||
}
|
||||
ftpClient.enterLocalPassiveMode();
|
||||
ftpClient.setFileType(FTP.ASCII_FILE_TYPE);
|
||||
ftpClient.setControlEncoding("UTF-8");
|
||||
// Compute file path
|
||||
if (!ftpWorkingPath.startsWith("/")) {
|
||||
ftpWorkingPath = "/" + ftpWorkingPath;
|
||||
}
|
||||
if (!ftpWorkingPath.endsWith("/")) {
|
||||
ftpWorkingPath = ftpWorkingPath + "/";
|
||||
}
|
||||
InputStream writer = null;
|
||||
|
||||
// verify directories
|
||||
if (!ftpClient.changeWorkingDirectory(ftpWorkingPath)) {
|
||||
logMessage(configuration, "FTP file transfer failed: missing working directory '" + ftpWorkingPath
|
||||
+ "' : " + ftpClient.getReplyString());
|
||||
}
|
||||
FTPClient ftpClient = null;
|
||||
try {
|
||||
logMessage(configuration, "......put " + fileName + " to FTP server: " + ftpServer + "...");
|
||||
ftpClient = new FTPSClient("TLS", false);
|
||||
ftpClient.setBufferSize(8192);
|
||||
ftpClient.connect(ftpServer, ftpPort);
|
||||
if (ftpClient.login(ftpUser, ftpPassword) == false) {
|
||||
logMessage(configuration, "FTP file transfer failed: login failed!");
|
||||
}
|
||||
ftpClient.enterLocalPassiveMode();
|
||||
ftpClient.setFileType(FTP.ASCII_FILE_TYPE);
|
||||
ftpClient.setControlEncoding("UTF-8");
|
||||
|
||||
// upload file to FTP server.
|
||||
writer = new ByteArrayInputStream(fileData.getContent());
|
||||
// verify directories
|
||||
if (!ftpClient.changeWorkingDirectory(ftpWorkingPath)) {
|
||||
logMessage(configuration, "FTP file transfer failed: missing working directory '" + ftpWorkingPath
|
||||
+ "' : " + ftpClient.getReplyString());
|
||||
}
|
||||
|
||||
if (!ftpClient.storeFile(fileName, writer)) {
|
||||
logMessage(configuration, "FTP file transfer failed: unable to write '" + ftpWorkingPath + fileName
|
||||
+ "' : " + ftpClient.getReplyString());
|
||||
}
|
||||
// upload file to FTP server.
|
||||
writer = new ByteArrayInputStream(fileData.getContent());
|
||||
|
||||
logMessage(configuration, "...." + ftpWorkingPath + fileName + " transfered successfull to " + ftpServer);
|
||||
if (!ftpClient.storeFile(fileName, writer)) {
|
||||
logMessage(configuration, "FTP file transfer failed: unable to write '" + ftpWorkingPath + fileName
|
||||
+ "' : " + ftpClient.getReplyString());
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
logMessage(configuration, "FTP file transfer failed: " + e.getMessage());
|
||||
} finally {
|
||||
// do logout....
|
||||
try {
|
||||
if (writer != null) {
|
||||
writer.close();
|
||||
}
|
||||
ftpClient.logout();
|
||||
ftpClient.disconnect();
|
||||
} catch (IOException e) {
|
||||
logMessage(configuration, "FTP file transfer failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
logMessage(configuration, "...." + ftpWorkingPath + fileName + " transfered successfull to " + ftpServer);
|
||||
|
||||
} catch (IOException e) {
|
||||
logMessage(configuration, "FTP file transfer failed: " + e.getMessage());
|
||||
} finally {
|
||||
// do logout....
|
||||
try {
|
||||
if (writer != null) {
|
||||
writer.close();
|
||||
}
|
||||
ftpClient.logout();
|
||||
ftpClient.disconnect();
|
||||
} catch (IOException e) {
|
||||
logMessage(configuration, "FTP file transfer failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,17 @@ public class MahnlaufExecuteAdapter implements SignalAdapter {
|
|||
public ItemCollection execute(ItemCollection mahnLaufWorkitem, ItemCollection event)
|
||||
throws AdapterException, PluginException {
|
||||
|
||||
if (mahnLaufWorkitem.isItemEmpty("$workitemref")) {
|
||||
throw new PluginException(MahnlaufRefAddAdapter.class.getName(), MahnlaufService.ERROR_WORKFLOW,
|
||||
"Es wurden keine Rechnungen ausgewählt. Der Mahnlauf kann nicht gestartet werden.");
|
||||
}
|
||||
|
||||
// get all Invoices of this Mahnlauf
|
||||
List<String> refList = mahnLaufWorkitem.getItemValue("$workitemref");
|
||||
|
||||
for (String uniqueId : refList) {
|
||||
ItemCollection invoice = workflowService.getWorkItem(uniqueId);
|
||||
if (invoice != null && (invoice.getTaskID()>=MahnlaufService.TASK_MAHNLAUF_START && invoice.getTaskID()<=MahnlaufService.TASK_MAHNLAUF_END)) {
|
||||
if (invoice != null && (invoice.getTaskID() >= MahnlaufService.TASK_MAHNLAUF_START
|
||||
&& invoice.getTaskID() <= MahnlaufService.TASK_MAHNLAUF_END)) {
|
||||
mahnlaufService.processInvoice(invoice.event(MahnlaufService.EVENT_MAHNLAUF_EXECUTE));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ import org.imixs.workflow.exceptions.PluginException;
|
|||
import org.imixs.workflow.exceptions.QueryException;
|
||||
import org.imixs.workflow.sepa.services.SepaWorkflowService;
|
||||
|
||||
import com.alexanderlogistics.KreditorDebitorService;
|
||||
|
||||
/**
|
||||
* The MahnlaufRefAddAdapter links an invoice with a Mahnlauf for the
|
||||
* dbtr.number item . If there is currently no open Mahnlauf for this key, the
|
||||
|
|
@ -38,6 +40,9 @@ public class MahnlaufRefAddAdapter implements SignalAdapter {
|
|||
@EJB
|
||||
ModelService modelService;
|
||||
|
||||
@EJB
|
||||
KreditorDebitorService kreditorDebitorService;
|
||||
|
||||
@EJB
|
||||
WorkflowService workflowService = null;
|
||||
|
||||
|
|
@ -55,6 +60,12 @@ public class MahnlaufRefAddAdapter implements SignalAdapter {
|
|||
public ItemCollection execute(ItemCollection invoice, ItemCollection event)
|
||||
throws AdapterException, PluginException {
|
||||
|
||||
|
||||
if (invoice.getTaskID()<MahnlaufService.TASK_MAHNLAUF_START || invoice.getTaskID()>MahnlaufService.TASK_MAHNLAUF_END) {
|
||||
throw new PluginException(MahnlaufRefAddAdapter.class.getName(),
|
||||
MahnlaufService.ERROR_CONFIG, "Der Mahnlauf kann nur für Rechnungen erstellt werden die bereits die Fälligkeit erreicht haben.");
|
||||
}
|
||||
|
||||
String dbtrNumber = invoice.getItemValueString(MahnlaufService.ITEM_DBTR_NUMBER);
|
||||
ItemCollection mahnLaufWorkitem;
|
||||
try {
|
||||
|
|
@ -139,7 +150,15 @@ public class MahnlaufRefAddAdapter implements SignalAdapter {
|
|||
|
||||
// copy dbtr_iban
|
||||
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_NAME, invoice.getItemValue(MahnlaufService.ITEM_DBTR_NAME));
|
||||
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_EMAIL, invoice.getItemValue(MahnlaufService.ITEM_DBTR_EMAIL));
|
||||
|
||||
|
||||
// lookup email....
|
||||
String dbtrNumber=invoice.getItemValueString("dbtr.number");
|
||||
ItemCollection dbtrItemCol=kreditorDebitorService.findDebitor("D"+dbtrNumber);
|
||||
if (dbtrItemCol!=null) {
|
||||
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_EMAIL, dbtrItemCol.getItemValueString("cdtr.mail"));// dbtr.mail
|
||||
}
|
||||
|
||||
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_NUMBER, invoice.getItemValue(MahnlaufService.ITEM_DBTR_NUMBER));
|
||||
|
||||
mahnlaufWorkitem.setItemValue("invoice.language", invoice.getItemValue("invoice.language"));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
||||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html">
|
||||
|
||||
<!-- Zeit alle verknüften Zahlungen an -->
|
||||
|
||||
|
||||
<h:panelGroup layout="block" styleClass="imixs-form-section"
|
||||
id="paymentlist">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="imixsdatatable ">
|
||||
|
||||
|
||||
<tr>
|
||||
<th style="">Mahnungen</th>
|
||||
</tr>
|
||||
|
||||
<ui:param name="dunnings"
|
||||
value="#{workitemLinkController.getExternalReferences('$workflowgroup:Mahnlauf')}"></ui:param>
|
||||
<ui:repeat var="dunning_stub" value="#{dunnings}">
|
||||
<ui:param name="dunning"
|
||||
value="#{opListController.loadInvoice(dunning_stub.getUniqueID())}"></ui:param>
|
||||
|
||||
<tr>
|
||||
<td><h:link outcome="/pages/workitems/workitem">
|
||||
#{dunning.item['$workflowsummary']}
|
||||
<f:param name="id" value="#{dunning.item['$uniqueid']}" />
|
||||
</h:link></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</ui:repeat>
|
||||
|
||||
|
||||
</table>
|
||||
</h:panelGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ui:composition>
|
||||
|
|
@ -67,7 +67,6 @@
|
|||
<td style="text-align: right; color: red;"><h:outputText
|
||||
value="#{invoice.item['invoice.saldo']}">
|
||||
<f:convertNumber minFractionDigits="2" locale="de" />
|
||||
|
||||
</h:outputText></td>
|
||||
|
||||
|
||||
|
|
@ -75,13 +74,18 @@
|
|||
|
||||
|
||||
<!-- CheckBox -->
|
||||
<td style="text-align: center;"><h:selectBooleanCheckbox class="invoice_selector" rendered="#{!readonly}"
|
||||
<td style="text-align: center;">
|
||||
|
||||
<ui:fragment rendered="#{invoice.taskID ge 5100 and invoice.taskID lt 5299}">
|
||||
<h:selectBooleanCheckbox class="invoice_selector" rendered="#{!readonly}"
|
||||
value="#{invoice.item['selected']}"
|
||||
onclick="initInvoicePayment(this)">
|
||||
<f:ajax event="change" execute="#{opListContainer.clientId}"
|
||||
listener="#{opListController.updateChildList(workitem)}"
|
||||
render="#{opListContainer.clientId}"></f:ajax>
|
||||
</h:selectBooleanCheckbox></td>
|
||||
</h:selectBooleanCheckbox>
|
||||
</ui:fragment>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<table class="imixsdatatable ">
|
||||
|
||||
|
||||
|
|
@ -29,7 +28,7 @@
|
|||
</tr>
|
||||
|
||||
<ui:param name="payments"
|
||||
value="#{workitemLinkController.getExternalReferences('($WorkflowGroup:Zahlungseingang)')}"></ui:param>
|
||||
value="#{workitemLinkController.getExternalReferences('$workflowgroup:Zahlungseingang')}"></ui:param>
|
||||
<ui:repeat var="payment_stub" value="#{payments}">
|
||||
<ui:param name="payment"
|
||||
value="#{opListController.loadInvoice(payment_stub.getUniqueID())}"></ui:param>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
package com.alexanderlogistics;
|
||||
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.NoSuchProviderException;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.Store;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
/**
|
||||
* This test generates random test data
|
||||
*
|
||||
* @author rsoika
|
||||
*
|
||||
*/
|
||||
public class TestIMAPOauth2 {
|
||||
|
||||
final static String FILE = "/DTVF_SKBeschrift_21010.csv";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TestIMAPOauth2.class.getName());
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test imap connect via oauth
|
||||
*
|
||||
* https://techcommunity.microsoft.com/t5/exchange/javamail-connecting-to-office-365-xoauth2-for-imap/m-p/1505026
|
||||
*/
|
||||
@Test
|
||||
public void testIMAP() {
|
||||
try {
|
||||
Properties properties = new Properties();
|
||||
properties.put("mail.imap.ssl.enable", "true");
|
||||
properties.put("mail.imap.auth.mechanisms", "XOAUTH2");
|
||||
properties.put("mail.imap.auth.mechanisms", "XOAUTH2");
|
||||
properties.put("mail.imap.sasl.mechanisms", "XOAUTH2");
|
||||
properties.put("mail.imap.sasl.enable", "true");
|
||||
// properties.put("mail.imap.sasl.enable", "true"); un-commented still results
|
||||
// are same
|
||||
properties.put("mail.imap.auth.login.disable", "true");
|
||||
properties.put("mail.imap.auth.plain.disable", "true");
|
||||
properties.put("mail.debug", "true");
|
||||
properties.put("mail.debug.auth", "true");
|
||||
|
||||
String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
|
||||
properties.setProperty("mail.imap.socketFactory.class", SSL_FACTORY);
|
||||
properties.setProperty("mail.imap.socketFactory.fallback", "false");
|
||||
properties.setProperty("mail.imap.socketFactory.port", "993");
|
||||
properties.setProperty("mail.imap.starttls.enable", "true");
|
||||
|
||||
|
||||
Session session = Session.getInstance(properties);
|
||||
session.setDebug(true);
|
||||
|
||||
String userEmail = "imixs@alexander-logistics.com";
|
||||
// i^i$oe-!+o1o0io(
|
||||
String accessToken = "accessToken";
|
||||
|
||||
Store store;
|
||||
|
||||
store = session.getStore("imap");
|
||||
|
||||
String url="outlook.office365.com";
|
||||
//String url="https://outlook.office.com/IMAP.AccessAsUser.All";
|
||||
store.connect(url, 993, userEmail, accessToken);
|
||||
} catch (MessagingException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
Assert.fail();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
6850
office-alexander-logistics-app/src/test/resources/datev/OPD28.csv
Normal file
6850
office-alexander-logistics-app/src/test/resources/datev/OPD28.csv
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -413,6 +413,7 @@ Bei Fragen wenden Sie sich bitte an info@imixs.com
|
|||
<imixs-form-section label="Positionen" path="alexander/section_datevbuchung" />
|
||||
|
||||
<imixs-form-section label="Zahlungseingänge" path="alexander/section_payments" />
|
||||
<imixs-form-section label="Mahnläufe" path="alexander/section_dunnings" />
|
||||
</imixs-form>]]></bpmn2:documentation>
|
||||
<bpmn2:dataState id="DataState_1"/>
|
||||
</bpmn2:dataObject>
|
||||
|
|
|
|||
Loading…
Reference in a new issue