fix null pointer exception
This commit is contained in:
parent
7902df76a9
commit
d8bfc6ce39
1 changed files with 16 additions and 10 deletions
|
|
@ -189,21 +189,27 @@ public class OPListController implements Serializable {
|
|||
|
||||
// finally we set the 'selection' item depending on the $workitemList
|
||||
// and the payment amount form the 'payment.details'
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
List<ItemCollection> paymentList = zahlungseingangService.loadPaymentDetails(workflowController.getWorkitem());
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (selection.contains(invoice.getUniqueID())) {
|
||||
invoice.setItemValue("selected", true);
|
||||
// set amount
|
||||
for (ItemCollection payment : paymentList) {
|
||||
if (invoice.getUniqueID().equals(payment.getUniqueID())) {
|
||||
invoice.setItemValue("payment.amount", payment.getItemValue("payment.amount"));
|
||||
break;
|
||||
if (invoiceList!=null) {
|
||||
List<String> selection = workflowController.getWorkitem().getItemValue("$workitemref");
|
||||
List<ItemCollection> paymentList = zahlungseingangService.loadPaymentDetails(workflowController.getWorkitem());
|
||||
for (ItemCollection invoice : invoiceList) {
|
||||
if (selection.contains(invoice.getUniqueID())) {
|
||||
invoice.setItemValue("selected", true);
|
||||
// set amount
|
||||
for (ItemCollection payment : paymentList) {
|
||||
if (invoice.getUniqueID().equals(payment.getUniqueID())) {
|
||||
invoice.setItemValue("payment.amount", payment.getItemValue("payment.amount"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// empty list
|
||||
invoiceList = new ArrayList<ItemCollection>();
|
||||
}
|
||||
|
||||
|
||||
return invoiceList;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue