op listen summenbildung
This commit is contained in:
parent
aabb7ab04d
commit
2e66c68e40
2 changed files with 16 additions and 5 deletions
|
|
@ -201,13 +201,20 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
||||||
private void addCurrencyColumns(XSSFWorkbook doc, XSSFSheet sheet, List<String> currencyList,
|
private void addCurrencyColumns(XSSFWorkbook doc, XSSFSheet sheet, List<String> currencyList,
|
||||||
List<ItemCollection> spaces) {
|
List<ItemCollection> spaces) {
|
||||||
|
|
||||||
// zusaetzliche spalten einfuegen...
|
// zusaetzliche Abteilungs spalten einfuegen...
|
||||||
int newColumns = (currencyList.size() * spaces.size()) - 0;
|
int newColumns = (currencyList.size() * (spaces.size())) - 1;
|
||||||
for (int i = 0; i < newColumns; i++) {
|
for (int i = 0; i < newColumns; i++) {
|
||||||
logger.fine(".. add currency column...");
|
logger.fine(".. add currency column...");
|
||||||
POIUtil.insertColumn(sheet, 1, 2 + i);
|
POIUtil.insertColumn(sheet, 1, 2 + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Total spalten einfuegen
|
||||||
|
for (int i = 0; i < currencyList.size() - 1; i++) {
|
||||||
|
logger.fine(".. add total column...");
|
||||||
|
POIUtil.insertColumn(sheet, 2 + newColumns, 3 + newColumns + i);
|
||||||
|
}
|
||||||
|
newColumns = newColumns + currencyList.size();
|
||||||
|
|
||||||
// Beschriftungen eintragen
|
// Beschriftungen eintragen
|
||||||
int col = 1;
|
int col = 1;
|
||||||
XSSFCell cell = null;
|
XSSFCell cell = null;
|
||||||
|
|
@ -226,6 +233,11 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
||||||
}
|
}
|
||||||
// Add the total column
|
// Add the total column
|
||||||
spaceRow.getCell(col).setCellValue("Total");
|
spaceRow.getCell(col).setCellValue("Total");
|
||||||
|
for (String currency : currencyList) {
|
||||||
|
cell = currencyRow.getCell(col);
|
||||||
|
cell.setCellValue(currency);
|
||||||
|
col++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -533,11 +545,10 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
||||||
// totalCell.setCellValue(totalsUeberfaelligCurrency2.get("TOTAL") +
|
// totalCell.setCellValue(totalsUeberfaelligCurrency2.get("TOTAL") +
|
||||||
// totalsFaelligCurrency2.get("TOTAL"));
|
// totalsFaelligCurrency2.get("TOTAL"));
|
||||||
|
|
||||||
// delete placeholder row
|
// delete placeholder rows
|
||||||
sheet.shiftRows(_rowNo, _rowNo + 3, -1);
|
sheet.shiftRows(_rowNo, _rowNo + 3, -1);
|
||||||
|
sheet.shiftRows(_rowNo - 1, _rowNo - 1 + 3, -1);
|
||||||
logger.finest("......invoices added");
|
logger.finest("......invoices added");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in a new issue