diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticExcelAdapterDebitor.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticExcelAdapterDebitor.java index 9772745..2cd4b18 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticExcelAdapterDebitor.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticExcelAdapterDebitor.java @@ -194,7 +194,7 @@ public class AGLAnalyticExcelAdapterDebitor extends POIFindReplaceAdapter { col++; cell = labelRow.getCell(col); - cell.setCellValue("Saldo " + currency); + cell.setCellValue("Balance " + currency); col++; } } diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportAdapter.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportAdapter.java index 6f187a6..3e23090 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportAdapter.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportAdapter.java @@ -163,37 +163,6 @@ public class OPListExportAdapter extends POIFindReplaceAdapter { } logger.info("... completed!"); - // appendExcelTemplate(document, textblock, template, targetName); - - // logger.info("... loading poi configuration.."); - // // Process POI instructions - // // read the config - // ItemCollection poiConfig = workflowService.evalWorkflowResult(event, - // "poi-update", document, false); - // if (poiConfig == null || !poiConfig.hasItem("findreplace")) { - // throw new PluginException(POIFindReplaceAdapter.class.getSimpleName(), - // CONFIG_ERROR, - // "missing poi configuration"); - // } - // List replaceDevList = poiConfig.getItemValue("findreplace"); - // String eval = poiConfig.getItemValueString("eval"); - // try { - // logger.info("... update template with normal poi information.."); - // this.updateFileData(document.getFileData(targetName), document, - // replaceDevList, eval); - - // // now we add separate lines for each invoice.... - // logger.info("... insert invoices - filter=" + filter); - // document.setItemValue("space.currency1", currency1); - // document.setItemValue("space.currency2", currency2); - - // insertInvoiceRows(document, targetName, filter, currency1, currency2); - // } catch (PluginException | IOException | QueryException e) { - // throw new PluginException(OPListExportAdapter.class.getSimpleName(), - // InvoiceService.ERROR_CONFIG, - // "failed to update op-liste: " + e.getMessage()); - // } - // logger.info("... completed!"); return document; } @@ -319,7 +288,7 @@ public class OPListExportAdapter extends POIFindReplaceAdapter { // jetzt füge alle Rechnungen an. for (ItemCollection invoice : invoices) { - logger.fine("......add invoice " + invoice.getUniqueID()); + logger.info("......add invoice " + invoice.getUniqueID() + " -> Row=" + rowPos); // now create a new line.. XSSFRow row = sheet.createRow(rowPos); @@ -360,12 +329,14 @@ public class OPListExportAdapter extends POIFindReplaceAdapter { rowPos++; } // delete reference row 11 - // sheet.shiftRows(referenceRowPos, lastRow + totalRowCount, -3, true, true); - // sheet.shiftRows(rowPos, lastRow, -3, true, true); - + sheet.shiftRows(referenceRowPos, rowPos + 4, -1, true, true); + // delete last empty lines + sheet.shiftRows(rowPos + 0, rowPos + 1, -2, true, true); + // fix current row pos for totals + rowPos = rowPos - 2; // finally update the totals... int i = 0; - XSSFRow totalRow = sheet.getRow(rowPos + 1); + XSSFRow totalRow = sheet.getRow(rowPos); for (String cur : currencyList) { i++; Double totalSum = currencyTotalSum.get(cur); diff --git a/templates/op-liste_template.xlsx b/templates/op-liste_template.xlsx index 8f3b329..573123a 100644 Binary files a/templates/op-liste_template.xlsx and b/templates/op-liste_template.xlsx differ