improve kreditor suche

This commit is contained in:
Ralph Soika 2024-08-15 10:05:02 +02:00
parent 9654b42d48
commit 49c01370eb
3 changed files with 11 additions and 26 deletions

View file

@ -97,8 +97,14 @@ public class CargosoftController implements Serializable {
// die cargosoft Kreditornummer beginnt seltsamerweise mit einem K
// und die Debitoren mit einem D.....
String query = "(type:" + KreditorDebitorService.TYPE_CARGOSOFTKREDITOR + ") AND ( (name:K" + phrase
+ "*) OR (name:D" + phrase + "*) OR (" + phrase.toLowerCase() + "*) )";
String query = "(type:" + KreditorDebitorService.TYPE_CARGOSOFTKREDITOR + ")";
if (phrase.toUpperCase().startsWith("K") || phrase.toUpperCase().startsWith("D")) {
query = query + " AND ( (name:" + phrase + "*) OR (" + phrase.toLowerCase() + "*) )";
} else {
// query with K and D prafix
query = query + " AND ( (name:K" + phrase + "*) OR (name:D" + phrase + "*) "
+ " OR (" + phrase.toLowerCase() + "*) )";
}
try {
List<ItemCollection> result = documentService.find(query, 20, 0, "$modified", true);

View file

@ -5,11 +5,7 @@
template="/layout/template.xhtml">
<ui:define name="content">
<f:view>
<h:form id="zahlungsziel_form_id">
<!-- ########## Error ########## -->
@ -26,16 +22,11 @@
<h:outputText value="Accounts " />
</h1>
</div>
<!-- ########## Error ########## -->
<ui:include src="/error_message.xhtml" />
<div class="imixs-body">
<div class="imixs-form-panel">
<div class="imixs-form-section-2">
<dl>
<dt>Creditor/Debtor:</dt>
@ -44,11 +35,8 @@
pt:data-item="cdtr.number" />
</dd>
</dl>
</div>
<h:panelGroup layout="block" styleClass="imixs-form-section-2" id="contentIputID">
<dl>
<dt>E-Mail:</dt>
<dd>
@ -59,8 +47,6 @@
<span class="small">Separate multiple addresses with new lines.</span>
</dd>
</dl>
<dl>
<dt>Term of Payment:</dt>
<dd>
@ -69,10 +55,6 @@
pt:data-item="cdtr.creditperiod" /> days
</dd>
</dl>
<dl>
<dt>Country:</dt>
<dd>
@ -80,11 +62,8 @@
value="#{cargosoftController.kreditor.item['country']}" />
</dd>
</dl>
</h:panelGroup>
<div class="imixs-form-section-2">
<dl>

View file

@ -66,11 +66,11 @@
$("input[data-item='invoice.number']").focus().select();
}
// update iban/bic
if (inputElementIban) {
// update iban/bic if available
if (inputElementIban && cdtrData.iban && cdtrData.iban != '') {
inputElementIban.val(cdtrData.iban);
}
if (inputElementBic) {
if (inputElementBic && cdtrData.bic && cdtrData.bic != '') {
inputElementBic.val(cdtrData.bic);
}
if (inputElementMail) {