@DeclareRoles(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") public class DatevExportService extends Object
Unter anderem werden metadaten berechnet.
_stapelzeitraum_start und _stapelzeitraum_ende markieren die äterste und die jüngste Rechnung. Diese Daten weren für die DATEV Kopf Datei benötigt.
Change: 13.01.2021
Belegbilder dürfen immer nur einmal in der documents.xml drin stehen auch wenn diese mehrfach in verschiedenne Buchungssätzen verwendet werden. Daher prüfen wir beim Aufbau der documents.xml ob das belegbild schon generiert wurde.
| Modifier and Type | Field and Description |
|---|---|
static String |
CHILD_ITEM_PROPERTY |
static String |
ITEM_DATEV_BOOKING_PERIOD |
static String |
ITEM_DATEV_CLIENT_ID |
static String |
ITEM_DATEV_CONSULTANT_ID |
static String |
ITEM_DATEV_FISCAL_START |
static String |
ITEM_DATEV_KONTENLAENGE |
static String |
ITEM_DBTR_NAME |
static String |
ITEM_FTP_ERROR |
static String |
ITEM_FTP_HOST |
static String |
ITEM_FTP_PASSWORD |
static String |
ITEM_FTP_PATH_UPLOAD |
static String |
ITEM_FTP_PORT |
static String |
ITEM_FTP_USER |
static String |
MODEL_ERROR |
static String |
REPORT_ERROR |
| Constructor and Description |
|---|
DatevExportService() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildCSVFile(org.imixs.workflow.ItemCollection datevExport,
List<org.imixs.workflow.ItemCollection> data,
String key,
org.imixs.workflow.ItemCollection configuration)
This method builds an DATEV CSV export file containing all given invoices
|
void |
buildDocumentsZipFile(org.imixs.workflow.ItemCollection datevExport,
List<org.imixs.workflow.ItemCollection> data,
String key,
org.imixs.workflow.ItemCollection configuration)
This method builds the datev zip file containing the XML documents definition
and also all attachments.
|
org.imixs.workflow.ItemCollection |
buildExportWorkitem(org.imixs.workflow.ItemCollection configuration,
String modelVersion,
int taskID,
List<org.imixs.workflow.ItemCollection> data)
This method builds the export workitem.
|
String |
computeKey(org.imixs.workflow.ItemCollection invoice)
Helper Method to copute the grouping key
(MandantID+Buchungsperiode)
|
org.imixs.workflow.ItemCollection |
findDatevExport(String datevKey)
Prüft alle offenen Datev Exporte und gibt den neuesten zur angegebenen Datev
Client ID zurück, oder null falls es keinen Offenen Datev Export gibt.
|
org.imixs.workflow.FileData |
getWorkItemFileFromWorkitem(org.imixs.workflow.ItemCollection invoice)
This method first lookups the origin workItem from the given export
data entity.
|
org.imixs.workflow.ItemCollection |
loadConfiguration(String name)
Loads the DATEV configuration entity by name.
|
static void |
logMessage(String message,
org.imixs.workflow.ItemCollection configuration,
org.imixs.workflow.ItemCollection workitem)
Creates a new log entry stored in the item _scheduler_log.
|
org.imixs.workflow.ItemCollection |
processDatevExport(org.imixs.workflow.ItemCollection datevExport)
Aktualisiert den DATEV Export mit Manager Rechten
|
boolean |
putFileData(org.imixs.workflow.FileData fileData,
org.imixs.workflow.ItemCollection configuration,
String subDirectory,
org.imixs.workflow.ItemCollection datevExport,
int ftpType)
This method exports a fildata object to a ftp server defined by the
configuration ItemCollection.
|
org.imixs.workflow.ItemCollection |
updateExportWorkitem(org.imixs.workflow.ItemCollection datevExport,
org.imixs.workflow.ItemCollection configuration,
List<org.imixs.workflow.ItemCollection> data)
This method Updates the export workitem
The datev client id is fetched from the first invoice of the invoice data
collection.
|
public static final String ITEM_DATEV_KONTENLAENGE
public static final String ITEM_FTP_HOST
public static final String ITEM_FTP_PORT
public static final String ITEM_FTP_USER
public static final String ITEM_FTP_PASSWORD
public static final String ITEM_FTP_PATH_UPLOAD
public static final String ITEM_FTP_ERROR
public static final String ITEM_DATEV_CLIENT_ID
public static final String ITEM_DATEV_BOOKING_PERIOD
public static final String ITEM_DATEV_CONSULTANT_ID
public static final String ITEM_DATEV_FISCAL_START
public static final String ITEM_DBTR_NAME
public static final String CHILD_ITEM_PROPERTY
public static final String REPORT_ERROR
public static final String MODEL_ERROR
public org.imixs.workflow.ItemCollection updateExportWorkitem(org.imixs.workflow.ItemCollection datevExport,
org.imixs.workflow.ItemCollection configuration,
List<org.imixs.workflow.ItemCollection> data)
The datev client id is fetched from the first invoice of the invoice data collection.
Change 5.5.2022 Die Beraternummer kann nun auch auf Corporate Ebene gepflegt werden. Ist das der Fall, dann gewinnt diese Nummer. Andernfalls wird weiterhin die Beraternummer aus der Zentralen DATEV Config genommen.
configuration - modelVersion - taskID - data - public void buildDocumentsZipFile(org.imixs.workflow.ItemCollection datevExport,
List<org.imixs.workflow.ItemCollection> data,
String key,
org.imixs.workflow.ItemCollection configuration)
throws org.imixs.workflow.engine.scheduler.SchedulerException,
org.imixs.workflow.exceptions.PluginException
Change: 13.01.2021
Belegbilder dürfen immer nur einmal in der documents.xml drin stehen auch wenn diese mehrfach in verschiedenne Buchungssätzen verwendet werden. Daher prüfen wir beim Aufbau der documents.xml ob das belegbild schon generiert wurde.
data - org.imixs.workflow.engine.scheduler.SchedulerExceptionorg.imixs.workflow.exceptions.PluginExceptionpublic void buildCSVFile(org.imixs.workflow.ItemCollection datevExport,
List<org.imixs.workflow.ItemCollection> data,
String key,
org.imixs.workflow.ItemCollection configuration)
throws org.imixs.workflow.engine.scheduler.SchedulerException
data - org.imixs.workflow.engine.scheduler.SchedulerExceptionpublic boolean putFileData(org.imixs.workflow.FileData fileData,
org.imixs.workflow.ItemCollection configuration,
String subDirectory,
org.imixs.workflow.ItemCollection datevExport,
int ftpType)
throws org.imixs.workflow.engine.scheduler.SchedulerException
Das Zielverzeichnis wird mit der MAndanten ID ergänzt!
timer - org.imixs.workflow.exceptions.QueryExceptionorg.imixs.workflow.engine.scheduler.SchedulerExceptionpublic org.imixs.workflow.ItemCollection buildExportWorkitem(org.imixs.workflow.ItemCollection configuration,
String modelVersion,
int taskID,
List<org.imixs.workflow.ItemCollection> data)
The datev client id is fetched from the first invoice of the invoice data collection.
Change 5.5.2022 Die Beraternummer kann nun auch auf Corporate Ebene gepflegt werden. Ist das der Fall, dann gewinnt diese Nummer. Andernfalls wird weiterhin die Beraternummer aus der Zentralen DATEV Config genommen.
configuration - modelVersion - taskID - data - public org.imixs.workflow.ItemCollection loadConfiguration(String name)
public String computeKey(org.imixs.workflow.ItemCollection invoice)
public org.imixs.workflow.ItemCollection findDatevExport(String datevKey) throws org.imixs.workflow.exceptions.QueryException
datevKey - org.imixs.workflow.exceptions.QueryExceptionpublic org.imixs.workflow.ItemCollection processDatevExport(org.imixs.workflow.ItemCollection datevExport)
throws org.imixs.workflow.exceptions.AccessDeniedException,
org.imixs.workflow.exceptions.ProcessingErrorException,
org.imixs.workflow.exceptions.PluginException,
org.imixs.workflow.exceptions.ModelException
datevExport - org.imixs.workflow.exceptions.ModelExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionpublic org.imixs.workflow.FileData getWorkItemFileFromWorkitem(org.imixs.workflow.ItemCollection invoice)
throws org.imixs.workflow.exceptions.PluginException
If multiple files are attached, the method returns the latest FileData object
uniqueid - file - - file nameorg.imixs.workflow.exceptions.PluginExceptionpublic static void logMessage(String message, org.imixs.workflow.ItemCollection configuration, org.imixs.workflow.ItemCollection workitem)
message - configuration - Copyright © 2022 Imixs Software Solutions GmbH. All rights reserved.