stapelverarbeitung

This commit is contained in:
Ralph Soika 2025-01-23 23:57:37 +01:00
parent 8db4320348
commit 74ef6e17a7
4 changed files with 46 additions and 32 deletions

View file

@ -74,8 +74,14 @@ public class InvoiceDispatchAdapter implements SignalAdapter {
try { try {
workflowService.processWorkItem(invoice, 20); workflowService.processWorkItem(invoice, 20);
} catch (AccessDeniedException | ProcessingErrorException | PluginException | ModelException e) { } catch (AccessDeniedException | ProcessingErrorException | PluginException | ModelException e) {
throw new PluginException(InvoiceDispatchAdapter.class.getSimpleName(), "PROCESSING_ERROR", // Hier werfen wir keine Exception mehr sondern geben nur eine Warning auf der
"Failed to process invoice : " + invoice.getUniqueID()); // Console aus.
// Der User merkt also nicht wenn eine Rechnung nicht zugewiesen werden konnte
// throw new PluginException(InvoiceDispatchAdapter.class.getSimpleName(),
// "PROCESSING_ERROR",
// "Failed to process invoice : " + invoice.getUniqueID());
logger.info("Failed to process invoice : " + invoice.getUniqueID());
} }
} }

View file

@ -56,7 +56,8 @@ oplist.invoices.description.open=Anzahl der Rechnungen die noch nicht fällig si
oplist.invoices.description.due=Anzahl der fälligen Rechnungen oplist.invoices.description.due=Anzahl der fälligen Rechnungen
oplist.invoices.description.dunning=Anzahl Rechnungen bereits gemahnt oplist.invoices.description.dunning=Anzahl Rechnungen bereits gemahnt
invoice.clickall=Alle Rechnungen markieren
invoice.unclickall=Auswahl zurücksetzen
ERROR_CDTR_INVALID=Die Kreditorennummer ist nicht gültig ERROR_CDTR_INVALID=Die Kreditorennummer ist nicht gültig
ERROR_BOOKING_PERIOD=Eingabefehler - Bitte geben Sie eine gültige Buchungsperiode ein! Prüfen Sie auch die Spalte BP in der Positionstabelle. ERROR_BOOKING_PERIOD=Eingabefehler - Bitte geben Sie eine gültige Buchungsperiode ein! Prüfen Sie auch die Spalte BP in der Positionstabelle.

View file

@ -56,6 +56,8 @@ oplist.invoices.description.open=Number of invoices that are not yet due
oplist.invoices.description.due=Number of invoices due oplist.invoices.description.due=Number of invoices due
oplist.invoices.description.dunning=Number of invoices already dunned oplist.invoices.description.dunning=Number of invoices already dunned
invoice.clickall=Select all invoices
invoice.unclickall=Reset
ERROR_CDTR_INVALID=The creditor number is not valid ERROR_CDTR_INVALID=The creditor number is not valid
ERROR_BOOKING_PERIOD=Input error - Please enter a valid booking period! Also check the BP column in the position table. ERROR_BOOKING_PERIOD=Input error - Please enter a valid booking period! Also check the BP column in the position table.

View file

@ -50,15 +50,13 @@
<ui:fragment rendered="#{!empty invoiceList}"> <ui:fragment rendered="#{!empty invoiceList}">
<div class="imixs-form-section"> <div class="imixs-form-section">
<input type="button" id="clickallid" value="#{custom['invoice.clickall']}" />
<input type="button" id="unclickallid" value="#{custom['invoice.unclickall']}" />
<table class="" style="font-size: 0.9rem;line-height: 2.1em;"> <table class="" style="font-size: 0.9rem;line-height: 2.1em;">
<c:forEach items="#{invoiceList}" var="invoice"> <c:forEach items="#{invoiceList}" var="invoice">
<tr> <tr>
<td><input type="checkbox" class="selection_checkbox" <td><input type="checkbox" class="selection_checkbox"
id="#{invoice.uniqueID}" /></td> id="#{invoice.uniqueID}" /></td>
@ -84,37 +82,44 @@
<script type="text/javascript"> <script type="text/javascript">
/*<![CDATA[*/ /*<![CDATA[*/
// collect all selected ids form the checkboxes in the first column // collect all selected ids form the checkboxes in the first column
$(document).ready( $(document).ready(
function() { function() {
// clear last selection... // Button-Handler bleiben gleich
selection = $('.invoice_selection_list').val(''); document.querySelector('input[id="clickallid"]').addEventListener('click', function() {
document.querySelectorAll('.selection_checkbox').forEach(checkbox => {
checkbox.checked = true;
updateSelectionList(checkbox.id, true);
});
});
// on change handler.... document.querySelector('input[id="unclickallid"]').addEventListener('click', function() {
$('input[type="checkbox"].selection_checkbox').change( document.querySelectorAll('.selection_checkbox').forEach(checkbox => {
function() { checkbox.checked = false;
var id = $(this).attr('id'); updateSelectionList(checkbox.id, false);
var check = $(this).prop('checked'); });
//console.log("Change: " + id + " to " + check); });
// get selection $('.invoice_selection_list').val('');
var selection = $('.invoice_selection_list')
.val(); function updateSelectionList(id, checked) {
const selectionArr = selection.split(","); let selection = $('.invoice_selection_list').val();
// selected let selectionArr = selection ? selection.split(",").filter(x => x) : [];
if (check) {
selectionArr.push(id); if (checked && !selectionArr.includes(id)) {
} selectionArr.push(id);
// unselected } else if (!checked) {
if (!check) { selectionArr = selectionArr.filter(x => x !== id);
var i = selectionArr.indexOf(id); }
selectionArr.splice(i, i);
} $('.invoice_selection_list').val(selectionArr.join(','));
//console.log("new selection=" + selectionArr.join(',')); }
selection = $('.invoice_selection_list').val(
selectionArr.join(',')); $('input[type="checkbox"].selection_checkbox').change(function() {
}); updateSelectionList($(this).attr('id'), $(this).prop('checked'));
});
}); });
/*]]>*/ /*]]>*/