Class DatevExportService
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.
- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildCSVFile(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 invoicesvoidbuildDocumentsZipFile(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.ItemCollectionbuildExportWorkitem(org.imixs.workflow.ItemCollection configuration, String modelVersion, int taskID, List<org.imixs.workflow.ItemCollection> data) This method builds the export workitem.computeKey(org.imixs.workflow.ItemCollection invoice, String datevClientID) Helper Method to copute the grouping key (MandantID+Buchungsperiode)org.imixs.workflow.ItemCollectionfindDatevExport(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.FileDatagetWorkItemFileFromWorkitem(org.imixs.workflow.ItemCollection invoice) This method first lookups the origin workItem from the given export data entity.org.imixs.workflow.ItemCollectionloadConfiguration(String name) Loads the DATEV configuration entity by name.org.imixs.workflow.ItemCollectionprocessDatevExport(org.imixs.workflow.ItemCollection datevExport) Aktualisiert den DATEV Export mit Manager RechtenbooleanputFileData(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.ItemCollectionupdateExportWorkitem(org.imixs.workflow.ItemCollection datevExport, org.imixs.workflow.ItemCollection configuration, List<org.imixs.workflow.ItemCollection> data) This method Updates the export workitem
-
Field Details
-
ITEM_DATEV_KONTENLAENGE
- See Also:
-
ITEM_FTP_HOST
- See Also:
-
ITEM_FTP_PORT
- See Also:
-
ITEM_FTP_USER
- See Also:
-
ITEM_FTP_PASSWORD
- See Also:
-
ITEM_FTP_PATH_UPLOAD
- See Also:
-
ITEM_FTP_ERROR
- See Also:
-
ITEM_DATEV_CLIENT_ID
- See Also:
-
ITEM_DATEV_CLIENT_NAME
- See Also:
-
ITEM_DATEV_BOOKING_PERIOD
- See Also:
-
ITEM_DATEV_CONSULTANT_ID
- See Also:
-
ITEM_DATEV_FISCAL_START
- See Also:
-
DEFAULT_CONFIG_NAME
- See Also:
-
CHILD_ITEM_PROPERTY
- See Also:
-
REPORT_ERROR
- See Also:
-
MODEL_ERROR
- See Also:
-
-
Constructor Details
-
DatevExportService
public DatevExportService()
-
-
Method Details
-
updateExportWorkitem
public 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 workitemThe datev client id is fetched from the first invoice of the invoice data collection.
- Parameters:
configuration-modelVersion-taskID-data-- Returns:
-
buildDocumentsZipFile
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.exceptions.PluginException This method builds the datev zip file containing the XML documents definition and also all attachments. The zip-file is finally attached into the datevExport workitem.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.
- Parameters:
data-- Throws:
org.imixs.workflow.exceptions.PluginException
-
buildCSVFile
public void buildCSVFile(org.imixs.workflow.ItemCollection datevExport, List<org.imixs.workflow.ItemCollection> data, String key, org.imixs.workflow.ItemCollection configuration) throws org.imixs.workflow.exceptions.PluginException This method builds an DATEV CSV export file containing all given invoices- Parameters:
data-- Throws:
org.imixs.workflow.exceptions.PluginException
-
putFileData
public 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.exceptions.PluginException This method exports a fildata object to a ftp server defined by the configuration ItemCollection.Das Zielverzeichnis wird mit der MAndanten ID ergänzt!
- Parameters:
timer-- Throws:
org.imixs.workflow.exceptions.QueryExceptionorg.imixs.workflow.exceptions.PluginException
-
buildExportWorkitem
public 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. This method is only used by the IW24DatevImportControler!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.
- Parameters:
configuration-modelVersion-taskID-data-- Returns:
-
loadConfiguration
Loads the DATEV configuration entity by name. The method returns null if no configuration exits.- Returns:
-
computeKey
Helper Method to copute the grouping key (MandantID+Buchungsperiode)- Returns:
-
findDatevExport
public org.imixs.workflow.ItemCollection findDatevExport(String datevKey) throws org.imixs.workflow.exceptions.QueryException 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.- Parameters:
datevKey-- Returns:
- Throws:
org.imixs.workflow.exceptions.QueryException
-
processDatevExport
public 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 Aktualisiert den DATEV Export mit Manager Rechten- Parameters:
datevExport-- Returns:
- Throws:
org.imixs.workflow.exceptions.ModelExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedException
-
getWorkItemFileFromWorkitem
public org.imixs.workflow.FileData getWorkItemFileFromWorkitem(org.imixs.workflow.ItemCollection invoice) throws org.imixs.workflow.exceptions.PluginException This method first lookups the origin workItem from the given export data entity. Then the method returns the first PDF fileData from a snapshot by a resolved invoice workItem.If multiple files are attached, the method returns the latest FileData object
- Parameters:
uniqueid-file- - file name- Returns:
- FileData object for the given filename.
- Throws:
org.imixs.workflow.exceptions.PluginException
-