multi currency - minor fixes

This commit is contained in:
Ralph Soika 2024-11-21 14:36:24 +01:00
parent 4d2ce3527a
commit 3eecb7e90d
3 changed files with 8 additions and 37 deletions

View file

@ -194,7 +194,7 @@ public class AGLAnalyticExcelAdapterDebitor extends POIFindReplaceAdapter {
col++; col++;
cell = labelRow.getCell(col); cell = labelRow.getCell(col);
cell.setCellValue("Saldo " + currency); cell.setCellValue("Balance " + currency);
col++; col++;
} }
} }

View file

@ -163,37 +163,6 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
} }
logger.info("... completed!"); 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<String> 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; return document;
} }
@ -319,7 +288,7 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
// jetzt füge alle Rechnungen an. // jetzt füge alle Rechnungen an.
for (ItemCollection invoice : invoices) { for (ItemCollection invoice : invoices) {
logger.fine("......add invoice " + invoice.getUniqueID()); logger.info("......add invoice " + invoice.getUniqueID() + " -> Row=" + rowPos);
// now create a new line.. // now create a new line..
XSSFRow row = sheet.createRow(rowPos); XSSFRow row = sheet.createRow(rowPos);
@ -360,12 +329,14 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
rowPos++; rowPos++;
} }
// delete reference row 11 // delete reference row 11
// sheet.shiftRows(referenceRowPos, lastRow + totalRowCount, -3, true, true); sheet.shiftRows(referenceRowPos, rowPos + 4, -1, true, true);
// sheet.shiftRows(rowPos, lastRow, -3, 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... // finally update the totals...
int i = 0; int i = 0;
XSSFRow totalRow = sheet.getRow(rowPos + 1); XSSFRow totalRow = sheet.getRow(rowPos);
for (String cur : currencyList) { for (String cur : currencyList) {
i++; i++;
Double totalSum = currencyTotalSum.get(cur); Double totalSum = currencyTotalSum.get(cur);

Binary file not shown.