prüfung doppelete Rechnugnsnummer

This commit is contained in:
Ralph Soika 2022-04-11 17:04:00 +02:00
parent ce71561027
commit 0f648abf5a
4 changed files with 11 additions and 7 deletions

View file

@ -5,7 +5,7 @@
<parent>
<artifactId>office-alexander-logistics</artifactId>
<groupId>com.alexander-logistics</groupId>
<version>1.2.3</version>
<version>1.2.4</version>
</parent>
<artifactId>office-alexander-logistics-app</artifactId>
<packaging>war</packaging>

View file

@ -281,6 +281,9 @@ public class InvoicePlugin extends AbstractPlugin {
private void validateInvoiceNumber(ItemCollection workitem) throws PluginException {
String invoiceNumber = workitem.getItemValueString("invoice.number");
// strip
String invoiceNumberStripped=invoiceNumber.replace(" ","");
workitem.setItemValue("invoice.number.stripped", invoiceNumberStripped);
String invoiceNumberDuplicate = workitem.getItemValueString("invoice.number.duplicate");
// wenn keine Rechnungsnummer eingegeben wurde gehts weiter!
@ -289,8 +292,9 @@ public class InvoicePlugin extends AbstractPlugin {
}
// rechnungseingang only workitems...
String query = "(type:workitem OR type:workitemarchive) AND ($modelversion:rechnungseingang*) AND NOT ($uniqueid:\""
+ workitem.getUniqueID() + "\") AND (invoice.number:\"" + invoiceNumber + "\")";
// Change 11.4.22 - we have now an additional field: invoice.number.stripped
String query = "(type:workitem OR type:workitemarchive) AND ($modelversion:rechnungseingang*) AND NOT ($uniqueid:\""
+ workitem.getUniqueID() + "\") AND ((invoice.number:\"" + invoiceNumberStripped + "\") OR (invoice.number.stripped:\"" + invoiceNumberStripped + "\"))";
try {
int result = this.getWorkflowService().getDocumentService().count(query, 1);
if (result > 0) {

View file

@ -2,12 +2,12 @@
# Imixs Lucene Plugin
##############################
lucence.indexDir=${imixs-office.IndexDir}
index.fields=txtsearchstring,txtSubject,txtname,txtEmail,txtUserName,namCreator,txtworkflowgroup,txtworkflowstatus,txtWorkflowAbstract,txtWorkflowSummary,txtworkflowhistory,txtspacename,txtprocessname,_subject,_description,_name,_projectnumber,_projectname,_ordernumber,_contractnumber,datDueDate,txtcommentlog,htmldescription,htmldocumentation,dms,dms_names,_childitems,$file.names,_VENDOR_NAME
index.fields=txtsearchstring,txtSubject,txtname,txtEmail,txtUserName,namCreator,txtworkflowgroup,txtworkflowstatus,txtWorkflowAbstract,txtWorkflowSummary,txtworkflowhistory,txtspacename,txtprocessname,_subject,_description,_name,_projectnumber,_projectname,_ordernumber,_contractnumber,datDueDate,txtcommentlog,htmldescription,htmldocumentation,dms,dms_names,invoice.number.stripped,_childitems,$file.names,_VENDOR_NAME
index.fields.analyze=txtUsername
index.fields.noanalyze=type,$UniqueIDRef,$created,$modified,$ModelVersion,namCreator,$ProcessID,datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber,dms_count,invoice.number,invoice.duedate,taxonomy.verteilung.stop,taxonomy.sachpruefung.stop,taxonomy.verteilung.start,taxonomy.sachpruefung.start,taxonomy.buchhaltung.start,taxonomy.buchhaltung.stop
index.fields.noanalyze=type,$UniqueIDRef,$created,$modified,$ModelVersion,namCreator,$ProcessID,datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber,dms_count,invoice.number,invoice.number.stripped,invoice.duedate,taxonomy.verteilung.stop,taxonomy.sachpruefung.stop,taxonomy.verteilung.start,taxonomy.sachpruefung.start,taxonomy.buchhaltung.start,taxonomy.buchhaltung.stop
index.fields.store=process.name,txtProcessName,txtWorkflowImageURL
index.fields.category=space.name,space.ref,taxonomy.verteilung.stop.by,taxonomy.sachpruefung.stop.by,taxonomy.buchhaltung.stop.by
office.search.noanalyze=invoice.number
office.search.noanalyze=invoice.number,invoice.number.stripped
##############################
# Marty Setup

View file

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alexander-logistics</groupId>
<artifactId>office-alexander-logistics</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>
<packaging>pom</packaging>
<name>Imixs Office Workflow - Custom Build</name>