excel export
This commit is contained in:
parent
2c6636bfbc
commit
f623ea33ff
3 changed files with 22 additions and 16 deletions
|
|
@ -122,7 +122,7 @@ public class ExcelExportController implements Serializable {
|
|||
}
|
||||
|
||||
// query zeit
|
||||
String query = "(type:workitem OR type:workitemarchive) ";
|
||||
String query = "(type:workitem OR type:workitemarchive) AND ($workflowgroup:Rechnungsausgang) ";
|
||||
if (start != null && stop != null) {
|
||||
query += "AND (invoice.date:[" + sDateFrom + " TO " + sDateTo + "]) ";
|
||||
} else {
|
||||
|
|
@ -132,8 +132,9 @@ public class ExcelExportController implements Serializable {
|
|||
|
||||
// query Sachprüfung
|
||||
|
||||
if (!filter.getItemValueString("space.name").isEmpty()) {
|
||||
query += " AND (space.name:" + filter.getItemValueString("space.name") + ")";
|
||||
if (!filter.getItemValueString("space.ref").isEmpty()
|
||||
&& !"-".equals(filter.getItemValueString("space.ref"))) {
|
||||
query += " AND ($uniqueidref:" + filter.getItemValueString("space.ref") + ")";
|
||||
}
|
||||
if (workflowController.getWorkitem() != null
|
||||
&& !workflowController.getWorkitem().getItemValueString("dbtr.number").isEmpty()) {
|
||||
|
|
@ -154,7 +155,7 @@ public class ExcelExportController implements Serializable {
|
|||
}
|
||||
String targetName = "ausgangsrechnungen-export_" + dateformat.format(new Date()) + ".xlsx";
|
||||
try {
|
||||
List<ItemCollection> invoices = documentService.find(query, MAX_ROWS, 0);
|
||||
List<ItemCollection> invoices = documentService.find(query, MAX_ROWS, 0, "invoice.date", true);
|
||||
if (invoices.size() > 0) {
|
||||
insertInvoiceRows(invoices, fileData);
|
||||
}
|
||||
|
|
@ -287,12 +288,11 @@ public class ExcelExportController implements Serializable {
|
|||
// insert values
|
||||
row.getCell(0).setCellValue(invoice.getItemValueString("invoice.number"));
|
||||
row.getCell(1).setCellValue(invoice.getItemValueString("dbtr.number"));
|
||||
row.getCell(2).setCellValue(invoice.getItemValueString("invoice.text"));
|
||||
|
||||
row.getCell(3).setCellValue(invoice.getItemValueDate("invoice.date"));
|
||||
row.getCell(4).setCellValue(invoice.getItemValueDate("invoice.duedate"));
|
||||
|
||||
row.getCell(5).setCellValue(invoice.getItemValueDouble("invoice.total"));
|
||||
row.getCell(2).setCellValue(invoice.getItemValueString("space.name"));
|
||||
row.getCell(3).setCellValue(invoice.getItemValueString("invoice.text"));
|
||||
row.getCell(4).setCellValue(invoice.getItemValueDate("invoice.date"));
|
||||
row.getCell(5).setCellValue(invoice.getItemValueDate("invoice.duedate"));
|
||||
row.getCell(6).setCellValue(invoice.getItemValueDouble("invoice.total"));
|
||||
|
||||
rowPos++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<ui:include src="/error_message.xhtml" />
|
||||
<div class="imixs-form">
|
||||
<div class="imixs-header">
|
||||
<h1>Excle Export Ausgangsrechnungen</h1>
|
||||
<h1>Excel Export Ausgangsrechnungen</h1>
|
||||
</div>
|
||||
<h:panelGroup layout="block" styleClass="imixs-body" id="analyse_panel">
|
||||
<div class="imixs-form-panel">
|
||||
|
|
@ -64,11 +64,17 @@
|
|||
<dt>
|
||||
Abteilung:
|
||||
</dt>
|
||||
<dd>
|
||||
<h:inputText
|
||||
value="#{excelExportController.filter.item['space.name']}">
|
||||
|
||||
</h:inputText>
|
||||
<dd>
|
||||
<h:selectOneMenu noSelectionOption="true"
|
||||
value="#{excelExportController.filter.item['space.ref']}">
|
||||
<f:selectItem itemLabel=" - " itemValue="-" ></f:selectItem>
|
||||
<c:forEach items="#{spaceRefFormController.getSpaces(workflowController.workitem, options)}"
|
||||
var="space">
|
||||
<f:selectItem itemLabel="#{space.item['name']}" itemValue="#{space.item['$UniqueID']}">
|
||||
</f:selectItem>
|
||||
</c:forEach>
|
||||
</h:selectOneMenu>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue