mahnlauf
This commit is contained in:
parent
29f62710a9
commit
7d481d14d0
6 changed files with 3966 additions and 15 deletions
16
.vscode/settings.json
vendored
Normal file
16
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// If one would like to add/remove/modify user preferences without modifying the content of the
|
||||
// workspace settings file, then one would need to modify the `settings.json` under here:
|
||||
// - Windows: %APPDATA%\Code\User\settings.json
|
||||
// - Linux: $HOME/.config/Code/User/settings.json
|
||||
// - Mac: $HOME/Library/Application Support/Code/User/settings.json
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": true
|
||||
},
|
||||
"java.checkstyle.version": "8.44",
|
||||
"java.checkstyle.autocheck": true,
|
||||
"java.checkstyle.configuration": "https://raw.githubusercontent.com/imixs/imixs-workflow/master/imixs-checkstyle-8.44.xml",
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
||||
|
||||
11
hotdeploy.sh
Executable file
11
hotdeploy.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
############################################################
|
||||
# Setup hotdeploy
|
||||
#
|
||||
############################################################
|
||||
|
||||
cd office-alexander-logistics-app
|
||||
mvn manik-hotdeploy:hotdeploy
|
||||
|
||||
cd ..
|
||||
|
|
@ -9,6 +9,7 @@ import org.imixs.workflow.exceptions.PluginException;
|
|||
/**
|
||||
* Das InvoiceOutgoingPlugin aktualisiert die Debitor E-Mail Adresse
|
||||
*
|
||||
* Auch das feld _img wird in Abhängigkeit vom item 'invoice.protest' gesetzt
|
||||
*
|
||||
* @author rsoika
|
||||
* @version 1.0
|
||||
|
|
@ -33,6 +34,12 @@ public class InvoiceOutgoingPlugin extends AbstractPlugin {
|
|||
workitem.setItemValue("dbtr.mail", debitor.getItemValueString("cdtr.mail"));
|
||||
}
|
||||
|
||||
String img="";
|
||||
if (workitem.getItemValueBoolean("invoice.protest")) {
|
||||
img = img + "<img title='Reklamiert' src=\"/layout/icons/icon106.png\">";
|
||||
|
||||
}
|
||||
workitem.setItemValue("_img", img);
|
||||
return workitem;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,11 +43,14 @@ public class OPListController implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final int TASK_ERSTELLUNG = 1000;
|
||||
|
||||
|
||||
private static Logger logger = Logger.getLogger(OPListController.class.getName());
|
||||
|
||||
private String lastDbtrNumber = null;
|
||||
|
||||
private String currencyFilter = "-";
|
||||
private String lastCurrencyFilter = null;
|
||||
|
||||
private List<ItemCollection> invoiceList = null;
|
||||
|
||||
@Inject
|
||||
|
|
@ -65,7 +68,8 @@ public class OPListController implements Serializable {
|
|||
/**
|
||||
* Diese Methode wird für Zahlungseingänge und Mahnläufe verwendet.
|
||||
* <p>
|
||||
* Die Methode liefert die Rechnungen zur gegebenen dbtrNumber. Die Methode nutzt
|
||||
* Die Methode liefert die Rechnungen zur gegebenen dbtrNumber. Die Methode
|
||||
* nutzt
|
||||
* einen lokalen cache um die Zugriffe zu beschleunigen.
|
||||
* <p>
|
||||
* Befindet sich ein Zahlungseingang in Erstellung (Task=1000) werden alle
|
||||
|
|
@ -88,6 +92,9 @@ public class OPListController implements Serializable {
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<ItemCollection> getInvoices(String _dbtrNumber) {
|
||||
if (_dbtrNumber == null) {
|
||||
return new ArrayList<ItemCollection>();
|
||||
}
|
||||
|
||||
// Compute all open invoices if TASK_ERSTELLUNG....
|
||||
if (workflowController.getWorkitem().getTaskID() == TASK_ERSTELLUNG) {
|
||||
|
|
@ -99,12 +106,16 @@ public class OPListController implements Serializable {
|
|||
}
|
||||
|
||||
// if last dbtr number is equal then return the current list....
|
||||
if (invoiceList != null && lastDbtrNumber != null && lastDbtrNumber.equals(_dbtrNumber)) {
|
||||
if (invoiceList != null && //
|
||||
lastDbtrNumber != null && lastDbtrNumber.equals(_dbtrNumber) && //
|
||||
lastCurrencyFilter != null && lastCurrencyFilter.equals(currencyFilter) //
|
||||
) {
|
||||
return invoiceList;
|
||||
}
|
||||
|
||||
// load new invoice list....
|
||||
lastDbtrNumber = _dbtrNumber;
|
||||
lastCurrencyFilter = currencyFilter;
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
logger.info("....loading open Invoices for " + _dbtrNumber);
|
||||
|
||||
|
|
@ -115,12 +126,24 @@ public class OPListController implements Serializable {
|
|||
if (_dbtrNumber.startsWith("D")) {
|
||||
_dbtrNumber = _dbtrNumber.substring(1);
|
||||
}
|
||||
// (type:workitem OR type:workitemarchive)
|
||||
String query = "(type:workitem) AND ($modelversion:rechnungsausgang-*) AND (dbtr.number:" + _dbtrNumber
|
||||
+ ")";
|
||||
|
||||
try {
|
||||
invoiceList = documentService.find(query, 999, 0, "invoice.number", false);
|
||||
String query = "(type:workitem) AND ($modelversion:rechnungsausgang-*) AND (dbtr.number:" + _dbtrNumber
|
||||
+ ")";
|
||||
List<ItemCollection> invoiceListTemp = documentService.find(query, 999, 0, "invoice.number", false);
|
||||
|
||||
// Jetzt nur noch die Rechnungen nehmen die zum ausgewählten Währungsfilter
|
||||
// passen
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
for (ItemCollection _invoice : invoiceListTemp) {
|
||||
if (currencyFilter == null || currencyFilter.isEmpty() || currencyFilter.equals("-")) {
|
||||
invoiceList.add(_invoice);
|
||||
} else {
|
||||
if (currencyFilter.equals(_invoice.getItemValueString("invoice.currency"))) {
|
||||
invoiceList.add(_invoice);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (QueryException e) {
|
||||
logger.severe("Failed to get op liste:" + e.getMessage());
|
||||
}
|
||||
|
|
@ -152,11 +175,11 @@ public class OPListController implements Serializable {
|
|||
* Eine Ausnahme ist hier nur wenn jemand auf Speichern oder mahnen drückt
|
||||
* (Event = 10|20). Dann ändern wir die Liste nicht!
|
||||
*
|
||||
* Hinweis: in der Liste befinden sich keine Inkasso Rechnungen, da man diese
|
||||
* Hinweis: in der Liste befinden sich keine Inkasso Rechnungen, da man diese
|
||||
* nicht anwählen kann.
|
||||
*/
|
||||
if (workflowController.getWorkitem().getModelVersion().startsWith("mahnlauf")) {
|
||||
|
||||
|
||||
// wir selektieren hier immer alle fälligen Rechnungen vor falls wir aus
|
||||
// einer Rechnung mit dem Event 100 (Mahnlauf erstellen) kommen, oder
|
||||
// wenn der Mahnlauf von außen gerate eben neu erzeugt wurde
|
||||
|
|
@ -189,9 +212,10 @@ public class OPListController implements Serializable {
|
|||
|
||||
// finally we set the 'selection' item depending on the $workitemList
|
||||
// and the payment amount form the 'payment.details'
|
||||
if (invoiceList!=null) {
|
||||
if (invoiceList != null) {
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
List<ItemCollection> paymentList = zahlungseingangService.loadPaymentDetails(workflowController.getWorkitem());
|
||||
List<ItemCollection> paymentList = zahlungseingangService
|
||||
.loadPaymentDetails(workflowController.getWorkitem());
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (selection.contains(invoice.getUniqueID())) {
|
||||
invoice.setItemValue("selected", true);
|
||||
|
|
@ -205,11 +229,10 @@ public class OPListController implements Serializable {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// empty list
|
||||
// empty list
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
}
|
||||
|
||||
|
||||
return invoiceList;
|
||||
}
|
||||
|
||||
|
|
@ -310,7 +333,7 @@ public class OPListController implements Serializable {
|
|||
double result = 0;
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (currency.equals(invoice.getItemValueString("invoice.currency"))) {
|
||||
result = result + invoice.getItemValueDouble("invoice.total");
|
||||
result = result + invoice.getItemValueDouble("invoice.total");
|
||||
}
|
||||
}
|
||||
// rond with 2 digits
|
||||
|
|
@ -387,4 +410,11 @@ public class OPListController implements Serializable {
|
|||
return date.compareTo(LocalDate.now()) <= 0;
|
||||
}
|
||||
|
||||
public String getCurrencyFilter() {
|
||||
return currencyFilter;
|
||||
}
|
||||
|
||||
public void setCurrencyFilter(String currencyFilter) {
|
||||
this.currencyFilter = currencyFilter;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,14 @@
|
|||
<h:panelGroup layout="block" styleClass="imixs-form-section"
|
||||
id="oplist-table" binding="#{opListContainer}">
|
||||
|
||||
<h:selectOneRadio value="#{opListController.currencyFilter}" style="float:right;">
|
||||
<f:selectItem itemLabel="Alle" itemValue="-"/>
|
||||
<f:selectItem itemLabel="EUR" itemValue="EUR"/>
|
||||
<f:selectItem itemLabel="USD" itemValue="USD"/>
|
||||
<f:ajax render="oplist-table" />
|
||||
</h:selectOneRadio>
|
||||
|
||||
|
||||
<table style="width: 100%; margin: 5px;">
|
||||
<tr>
|
||||
<th style="text-align: left;">#{message['form.invoicenumber']}</th>
|
||||
|
|
@ -36,7 +44,11 @@
|
|||
<td><h:link outcome="/pages/workitems/workitem">
|
||||
#{invoice.item['invoice.number']}
|
||||
<f:param name="id" value="#{invoice.item['$uniqueid']}" />
|
||||
</h:link></td>
|
||||
</h:link>
|
||||
|
||||
<h:outputText escape="false" value="#{invoice.item['_img']}"/>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td><h:outputText value="#{invoice.item['invoice.date']}">
|
||||
|
|
|
|||
3875
workflow/rechnungsausgang-de-1.0.5.bpmn
Normal file
3875
workflow/rechnungsausgang-de-1.0.5.bpmn
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue