verbesserter XML import - skip rückstellungen
This commit is contained in:
parent
7a728fc298
commit
d0dc2167ff
3 changed files with 4085 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
### 1.2.19 (Development)
|
||||
|
||||
- Neue XML Invoice Schnittstelle
|
||||
- Mahnwesen englisch (noch nicht begonnen!)
|
||||
- Mahnwesen englisch
|
||||
|
||||
|
||||
### 1.2.18
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ public class CargosoftXMLInvoiceImportImportService {
|
|||
private static Logger logger = Logger.getLogger(CargosoftXMLInvoiceImportImportService.class.getName());
|
||||
public static final String OPTION_MANDANT_ID = "mandant.id";
|
||||
public static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
|
||||
public static final String REGEX_IMPORTTEXTPATTERN = "^R[1-8] .*$";
|
||||
|
||||
@EJB
|
||||
WorkflowService workflowService;
|
||||
|
|
@ -443,11 +444,17 @@ public class CargosoftXMLInvoiceImportImportService {
|
|||
}
|
||||
|
||||
// Row Positions lesen
|
||||
// InvoiceRows/InvoiceRow
|
||||
readXMLRows(doc, workitem);
|
||||
|
||||
// Jetzt noch das Space mapping
|
||||
mahnlaufService.mapInvoiceTextToSpace(workitem, spacePosMappings);
|
||||
|
||||
// Rückstellungen ignorieren
|
||||
if (isRueckStellung(workitem)) {
|
||||
// Ignore invoice!
|
||||
return null;
|
||||
}
|
||||
|
||||
// Finally we attache the pdf file and the XML conent to the workitem.
|
||||
attacheFiles(doc, workitem);
|
||||
|
||||
|
|
@ -458,6 +465,19 @@ public class CargosoftXMLInvoiceImportImportService {
|
|||
return workitem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft ob die Rechnung eine Rückstellung ist also mit R1 bis R8 beginnt
|
||||
*
|
||||
* ^R[1-8] .
|
||||
*
|
||||
* @param workitem
|
||||
* @return
|
||||
*/
|
||||
private boolean isRueckStellung(ItemCollection workitem) {
|
||||
String text = workitem.getItemValueString("invoice.text");
|
||||
return text.matches(REGEX_IMPORTTEXTPATTERN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a tag value from the xml tree and set the value into the given
|
||||
* workitem.
|
||||
|
|
|
|||
4063
workflow/rechnungsausgang-de-1.0.7.bpmn
Normal file
4063
workflow/rechnungsausgang-de-1.0.7.bpmn
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue