prüfung doppelete Rechnugnsnummer
This commit is contained in:
parent
ce71561027
commit
0f648abf5a
4 changed files with 11 additions and 7 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>office-alexander-logistics</artifactId>
|
<artifactId>office-alexander-logistics</artifactId>
|
||||||
<groupId>com.alexander-logistics</groupId>
|
<groupId>com.alexander-logistics</groupId>
|
||||||
<version>1.2.3</version>
|
<version>1.2.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>office-alexander-logistics-app</artifactId>
|
<artifactId>office-alexander-logistics-app</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,9 @@ public class InvoicePlugin extends AbstractPlugin {
|
||||||
private void validateInvoiceNumber(ItemCollection workitem) throws PluginException {
|
private void validateInvoiceNumber(ItemCollection workitem) throws PluginException {
|
||||||
|
|
||||||
String invoiceNumber = workitem.getItemValueString("invoice.number");
|
String invoiceNumber = workitem.getItemValueString("invoice.number");
|
||||||
|
// strip
|
||||||
|
String invoiceNumberStripped=invoiceNumber.replace(" ","");
|
||||||
|
workitem.setItemValue("invoice.number.stripped", invoiceNumberStripped);
|
||||||
String invoiceNumberDuplicate = workitem.getItemValueString("invoice.number.duplicate");
|
String invoiceNumberDuplicate = workitem.getItemValueString("invoice.number.duplicate");
|
||||||
|
|
||||||
// wenn keine Rechnungsnummer eingegeben wurde gehts weiter!
|
// wenn keine Rechnungsnummer eingegeben wurde gehts weiter!
|
||||||
|
|
@ -289,8 +292,9 @@ public class InvoicePlugin extends AbstractPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// rechnungseingang only workitems...
|
// rechnungseingang only workitems...
|
||||||
String query = "(type:workitem OR type:workitemarchive) AND ($modelversion:rechnungseingang*) AND NOT ($uniqueid:\""
|
// Change 11.4.22 - we have now an additional field: invoice.number.stripped
|
||||||
+ workitem.getUniqueID() + "\") AND (invoice.number:\"" + invoiceNumber + "\")";
|
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 {
|
try {
|
||||||
int result = this.getWorkflowService().getDocumentService().count(query, 1);
|
int result = this.getWorkflowService().getDocumentService().count(query, 1);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
# Imixs Lucene Plugin
|
# Imixs Lucene Plugin
|
||||||
##############################
|
##############################
|
||||||
lucence.indexDir=${imixs-office.IndexDir}
|
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.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.store=process.name,txtProcessName,txtWorkflowImageURL
|
||||||
index.fields.category=space.name,space.ref,taxonomy.verteilung.stop.by,taxonomy.sachpruefung.stop.by,taxonomy.buchhaltung.stop.by
|
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
|
# Marty Setup
|
||||||
|
|
|
||||||
2
pom.xml
2
pom.xml
|
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.alexander-logistics</groupId>
|
<groupId>com.alexander-logistics</groupId>
|
||||||
<artifactId>office-alexander-logistics</artifactId>
|
<artifactId>office-alexander-logistics</artifactId>
|
||||||
<version>1.2.3</version>
|
<version>1.2.4</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Imixs Office Workflow - Custom Build</name>
|
<name>Imixs Office Workflow - Custom Build</name>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue