Skip to content

Commit

Permalink
refine data format
Browse files Browse the repository at this point in the history
Issue #124
  • Loading branch information
rsoika committed Sep 7, 2022
1 parent f4e1af2 commit f2a0461
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void readHeader(ItemCollection workitem) throws PluginException {
header1 = in.readLine();
String[] header1List = header1.split(";(?=([^\"]*\"[^\"]*\")*[^\"]*$)", 99);

if (header1List.length<6) {
if (header1List.length<13) {
throw new PluginException(DatevImportAdapter.class.getName(), DATEV_IMPORT_ERROR, "Invalid header-1!");
}

Expand All @@ -107,7 +107,9 @@ private void readHeader(ItemCollection workitem) throws PluginException {
workitem.setItemValue("datev.Versionsnummer", csvVal(header1List[1]));
workitem.setItemValue("datev.Datenkategorie", csvVal(header1List[2]));
workitem.setItemValue("datev.Formatname", csvVal(header1List[3]));
workitem.setItemValue("datev.Erzeugt.am", csvVal(header1List[5]));
workitem.setItemValue("datev.Erzeugt_am", csvVal(header1List[5]));
workitem.setItemValue("datev.WJ-Beginn", csvVal(header1List[12]));


} catch (IOException e) {
throw new PluginException(DatevImportAdapter.class.getName(), DATEV_IMPORT_ERROR, "Unable to read file",e);
Expand Down

0 comments on commit f2a0461

Please sign in to comment.