diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/CargosoftExportController.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/CargosoftExportController.java new file mode 100644 index 0000000..a78c5b3 --- /dev/null +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/CargosoftExportController.java @@ -0,0 +1,81 @@ +package com.alexanderlogistics.datev; +/******************************************************************************* + * Imixs Workflow Technology + * Copyright (C) 2003, 2008 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 + * + * Contributors: + * Imixs Software Solutions GmbH - initial API and implementation + * Ralph Soika + * + *******************************************************************************/ + +import java.util.logging.Logger; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Named; + +import org.imixs.workflow.datev.imports.DatevImportScheduler; +import org.imixs.workflow.engine.scheduler.SchedulerController; + +/** + * The DatevController is used to configure the DatevScheduler. This service is + * used to generate datev export workitems. + *
+ * The Controller creates a configuration entity "type=configuration; + * txtname=datev". + *
+ * The following config items are defined: + * + * The following config items are defined: + * + *
+ * _model_version = model version for the SEPA export + * _initial_task = inital task ID + *+ * + * + * @author rsoika + * + */ +@Named +@RequestScoped +public class CargosoftExportController extends SchedulerController { + + public static final String CARGOSOFT_EXPORT_CONFIGURATION = "CARGOSOFT_EXPORT_CONFIGURATION"; + + private static final long serialVersionUID = 1L; + private static Logger logger = Logger.getLogger(CargosoftExportController.class.getName()); + + @Override + public String getName() { + return CARGOSOFT_EXPORT_CONFIGURATION; + } + + /** + * Returns the sepa scheduler class name. This name depends on the _export_type. + * + * There are two export interfaces available - csv and XML + * + */ + @Override + public String getSchedulerClass() { + String schedulerClass = CargosoftExportScheduler.class.getName(); + logger.finest("...... scheduler: " + schedulerClass); + return schedulerClass; + } + +} diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/CargosoftExportScheduler.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/CargosoftExportScheduler.java new file mode 100644 index 0000000..74dbf44 --- /dev/null +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/CargosoftExportScheduler.java @@ -0,0 +1,162 @@ +/******************************************************************************* + * Imixs Workflow Technology + * Copyright (C) 2001, 2008 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 + * + * Contributors: + * Imixs Software Solutions GmbH - initial API and implementation + * Ralph Soika + *******************************************************************************/ +package com.alexanderlogistics.datev; + +import java.io.ByteArrayOutputStream; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.logging.Logger; + +import javax.ejb.EJB; + +import org.imixs.workflow.ItemCollection; +import org.imixs.workflow.engine.DocumentService; +import org.imixs.workflow.engine.ModelService; +import org.imixs.workflow.engine.ReportService; +import org.imixs.workflow.engine.WorkflowService; +import org.imixs.workflow.engine.scheduler.Scheduler; +import org.imixs.workflow.engine.scheduler.SchedulerException; +import org.imixs.workflow.engine.scheduler.SchedulerService; +import org.imixs.workflow.exceptions.QueryException; + +/** + * The CargosoftExportScheduler exports a csv file with kreditor data + *
+ * The class implements the interface
+ * _org.imixs.workflow.engine.scheduler.Scheduler_ and can be used in
+ * combination with the Imxis-Workflow Scheduler Service.
+ *
+ * @see SchedulerService
+ * @author rsoika
+ *
+ */
+public class CargosoftExportScheduler implements Scheduler {
+
+ public static final int MAX_COUNT = 999;
+
+ 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
+ WorkflowService workflowService;
+
+ @EJB
+ ModelService modelService;
+
+ @EJB
+ ReportService reportService;
+
+ 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 {
+ ByteArrayOutputStream outputStream = null;
+ List
+ Die Verzeichnisse
+ werden mit der DATEV Mandanten ID ergänzt und müssen vor dem
+ Export angelegt worden sein!
+ Definieren Sie hier den Inport eines Buchunsstapel. Der
- Import erfolgt im DATEV Standardformat (CSV Datei) Das Workflow Modell gibt an mit welchem Worklfow die
- Datensätze importiert werden sollen
- The initial task
- must define a report containing the query and style sheet
- information. Invoices will be automatically grouped by the
- optional attribute "_datev_client_id". The datev workflow may
- optional include a "invoice_update" item definition.
-
- Die Verzeichnisse
- werden mit der DATEV Mandanten ID ergänzt und müssen vor dem
- Export angelegt worden sein!
-
diff --git a/office-alexander-logistics-app/src/main/webapp/pages/admin/cargosoft_export.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/admin/cargosoft_export.xhtml
new file mode 100644
index 0000000..29f9c23
--- /dev/null
+++ b/office-alexander-logistics-app/src/main/webapp/pages/admin/cargosoft_export.xhtml
@@ -0,0 +1,149 @@
+Ausgangsrechnungen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Scheduler
+
+ DATEV
-
-
-
-
-
-
- Import DATEV Buchungsstapel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Scheduler
-
- Import DATEV Stammdaten
-
-
-
-
-
-
-
- #{kriegerImportController.importData.item['log']}
-
-