Compare commits

...

330 commits

Author SHA1 Message Date
97a6e86a11 verbesserter prompt 2026-08-21 10:29:23 +02:00
f2bd7210e6 upgrade 1.4 -> Brazil 2026-08-20 22:40:40 +02:00
3c5e5b0546 Merge branch 'office-alexander-logistics-1.4' 2026-08-20 21:43:42 +02:00
f06adc290c update 2026-08-20 21:41:19 +02:00
6721c2de9b update 2026-08-20 15:11:58 +02:00
2d3f98c15c clean up docu and junit tests 2026-08-20 11:05:28 +02:00
cfe1edb294 Merge commit '8309be5b39a6f1e8228626e667a0678cf908d304' into office-alexander-logistics-1.4 2026-08-20 11:03:36 +02:00
f96d1af5e7 Merge branch 'master' into office-alexander-logistics-1.4 2026-08-20 11:02:58 +02:00
8309be5b39 neue tax email brazil 2026-08-20 10:45:22 +02:00
e85840695c Merge branch 'master' of ssh://git.imixs.com/git/office-alexander-logistics 2026-08-19 14:54:37 +02:00
b6782448f9 wrong email 2026-08-19 14:54:22 +02:00
f942231066 neuer AGLAIInvoiceAdapter für auflösung von space.ref 2026-08-19 10:18:36 +02:00
99e138e685 model mit besseren historien text 2026-08-18 11:49:10 +02:00
44df91da9d model fix, backup testbackup test 2026-08-18 11:48:12 +02:00
8afb45271f cancel button added 2026-08-17 12:17:52 +02:00
7bca17dcca cancel button added 2026-08-17 12:17:04 +02:00
fe4ca105df fix gitignore 2026-08-17 11:35:41 +02:00
202fe2f3a0 korrektur validierung Gutschriften 2026-08-17 11:34:31 +02:00
3d322152e5 update neue AI Version 2026-08-17 11:22:38 +02:00
01e0e89e14 Migration office 2026-08-15 14:19:38 +02:00
e14af8449f migration auf neue office version 2026-08-15 10:54:26 +02:00
b8d0660526 neue KI Features 2026-08-15 09:46:17 +02:00
aeba05cc19 update polen 2026-08-13 12:23:06 +02:00
020498eee7 update sepa brasilien 2026-08-12 14:09:07 +02:00
6a66fd1852 fixed timing in ksef export 2026-08-07 18:01:01 +02:00
0a459e4b48 improved http check status mechanism 2026-08-04 12:12:17 +02:00
49c8ea0db9 New task Reklamiert/bezahlt 2026-07-31 12:30:09 +02:00
bd0500beef update cn und br 2026-07-31 12:13:13 +02:00
b6e56958ec logging, configuraiton BR 2026-07-27 20:03:05 +02:00
3f15b3a11b anapssungen der einvoice 2026-07-24 11:04:22 +02:00
f758c4a6ac verbesserungen e-invoice 2026-07-23 16:25:15 +02:00
0d9c9d8615 impvore e-invoice format 2026-07-23 16:13:44 +02:00
2b997da394 Setup AGL BR 2026-07-23 13:07:55 +02:00
092aa40ceb added timer to solve scheduler hangs 2026-07-17 09:40:51 +02:00
8d9de4a16a fixes error messages, added data export 2026-07-06 12:27:33 +02:00
1086466822 ksef update 2026-07-06 11:34:28 +02:00
a3df1a0a77 KSeF Docu 2026-06-29 22:31:39 +02:00
68acd25778 skip validation in end status-manuelle Auslandsrechnung 2026-06-29 13:42:09 +02:00
4e24e6e7b4 update 2026-06-26 12:28:38 +02:00
53703cdf9b purchase workflow 2026-06-24 11:26:56 +02:00
394297b31c new forward opiton 2026-06-11 18:32:05 +02:00
6a22dc29af update invoice worklow 2026-06-11 13:51:35 +02:00
38b60d7621 update payment.date 2026-06-10 15:06:11 +02:00
944d72b2cf minor fixes 2026-06-10 14:55:24 +02:00
f6fb26dcf0 fixes 2026-06-10 11:20:51 +02:00
4203572a8f upgrade 1.3.6 2026-06-08 12:20:09 +02:00
049bf8fea9 new dataview version 2026-06-08 12:19:48 +02:00
69456a28a0 fixed correct summarization in writeSummaryFields - with multipel 0% rules 2026-05-28 19:38:35 +02:00
111527b407 fixed correct summarization in writeSummaryFields - with multipel 0% rules 2026-05-28 19:17:47 +02:00
ba40d05c9d neuer posteingang für polen 2026-05-27 15:36:31 +02:00
190aa023c0 skip ksef for debit/credit notes 2026-05-18 16:05:17 +02:00
907455fe9b vat id in business partner form aufgenommen 2026-05-15 16:11:58 +02:00
99dd910520 clean up workflow folder 2026-05-15 10:20:24 +02:00
be2f8c08ac fixed ksef tax codes 2026-05-14 15:52:16 +02:00
26114ae35c fixed ksef tax codes 2026-05-14 09:51:39 +02:00
97935680bf fixed ksef tests 2026-05-14 09:51:26 +02:00
5491c04da4 korrektur P_18 2026-05-13 16:23:13 +02:00
a272c8bdb4 new tax code CARGO_023 2026-05-12 23:09:30 +02:00
f72ef5cce6 Änderung ksef template und umrechnugn der Kurse 2026-05-12 15:47:04 +02:00
5b4401bb82 business partner views 2026-05-05 11:56:44 +02:00
6afd6856c2 update 2026-05-04 16:58:39 +02:00
c15efc106c neue Ansicht Businesspartner 2026-05-04 16:33:57 +02:00
a65ae59950 optional ksev export 2026-05-04 15:26:28 +02:00
1d91e7f809 fixes 2026-05-01 13:32:19 +02:00
0e86783324 fixes ksef 2026-04-28 19:35:32 +02:00
7d426a0dab fixes ksef 2026-04-28 19:10:45 +02:00
6f76b367e7 update 2026-04-28 16:44:10 +02:00
edacbbdd6d neue Imple KSEF Adapter 2026-04-27 22:42:09 +02:00
04acdb4ff3 Feedback von Taxman 2026-04-27 16:31:42 +02:00
f8c13c5b2b Feedback von Taxman 2026-04-27 12:47:59 +02:00
47fc7e151e manueller ksef process 2026-04-17 17:35:21 +02:00
ae11393c8c update ksef workflow 2026-04-16 17:46:32 +02:00
9884a3cd00 Korrektur der Polnischen KSeF Verarbeitung 2026-04-16 06:22:06 +02:00
d11099e8a3 mail plugin 2026-04-09 13:28:26 +02:00
6bee49b917 fixed KSeFAdapter - compute pos numbers manually 2026-04-02 16:56:54 +02:00
3ebd619df4 fix ATC Number 2026-04-02 12:34:22 +02:00
d7619a7c21 ksef prod 2026-04-01 17:00:09 +02:00
4894d11f83 docu 2026-03-24 15:12:34 +01:00
9a3e6146ea fix mulitiple mailaddresses in business partner 2026-03-19 08:54:18 +01:00
28b17e957f update 2026-03-13 10:28:43 +01:00
2bfa7cd7e1 konfiguraition, mailing, 2026-03-09 12:40:55 +01:00
d7c9682bfd korrektur der Steuerberechnung 2026-02-24 16:29:50 +01:00
676310ae38 update 2026-02-24 11:52:14 +01:00
1d7fb83710 workflows 2026-02-12 15:22:16 +01:00
1a614564a8 update - added test 2026-02-10 12:47:20 +01:00
fc69af8bd5 modle update 2026-01-30 13:10:32 +01:00
38b755d5c1 mail plugin update 2026-01-29 13:23:08 +01:00
d59f9f3718 fixed api endpoint 2026-01-23 16:19:29 +01:00
dd96aa84d0 mail benachrichtigung rsoika deaktiviert 2026-01-22 10:47:17 +01:00
e2c1d9a47e mail plugin in workflow aktualisiert 2026-01-14 20:03:16 +01:00
cdf6d36f8b update posteingang summarization prompt 2026-01-07 18:01:50 +01:00
f90afb959a model updates 2025-12-16 13:25:26 +01:00
851519dbbd update ksef 2025-12-11 16:44:15 +01:00
5f4de3e432 mail fix 2025-12-08 14:55:53 +01:00
82b3771fc8 performance issues 2025-12-08 12:27:28 +01:00
5b445adee0 überarbeitung KSeF 2025-12-08 11:44:59 +01:00
b3c935132b mail subject changed 2025-12-08 08:49:29 +01:00
600f6980bd fix scheduler setting für Mailversand 2025-12-05 16:54:22 +01:00
15b8a54360 E-Mail Benachrichtigung an Herrn Hoelzl bei Payment RUn 2025-12-05 16:39:36 +01:00
5f20bc458b added qr-code to invoice 2025-12-04 16:48:33 +01:00
e09e25766a typo 2025-12-04 08:58:50 +01:00
78739d3517 improve invoice plugin logic 2025-12-01 12:00:58 +01:00
fecb9e8813 some minor fixes 2025-11-28 20:02:52 +01:00
96477feb74 qr code ergänzt 2025-11-28 15:30:16 +01:00
a1621420e2 Berechnung der KSeF Download URLs 2025-11-28 14:01:18 +01:00
e4347046b4 store uop data 2025-11-27 11:47:52 +01:00
3e1e7ccef0 update ksef intergation 2025-11-27 11:22:22 +01:00
459f7808cf refactoring KSeF invoice upload 2025-11-27 11:07:21 +01:00
9024ee2e38 fixed KSeF Upload 2025-11-26 23:31:45 +01:00
082f0f609d import hilfs methode für test 2025-11-26 18:33:29 +01:00
1ee7c82805 import hilfs methode für test 2025-11-26 18:32:52 +01:00
909c3f195d refactoring 2025-11-25 08:43:02 +01:00
dd70091057 Invoice Type (RodzajFaktury) -> VAT | KOR 2025-11-24 23:20:18 +01:00
6b6957e1ab Auslesen der Cargosoft Korrektur Rechnungsdaten 2025-11-24 23:05:10 +01:00
6e65ed4468 lookup nip - migration 2025-11-24 18:48:13 +01:00
cca28e9414 update ksef 2025-11-24 16:59:36 +01:00
616765aa0a update pl 2025-11-19 17:08:03 +01:00
53b5f69329 added ksef schema validator 2025-11-18 22:15:16 +01:00
c232841ed3 update 2025-11-18 16:33:58 +01:00
f61c7feca5 update ksef 2025-11-18 11:54:25 +01:00
fb3f086192 ksef export configuration 2025-11-17 21:36:36 +01:00
b986f8615a ksef adapter added 2025-11-17 16:49:58 +01:00
7b421e0a37 Neuer FTP Connector mit Atomic Write 2025-11-17 12:36:21 +01:00
1897377eb3 Started e-invoice interface 2025-11-17 12:35:59 +01:00
1f2d3b4cd5 new impl authManager 2025-11-17 00:04:40 +01:00
6c4e72fe82 neuer Test Code - bessere Key Verwaltung 2025-11-16 15:31:28 +01:00
1bce7db64e logging 2025-11-16 11:03:05 +01:00
cfd974ecd2 started 1.3.5 2025-11-15 20:47:49 +01:00
6d7d47772c finalize 1.3.4 2025-11-15 20:35:58 +01:00
1b31712ac7 logging 2025-11-15 15:28:31 +01:00
bb058306f0 korrektur 2025-11-15 10:51:27 +01:00
11b28ef9c3 KSeF Impl and docu 2025-11-14 23:22:24 +01:00
26b08eb507 test authManager 2025-11-14 22:04:11 +01:00
5ead936783 verbesserte auth methodik 2025-11-14 15:24:12 +01:00
9f6d86d328 neue impl 2025-11-14 13:43:58 +01:00
7fe009c23c Implemented KSeFAuthManager 2025-11-13 22:35:20 +01:00
e76a8dc668 update 2025-11-13 19:45:59 +01:00
278880a6b0 docu 2025-11-13 17:23:44 +01:00
5e4698025a Test Code KSeF client 2025-11-13 17:23:29 +01:00
ed3444890d update 2025-11-10 12:06:07 +01:00
3e96df6e9c docu 2025-11-07 16:13:27 +01:00
e322acbd0e update 2025-11-06 15:18:04 +01:00
af03c22dd7 modernisierung data-views 2025-11-04 11:24:09 +01:00
6f15bbd21f bugfix datumseingabe_tage 2025-10-22 10:40:34 +02:00
7ae22da078 bug fix - gutschrift 2025-10-15 12:35:06 +02:00
62435591d7 new option - delete credit note 2025-10-10 12:39:42 +02:00
e50a923347 fixed workflow models 2025-10-10 10:58:51 +02:00
ca630aec03 Auswahl eines optionalen Buchungskontos bei Eingangsgutschriften 2025-10-09 17:19:55 +02:00
5aa9fba8f8 Auswahl eines optionalen Buchungskontos bei Eingangsgutschriften 2025-10-09 17:15:30 +02:00
54fe24e8c7 Erweiterte Anzeige Business Partner Suche 2025-10-08 19:24:38 +02:00
9fa5217d59 smaller model fixes (SEPA) 2025-10-08 14:44:35 +02:00
98d46de37c workflow updates - Polen Tax Export 2025-10-06 10:56:43 +02:00
c7ec908f4e fix validierung 2025-09-21 21:29:07 +02:00
988a831200 invoicePlugin - bessere Kontrolle partner.id 2025-09-19 18:46:44 +02:00
15e37ff2c8 verbesserte Prüfung der Partner.ID Eingabe , Speziallösung Frau Mwanig für sonder Gutschriften Export an Cargosoft 2025-09-19 12:13:43 +02:00
6c1fa2c094 fix ams model - sepa übergabe 2025-09-12 09:04:48 +02:00
d7f2b0bc92 korrektur business partner import bei Eingangsrechnung 2025-09-10 11:09:35 +02:00
51730e3d39 start outgoing invoices in poland 2025-09-08 17:10:43 +02:00
513782b303 update bp workflow 2025-09-04 12:01:06 +02:00
75ef221181 bp workflow update 2025-09-04 11:29:45 +02:00
8b463d3acb update dwc - complete button 2025-09-04 10:54:44 +02:00
3764a265f9 fix model debitor analyise 2025-09-03 11:29:53 +02:00
3df24a7bd8 update 2025-09-02 12:48:11 +02:00
f986a9d1ba schon wieder typo :-( 2025-09-02 12:17:33 +02:00
5d1434fa7d Merge branch 'master' of ssh://git.imixs.com/git/office-alexander-logistics 2025-09-02 11:30:23 +02:00
d1b816d1e6 typo 2 2025-09-02 11:30:12 +02:00
7e1c0e91b8 update csv export 2025-09-02 11:02:23 +02:00
5a4ac8a1e6 test client kutzner, fix sepa polen 2025-09-02 10:35:23 +02:00
fef55be481 typo in script 2025-09-02 10:26:56 +02:00
5e483d5517 sepa reports Polen finalisiert 2025-09-01 14:07:04 +02:00
863dc67603 update 2025-09-01 13:58:54 +02:00
4143468ea0 anzeige sepa läufe 2025-09-01 12:33:08 +02:00
d4dc59b60b modelle aufgeräumt 2025-09-01 11:14:48 +02:00
106515d25a fixed opListContoller - getinvoices 2025-09-01 11:02:34 +02:00
6c67a81b6f typo 2025-09-01 10:53:54 +02:00
0ef5fff446 verbesserter SEPA Report 2025-09-01 08:47:19 +02:00
e0e5bbd8f3 abschluss migration 2025-08-31 07:53:51 +02:00
c6205b9c43 adresswandlung cargosoft 2025-08-30 17:27:33 +02:00
c14e1e41b3 migration imixs-archive -> imixs-data 2025-08-29 17:49:52 +02:00
fbf5bf2962 zoho schnittstelle 2025-08-29 09:43:53 +02:00
fe23ba4050 cargosoft migrations agent 2025-08-28 21:21:43 +02:00
734fe57d09 verbesserungen Migration PL 2025-08-28 13:10:39 +02:00
3a08e83581 caching op liste 2025-08-27 21:40:54 +02:00
5c16f68a43 workflow update 2025-08-27 15:31:07 +02:00
81db869ccd fix read access für csv export 2025-08-24 19:27:35 +02:00
6f9727c4d1 fix read access für csv export 2025-08-24 19:19:18 +02:00
98ad08b052 korrektur pflichtfelder 2025-08-24 18:36:35 +02:00
52ac50f204 support von 5-stelligen BP Nummern 2025-08-24 10:34:51 +02:00
6620f7ce7c Vendor Auswahl für Sachrechnung 2025-08-22 15:45:31 +02:00
4ae91b527c BP Auswahl für Sachrechnung 2025-08-22 15:30:49 +02:00
e1145e9348 update mail translation 2025-08-22 12:15:43 +02:00
79504dc80a update process 2025-08-22 12:15:22 +02:00
c6e73ac111 update sepa bank millenium 2025-08-21 16:34:12 +02:00
a44424fcf1 update 2025-08-21 12:19:17 +02:00
b666ffdbb7 update excel update 2025-08-21 12:09:41 +02:00
c2c3b6e798 update model 2025-08-21 11:54:42 +02:00
4fb35d252b fixed übernahme iban/bic von bpController 2025-08-21 08:02:46 +02:00
58745c32da csv export - anpassung rechnungs modelle 2025-08-20 20:22:43 +02:00
15ce9fc9bb csv export 2025-08-20 19:27:18 +02:00
fce3559463 ubernahme IBAN/BIC bei Partner auswahl 2025-08-20 18:58:14 +02:00
03e0ac275f update invoice inbound 2025-08-20 16:31:54 +02:00
7f437904c9 update models 2025-08-20 15:17:17 +02:00
686a112c22 update changes 2025-08-19 22:50:23 +02:00
c9b25c9f5e typo 2025-08-19 22:26:55 +02:00
c0073dadd7 cargosoft report 2025-08-18 19:48:35 +02:00
550323b72f usa model fixes 2025-08-18 19:19:24 +02:00
ea5bc8d1e5 workflow modelle aufgeräumt 2025-08-15 11:26:22 +02:00
8fcdaa3b69 model update 2025-08-14 11:36:45 +02:00
0d73f0f7e0 translation 2025-08-13 11:08:27 +02:00
18ffca90fb modelle usa 2025-08-13 08:51:48 +02:00
22d23226e4 introduced new DataGroups/DataViews 2025-08-12 23:12:13 +02:00
73dd3c37a5 update 2025-08-11 16:56:34 +02:00
291b9d4a0a model fix 2025-08-11 11:45:54 +02:00
db815dea23 invoice export feature 2025-08-05 10:57:54 +02:00
8ddf44515e Upgrade Office Version (removed external references from chronical) 2025-08-05 08:36:06 +02:00
29d584d12f update USA 2025-08-04 15:34:56 +02:00
bf1d9fd37b usa workflow 2025-08-03 14:18:48 +02:00
a152fdd461 sepa konfigurationen aufgeräumt 2025-08-01 15:26:25 +02:00
9cefd51ccb update docu 2025-08-01 13:40:41 +02:00
22c1c8793b model update - hide repeat-ai 2025-07-30 22:26:46 +02:00
2725b08cf7 update imixs-archive api verison 2025-07-30 21:56:56 +02:00
52412a7678 cargosoft export 2025-07-30 10:12:11 +02:00
6545f76f43 update 2025-07-24 16:55:27 +02:00
259373053f update bp 2025-07-24 15:08:23 +02:00
fd668439c8 update ams 2025-07-24 15:05:43 +02:00
60d2d90114 update 2025-07-23 12:30:55 +02:00
67affba4d7 fixed zoho - refresh token function 2025-07-14 13:24:05 +02:00
1e698fc8bf zoho async optimizing 2025-07-11 11:07:06 +02:00
04eb6ddc18 update 2025-07-11 10:48:33 +02:00
c9c9f69bed zoho update 2025-07-11 10:38:34 +02:00
eb6d3d2c00 acl fix - zoho export 2025-07-08 23:31:31 +02:00
2bc72c0940 new workflow - async zoho export 2025-07-08 21:39:37 +02:00
8796759bb2 model update 2025-07-07 18:56:50 +02:00
caae20029e update dataviews 2025-07-05 15:43:20 +02:00
049df51b89 update ams sachrechnung 2025-07-03 13:35:05 +02:00
e81be7996e update ams & typo 2025-07-03 12:50:32 +02:00
2cbd5d66bc added a eventlog test client 2025-07-02 21:39:58 +02:00
87ef39ece4 update AMS... 2025-07-01 16:18:08 +02:00
22c2791fa1 start ams 2025-06-25 16:34:02 +02:00
e350ece8f3 zoho credit note interface 2025-06-25 09:54:33 +02:00
ffb0942737 send only one invoice line 2025-06-24 12:45:25 +02:00
cce4b9a6e4 logging 2025-06-23 14:22:51 +02:00
7b283e5b03 zoho tax export bills 2025-06-19 14:22:05 +02:00
7204fc43c8 update language 2025-06-18 11:01:31 +02:00
fe65ae16a4 zoho schnittstelle 2025-06-18 08:52:14 +02:00
9de6a9fe23 zoho currency and taxes 2025-06-16 12:46:05 +02:00
177d75c13a zoho - taxid - export 2025-06-13 13:58:15 +02:00
5105d20783 zoho - taxid - export 2025-06-13 13:56:07 +02:00
cc7e081c78 IBAN Plugin entfernt 2025-06-12 15:15:43 +02:00
d4f1bd318e zoho credit note 2025-06-10 16:34:50 +02:00
8d236df375 new ZOHO Invoice export with one invoice position only! 2025-06-10 15:45:52 +02:00
f294d64e8c fix op_liste Zahlungseingang - Anzeige Währungen 2025-06-10 14:39:00 +02:00
ea5a43e259 doc 2025-06-10 14:07:10 +02:00
87cd3204c2 mail plugin 2025-06-08 11:15:28 +02:00
93c902ab4a update mail plugin 2025-06-08 11:11:48 +02:00
f695bc63a3 Merge branch 'office-alexander-logistics-1.3.3-mail' 2025-06-07 10:39:11 +02:00
9556c419ca update 2025-06-07 10:31:50 +02:00
830394c7a3 Neue Mail Funktion (sende option) 2025-06-07 10:13:20 +02:00
001787e018 bug fix 2025-05-27 17:24:43 +02:00
5c7cdde0fe model fixes 2025-05-27 08:27:33 +02:00
981ccfc41b update 2025-05-22 16:11:01 +02:00
73731c89ea export zoho vendor credit 2025-05-19 18:57:22 +02:00
1a82da08d5 neuer Workflow Bill 2025-05-19 15:28:25 +02:00
d4d57797a3 Kursberechnung AED Zoho Export und neue Modelle für DWC 2025-05-15 22:33:39 +02:00
5c7f7746d6 kein manual foreign payment mehr! 2025-05-14 10:27:02 +02:00
7535fa975e update 2025-05-13 17:07:17 +02:00
b8879fc300 DWC Workflows - renaming payment 2025-05-12 23:31:32 +02:00
e987a30053 update data views 2025-05-12 18:34:58 +02:00
65a1d4f2b7 dataview integration 2025-05-12 17:23:42 +02:00
584d59cfbe dataview 2025-05-12 16:16:11 +02:00
6cfea74397 dataview - excel export 2025-05-12 14:24:13 +02:00
303448d766 dataview view impl 2025-05-11 21:43:27 +02:00
d948742963 dataViews first working draft! 2025-05-11 15:47:01 +02:00
174b230509 dataview improvments 2025-05-11 13:56:20 +02:00
372c7887fb dataview draft 2025-05-11 10:32:38 +02:00
db478a5b4e new dataview draft 2025-05-11 09:02:50 +02:00
c2e4df0379 new DataView feature 2025-05-09 17:56:46 +02:00
6cd3d5d258 zoho currency lookup 2025-05-09 12:24:15 +02:00
919ad796de zoho integration 2025-05-09 10:52:28 +02:00
c1f123215a reporting feature 2025-05-09 10:07:13 +02:00
d47518224f zoho expense export 2025-05-08 23:10:57 +02:00
4b9da4d98a update zoho interface 2025-05-07 13:12:45 +02:00
0f7627419a neue Code Formatierung 2025-05-07 11:37:31 +02:00
be064fb965 zoho attachments 2025-05-02 14:27:02 +02:00
f30cc8e8fe zoho invoice export 2025-04-30 11:25:08 +02:00
72a10ddcf5 fix 2025-04-28 19:20:35 +02:00
1ea9564e55 minor dunning layout fixes 2025-04-28 19:14:48 +02:00
9511d7fd95 minor fixes 2025-04-28 12:36:11 +02:00
3a103e9a1e update 2025-04-28 11:12:36 +02:00
112de7e8ad fix 2025-04-27 23:04:54 +02:00
81fb527029 optimierung Business Partnersuche 2025-04-27 23:01:37 +02:00
aa5f000715 refactoring business data - neue Logik 2025-04-27 16:27:51 +02:00
ac4127e353 anpassung invoice bp sync 2025-04-27 10:53:17 +02:00
5aa7113d7f fix 2025-04-26 22:01:19 +02:00
595e77fc63 viele verbesserungne 2025-04-26 17:40:07 +02:00
27698becf5 neuester schrei 2025-04-26 14:39:03 +02:00
7ba7967a92 neues BP interface 2025-04-26 13:28:35 +02:00
bdf3c8ba01 update business partner 2025-04-26 08:41:10 +02:00
d6ba785002 started 1.3.4 2025-04-25 20:09:20 +02:00
633363aa3c Finalized version 1.3.3 2025-04-25 20:05:46 +02:00
c1c1d8b520 update 2025-04-25 17:27:22 +02:00
cbe256a962 zoho api 2025-04-25 16:30:41 +02:00
27f7b2b4f6 zoho invoice export - draft 2025-04-25 13:59:24 +02:00
39099700fe zoho token management 2025-04-25 09:52:50 +02:00
c47a6ed4ac zoho interface 2025-04-24 17:13:19 +02:00
a756997247 zoho self client - new test code 2025-04-22 22:20:13 +02:00
628d10bae9 zoho oauth client impl 2025-04-21 22:36:30 +02:00
703995f959 zoho oauth grant service added 2025-04-21 22:13:38 +02:00
f623ea33ff excel export 2025-04-09 18:49:49 +02:00
2c6636bfbc Excel Export Funktion 2025-04-08 19:53:27 +02:00
d99aad1322 excel exportfunktion 2025-04-07 17:26:22 +02:00
3b7742ee07 Excel Export Ausgangsrechnungen 2025-04-07 11:26:00 +02:00
b9084965e0 sepa Neue Bank in Polen - bankmillennium 2025-04-05 15:21:05 +02:00
1db1cd756c added timeout in ki-analyse 2025-04-02 11:10:18 +02:00
84a2e87eb6 update 2025-03-31 20:44:00 +02:00
93263280dc update 2025-03-31 20:42:56 +02:00
02f24df8a3 Update Junit Test classes 2025-03-31 11:59:05 +02:00
042fd7bdcf journal 2025-03-27 20:58:16 +01:00
f52e76374e neues JournalAccounting 2025-03-26 11:20:43 +01:00
56a60a990d Cargosoft Invoice import - skip if billing Text == WÄHRUNG 2025-03-26 11:18:55 +01:00
0d5aa41e4d update Businesspartners 2025-03-25 11:33:45 +01:00
0b20c10c0a added a debug test for outlook mail, upgraded docker image 2025-03-16 18:15:12 +01:00
47d90c8655 model fix - old business rule syntax 2025-03-15 10:21:17 +01:00
5da7fc866f fixed docker version 2025-03-12 23:02:43 +01:00
216589537c finalize 1.3.2 2025-03-12 19:03:21 +01:00
2aa5501b03 oidc profile ergänzt 2025-03-10 17:44:31 +01:00
647f2e9af8 added lucene client 2025-03-06 19:13:22 +01:00
09572730e5 updaet posteingnag 2025-03-03 11:41:13 +01:00
f8df34586c Merge branch 'inmemory-metric' 2025-03-03 11:38:40 +01:00
bcbb60fc20 timeout 2025-03-03 11:20:48 +01:00
746 changed files with 496260 additions and 430244 deletions

2
.gitignore vendored
View file

@ -13,9 +13,11 @@ target/
.metadata/ .metadata/
.project .project
.classpath .classpath
.env
# ignore docker deployments # ignore docker deployments
docker/deployments/ docker/deployments/
docker/keys/imixs-llm.xml
# Sepa Report # Sepa Report
reports/sepa/result_sepa* reports/sepa/result_sepa*

View file

@ -8,8 +8,5 @@
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit" "source.organizeImports": "explicit"
}, },
"java.checkstyle.version": "8.44", "java.format.settings.url": "https://raw.githubusercontent.com/imixs/imixs-workflow/refs/heads/master/imixs-code-style.xml"
"java.checkstyle.autocheck": true,
"java.checkstyle.configuration": "https://raw.githubusercontent.com/imixs/imixs-workflow/master/imixs-checkstyle-8.44.xml",
"java.configuration.updateBuildConfiguration": "automatic"
} }

210
BPMN-KI-Test/prompt1.txt Normal file
View file

@ -0,0 +1,210 @@
Du bist Prozessberater und Spezialisiert auf die Analyse von BPMN Modellen.
Bitte beschreibe den im folgenden BPMN 2.0 Modell definierten Prozess und erstelle eine kurze Zusammenfassung:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bpmn2:definitions xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:open-bpmn="http://open-bpmn.org/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
exporter="org.openbpmn" exporterVersion="1.0.0" targetNamespace="http://open-bpmn.org"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL">
<bpmn2:collaboration id="collaboration_1" name="Default Collaboration">
<bpmn2:participant id="participant_TgW2JA" name="Default Process" processRef="process_1" />
<bpmn2:participant id="participant_tgRhJQ" name="Rechnungseingang" processRef="process_lYaFpg">
<bpmn2:documentation id="documentation_wSfXcQ"><![CDATA[Dieser Workflow dient dazu eingehende Rechnungen zu prüfen und zur Bezahlung weiterzuleiten. Es wird unterschieden von Sachrechnungen, die vom Sekretariat bearbeitet werden können und Cargo-Rechnungen die durch die Logistikabteilung anhand von Logistikaufträgen geprüft werden.
Nachdem die Rechnung bezahlt wurde wird der Vorgang archiviert. ]]></bpmn2:documentation>
</bpmn2:participant>
</bpmn2:collaboration>
<bpmn2:extensionElements>
<open-bpmn:auto-align>true</open-bpmn:auto-align>
</bpmn2:extensionElements>
<bpmn2:process definitionalCollaborationRef="collaboration_1" id="process_1"
name="Default Process" processType="Public">
<bpmn2:documentation id="documentation_wXazVg" />
</bpmn2:process>
<bpmn2:process definitionalCollaborationRef="collaboration_1" id="process_lYaFpg"
isExecutable="true" name="Rechnungseingang" processType="Private">
<bpmn2:laneSet id="laneset_fDygyw" name="Lane Set">
<bpmn2:lane id="lane_BgoDFg" name="Sekretariat">
<bpmn2:documentation id="documentation_hIztzA" />
<bpmn2:flowNodeRef>task_7Y3UUA</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_bH7Wag</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_oNXxgg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_GEqHhQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_VJXKGg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_SP75zg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_ASbu1A</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_Vyo0Zw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_xAzhzw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_YH3bnw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_1qR49w</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_fHgZBg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_YnFi7A</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="lane_eMP9Xw" name="Fachbereich">
<bpmn2:documentation id="documentation_6ihnmQ" />
<bpmn2:flowNodeRef>event_A1J0OA</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_5lS3mw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_Hn5ZhQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_dJ89xQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_30uUNA</bpmn2:flowNodeRef>
</bpmn2:lane>
</bpmn2:laneSet>
<bpmn2:startEvent id="event_bH7Wag" name="Start">
<bpmn2:documentation id="documentation_pguolw" />
<bpmn2:outgoing>sequenceFlow_8yitUQ</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:task id="task_7Y3UUA" name="Rechnungsprüfung">
<bpmn2:documentation id="documentation_oKsT5Q"><![CDATA[Inhaltliche Prüufng der Rechnung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_BGVbSA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_FyAf3g</bpmn2:outgoing>
<bpmn2:incoming>sequenceFlow_hvQWmg</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_j4GDgg</bpmn2:incoming>
</bpmn2:task>
<bpmn2:endEvent id="event_oNXxgg" name="Ende">
<bpmn2:documentation id="documentation_1heF3g" />
<bpmn2:incoming>sequenceFlow_iVpj0g</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:intermediateCatchEvent id="event_GEqHhQ" name="Import">
<bpmn2:documentation id="documentation_gR2xbw" />
<bpmn2:incoming>sequenceFlow_8yitUQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_BGVbSA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_8yitUQ" sourceRef="event_bH7Wag" targetRef="event_GEqHhQ">
<bpmn2:documentation id="documentation_2Zd0Aw" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_BGVbSA" sourceRef="event_GEqHhQ" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_6k088A" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_VJXKGg" name="Sachrechnung">
<bpmn2:documentation id="documentation_DaDN3w"><![CDATA[Weiterleiten zur Sachprüfung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_rZXh6g</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_sNlWkQ</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:task id="task_SP75zg" name="Budgetprüfung">
<bpmn2:documentation id="documentation_qP2Sew" />
<bpmn2:incoming>sequenceFlow_sNlWkQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_nxZ9bA</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:task id="task_5lS3mw" name="Prüfung Logistik Auftrag">
<bpmn2:documentation id="documentation_zweAkw"><![CDATA[Prüfung der Rechnung und Abgleich mit Logistikauftrag]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_DXGQrw</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_UebylQ</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:eventBasedGateway gatewayDirection="Diverging" id="gateway_ASbu1A" name="">
<bpmn2:documentation id="documentation_09gukg" />
<bpmn2:incoming>sequenceFlow_FyAf3g</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_rZXh6g</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_i7cH2A</bpmn2:outgoing>
</bpmn2:eventBasedGateway>
<bpmn2:sequenceFlow id="sequenceFlow_FyAf3g" sourceRef="task_7Y3UUA" targetRef="gateway_ASbu1A">
<bpmn2:documentation id="documentation_tv00MQ" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_rZXh6g" sourceRef="gateway_ASbu1A" targetRef="event_VJXKGg">
<bpmn2:documentation id="documentation_EPAmhQ" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_sNlWkQ" sourceRef="event_VJXKGg" targetRef="task_SP75zg">
<bpmn2:documentation id="documentation_iXrfpg" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_A1J0OA" name="Cargo Rechnung">
<bpmn2:documentation id="documentation_RWi6LA"><![CDATA[Weiterleitung zur Prüfung Logistikauftrag]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_i7cH2A</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_DXGQrw</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_i7cH2A" sourceRef="gateway_ASbu1A" targetRef="event_A1J0OA">
<bpmn2:documentation id="documentation_pz6J4g" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_DXGQrw" sourceRef="event_A1J0OA" targetRef="task_5lS3mw">
<bpmn2:documentation id="documentation_ngSLdQ" />
</bpmn2:sequenceFlow>
<bpmn2:exclusiveGateway gatewayDirection="Diverging" id="gateway_Vyo0Zw" name="">
<bpmn2:documentation id="documentation_Pm90XA" />
<bpmn2:incoming>sequenceFlow_nxZ9bA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_9tp42Q</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_h4SfiQ</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:intermediateCatchEvent id="event_dJ89xQ" name="Freigabe">
<bpmn2:documentation id="documentation_sB06Ag"><![CDATA[Rechnung in Ordnung und freigegeben zur Bezahlung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_PLk0RA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_A0FQoA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:exclusiveGateway gatewayDirection="Diverging" id="gateway_Hn5ZhQ" name="">
<bpmn2:documentation id="documentation_aLEQqQ" />
<bpmn2:incoming>sequenceFlow_UebylQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_PLk0RA</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_xVEjcA</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:sequenceFlow id="sequenceFlow_UebylQ" sourceRef="task_5lS3mw" targetRef="gateway_Hn5ZhQ">
<bpmn2:documentation id="documentation_MZdr7Q" />
</bpmn2:sequenceFlow>
<bpmn2:task id="task_xAzhzw" name="Bezahlung">
<bpmn2:documentation id="documentation_zO3SRw" />
<bpmn2:incoming>sequenceFlow_9OrwEg</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_A0FQoA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_OfKNWA</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:sequenceFlow id="sequenceFlow_nxZ9bA" sourceRef="task_SP75zg" targetRef="gateway_Vyo0Zw">
<bpmn2:documentation id="documentation_G4qmmA" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_PLk0RA" sourceRef="gateway_Hn5ZhQ" targetRef="event_dJ89xQ">
<bpmn2:documentation id="documentation_Y5qwSA" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_YH3bnw" name="Freigeben">
<bpmn2:documentation id="documentation_C05Bhw"><![CDATA[Rechnung in Ordnung und freigegeben zur Bezahlung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_9tp42Q</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_9OrwEg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_9tp42Q" sourceRef="gateway_Vyo0Zw" targetRef="event_YH3bnw">
<bpmn2:documentation id="documentation_PIQaSg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_9OrwEg" sourceRef="event_YH3bnw" targetRef="task_xAzhzw">
<bpmn2:documentation id="documentation_0eagTw" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_1qR49w" name="Ablehnen">
<bpmn2:documentation id="documentation_cdpcXA" />
<bpmn2:incoming>sequenceFlow_h4SfiQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_hvQWmg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:intermediateCatchEvent id="event_30uUNA" name="Ablehnen">
<bpmn2:documentation id="documentation_VazNUA" />
<bpmn2:incoming>sequenceFlow_xVEjcA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_j4GDgg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_h4SfiQ" sourceRef="gateway_Vyo0Zw" targetRef="event_1qR49w">
<bpmn2:documentation id="documentation_Q2yPDw" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_hvQWmg" sourceRef="event_1qR49w" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_qkneSw" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_xVEjcA" sourceRef="gateway_Hn5ZhQ" targetRef="event_30uUNA">
<bpmn2:documentation id="documentation_l9waIg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_j4GDgg" sourceRef="event_30uUNA" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_4vaLww" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_A0FQoA" sourceRef="event_dJ89xQ" targetRef="task_xAzhzw">
<bpmn2:documentation id="documentation_fAB90Q" />
</bpmn2:sequenceFlow>
<bpmn2:task id="task_fHgZBg" name="Archiviert">
<bpmn2:documentation id="documentation_Idessw"><![CDATA[Rechnungsprüfung abgeschlossen und Rechnung archiveirt.]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_A0FQoA</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_sUEtcA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_iVpj0g</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:intermediateCatchEvent id="event_YnFi7A" name="Bezahlt">
<bpmn2:documentation id="documentation_Jz0LKg"><![CDATA[Rechnungsbetrag wurde überwiesen]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_OfKNWA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_sUEtcA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_OfKNWA" sourceRef="task_xAzhzw" targetRef="event_YnFi7A">
<bpmn2:documentation id="documentation_DdJpCg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_sUEtcA" sourceRef="event_YnFi7A" targetRef="task_fHgZBg">
<bpmn2:documentation id="documentation_uG0SGg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_iVpj0g" sourceRef="task_fHgZBg" targetRef="event_oNXxgg">
<bpmn2:documentation id="documentation_Is0LqQ" />
</bpmn2:sequenceFlow>
</bpmn2:process>
</bpmn2:definitions>

11
BPMN-KI-Test/prompt2.txt Normal file
View file

@ -0,0 +1,11 @@
Wir haben einen Geschäftsprozess für die Eingangsrechnungsprüfung in einem Unternehmen.
Rechnungen werden importiert und dann zur "Rechnungsprüfung" geleitet. Dieser Zusstand ist in einem BPMN 2.0 Diagram als Task Element abgebildet.
Der Mitarbeiter hat nun über die beiden Aktionen "Sachrechnung" und "Cargorechnung" die Möglichkeit die Rechnung zu klassifizieren. Diese beiden Aktionen sind in einem
BPMN 2.0 Diagram als Event Elemente dargestellt. Das Event 'Sachrechnung' führt zum Status (Task) "Budgetprüfung" (die vom Sekretariat durchgeführt wird)
und das Event 'Cargorechnung' führt zum Status 'Prüfung Logistikauftrag' (die vom Fachbereich durchgeführt werden kann). In beiden Zuständen kann nun der Mitarbeiter die Rechnung
über das Event "Freigeben" zur Bezahlung freigeben (Task) oder mit "Ablehnen" zurück an die initiale "Rechnungsprüfung" zurücksenden. Nach der Bezahlung kann der Mitarbeiter
die Rechnung über die Aktion (Event) "Bezahlt" in den finalen Status (Task) 'Archiviert' senden.
In einem BPMN Diagram sind diese Verzweigungen bei den Entscheidungen mit Gateways dargestellt.
Erstelle für diesen Prozessablauf eine sehr kompakte Darstellungsform, die für ein KI Prompt Template geeignet ist.

View file

@ -0,0 +1,389 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bpmn2:definitions xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:open-bpmn="http://open-bpmn.org/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exporter="org.openbpmn" exporterVersion="1.0.0" targetNamespace="http://open-bpmn.org" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL">
<bpmn2:collaboration id="collaboration_1" name="Default Collaboration">
<bpmn2:participant id="participant_TgW2JA" name="Default Process" processRef="process_1"/>
<bpmn2:participant id="participant_tgRhJQ" name="Rechnungseingang" processRef="process_lYaFpg">
<bpmn2:documentation id="documentation_wSfXcQ"><![CDATA[Dieser Workflow dient dazu eingehende Rechnungen zu prüfen und zur Bezahlung weiterzuleiten. Es wird unterschieden von Sachrechnungen, die vom Sekretariat bearbeitet werden können und Cargo-Rechnungen die durch die Logistikabteilung anhand von Logistikaufträgen geprüft werden.
Nachdem die Rechnung bezahlt wurde wird der Vorgang archiviert. ]]></bpmn2:documentation>
</bpmn2:participant>
</bpmn2:collaboration>
<bpmn2:extensionElements>
<open-bpmn:auto-align>true</open-bpmn:auto-align>
</bpmn2:extensionElements>
<bpmn2:process definitionalCollaborationRef="collaboration_1" id="process_1" name="Default Process" processType="Public">
<bpmn2:documentation id="documentation_wXazVg"/>
</bpmn2:process>
<bpmn2:process definitionalCollaborationRef="collaboration_1" id="process_lYaFpg" isExecutable="true" name="Rechnungseingang" processType="Private">
<bpmn2:laneSet id="laneset_fDygyw" name="Lane Set">
<bpmn2:lane id="lane_BgoDFg" name="Sekretariat">
<bpmn2:documentation id="documentation_hIztzA"/>
<bpmn2:flowNodeRef>task_7Y3UUA</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_bH7Wag</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_oNXxgg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_GEqHhQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_VJXKGg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_SP75zg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_ASbu1A</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_Vyo0Zw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_xAzhzw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_YH3bnw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_1qR49w</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_fHgZBg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_YnFi7A</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="lane_eMP9Xw" name="Fachbereich">
<bpmn2:documentation id="documentation_6ihnmQ"/>
<bpmn2:flowNodeRef>event_A1J0OA</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_5lS3mw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_Hn5ZhQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_dJ89xQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_30uUNA</bpmn2:flowNodeRef>
</bpmn2:lane>
</bpmn2:laneSet>
<bpmn2:startEvent id="event_bH7Wag" name="Start">
<bpmn2:documentation id="documentation_pguolw"/>
<bpmn2:outgoing>sequenceFlow_8yitUQ</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:task id="task_7Y3UUA" name="Rechnungsprüfung">
<bpmn2:documentation id="documentation_oKsT5Q"><![CDATA[Inhaltliche Prüufng der Rechnung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_BGVbSA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_FyAf3g</bpmn2:outgoing>
<bpmn2:incoming>sequenceFlow_hvQWmg</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_j4GDgg</bpmn2:incoming>
</bpmn2:task>
<bpmn2:endEvent id="event_oNXxgg" name="Ende">
<bpmn2:documentation id="documentation_1heF3g"/>
<bpmn2:incoming>sequenceFlow_iVpj0g</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:intermediateCatchEvent id="event_GEqHhQ" name="Import">
<bpmn2:documentation id="documentation_gR2xbw"/>
<bpmn2:incoming>sequenceFlow_8yitUQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_BGVbSA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_8yitUQ" sourceRef="event_bH7Wag" targetRef="event_GEqHhQ">
<bpmn2:documentation id="documentation_2Zd0Aw"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_BGVbSA" sourceRef="event_GEqHhQ" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_6k088A"/>
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_VJXKGg" name="Sachrechnung">
<bpmn2:documentation id="documentation_DaDN3w"><![CDATA[Weiterleiten zur Sachprüfung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_rZXh6g</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_sNlWkQ</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:task id="task_SP75zg" name="Budgetprüfung">
<bpmn2:documentation id="documentation_qP2Sew"/>
<bpmn2:incoming>sequenceFlow_sNlWkQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_nxZ9bA</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:task id="task_5lS3mw" name="Prüfung Logistik Auftrag">
<bpmn2:documentation id="documentation_zweAkw"><![CDATA[Prüfung der Rechnung und Abgleich mit Logistikauftrag]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_DXGQrw</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_UebylQ</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:eventBasedGateway gatewayDirection="Diverging" id="gateway_ASbu1A" name="">
<bpmn2:documentation id="documentation_09gukg"/>
<bpmn2:incoming>sequenceFlow_FyAf3g</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_rZXh6g</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_i7cH2A</bpmn2:outgoing>
</bpmn2:eventBasedGateway>
<bpmn2:sequenceFlow id="sequenceFlow_FyAf3g" sourceRef="task_7Y3UUA" targetRef="gateway_ASbu1A">
<bpmn2:documentation id="documentation_tv00MQ"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_rZXh6g" sourceRef="gateway_ASbu1A" targetRef="event_VJXKGg">
<bpmn2:documentation id="documentation_EPAmhQ"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_sNlWkQ" sourceRef="event_VJXKGg" targetRef="task_SP75zg">
<bpmn2:documentation id="documentation_iXrfpg"/>
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_A1J0OA" name="Cargo Rechnung">
<bpmn2:documentation id="documentation_RWi6LA"><![CDATA[Weiterleitung zur Prüfung Logistikauftrag]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_i7cH2A</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_DXGQrw</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_i7cH2A" sourceRef="gateway_ASbu1A" targetRef="event_A1J0OA">
<bpmn2:documentation id="documentation_pz6J4g"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_DXGQrw" sourceRef="event_A1J0OA" targetRef="task_5lS3mw">
<bpmn2:documentation id="documentation_ngSLdQ"/>
</bpmn2:sequenceFlow>
<bpmn2:exclusiveGateway gatewayDirection="Diverging" id="gateway_Vyo0Zw" name="">
<bpmn2:documentation id="documentation_Pm90XA"/>
<bpmn2:incoming>sequenceFlow_nxZ9bA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_9tp42Q</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_h4SfiQ</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:intermediateCatchEvent id="event_dJ89xQ" name="Freigabe">
<bpmn2:documentation id="documentation_sB06Ag"><![CDATA[Rechnung in Ordnung und freigegeben zur Bezahlung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_PLk0RA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_A0FQoA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:exclusiveGateway gatewayDirection="Diverging" id="gateway_Hn5ZhQ" name="">
<bpmn2:documentation id="documentation_aLEQqQ"/>
<bpmn2:incoming>sequenceFlow_UebylQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_PLk0RA</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_xVEjcA</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:sequenceFlow id="sequenceFlow_UebylQ" sourceRef="task_5lS3mw" targetRef="gateway_Hn5ZhQ">
<bpmn2:documentation id="documentation_MZdr7Q"/>
</bpmn2:sequenceFlow>
<bpmn2:task id="task_xAzhzw" name="Bezahlung">
<bpmn2:documentation id="documentation_zO3SRw"/>
<bpmn2:incoming>sequenceFlow_9OrwEg</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_A0FQoA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_OfKNWA</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:sequenceFlow id="sequenceFlow_nxZ9bA" sourceRef="task_SP75zg" targetRef="gateway_Vyo0Zw">
<bpmn2:documentation id="documentation_G4qmmA"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_PLk0RA" sourceRef="gateway_Hn5ZhQ" targetRef="event_dJ89xQ">
<bpmn2:documentation id="documentation_Y5qwSA"/>
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_YH3bnw" name="Freigeben">
<bpmn2:documentation id="documentation_C05Bhw"><![CDATA[Rechnung in Ordnung und freigegeben zur Bezahlung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_9tp42Q</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_9OrwEg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_9tp42Q" sourceRef="gateway_Vyo0Zw" targetRef="event_YH3bnw">
<bpmn2:documentation id="documentation_PIQaSg"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_9OrwEg" sourceRef="event_YH3bnw" targetRef="task_xAzhzw">
<bpmn2:documentation id="documentation_0eagTw"/>
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_1qR49w" name="Ablehnen">
<bpmn2:documentation id="documentation_cdpcXA"/>
<bpmn2:incoming>sequenceFlow_h4SfiQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_hvQWmg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:intermediateCatchEvent id="event_30uUNA" name="Ablehnen">
<bpmn2:documentation id="documentation_VazNUA"/>
<bpmn2:incoming>sequenceFlow_xVEjcA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_j4GDgg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_h4SfiQ" sourceRef="gateway_Vyo0Zw" targetRef="event_1qR49w">
<bpmn2:documentation id="documentation_Q2yPDw"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_hvQWmg" sourceRef="event_1qR49w" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_qkneSw"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_xVEjcA" sourceRef="gateway_Hn5ZhQ" targetRef="event_30uUNA">
<bpmn2:documentation id="documentation_l9waIg"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_j4GDgg" sourceRef="event_30uUNA" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_4vaLww"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_A0FQoA" sourceRef="event_dJ89xQ" targetRef="task_xAzhzw">
<bpmn2:documentation id="documentation_fAB90Q"/>
</bpmn2:sequenceFlow>
<bpmn2:task id="task_fHgZBg" name="Archiviert">
<bpmn2:documentation id="documentation_Idessw"><![CDATA[Rechnungsprüfung abgeschlossen und Rechnung archiveirt.]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_A0FQoA</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_sUEtcA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_iVpj0g</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:intermediateCatchEvent id="event_YnFi7A" name="Bezahlt">
<bpmn2:documentation id="documentation_Jz0LKg"><![CDATA[Rechnungsbetrag wurde überwiesen]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_OfKNWA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_sUEtcA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_OfKNWA" sourceRef="task_xAzhzw" targetRef="event_YnFi7A">
<bpmn2:documentation id="documentation_DdJpCg"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_sUEtcA" sourceRef="event_YnFi7A" targetRef="task_fHgZBg">
<bpmn2:documentation id="documentation_uG0SGg"/>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_iVpj0g" sourceRef="task_fHgZBg" targetRef="event_oNXxgg">
<bpmn2:documentation id="documentation_Is0LqQ"/>
</bpmn2:sequenceFlow>
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1" name="OpenBPMN Diagram">
<bpmndi:BPMNPlane bpmnElement="collaboration_1" id="BPMNPlane_1">
<bpmndi:BPMNShape bpmnElement="event_bH7Wag" id="BPMNShape_uh055A">
<dc:Bounds height="36.0" width="36.0" x="307.0" y="-233.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_iQJHWQ">
<dc:Bounds height="20.0" width="100.0" x="275.0" y="-194.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_oNXxgg" id="BPMNShape_UInW7g">
<dc:Bounds height="36.0" width="36.0" x="1777.0" y="-233.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_34qp2g">
<dc:Bounds height="20.0" width="100.0" x="1745.0" y="-194.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="task_7Y3UUA" id="BPMNShape_6O8H3A">
<dc:Bounds height="50.0" width="110.0" x="520.0" y="-240.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="participant_tgRhJQ" id="BPMNShape_nrps0Q">
<dc:Bounds height="630.0" width="1650.0" x="230.0" y="-370.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="lane_BgoDFg" id="BPMNShape_Lane_D1gWUg">
<dc:Bounds height="258.0" width="1620.0" x="260.0" y="-370.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="lane_eMP9Xw" id="BPMNShape_Lane_j8rKkg">
<dc:Bounds height="372.0" width="1620.0" x="260.0" y="-112.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_GEqHhQ" id="BPMNShape_NYeOlw">
<dc:Bounds height="36.0" width="36.0" x="397.0" y="-233.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_u0gAdw">
<dc:Bounds height="20.0" width="100.0" x="365.0" y="-194.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_8yitUQ" id="BPMNEdge_SKFqeQ" sourceElement="BPMNShape_uh055A" targetElement="BPMNShape_NYeOlw">
<di:waypoint x="343.0" y="-215.0"/>
<di:waypoint x="397.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_BGVbSA" id="BPMNEdge_qcdmuA" sourceElement="BPMNShape_NYeOlw" targetElement="BPMNShape_6O8H3A">
<di:waypoint x="433.0" y="-215.0"/>
<di:waypoint x="520.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_VJXKGg" id="BPMNShape_QCvdOw">
<dc:Bounds height="36.0" width="36.0" x="797.0" y="-233.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_6j9aVg">
<dc:Bounds height="20.0" width="100.0" x="765.0" y="-194.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="task_SP75zg" id="BPMNShape_dnAc8g">
<dc:Bounds height="50.0" width="110.0" x="930.0" y="-240.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="task_5lS3mw" id="BPMNShape_VFDbeg">
<dc:Bounds height="50.0" width="110.0" x="920.0" y="0.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="gateway_ASbu1A" id="BPMNShape_LIkiBA">
<dc:Bounds height="50.0" width="50.0" x="680.0" y="-240.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_uZQpOQ">
<dc:Bounds height="20.0" width="100.0" x="655.0" y="-187.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_FyAf3g" id="BPMNEdge_F0Y1Tw" sourceElement="BPMNShape_6O8H3A" targetElement="BPMNShape_LIkiBA">
<di:waypoint x="630.0" y="-215.0"/>
<di:waypoint x="680.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_rZXh6g" id="BPMNEdge_luL2IA" sourceElement="BPMNShape_LIkiBA" targetElement="BPMNShape_QCvdOw">
<di:waypoint x="730.0" y="-215.0"/>
<di:waypoint x="797.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_sNlWkQ" id="BPMNEdge_vB8usw" sourceElement="BPMNShape_QCvdOw" targetElement="BPMNShape_dnAc8g">
<di:waypoint x="833.0" y="-215.0"/>
<di:waypoint x="930.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_A1J0OA" id="BPMNShape_KJbgeQ">
<dc:Bounds height="36.0" width="36.0" x="787.0" y="7.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_Rmen0A">
<dc:Bounds height="20.0" width="100.0" x="755.0" y="46.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_i7cH2A" id="BPMNEdge_HBLd5A" sourceElement="BPMNShape_LIkiBA" targetElement="BPMNShape_KJbgeQ">
<di:waypoint x="703.0" y="-192.0"/>
<di:waypoint x="703.0" y="25.0"/>
<di:waypoint x="787.0" y="25.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_DXGQrw" id="BPMNEdge_s15wBA" sourceElement="BPMNShape_KJbgeQ" targetElement="BPMNShape_VFDbeg">
<di:waypoint x="823.0" y="25.0"/>
<di:waypoint x="920.0" y="25.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="gateway_Vyo0Zw" id="BPMNShape_QihA6g">
<dc:Bounds height="50.0" width="50.0" x="1090.0" y="-240.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_cyvcMA">
<dc:Bounds height="20.0" width="100.0" x="1065.0" y="-187.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_dJ89xQ" id="BPMNShape_4M1lNg">
<dc:Bounds height="36.0" width="36.0" x="1187.0" y="7.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_gdYGpg">
<dc:Bounds height="20.0" width="100.0" x="1155.0" y="46.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="gateway_Hn5ZhQ" id="BPMNShape_mr0ibw">
<dc:Bounds height="50.0" width="50.0" x="1080.0" y="0.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_5l4dRA">
<dc:Bounds height="20.0" width="100.0" x="1055.0" y="53.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_UebylQ" id="BPMNEdge_U0wIKg" sourceElement="BPMNShape_VFDbeg" targetElement="BPMNShape_mr0ibw">
<di:waypoint x="1030.0" y="25.0"/>
<di:waypoint x="1080.0" y="25.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="task_xAzhzw" id="BPMNShape_JrIJDQ">
<dc:Bounds height="50.0" width="110.0" x="1290.0" y="-240.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_nxZ9bA" id="BPMNEdge_KKXvFg" sourceElement="BPMNShape_dnAc8g" targetElement="BPMNShape_QihA6g">
<di:waypoint x="1040.0" y="-215.0"/>
<di:waypoint x="1090.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_PLk0RA" id="BPMNEdge_8UEsHA" sourceElement="BPMNShape_mr0ibw" targetElement="BPMNShape_4M1lNg">
<di:waypoint x="1130.0" y="25.0"/>
<di:waypoint x="1187.0" y="25.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_YH3bnw" id="BPMNShape_GUBmSg">
<dc:Bounds height="36.0" width="36.0" x="1197.0" y="-233.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_c48Mng">
<dc:Bounds height="20.0" width="100.0" x="1165.0" y="-194.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_9tp42Q" id="BPMNEdge_0AkLow" sourceElement="BPMNShape_QihA6g" targetElement="BPMNShape_GUBmSg">
<di:waypoint x="1140.0" y="-215.0"/>
<di:waypoint x="1197.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_9OrwEg" id="BPMNEdge_eqL00Q" sourceElement="BPMNShape_GUBmSg" targetElement="BPMNShape_JrIJDQ">
<di:waypoint x="1233.0" y="-215.0"/>
<di:waypoint x="1290.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="event_1qR49w" id="BPMNShape_rbG2Zg">
<dc:Bounds height="36.0" width="36.0" x="1097.0" y="-333.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_2qmYIA">
<dc:Bounds height="20.0" width="100.0" x="1065.0" y="-294.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_30uUNA" id="BPMNShape_xUycJQ">
<dc:Bounds height="36.0" width="36.0" x="1087.0" y="127.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_40xf3g">
<dc:Bounds height="20.0" width="100.0" x="1055.0" y="166.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_h4SfiQ" id="BPMNEdge_7m0QHg" sourceElement="BPMNShape_QihA6g" targetElement="BPMNShape_rbG2Zg">
<di:waypoint x="1115.0" y="-240.0"/>
<di:waypoint x="1115.0" y="-297.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_hvQWmg" id="BPMNEdge_xx0UyQ" sourceElement="BPMNShape_rbG2Zg" targetElement="BPMNShape_6O8H3A">
<di:waypoint x="1097.0" y="-315.0"/>
<di:waypoint x="575.0" y="-315.0"/>
<di:waypoint x="575.0" y="-240.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_xVEjcA" id="BPMNEdge_5276Pw" sourceElement="BPMNShape_mr0ibw" targetElement="BPMNShape_xUycJQ">
<di:waypoint x="1105.0" y="50.0"/>
<di:waypoint x="1105.0" y="127.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_j4GDgg" id="BPMNEdge_3xc00w" sourceElement="BPMNShape_xUycJQ" targetElement="BPMNShape_6O8H3A">
<di:waypoint x="1087.0" y="145.0"/>
<di:waypoint x="575.0" y="145.0"/>
<di:waypoint x="575.0" y="-190.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_A0FQoA" id="BPMNEdge_vgxzvQ" sourceElement="BPMNShape_4M1lNg" targetElement="BPMNShape_JrIJDQ">
<di:waypoint x="1223.0" y="25.0"/>
<di:waypoint x="1345.0" y="25.0"/>
<di:waypoint x="1345.0" y="-190.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="task_fHgZBg" id="BPMNShape_79up9g">
<dc:Bounds height="50.0" width="110.0" x="1600.0" y="-240.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_YnFi7A" id="BPMNShape_THdIqQ">
<dc:Bounds height="36.0" width="36.0" x="1457.0" y="-233.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_P4dNKg">
<dc:Bounds height="20.0" width="100.0" x="1425.0" y="-194.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_OfKNWA" id="BPMNEdge_p2wDpg" sourceElement="BPMNShape_JrIJDQ" targetElement="BPMNShape_THdIqQ">
<di:waypoint x="1400.0" y="-215.0"/>
<di:waypoint x="1457.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_sUEtcA" id="BPMNEdge_lOlEPw" sourceElement="BPMNShape_THdIqQ" targetElement="BPMNShape_79up9g">
<di:waypoint x="1493.0" y="-215.0"/>
<di:waypoint x="1600.0" y="-215.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_iVpj0g" id="BPMNEdge_XmQNXg" sourceElement="BPMNShape_79up9g" targetElement="BPMNShape_UInW7g">
<di:waypoint x="1710.0" y="-215.0"/>
<di:waypoint x="1777.0" y="-215.0"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>

View file

@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bpmn2:definitions xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:open-bpmn="http://open-bpmn.org/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
exporter="org.openbpmn" exporterVersion="1.0.0" targetNamespace="http://open-bpmn.org"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL">
<bpmn2:collaboration id="collaboration_1" name="Default Collaboration">
<bpmn2:participant id="participant_TgW2JA" name="Default Process" processRef="process_1" />
<bpmn2:participant id="participant_tgRhJQ" name="Rechnungseingang" processRef="process_lYaFpg">
<bpmn2:documentation id="documentation_wSfXcQ"><![CDATA[Dieser Workflow dient dazu eingehende Rechnungen zu prüfen und zur Bezahlung weiterzuleiten. Es wird unterschieden von Sachrechnungen, die vom Sekretariat bearbeitet werden können und Cargo-Rechnungen die durch die Logistikabteilung anhand von Logistikaufträgen geprüft werden.
Nachdem die Rechnung bezahlt wurde wird der Vorgang archiviert. ]]></bpmn2:documentation>
</bpmn2:participant>
</bpmn2:collaboration>
<bpmn2:extensionElements>
<open-bpmn:auto-align>true</open-bpmn:auto-align>
</bpmn2:extensionElements>
<bpmn2:process definitionalCollaborationRef="collaboration_1" id="process_1"
name="Default Process" processType="Public">
<bpmn2:documentation id="documentation_wXazVg" />
</bpmn2:process>
<bpmn2:process definitionalCollaborationRef="collaboration_1" id="process_lYaFpg"
isExecutable="true" name="Rechnungseingang" processType="Private">
<bpmn2:laneSet id="laneset_fDygyw" name="Lane Set">
<bpmn2:lane id="lane_BgoDFg" name="Sekretariat">
<bpmn2:documentation id="documentation_hIztzA" />
<bpmn2:flowNodeRef>task_7Y3UUA</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_bH7Wag</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_oNXxgg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_GEqHhQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_VJXKGg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_SP75zg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_ASbu1A</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_Vyo0Zw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_xAzhzw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_YH3bnw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_1qR49w</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_fHgZBg</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_YnFi7A</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="lane_eMP9Xw" name="Fachbereich">
<bpmn2:documentation id="documentation_6ihnmQ" />
<bpmn2:flowNodeRef>event_A1J0OA</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>task_5lS3mw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>gateway_Hn5ZhQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_dJ89xQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_30uUNA</bpmn2:flowNodeRef>
</bpmn2:lane>
</bpmn2:laneSet>
<bpmn2:startEvent id="event_bH7Wag" name="Start">
<bpmn2:documentation id="documentation_pguolw" />
<bpmn2:outgoing>sequenceFlow_8yitUQ</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:task id="task_7Y3UUA" name="Rechnungsprüfung">
<bpmn2:documentation id="documentation_oKsT5Q"><![CDATA[Inhaltliche Prüufng der Rechnung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_BGVbSA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_FyAf3g</bpmn2:outgoing>
<bpmn2:incoming>sequenceFlow_hvQWmg</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_j4GDgg</bpmn2:incoming>
</bpmn2:task>
<bpmn2:endEvent id="event_oNXxgg" name="Ende">
<bpmn2:documentation id="documentation_1heF3g" />
<bpmn2:incoming>sequenceFlow_iVpj0g</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:intermediateCatchEvent id="event_GEqHhQ" name="Import">
<bpmn2:documentation id="documentation_gR2xbw" />
<bpmn2:incoming>sequenceFlow_8yitUQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_BGVbSA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_8yitUQ" sourceRef="event_bH7Wag" targetRef="event_GEqHhQ">
<bpmn2:documentation id="documentation_2Zd0Aw" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_BGVbSA" sourceRef="event_GEqHhQ" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_6k088A" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_VJXKGg" name="Sachrechnung">
<bpmn2:documentation id="documentation_DaDN3w"><![CDATA[Weiterleiten zur Sachprüfung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_rZXh6g</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_sNlWkQ</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:task id="task_SP75zg" name="Budgetprüfung">
<bpmn2:documentation id="documentation_qP2Sew" />
<bpmn2:incoming>sequenceFlow_sNlWkQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_nxZ9bA</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:task id="task_5lS3mw" name="Prüfung Logistik Auftrag">
<bpmn2:documentation id="documentation_zweAkw"><![CDATA[Prüfung der Rechnung und Abgleich mit Logistikauftrag]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_DXGQrw</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_UebylQ</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:eventBasedGateway gatewayDirection="Diverging" id="gateway_ASbu1A" name="">
<bpmn2:documentation id="documentation_09gukg" />
<bpmn2:incoming>sequenceFlow_FyAf3g</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_rZXh6g</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_i7cH2A</bpmn2:outgoing>
</bpmn2:eventBasedGateway>
<bpmn2:sequenceFlow id="sequenceFlow_FyAf3g" sourceRef="task_7Y3UUA" targetRef="gateway_ASbu1A">
<bpmn2:documentation id="documentation_tv00MQ" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_rZXh6g" sourceRef="gateway_ASbu1A" targetRef="event_VJXKGg">
<bpmn2:documentation id="documentation_EPAmhQ" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_sNlWkQ" sourceRef="event_VJXKGg" targetRef="task_SP75zg">
<bpmn2:documentation id="documentation_iXrfpg" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_A1J0OA" name="Cargo Rechnung">
<bpmn2:documentation id="documentation_RWi6LA"><![CDATA[Weiterleitung zur Prüfung Logistikauftrag]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_i7cH2A</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_DXGQrw</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_i7cH2A" sourceRef="gateway_ASbu1A" targetRef="event_A1J0OA">
<bpmn2:documentation id="documentation_pz6J4g" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_DXGQrw" sourceRef="event_A1J0OA" targetRef="task_5lS3mw">
<bpmn2:documentation id="documentation_ngSLdQ" />
</bpmn2:sequenceFlow>
<bpmn2:exclusiveGateway gatewayDirection="Diverging" id="gateway_Vyo0Zw" name="">
<bpmn2:documentation id="documentation_Pm90XA" />
<bpmn2:incoming>sequenceFlow_nxZ9bA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_9tp42Q</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_h4SfiQ</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:intermediateCatchEvent id="event_dJ89xQ" name="Freigabe">
<bpmn2:documentation id="documentation_sB06Ag"><![CDATA[Rechnung in Ordnung und freigegeben zur Bezahlung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_PLk0RA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_A0FQoA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:exclusiveGateway gatewayDirection="Diverging" id="gateway_Hn5ZhQ" name="">
<bpmn2:documentation id="documentation_aLEQqQ" />
<bpmn2:incoming>sequenceFlow_UebylQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_PLk0RA</bpmn2:outgoing>
<bpmn2:outgoing>sequenceFlow_xVEjcA</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
<bpmn2:sequenceFlow id="sequenceFlow_UebylQ" sourceRef="task_5lS3mw" targetRef="gateway_Hn5ZhQ">
<bpmn2:documentation id="documentation_MZdr7Q" />
</bpmn2:sequenceFlow>
<bpmn2:task id="task_xAzhzw" name="Bezahlung">
<bpmn2:documentation id="documentation_zO3SRw" />
<bpmn2:incoming>sequenceFlow_9OrwEg</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_A0FQoA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_OfKNWA</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:sequenceFlow id="sequenceFlow_nxZ9bA" sourceRef="task_SP75zg" targetRef="gateway_Vyo0Zw">
<bpmn2:documentation id="documentation_G4qmmA" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_PLk0RA" sourceRef="gateway_Hn5ZhQ" targetRef="event_dJ89xQ">
<bpmn2:documentation id="documentation_Y5qwSA" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_YH3bnw" name="Freigeben">
<bpmn2:documentation id="documentation_C05Bhw"><![CDATA[Rechnung in Ordnung und freigegeben zur Bezahlung]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_9tp42Q</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_9OrwEg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_9tp42Q" sourceRef="gateway_Vyo0Zw" targetRef="event_YH3bnw">
<bpmn2:documentation id="documentation_PIQaSg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_9OrwEg" sourceRef="event_YH3bnw" targetRef="task_xAzhzw">
<bpmn2:documentation id="documentation_0eagTw" />
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="event_1qR49w" name="Ablehnen">
<bpmn2:documentation id="documentation_cdpcXA" />
<bpmn2:incoming>sequenceFlow_h4SfiQ</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_hvQWmg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:intermediateCatchEvent id="event_30uUNA" name="Ablehnen">
<bpmn2:documentation id="documentation_VazNUA" />
<bpmn2:incoming>sequenceFlow_xVEjcA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_j4GDgg</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_h4SfiQ" sourceRef="gateway_Vyo0Zw" targetRef="event_1qR49w">
<bpmn2:documentation id="documentation_Q2yPDw" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_hvQWmg" sourceRef="event_1qR49w" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_qkneSw" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_xVEjcA" sourceRef="gateway_Hn5ZhQ" targetRef="event_30uUNA">
<bpmn2:documentation id="documentation_l9waIg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_j4GDgg" sourceRef="event_30uUNA" targetRef="task_7Y3UUA">
<bpmn2:documentation id="documentation_4vaLww" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_A0FQoA" sourceRef="event_dJ89xQ" targetRef="task_xAzhzw">
<bpmn2:documentation id="documentation_fAB90Q" />
</bpmn2:sequenceFlow>
<bpmn2:task id="task_fHgZBg" name="Archiviert">
<bpmn2:documentation id="documentation_Idessw"><![CDATA[Rechnungsprüfung abgeschlossen und Rechnung archiveirt.]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_A0FQoA</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_sUEtcA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_iVpj0g</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:intermediateCatchEvent id="event_YnFi7A" name="Bezahlt">
<bpmn2:documentation id="documentation_Jz0LKg"><![CDATA[Rechnungsbetrag wurde überwiesen]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_OfKNWA</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_sUEtcA</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_OfKNWA" sourceRef="task_xAzhzw" targetRef="event_YnFi7A">
<bpmn2:documentation id="documentation_DdJpCg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_sUEtcA" sourceRef="event_YnFi7A" targetRef="task_fHgZBg">
<bpmn2:documentation id="documentation_uG0SGg" />
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="sequenceFlow_iVpj0g" sourceRef="task_fHgZBg" targetRef="event_oNXxgg">
<bpmn2:documentation id="documentation_Is0LqQ" />
</bpmn2:sequenceFlow>
</bpmn2:process>
</bpmn2:definitions>

17
BPMN-KI-Test/schema-1.txt Normal file
View file

@ -0,0 +1,17 @@
Prozess: Eingangsrechnungsprüfung
START -> [Task] Rechnungsprüfung
|
|-- [Event] Sachrechnung --> [Task] Budgetprüfung (Sekretariat)
| |
| |-- [Event] Freigeben --> [Task] Bezahlung
| |-- [Event] Ablehnen --> [Task] Rechnungsprüfung
|
|-- [Event] Cargorechnung --> [Task] Prüfung Logistikauftrag (Fachbereich)
|
|-- [Event] Freigeben --> [Task] Bezahlung
|-- [Event] Ablehnen --> [Task] Rechnungsprüfung
[Task] Bezahlung
|
|-- [Event] Bezahlt --> [Task] Archiviert (ENDE)

46
BPMN-KI-Test/schema-2.txt Normal file
View file

@ -0,0 +1,46 @@
prozess: Eingangsrechnungsprüfung
start_event: Rechnung importiert
tasks:
- name: Rechnungsprüfung
type: user_task
gateway:
name: Klassifikation
type: exclusive
paths:
- event: Sachrechnung
next_task: Budgetprüfung
role: Sekretariat
- event: Cargorechnung
next_task: Prüfung Logistikauftrag
role: Fachbereich
- name: Budgetprüfung
type: user_task
gateway:
name: Entscheidung
type: exclusive
paths:
- event: Freigeben
next_task: Bezahlung
- event: Ablehnen
next_task: Rechnungsprüfung
- name: Prüfung Logistikauftrag
type: user_task
gateway:
name: Entscheidung
type: exclusive
paths:
- event: Freigeben
next_task: Bezahlung
- event: Ablehnen
next_task: Rechnungsprüfung
- name: Bezahlung
type: service_task
event:
name: Bezahlt
next_task: Archiviert
- name: Archiviert
type: end_event

View file

@ -1,10 +1,7 @@
FROM imixs/imixs-office-workflow:5.1.1-SNAPSHOT FROM imixs/imixs-office-workflow:5.1.5-wildfly-29.0.1.Final-jdk17
#FROM imixs/imixs-office-workflow:5.0.3-SNAPSHOT
# Setup debug configuration
# COPY ./docker/configuration/standalone-debug.xml /opt/jboss/wildfly/standalone/configuration/
# Deploy artefact # Deploy artefact
RUN rm -r /opt/jboss/wildfly/standalone/deployments/* RUN rm -r /opt/jboss/wildfly/standalone/deployments/*
COPY ./*-app/target/*.war /opt/jboss/wildfly/standalone/deployments/ # Deploy artefact
COPY ./target/*.war /opt/jboss/wildfly/standalone/deployments/

View file

@ -1,9 +1,8 @@
FROM imixs/imixs-office-workflow:5.0.3-SNAPSHOT FROM imixs/imixs-office-workflow:5.1.5-wildfly-29.0.1.Final-jdk17
# Deploy artefact # Deploy artefact
RUN rm -r /opt/jboss/wildfly/standalone/deployments/* RUN rm -r /opt/jboss/wildfly/standalone/deployments/*
COPY ./*-app/target/*.war /opt/jboss/wildfly/standalone/deployments/ COPY ./target/*.war /opt/jboss/wildfly/standalone/deployments/
# Run in Debug Mode # Run in Debug Mode
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "--debug", "*:8787"] CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0", "--debug", "*:8787"]

View file

@ -1,15 +1,112 @@
# Versionen # Versionen
### 1.3.1 (Development - Office-Workflow 5.0.4 ) ## 1.4.0 (Development)
- neuer AGLAIInvoiceAdapter
der Adapter `com.alexanderlogistics.AGLAIInvoiceAdapter` muss künftig in das Import Event der Rechnungseingangs Modelle. Dieser Adapter Findet den Space und den Mandanten.
Neue Modelle:
- Posteingang
- posteingang-de-3.0
- AMS
- rechnungseingang-ams-1.1.0.bpmn
## 1.3.6 (Development)
**KSeF Produktiname II.**
Neues ksef.xml als Template einspielen
Neue version deployen.
**KSeF Produktiname I.**
Wir bekommen von Majcie einen neuen Prod - Token für KSeF. Dieser muss in das Kubernetes Deployment file eintegragen werden. Auch der Enpunkt muss geändert werden!
- name: KSEF_API_NIP
value: "9552521552"
- name: KSEF_API_TOKEN
value: "2025??????????????????2|nip-9552521552|f?????????????????????????????????????????"
- name: KSEF_API_ENDPOINT
value: "https://api.ksef.mf.gov.pl/v2"
Im Worklfow Modell 'rechnungsausgang' muss das das Partner Mail im Schritt 4200.10 aktiviert werden.
jhendzel@alexander-logistics.com in CC
ralph.soika@imixs.com in BCC
Derzeit fehlen meistens die Mailadressen so dass vermutlich häufig keine Mails rausgehen.
Im Dokument Import 'CARGOSOFT_INVOCIE_XML' muss die Task ID von 5001 auf 4000 geändert werden!!
## 1.3.5
- Verbesserter Cargosoft Export (Eingangsrechnungen)
- Polen KSeF Schnittstelle
- E-Rechnungs Adapter
## 1.3.4
- Finalisierung Business Partner Interface
|- Neue Plugin Logik (Aktualisierung der BP Nummer und Aktivierung von BP Objekten falls diese archiviert waren)
- Zoho Schnittstelle
- Neues DataView und DataGroups Konzept implementiert
### Migration
- Encoding für CSV Import aus cargosoft muss auf `encoding=UTF-8` stehen!
- Neues Businesspartner BPMN Modell einspielen
- Lucene Index neu berechnene wegen 'partner.id'
#### Daten Synchronisation BUsiness Parnter
- Erstmal nach Dubletten suchen:
- https://alexander-logistics-xxx.office-workflow.de/api/cargosoft/remove-dubletten?maxcount=5000
ACHTUNG kann sehr lange laufen (1 Stunde)
- Jetzt die Daten syncen
https://alexander-logistics-xxx.office-workflow.de/api/cargosoft/bp-sync?maxcount=25000
ACHTUNG kann sehr sehr sehr!! lange laufen (3 Stunde)
kann aber auch dann mehrfach aufgerufen werden so dass sich das alles zum guten wendet
#### Modelle Anpassen
in verschiedenen müssen die alten form parts `alexander/cdtreingabe` und `alexander/dbtreingabe` mit dem neuen `alexander/businesspartner_search` ausgetauscht werden.
Der `BusinessPartnerController` bzw. das `InvoicePlugin` bzw. `InvoiceOutgoingPlugin` kümmert sich automatisch um die Migration
Betroffen sind:
- rechnungseingang-\*
- rechnugnseingang-sachrechnung\*
- rechnungsausgang-\*
- zahlungseingang-\*
- Analyse-debitor-\*
Mahnlauf
- dieser müsste so modelliert werden wie `rechnungsausgang-dwc-1.0.3` zu sehen ist!!!!!!
## 1.3.3
- Imixs-Archive 3.1.1. Compactor Service
Migration:
set ARCHIVE_SNAPSHOT_GRACE_PERIOD= 5
set ARCHIVE_SNAPSHOT_COMPACTOR= enabled
## 1.3.2
- Posteingang Worklfow - timeout logic
- added lucene client to docker image
- added optional oidc profile
## 1.3.1
- Imixs-Office-Workflow 5.0.4
- Mulit Currecy Feature für Ausgangsrechnungen - Mulit Currecy Feature für Ausgangsrechnungen
- Neue Analyse Boards - Neue Analyse Boards
- Neue SOA - Neue SOA
- Neues Mahnwesen - Neues Mahnwesen
## 1.3.0
### 1.3.0
- Migration auf Imixs-Office-Workflow 5.0.2 - Migration auf Imixs-Office-Workflow 5.0.2
- Upgrade Imixs-Workflow 6.7 - Upgrade Imixs-Workflow 6.7
@ -34,15 +131,11 @@
3. Alle Workflow Modelle erneuern 3. Alle Workflow Modelle erneuern
## 1.2.21 (Draft)
### 1.2.21 (Draft)
- Beim XML Invoice Import wird nun auch die Sprache für das Mahnwesen ermittelt (fehlte) - Beim XML Invoice Import wird nun auch die Sprache für das Mahnwesen ermittelt (fehlte)
- Währungsunabhängigkeit - Währungsunabhängigkeit
**Migration** **Migration**
1. Paramter Pflegen 1. Paramter Pflegen
@ -56,28 +149,27 @@
3. Alle Workflow Modelle erneuern 3. Alle Workflow Modelle erneuern
### 1.2.20 (Development) ## 1.2.20 (Development)
- Optimierung OP-Liste nach KW - Optimierung OP-Liste nach KW
- Fix Fälligkeit in maske - Fix Fälligkeit in maske
- Fix XML Schnittstelle Cargosoft Sammelgutschrift - Fix XML Schnittstelle Cargosoft Sammelgutschrift
### 1.2.19 ## 1.2.19
- Neue XML Invoice Schnittstelle - Neue XML Invoice Schnittstelle
- Mahnwesen englisch - Mahnwesen englisch
## 1.2.18
### 1.2.18
- Fix in Archiv Suche CustomSearchController.java - requestscoped - Fix in Archiv Suche CustomSearchController.java - requestscoped
### 1.2.17 ## 1.2.17
- neue Archive suche - neue Archive suche
- invoice.exchangerate Input ersetzt nun . durch , und locale='de' damit der Wert richtig gespeichert wird!! - invoice.exchangerate Input ersetzt nun . durch , und locale='de' damit der Wert richtig gespeichert wird!!
### 1.2.16 ## 1.2.16
- Upgrade Imixs-Archive auf 2.4.2 - verbesserter IMAP Import - Upgrade Imixs-Archive auf 2.4.2 - verbesserter IMAP Import
- Upgarde Imixs-Adapters 2.3.3-SNAPSHOT - Upgarde Imixs-Adapters 2.3.3-SNAPSHOT
@ -90,10 +182,10 @@
- sepa-export-manual-3.0.0 - sepa-export-manual-3.0.0
- sepa-export-manual-pl-3.0.1 - sepa-export-manual-pl-3.0.1
**Achtung**: Kubernetes Deploymets müssen angepasst werden (siehe AGL Polen) **Achtung**: Kubernetes Deploymets müssen angepasst werden (siehe AGL Polen)
### 1.2.15 ## 1.2.15
- kleinere Layout Anpassungen in den Formualren und input Feldern (Positionstabelle, Sachbearbeiter Auswahl...) - kleinere Layout Anpassungen in den Formualren und input Feldern (Positionstabelle, Sachbearbeiter Auswahl...)
- invoice.exchangerate Input ersetzt nun , durch . damit der Wert richtig gespeichert wird. - invoice.exchangerate Input ersetzt nun , durch . damit der Wert richtig gespeichert wird.
- Fix Cargosoft DATEV Import - Korektur des Rechnungsdatums / Jahr - Fix Cargosoft DATEV Import - Korektur des Rechnungsdatums / Jahr
@ -101,32 +193,28 @@
https://alexander-logistics.office-workflow.de/api/cargosoft/fix/100 https://alexander-logistics.office-workflow.de/api/cargosoft/fix/100
### 1.2.14 ## 1.2.14
- Internationalisierung - Internationalisierung
## 1.2.13
### 1.2.13
- Payment Statistik - Payment Statistik
- Neue Indexfelder 'invoice.date' 'payment.date' - Neue Indexfelder 'invoice.date' 'payment.date'
**WICHTIG:** Es muss nach dem Update einmal der Index neu berechnet werden. **WICHTIG:** Es muss nach dem Update einmal der Index neu berechnet werden.
### 1.2.12 ## 1.2.12
- Neue Debitoren/Kreditoren Verwaltung - Zusätzliche E-Mail - Neue Debitoren/Kreditoren Verwaltung - Zusätzliche E-Mail
Realisiert über neue Custom Feld 'textlist' Realisiert über neue Custom Feld 'textlist'
- validierung e-mail erfolgt über Adapter und Workflow Rule - validierung e-mail erfolgt über Adapter und Workflow Rule
## 1.2.10
### 1.2.10
Inkasso Workflow Inkasso Workflow
## 1.2.8
### 1.2.8
Neue KI Version Neue KI Version
@ -134,19 +222,18 @@
Zalungsavis für SEPA Rechnungen freigeschaltet Zalungsavis für SEPA Rechnungen freigeschaltet
## 1.2.7
### 1.2.7
Erweiterte Kreditoren Verwaltung. Es können bis zu 4 IBAN/BIC Kombinationen pro Kreditor erfasst werden. Erweiterte Kreditoren Verwaltung. Es können bis zu 4 IBAN/BIC Kombinationen pro Kreditor erfasst werden.
Wenn vom Benutezr bei der Rechnungserfassugn eine Kombination eingegeben wird die noch nicht gespeichert war, Wenn vom Benutezr bei der Rechnungserfassugn eine Kombination eingegeben wird die noch nicht gespeichert war,
wird diese aufgenomen und die anderen rutschen nach unten. wird diese aufgenomen und die anderen rutschen nach unten.
### 1.2.6 ## 1.2.6
Übernahme von IBAN BIC aus kreditoren verwaltung Übernahme von IBAN BIC aus kreditoren verwaltung
### 1.1.1 ## 1.1.1
- Cargosoft Splitbuchungen - Es können zu einer Rechnung mehrere Cargosoft Exporte erzeugt werden. Die Sub Rechnungsnummern stehen im Feld numsequencenumber_sub - Cargosoft Splitbuchungen - Es können zu einer Rechnung mehrere Cargosoft Exporte erzeugt werden. Die Sub Rechnungsnummern stehen im Feld numsequencenumber_sub
- Neue Modellversion rechnungseingnag-de-1.2.0 und posteingang-de-1.0.4 - Neue Modellversion rechnungseingnag-de-1.2.0 und posteingang-de-1.0.4

204
backup/README.md Normal file
View file

@ -0,0 +1,204 @@
# Eigenes Backup-System (Backup-Mirror)
## Architektur, Einrichtung und Disaster-Recovery-Konzept
---
## 1. Idee und Architektur
### 1.1 Ausgangslage
Imixs-Office-Workflow wird von uns als eine transaktionale, hochverfügbare
Geschäftsprozessmanagement-Suite betrieben. Die Basis ist ein Open Source Kernel,
der frei zugänglich ist ([https://github.com/imixs/](https://github.com/imixs/)).
Unabhängig vom gewählten Betriebsmodell (SaaS, Public Cloud, Private Cloud, On
Premise) sind und bleiben Sie Eigentümer Ihrer Geschäftsdaten. Über den
Backup-Service haben Sie die Möglichkeit, jederzeit eigenständig auf eine
vollständige Kopie Ihrer Daten zuzugreifen unabhängig davon, wie und wo Ihre
Instanz aktuell betrieben wird.
### 1.2 Architektur Own your Data
Auch wenn wir den Betrieb Ihrer Instanz übernehmen, bedeutet das nicht, dass Sie
von uns abhängig sind. Über den Backup-Mirror betreiben Sie bei sich einen eigenen,
unabhängigen Backup-Dienst. Dieser Dienst wird von Ihnen selbst eingerichtet,
verwaltet und überwacht und läuft vollständig autark wir müssen ihn technisch
weder kennen noch verwalten. Dadurch gilt:
> **Sie verfügen über eine eigenständige, vollständige Kopie Ihrer
> Geschäftsdaten unabhängig von unserer Infrastruktur. Mit dieser Kopie kann
> Ihr System bei Bedarf komplett neu aufgebaut werden.**
Das ist ein bewusst einfaches und robustes Prinzip: Es kommt nicht darauf an, *wo*
Ihre Daten zusätzlich liegen, sondern *wer* die Kontrolle über diesen zusätzlichen
Sicherungsort hat. Nur wenn diese Kontrolle bei Ihnen liegt, sind Sie wirklich
unabhängig.
### 1.3 Wie es funktioniert
Technisch basiert das Konzept auf dem Open-Source-Projekt
[Imixs-Archive](https://github.com/imixs/imixs-archive), konkret auf dem Baustein
*Imixs-Archive-Backup*. Der Ablauf im Überblick:
1. Bei jeder Änderung an einem Geschäftsvorgang erzeugt Ihre Workflow-Instanz
automatisch einen unveränderlichen Snapshot (eine vollständige Kopie des
Vorgangs inkl. aller angehängten Dokumente).
2. Diese Snapshots werden über die REST-Schnittstelle Ihrer Workflow-Instanz
bereitgestellt.
3. Ein bei Ihnen installierter Backup-Dienst (siehe Abschnitt 2) ruft diese
Snapshots eigenständig ab und speichert sie auf einem Speicherort Ihrer Wahl
(z. B. eigener FTP-/Storage-Server).
Wichtig: Die Verbindung erfolgt **von Ihrem System zu unserer Workflow-Instanz**
(„Pull-Prinzip"). Sie benötigen dafür lediglich einen Netzwerkzugriff auf die
REST-Schnittstelle Ihrer Instanz wir müssen keinen Zugriff auf Ihre Infrastruktur
haben und erhalten auch keinen.
---
## 2. Technische Einrichtung
Der Backup-Dienst kann als Docker-Container in unterschiedlichen Umgebungen betrieben werden:
- **Local**: lokal über Docker oder Docker Compose,
- **Private Cloud**: in einer Private Cloud (z.b. Kubernetes, OpenShift)
- **Public Cloud**: in einer Public Cloud Umgebung (z.b. AWS, Microsoft Azure)
### 2.1 Voraussetzungen
- Eine eigene Server- bzw. Container-Umgebung (Docker) auf Ihrer Seite
- Ein eigener Speicherort für die Backup-Daten (z. B. FTP-Storage, NAS mit
FTP-Anbindung)
- Eine sogenannte **Mirror-ID**, die wir Ihnen bereitstellen
### 2.2 Mirror-ID anfragen
Die Mirror-ID ist eine organisatorische Kennung, mit der wir Ihre eigene
Backup-Verbindung für Ihre Instanz freischalten. Sie ist kein Sicherheitsmerkmal im
engeren Sinn, sondern eine Vereinbarung zwischen uns: *„Kunde X betreibt ein eigenes
Backup."* Bitte fordern Sie diese ID formlos bei uns an.
### 2.3 Backup-Nutzer in Ihrer eigenen Instanz anlegen
Ein zentraler Punkt für die Autarkie des Systems: **Sie legen den technischen
Benutzer für den Backup-Zugriff selbst in Ihrer Imixs-Instanz an.** Dieser Nutzer
gehört ausschließlich Ihnen wir kennen weder das Passwort noch verwalten wir
dieses Konto. Vergeben Sie dem Nutzer ausreichende Leserechte, damit er alle
relevanten Vorgänge und Dokumente sichern kann.
### 2.4 Docker-Compose Beispielkonfiguration
Das folgende Beispiel zeigt eine Docker Compose Konfiguraiton für den Betrieb des Backup-Dienstes:
```yaml
version: "3.6"
services:
backup:
image: imixs/imixs-archive-backup:latest
environment:
TZ: "Europe/Berlin"
WORKFLOW_SERVICE_ENDPOINT: "https://<ihre-instanz>.office-workflow.de/api/"
WORKFLOW_SERVICE_USER: "<ihr-backup-nutzer>"
WORKFLOW_SERVICE_PASSWORD: "<ihr-passwort>"
WORKFLOW_SERVICE_AUTHMETHOD: "form"
BACKUP_FTP_HOST: "<ihr-storage-host>"
BACKUP_FTP_PATH: "<ihr-zielverzeichnis>"
BACKUP_FTP_PORT: "21"
BACKUP_FTP_USER: "<ihr-ftp-nutzer>"
BACKUP_FTP_PASSWORD: "<ihr-ftp-passwort>"
BACKUP_MIRROR_ID: "<ihre-mirror-id>"
ports:
- "8084:8080"
- "9990:9990"
```
**Erläuterung der wichtigsten Parameter:**
| Parameter | Bedeutung |
|---|---|
| `WORKFLOW_SERVICE_ENDPOINT` | Die REST-API-Adresse Ihrer bei uns gehosteten Workflow-Instanz |
| `WORKFLOW_SERVICE_USER/PASSWORD` | Der von Ihnen selbst angelegte Backup-Nutzer |
| `BACKUP_FTP_*` | Ihr eigener Speicherort für die Backup-Daten |
| `BACKUP_MIRROR_ID` | Die von uns bereitgestellte Freischalt-ID |
Nach dem Start prüft der Dienst regelmäßig auf neue zu sichernde Vorgänge und
überträgt diese automatisch auf Ihren Speicherort.
### 2.5 Monitoring des eigenen Backup-Dienstes
Da der Dienst vollständig in Ihrer Verantwortung läuft, sollten Sie ihn aktiv
überwachen. Ein einfacher Ping-Check zeigt zwar, dass der Container erreichbar
ist sagt aber nichts darüber aus, ob der Dienst tatsächlich funktionsfähig ist
und Backups erfolgreich durchführt.
Der Imixs-Archive-Backup-Service stellt hierfür standardisierte **MicroProfile-Endpunkte** mit, die auf Port `9990`
bereitgestellt werden:
| Endpunkt | Beschreibung |
|---|---|
| `/health` | Liefert den Health-Status des Dienstes nach dem MicroProfile-Health-Standard inklusive Readiness (ist der Dienst betriebsbereit, z. B. Verbindung zur Workflow-API und zum FTP-Storage vorhanden?) und Liveness (läuft der Prozess korrekt?) |
| `/metrics` | Liefert Betriebskennzahlen im MicroProfile-Metrics-Format (Prometheus-kompatibel), z. B. Anzahl verarbeiteter Backups, Fehlerzähler, Laufzeiten |
Damit lässt sich der Dienst professionell überwachen:
- **Health-Checks** binden Sie direkt in gängige Monitoring-Systeme ein (z. B.
Kubernetes Liveness-/Readiness-Probes, Uptime-Kuma, Nagios, Icinga) und erkennen
so nicht nur einen abgestürzten Container, sondern auch einen Dienst, der zwar
läuft, aber z. B. keine Verbindung mehr zu Ihrer Workflow-Instanz oder zum
FTP-Ziel herstellen kann.
- **Metrics** lassen sich direkt von Prometheus abgegriffen und in Grafana
visualisiert werden so erkennen Sie auf einen Blick, ob regelmäßig Backups
durchgeführt werden, oder ob z. B. die Fehlerrate ansteigt.
**Voraussetzung:** Sie müssen Port `9990` in Ihrer Docker-Umgebung entsprechend
freigeben bzw. mappen, damit Ihr Monitoring-System auf die Endpunkte zugreifen kann
(siehe Port-Mapping im Beispiel aus Abschnitt 2.4).
Ein Backup, das unbemerkt seit Wochen nicht mehr funktioniert, bietet keinen Schutz.
Die Überwachung über Health- und Metrics-Endpunkte ist daher ein integraler
Bestandteil des Konzepts, nicht optional.
---
## 3. Notfall- und Wiederherstellungsfall (Disaster Recovery)
Im Falle eines Disaster-Recovery-Prozesses stellen Sie uns Ihr Backup zur Verfügung, damit Ihr System auf dessen Basis wiederhergestellt werden kann. Dieser Abschnitt beschreibt das Vorgehen nur in Stichpunkten.
Die vollständige technische Dokumentation der
Imixs-Workflow-Architektur ist Open Source und öffentlich einsehbar unter
[github.com/imixs](https://github.com/imixs).
**Grundprinzip der Wiederherstellung:**
- Ihre gesicherten Snapshot-Daten liegen vollständig und unverändert in Ihrem
eigenen Speicher (FTP/Storage) vor.
- Diese Daten liegen in einem offenen, plattformunabhängigen XML-Format vor und
sind nicht an unsere konkrete Infrastruktur gebunden.
- Auf Basis dieser Daten kann eine neue Imixs-Workflow-Instanz (bei Ihnen oder bei
einem anderen Dienstleister) aufgesetzt werden.
- Über die Restore-Funktion der Imixs-Archive-Komponenten werden die Snapshots in
die neue Instanz zurückgespielt jeder Geschäftsvorgang wird dabei inklusive
seiner Historie und aller Dokumente wiederhergestellt.
**Wichtige Stichpunkte für den Ernstfall:**
- Backup-Daten sind vollständig bei Ihnen vorhanden → keine Abhängigkeit von uns
- Wiederherstellung erfordert eine lauffähige Imixs-Workflow-Umgebung (Open Source,
frei verfügbar)
- Die technische Vorgehensweise zum Restore ist Teil der öffentlichen
Imixs-Archive-Dokumentation
- Wir unterstützen Sie im Ernstfall selbstverständlich gerne beim Wiederaufbau
diese Unterstützung ist jedoch **keine Voraussetzung**, da die Daten und das
Wiederherstellungsverfahren vollständig unabhängig von uns nutzbar sind
---
## 4. Zusammenfassung
Mit dem Backup-Mirror bleiben Sie jederzeit Eigentümer Ihrer Geschäftsdaten unabhängig
davon, wie und wo Ihre Instanz betrieben wird. Sie richten den Dienst selbst ein, verwalten
ihn eigenständig und behalten so die volle Kontrolle über Ihre zusätzliche Datenkopie. Genau
diese Unabhängigkeit ist es, die Ihnen im Bedarfsfall den vollständigen Wiederaufbau Ihres
Systems ermöglicht.
Bei Fragen zur Einrichtung oder zur Anforderung Ihrer Mirror-ID kontaktieren Sie uns
gerne.

View file

@ -0,0 +1,22 @@
version: "3.6"
services:
###############################################
# Backup Service
###############################################
backup:
image: imixs/imixs-archive-backup:latest
environment:
TZ: "Europe/Berlin"
WORKFLOW_SERVICE_ENDPOINT: "https://alexander-logistics-ams.office-workflow.de/api/"
WORKFLOW_SERVICE_USER: "kutzner-backup-service"
WORKFLOW_SERVICE_PASSWORD: "16e-7ede-4c1c-bdeb-e16ce"
WORKFLOW_SERVICE_AUTHMETHOD: "form"
BACKUP_FTP_HOST: "u248962.your-storagebox.de"
BACKUP_FTP_PATH: "/test/agl/ams-test"
BACKUP_FTP_PORT: "21"
BACKUP_FTP_USER: "u248962"
BACKUP_FTP_PASSWORD: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
BACKUP_MIRROR_ID: "backup-mirror-local"
WORKFLOW_REST_JPQL_DOUBLEDECODE_WORKAROUND: "true"
ports:
- "8084:8080"

9
devi
View file

@ -30,13 +30,13 @@ if [[ "$(strip_dash $1)" == "setup" ]]; then
echo " starting dev enrvionment..." echo " starting dev enrvionment..."
mvn clean install -Pdebug mvn clean install -Pdebug
cp ./*-app/target/*.war ./docker/deployments/ cp ./*-app/target/*.war ./docker/deployments/
docker-compose -f docker-compose.yml up docker compose -f docker-compose.yml up
fi fi
if [[ "$(strip_dash $1)" == "start" ]]; then if [[ "$(strip_dash $1)" == "start" ]]; then
echo " Start Dev Environment..." echo " Start Dev Environment..."
docker-compose -f docker-compose.yml up docker compose -f docker-compose.yml up
fi fi
if [[ "$(strip_dash $1)" == "build" ]]; then if [[ "$(strip_dash $1)" == "build" ]]; then
@ -53,18 +53,17 @@ fi
if [[ "$(strip_dash $1)" == "hot" ]]; then if [[ "$(strip_dash $1)" == "hot" ]]; then
echo "* Hotdeploy..." echo "* Hotdeploy..."
cd *-app
mvn manik-hotdeploy:hotdeploy mvn manik-hotdeploy:hotdeploy
cd ..
fi fi
if [[ "$(strip_dash $1)" == "deploy" ]]; then if [[ "$(strip_dash $1)" == "deploy" ]]; then
echo " Deploy to Imixs-Cloud..." echo " Deploy to Imixs-Cloud..."
mvn clean install -Pkubernetes -DskipTests mvn clean install -Pimixs-cloud -DskipTests
fi fi
# Überprüfen, ob keine Parameter übergeben wurden - standard build # Überprüfen, ob keine Parameter übergeben wurden - standard build
if [[ $# -eq 0 ]]; then if [[ $# -eq 0 ]]; then

View file

@ -9,12 +9,16 @@ In Imixs ist es dann aber möglich zusätzliche Attribute zu einem Businesspartn
- Bankverbindungen - Bankverbindungen
- Emailadressen für Mahnwesen - Emailadressen für Mahnwesen
Die Businessparnter werden zentral nur in dem Hauptsystem in Bremen importiert und verwaltet. Damit ein AGL System auf die BusinessPartner zugreifen kann wird eine Rest API Schnittstelle verwendet. Diese kann über Environmentvariablen aktiviert werden: Die Businessparnter werden für jedes System separat importiert und verwaltet.
# Rest Service BusinessPartner API Folgende zentrale Stati werden über das BusinessPartner Modell festgelegt:
WORKFLOW_SERVICE_ENDPOINT: "http://app:8080/api"
WORKFLOW_SERVICE_USER: "admin" - TASK_ACTIVE = 1100
WORKFLOW_SERVICE_PASSWORD: "xxxxxxxx" - TASK_VERIFICATION = 1300
- TASK_INACTIVE = 1700
- TASK_LOCKED = 1800
Die Invoice Plugins aktualisierne automatisch die BusinessPartner Attribute `partner.id` und `partner.name`. Zusätzlich unterbinden die Plugins eine Verarbeitung falls das Business Objekt im Satus LOCKED oder VERIFICATION ist!
## BusinessPartner Suche ## BusinessPartner Suche
@ -28,7 +32,18 @@ Z.b. kann das als Custom Part in eine Form eingebunden werden:
<item name="bpid" type="custom" path="alexander/businesspartner_search" required="true" label="Businesspartner:" /> <item name="bpid" type="custom" path="alexander/businesspartner_search" required="true" label="Businesspartner:" />
``` ```
Das widget legt dann automatisch die felder `bpid` und `bpidname` an. Der name ist heirbei irrelevant, da immer die Items `partner.id` und `partner.name` ausgefüllt werden.
Zusätzlich kann man mit den Options angeben ob die Maske komplett neu gerendert werden soll. Das ist z.b. bei dem Modell `analyse-debitor.bpmn` der Fall
```xml
<item name="dbtr.number" type="custom" path="alexander/businesspartner_search" required="true" label="Debtor:" options="rerender" />
```
Man kann auch noch über die options eine regular Expression mitgeben wodurch die Filterliste eingeschränkt werden kann:
```xml
<item name="dbtr.number" type="custom" path="alexander/businesspartner_search" required="true" label="Debtor:" options="rerender;regexPattern=(ABC)" />
```
Alternativ kann im Backend über die EJB BusinessPartnerService nach bpid gesucht werden: Alternativ kann im Backend über die EJB BusinessPartnerService nach bpid gesucht werden:
@ -38,12 +53,45 @@ Alternativ kann im Backend über die EJB BusinessPartnerService nach bpid gesuch
ItemCollection bp= businessPartnerService.getBusinessPartnerByID("BP0001"); ItemCollection bp= businessPartnerService.getBusinessPartnerByID("BP0001");
``` ```
## Invoice Plugins
Die Invoice Plugins aktualisieren automatisch partner.id und partner.name falls diese Items noch nicht exiistieren
# Daten Migration # Daten Migration
Der `BusinessPartnerImportService` hängt sich über ein CDI Observer Pattern an den standard CSVImport Service
der die Cargosoft Stammdaten aktualisiert. Der BusinessPartnerImportService
prüft ob der Workflow schon existiert oder ggf. aktualisiert werden muss.
Der Service migriert auch die alten zusätzlichen IBAN/BIC felder wenn der Business partner erstmals neu angelegt wird. Falls bei der ersten Migration erkannt wird, dass die IBAN Nummern nicht eindeutig sind wir der BusinessParter mit dem Event 300 angelegt.
-
\_vendor_zip_code \_vendor_zip_code
\_vendor_fax \_vendor_fax
(type:cargosoftkreditor) AND ($modified:[20010101 TO 20250215]) (type:cargosoftkreditor) AND ($modified:[20010101 TO 20250215])
Wir müssen gundsätzlich erstmal über all $nosnapshot = true eintragen! ## Anmerkungen zu seltsamen Daten
BP4641 existier jetzt 3 mal mit der Debitoren nummer D14641
Feldmühle
- D14169
K74169
K76233 HSH Papier GmbH & Co. KG
D16233 Manfred Ziegler Transport GmbH
Problemkind: https://alexander-logistics-dwc.office-workflow.de/pages/workitems/workitem.xhtml?id=9dd64b0a-cfe1-4174-aea4-0e8af45b823f
# Business Parter Serach Widget
wir müssten eigentlich nach Auswahl des Partner
execute="#{customFormComponents.clientId}" render="#{customFormComponents.clientId}"
machnen, aber das hat einen blöden effekt

View file

@ -1,83 +0,0 @@
# FTP Server
Wir stellen verschiedene FTP Laufwerke auf dem Hetzner bereit um Daten mit Cargosoft und anderen Partnern auszutauschen
# Cargosoft
## Cargosoft Schnittstelle (Bremen - Mandant 001)
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/cargosoft
Benutzername: u248962-sub2
Passwort: aXa61n9Un3jDNQlL
## Cargosoft Schnittstelle (Bremerhaven Mandant 005)
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/cargosoft-bhv
Benutzername: u248962-sub5
Passwort: 5hKKzv6TFCKRrAdR
## Cargosoft Schnittstelle (Polen Mandant 003)
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/cargosoft-pl
Benutzername: u248962-sub7
Passwort: PGPzzqmtZ8BSxkbs
## Cargosoft Schnittstelle (Dubai Mandant 006)
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/cargosoft-dwc
Benutzername: u248962-sub3
Passwort: enHjxs9h4nJ6EgsZ
## Cargosoft Schnittstelle (USA Mandant 004)
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/cargosoft-usa
Benutzername: u248962-sub9
Passwort: GMk7NgDBrmb2QqXg
## Cargosoft Schnittstelle (China Mandant 007)
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/cargosoft-chn
Benutzername: u248962-sub10
Passwort: yswBeN83jMqkMqJa
# Dubai
Wir stellen Herrn Hoelzl in Dubai ein eigenes FTP Laufwerk bereit, in das wir die Rechnungen per Imixs-Exporter verschieben.
Server: u248962.your-storagebox.de
Pfad: /office-alexander-logistics/filetransfer-dwc
Benutzername: u248962-sub11
Passwort: mH9mAS77QhuA5XJi
Herr Hoelzl überträgt dann die Daten in eine app von einer Steuerkanzlei.
Es wird dazu ein FTP Server bereitgestellt der von Herrn Hölzl und Frau Geisler lokal eingebunden werden kann.
Der aktuelle Workflow für Eingangs- und Ausgangsrechnungen wird dahingehend angepasst, dass die Belege automatisch nach folgenden Format exportiert werden:
```
├── invoice-out
│ ├── 2024
│ │ ├── 06
│ │ │ ├── 198_EX-DWC-2406-013.pdf
│ │ │ ├── 199_EX-DWC-2406-013.pdf
│ │ ├── 07
│ │ │ ├── 200_IM-DWC-2407-010.pdf
├── invoice-in
│ ├── 2024
│ │ ├── 06
│ │ │ ├── 700045_EX-DWC-2406-005.pdf
│ │ │ ├── 700045_59475.pdf
```
sequencenumer +
firmename + positionsnummer + rechnungsnummer +
Der Export erfolgt automatisch nach Empfang der Rechnung bzw. nach Prüfung der Rechnung (Review->Approved). Die Dateinamen werden vom System berechnet (siehe oben). Bei Sachrechnungen wird das Rechnungsdatum verwendet um die Buchungsperiode zu berechnen.

Binary file not shown.

314
doc/KSeF/README.md Normal file
View file

@ -0,0 +1,314 @@
# KSeF API Integration
Java integration for the Polish **Krajowy System e-Faktur (KSeF)** - the national e-invoicing system for Poland.
## Overview
This integration provides secure communication with the KSeF API to upload electronic invoices. It handles the complex multi-step authentication flow and encryption requirements mandated by the Polish tax authorities.
- [Environment Endpoints](https://github.com/CIRFMF/ksef-docs/blob/main/srodowiska.md)
- [KSeF Official Documentation](https://www.gov.pl/web/kas/ksef)
- [KSeF API Specification](https://api-test.ksef.mf.gov.pl/docs/v2/index.html)
- [Upload Invoice](https://api-test.ksef.mf.gov.pl/docs/v2/index.html#tag/Wysylka-interaktywna/paths/~1api~1v2~1sessions~1online~1%7BreferenceNumber%7D~1invoices/post)
- [Facture Details](https://github.com/CIRFMF/ksef-docs/blob/main/sesja-interaktywna.md#2-wys%C5%82anie-faktury)
- [XML Invoice Example](https://github.com/CIRFMF/ksef-docs/blob/main/faktury/weryfikacja-faktury.md)
- [QR Code](https://github.com/CIRFMF/ksef-docs/blob/main/kody-qr.md)
- [Github Discussions](https://github.com/CIRFMF/ksef-docs/issues/351#issuecomment-3538013805)
- [Github Discussions](https://github.com/CIRFMF/ksef-docs/issues/399)
Test environment endpoint:
```
https://api-test.ksef.mf.gov.pl/api/v2
```
Production endpoint:
```
https://api.ksef.mf.gov.pl/api/v2
```
## Components
### 1. KSeFAuthManager
Manages authentication and session lifecycle for the KSeF API.
**Key Responsibilities:**
- Multi-step authentication flow
- RSA certificate management
- Session key generation and encryption
- Access token lifecycle management
- Session reuse and validation
### 2. KSeFAPIService
Provides business-level methods for invoice operations.
**Key Responsibilities:**
- Invoice encryption (AES-256-CBC)
- Invoice upload to KSeF
- Hash calculation and validation
- Error handling and reporting
## Authentication Flow
The KSeF API requires a sophisticated multi-step authentication process:
```
1. Load Public Keys
└─> GET /security/public-key-certificates
2. Challenge Request
└─> POST /auth/challenge
└─> Returns: challenge + timestamp
3. Token Authentication
└─> POST /auth/ksef-token
└─> Encrypts: token|timestamp with RSA-OAEP SHA-256
└─> Returns: authToken + referenceNumber
4. Token Redemption
└─> POST /auth/token/redeem
└─> Returns: accessToken
5. Open Interactive Session
└─> POST /sessions/online
└─> Generates AES-256 key + IV
└─> Encrypts session key with RSA
└─> Returns: sessionRefNumber + validUntil
```
## Invoice Upload Flow
Once authenticated, invoices can be uploaded:
```
1. Reuse or Create Session
└─> Validates existing session or creates new one
2. Encrypt Invoice
└─> AES-256-CBC encryption using session key
3. Calculate Hashes
└─> SHA-256 of original XML
└─> SHA-256 of encrypted XML
4. Upload Invoice
└─> POST /sessions/online/{sessionRef}/invoices
└─> Returns: referenceNumber
```
## Security Features
### Multi-Layer Encryption
- **RSA-OAEP SHA-256**: Token encryption with timestamp binding
- **RSA-OAEP SHA-1**: Session key encryption
- **AES-256-CBC**: Invoice content encryption
### Security Mechanisms
- **Replay Attack Protection**: Timestamp-bound tokens
- **Session Management**: Automatic session reuse and validation
- **Certificate Validation**: Dynamic X.509 certificate loading
- **UTC Timezone Handling**: Prevents timezone-related vulnerabilities
## Usage Example
```java
// Initialize Auth Manager
KSeFAuthManager authManager = new KSeFAuthManager();
authManager.setKsefToken("your-ksef-token");
authManager.setKsefNip("1234567890");
authManager.setKsefEndpoint("https://ksef-test.mf.gov.pl/api/v2");
authManager.init();
// Initialize API Service
KSeFAPIService apiService = new KSeFAPIService();
apiService.kseFAuthManager = authManager;
// Upload Invoice
ItemCollection workitem = new ItemCollection();
FileData fileData = new FileData("invoice.xml", xmlBytes, null, null);
workitem.addFileData(fileData);
String referenceNumber = apiService.uploadInvoice(workitem, "invoice.xml");
System.out.println("Invoice uploaded: " + referenceNumber);
```
## Configuration
Required environment variables:
```properties
ksef.api.token=your-ksef-authentication-token
ksef.api.nip=your-company-nip-number
ksef.api.endpoint=https://ksef-test.mf.gov.pl/api/v2
ksef.api.debug=false
```
## Session Management
The `KSeFAuthManager` automatically handles session lifecycle:
- **Session Reuse**: Validates `sessionValidUntil` timestamp (UTC)
- **Auto-Renewal**: Opens new session if current one expired
- **Thread-Safe**: Uses `@Lock(LockType.WRITE)` for concurrent access
## Testing
Test environment endpoint:
```
https://ksef-test.mf.gov.pl/api/v2
```
Production endpoint:
```
https://ksef.mf.gov.pl/api/v2
```
See `KSeFAPIServiceTest.java` for complete test examples.
## Error Handling
The implementation uses `PluginException` for error handling with two error types:
- `CONFIG_ERROR`: Configuration or setup issues
- `API_ERROR`: API communication or response errors
## Dependencies
- Jakarta EE (EJB, JSON-B)
- Java 11+ (HttpClient, Crypto APIs)
- Imixs Workflow (for document management)
# Validate XML
To validate XML results use xmllint. To install run:
```bash
$ sudo apt install libxml2-utils
```
With the bash script `src/test/resources/ksef/validate_xml.sh` you can test a xml file:
```bash
$ ./validate_xml.sh example-invoice-01.xml
```
or to manual test a xml run:
```bash
$ xmllint --noout --schema 'schemat-FA(3)-v1-0E.xsd' example-invoice-01.xml
example-invoice-01.xml validates
```
# KSeF FA(3) Invoice Types: VAT vs. KOR
This section explains the key differences between regular invoices (VAT) and correction invoices (KOR) in the Polish KSeF system using FA(3) structure.
## Invoice Types
### VAT - Regular Invoice
Standard invoice documenting a sale or service delivery.
### KOR - Correction Invoice
Invoice that corrects a previously issued invoice (VAT, ZAL, or ROZ).
---
## Key Differences
| Element | VAT Invoice | KOR Invoice |
| ------------------------- | -------------------------- | --------------------------------------------- |
| **RodzajFaktury** | `VAT` | `KOR` |
| **P_2 (Invoice Number)** | `216525` | `216525-KOR` (with suffix) |
| **P_1 (Invoice Date)** | Original date (2024-04-03) | Correction date (2024-04-15) |
| **Amount Fields** | Absolute values | **Difference values** (negative or positive) |
| **DaneFaKorygowanej** | ❌ Not present | ✅ **Required** - references original invoice |
| **FaWiersz (Line Items)** | Original values | **New/corrected values** |
---
## Critical: Amount Fields in KOR
**KOR invoices show DIFFERENCES, not absolute amounts!**
### Example: Correction from 4128.00 → 3500.00 EUR
```xml
<!-- VAT Invoice -->
<P_13_1>4128.00</P_13_1> <!-- Total Net -->
<P_14_1>0.00</P_14_1> <!-- Total VAT -->
<P_15>4128.00</P_15> <!-- Total Gross -->
```
```xml
<!-- KOR Invoice -->
<P_13_6_1>-628.00</P_13_6_1> <!-- Difference: 3500 - 4128 = -628 -->
<P_15>-628.00</P_15> <!-- Difference in Total -->
```
## DaneFaKorygowanej Element
**Required in KOR invoices** - Must appear AFTER `<RodzajFaktury>KOR</RodzajFaktury>`
```xml
<DaneFaKorygowanej>
<DataWystFaKorygowanej>2024-04-03</DataWystFaKorygowanej>
<NrFaKorygowanej>216525</NrFaKorygowanej>
<NrKSeF>1</NrKSeF>
<NrKSeFFaKorygowanej>9552521552-20240403-ABCDEF-123456-AB</NrKSeFFaKorygowanej>
</DaneFaKorygowanej>
```
| Field | Description |
| ----------------------- | --------------------------------------------------------- |
| `DataWystFaKorygowanej` | Date of **original** invoice |
| `NrFaKorygowanej` | Number of **original** invoice |
| `NrKSeF` | Flag: `1` = original was in KSeF |
| `NrKSeFFaKorygowanej` | KSeF number of original invoice (mandatory if `NrKSeF=1`) |
⚠️ **Critical:** The KSeF number must be saved when uploading the original VAT invoice!
---
## FaWiersz in KOR
**Line items show the NEW/CORRECTED values**, not differences:
```xml
<!-- VAT Invoice -->
<FaWiersz>
<P_9A>4128.00</P_9A> <!-- Unit price -->
<P_11>4128.00</P_11> <!-- Net value -->
</FaWiersz>
```
```xml
<!-- KOR Invoice -->
<FaWiersz>
<P_9A>3500.00</P_9A> <!-- NEW unit price -->
<P_11>3500.00</P_11> <!-- NEW net value -->
<P_12>0 KR</P_12> <!-- Tax rate (0% for exempted) -->
</FaWiersz>
```
---
# Testdaten
Um Testdaten in die lokale Dev Umgebung zu importieren:
1. aus dem Produktiv Archiv System das XML eines Rechnungs-Snapshots unter /docker/transfer speichern
2. per api Call importieren:
http://localhost:8080/api/cargosoft/import?file=/opt/jboss/wildfly/transfer/f28bf914-04de-4843-9809-54c724bdc9bf-1764111735524.xml

26
doc/KSeF/TEST.md Normal file
View file

@ -0,0 +1,26 @@
# Test Cases
Invoice
| No | currency | Tax % | Netto | Brutto | Imixs | TAXMAN |
| ---- | -------- | ----- | ---------- | ---------- | --------- | ------ |
| 6562 | EUR | 0 | 964,16 | 964,16 | OK |
| 6555 | PLN | 23 | 31820,10 | 40894,7 | OK |
| 6586 | PLN | 23 | 110.146,50 | 141.820,90 | OK |
| 6467 | USD | 0 | 1540,00 | 1540,00 | OK |
| 6567 | EUR | 0 | 9940,96 | 9940,96 | NIP Fehlt |
# Neuer Testlauf
6602 correction invoice where just description was changed, without changing of amounts (price, VAT..)
6816 - correction invoice where amounts where changed (before correction 180 USD, after correction 0 USD)
6811 invoice with more positions, incl. positions with different VAT rate
| No | currency | Tax % | Netto | Brutto | Imixs | TAXMAN |
| ---- | -------- | ----- | ----- | ------ | ----- | ------ |
| 6602 | | 0 | | | | OK |
| 6816 | | 0 | | | | OK |
| 6811 | | 0 | | | | OK |
| | | 0 | | | | |
| | | 0 | | | | |
| | | 0 | | | | |

11183
doc/KSeF/openapi.json Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

75
doc/KSeF/test.xml Normal file
View file

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Potwierdzenie xmlns="http://upo.schematy.mf.gov.pl/KSeF/v4-2">
<NazwaPodmiotuPrzyjmujacego>Ministerstwo Finansów</NazwaPodmiotuPrzyjmujacego>
<NumerReferencyjnySesji>20251128-SO-1DA83DC000-9430B11465-93</NumerReferencyjnySesji>
<Uwierzytelnienie>
<IdKontekstu>
<Nip>9552521552</Nip>
</IdKontekstu>
<NumerReferencyjnyTokenaKSeF>20251113-EC-2751AC3000-5C5466924B-62</NumerReferencyjnyTokenaKSeF>
</Uwierzytelnienie>
<NazwaStrukturyLogicznej>1-0E</NazwaStrukturyLogicznej>
<KodFormularza>FA (3)</KodFormularza>
<Dokument>
<NipSprzedawcy>9552521552</NipSprzedawcy>
<NumerKSeFDokumentu>9552521552-20251128-010000AA503B-FE</NumerKSeFDokumentu>
<NumerFaktury>216577</NumerFaktury>
<DataWystawieniaFaktury>2024-04-03</DataWystawieniaFaktury>
<DataPrzeslaniaDokumentu>2025-11-28T09:38:18.096+01:00</DataPrzeslaniaDokumentu>
<DataNadaniaNumeruKSeF>2025-11-28T09:38:18.192+01:00</DataNadaniaNumeruKSeF>
<SkrotDokumentu>wk2TorojBbyNYtDODL1l/KCxQi/rlb3Yss/OEmf5HpE=</SkrotDokumentu>
</Dokument>
<Signature Id="Signature" xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<Reference URI="">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>N/EazXugPjJtobeCSm/ShxeSafdffzHFeRo/BLsngR4=</DigestValue>
</Reference>
<Reference URI="#SignedProperties" Type="http://uri.etsi.org/01903#SignedProperties">
<Transforms>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>7OYxftjJC1QhSKcWd/oeu7jJaLiO1kFvDCLja8xmNqk=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
c87dKdbK3Wf2QpeKEEC0H2LMG92YBH95EbKL6wJTqozOzPq6wqj+06CIPX6bIEz8Szup9xWJlJHX+/xzO4NyMxeiXMQOCAiQ4ZnhPLG2EChopNZYGDbVgOMvfSQBSkHODobG8HH+q4fqueya0V+41CnCSzF8f68fcfVTrV8DfAuw3faKYVg4ddfkvFT+AkBCAZ/JPdYzVVN28np33bd1lHNFJ5wNSpILy9h0FF9iJIiB5RMyvJwxx0HlutrhIMUoId5vUW2XLJKAOLJSSntTJf2S4qjMJcgZr/ZVP9GSaBZPBX09nPWrXOfOwIOuakVfq9N2n+ONZ29ivHpZelMWlA==</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>
MIIGWDCCBECgAwIBAgIQY1FHALBG7qGuhTJ/Z7W+yjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJQTDEhMB8GA1UECgwYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMRwwGgYDVQQDDBNDZXJ0dW0gU01JTUUgUlNBIENBMB4XDTI1MDkyOTA2MTEzM1oXDTI3MDkyOTA2MTEzMlowgb4xGTAXBgNVBGETEFZBVFBMLTUyNjAyNTAyNzQxCzAJBgNVBAYTAlBMMRQwEgYDVQQIDAttYXpvd2llY2tpZTERMA8GA1UEBwwIV2Fyc3phd2ExHzAdBgNVBAoMFk1pbmlzdGVyc3R3byBGaW5hbnPDs3cxHzAdBgNVBAMMFk1pbmlzdGVyc3R3byBGaW5hbnPDs3cxKTAnBgkqhkiG9w0BCQEWGmtvbnN1bHRhY2plLmtzZWZAbWYuZ292LnBsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtL+kpQU8d16im5Z3wIEzo7GqfQF8zWEYZqN5JroiX2ePVACR3znmoo4zx0krVEyhtKKB2/oE3Ql2M5sxaRWC/hnBMLj8r7uAJ/v3lQqzGYAf0ImwRy1H+nF4OS0B1U0m7wD2dGXOSQdbPNVru8SZ9Nw6IcsuAsHezy8EagEIffl+zA/GWtAG6Mp8Bxj3K8LkUdZp70Faaeiv25kOuvT7vThePW+qNFhpdktYQT56lGOmWJqKsm0QtdMzAy1o7bfWeAFLfP7DU3Okk/oz9NqUJc8Swih2ligWN/+g/nwFxcEMrQ4GWE3FDQogNz6kySZ7OIqN//kY1SXXb1nQ1MVAXQIDAQABo4IBvzCCAbswDAYDVR0TAQH/BAIwADBBBgNVHR8EOjA4MDagNKAyhjBodHRwOi8vY3NtaW1lcnNhY2EuY3JsLmNlcnR1bS5wbC9jc21pbWVyc2FjYS5jcmwwgYMGCCsGAQUFBwEBBHcwdTAuBggrBgEFBQcwAYYiaHR0cDovL2NzbWltZXJzYWNhLm9jc3AtY2VydHVtLmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NzbWltZXJzYWNhLnJlcG9zaXRvcnkuY2VydHVtLnBsL2NzbWltZXJzYWNhLmNlcjAfBgNVHSMEGDAWgBRm+8MPvvS/4JzJq03eRxm9wMqmaDAdBgNVHQ4EFgQUGwFEj1u0JETJoPhJu2cKjErLsUwwTAYDVR0gBEUwQzAJBgdngQwBBQICMDYGCyqEaAGG9ncCZAMBMCcwJQYIKwYBBQUHAgEWGWh0dHBzOi8vd3d3LmNlcnR1bS5wbC9DUFMwHQYDVR0lBBYwFAYIKwYBBQUHAwQGCCsGAQUFBwMCMA4GA1UdDwEB/wQEAwIE8DAlBgNVHREEHjAcgRprb25zdWx0YWNqZS5rc2VmQG1mLmdvdi5wbDANBgkqhkiG9w0BAQsFAAOCAgEAOfiPMXAeftxKk6fMiRud/VZnQixhHqBakVx11ToO7m8qGW3gj2NJDkIoIWVuRIDpz6bg7vRoyPE0mSjYkjxXfb/gaAHVM1e9vGd5cN5esvJVc9wAbLY/e1ZAg7K8IHE+SQYjLsm0ykCQcnnamzEjSD6CArGUmvwJr33OnlNusVdSZ6ar+EexAEbwBUYL+8aeKYwXn+M928h4W831LxYoVv1WaNFfgUJHjFrIUNeSuXHLG0BslrJwJuy26UQaxiM0FSNJQyeSF5Xt3K+V7EuzX4jf3yfOcTwUrt/4Lq6AEH+konMj5OZurS75aA06NbR6L4hUWfdCFRIx561Y2sHeNlggONsvvQ//z0P9IVk65RqDz21DPt688SRJ5BL5wGo9CDn29+G8VEECPRuhe+UAoQOL/9iQ2mReybunuliarQCLGya/+Ig9QRZe9BWhlN7im1B+7kaMmTbGqzmUkiFoabH+hIqqh72o5B05H9U8R0o7PpI9oJZ95edst1y9fCXw5fbly5Y3N3lR78Ui3AkUf6NN6ZtsMixVHZS8qD/QTaXDX4ez8Kz1PkMGrPWYC0L64PZzyWGZmm3RNtvv/uqx4X/L0Kyu5Dp5+H5BJyQAGh+wHJ5TadGuzASThvuB+fXEhwO3Y+bS41G2czc1vf3s9DXSqMZykYVzRbPQ2XUWkzQ=</X509Certificate>
</X509Data>
</KeyInfo>
<Object>
<xades:QualifyingProperties Target="#Signature"
xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"
xmlns="http://www.w3.org/2000/09/xmldsig#">
<xades:SignedProperties Id="SignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2025-11-28T08:38:18.2360956+00:00</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<DigestMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>IFnqTIVQHeVNK0sYY9kn/o3hT2FGIV6U7keiW0zj/Ig=</DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<X509IssuerName>CN=Certum SMIME RSA CA, O=Asseco Data Systems
S.A., C=PL</X509IssuerName>
<X509SerialNumber>132015587733884965165641957463135993546</X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</Object>
</Signature>
</Potwierdzenie>

View file

@ -1,6 +0,0 @@
https://techcommunity.microsoft.com/t5/exchange/javamail-connecting-to-office-365-xoauth2-for-imap/m-p/1505026

BIN
doc/images/zoho-001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
doc/images/zoho-002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

94
doc/zoho/README.md Normal file
View file

@ -0,0 +1,94 @@
# Zoho Web API
AGL Dubai nutzt Zoho als Platform zusammen mit einer lokalen Steuerkanzlei
https://books.zoho.com/
Testaccount - siehe [SECRETS.md](SECRETS.md)
# API Dokumentation
- API Docu: https://www.zoho.com/books/api/v3/introduction/
- Authentication: https://www.zoho.com/books/api/v3/oauth/
# Testumgebung
https://books.zoho.eu/app/20105697367
https://accounts.zoho.eu/home#
Base API URI= https://accounts.zoho.eu/
## 1. Client Einrichten
https://api-console.zoho.eu/
## 2. Generating Grant Token
https://accounts.zoho.com/oauth/v2/auth?scope=ZohoBooks.invoices.CREATE,ZohoBooks.invoices.READ,ZohoBooks.invoices.UPDATE,ZohoBooks.invoices.DELETE&client_id=1000.NLTM2KUEHI696MSLGEIANATVGGX7IN&state=testing&response_type=code&redirect_uri=https://alexander-logistics-dwc.office-workflow.de/api/zoho/grant
1000.NLTM2KUEHI696MSLGEIANATVGGX7IN
ee9ba49f16e77c64abb89cea13542d2326d8d03ce8
## 3. Generate Access and Refresh Token
https://accounts.zoho.com/oauth/v2/token?code=1000.dd7exxxxxxxxxxxxxxxxxxxxxxxx9bb8.b6c0xxxxxxxxxxxxxxxxxxxxxxxxdca4&client_id=1000.NLTM2KUEHI696MSLGEIANATVGGX7IN&client_secret=ee9ba49f16e77c64abb89cea13542d2326d8d03ce8&redirect_uri=http://www.zoho.com/books&grant_type=authorization_code
# Self Client
Man kann bei zoho mit einem sogenannten 'Self Client' arbeiten. Dieser erlaubt es ohne Redirect auf die Zoho Webseite einen Code anzufordern:
## 1. Self Client einrichten
Auf die API COnsole von Zoho zugreifen:
https://api-console.zoho.eu/client/1000.GR5FTPZYB06HEWSFSSX4DJU3OBD4EJ
<img src="../images/zoho-001.png" width="800">
Es kann maximal ein Client eingerichtet werden
Unter Scope trägt man dann den gewünschten Scope ein. Z.B.:
ZohoBooks.invoices.CREATE,ZohoBooks.invoices.READ,ZohoBooks.invoices.UPDATE,ZohoBooks.invoices.DELETE
und eine Description
<img src="../images/zoho-002.png">
Den generierten Code nun in Anwendung übertragen und innerhalb (!!) der 'Time Duration' den Access und Refresh Token generieren!
Siehe Junit Test `TestUpdateTokens`
Find details also [here](https://www.zoho.com/writer/help/api/v1/oauth-step2.html#self-client)
## Example for JUnit Test
Der Junit Test `TestUpdateTokens` zeigt das Prinzip
```
client ID= 1000.GR5FTPZYB06HEWSFSSX4DJU3OBD4EJ
client secret= 3f3e74c5212bbc924a7ebf77f887c6296db1106c47
```
In der Web GUi einen neuen Code generieren:
Scope=ZohoBooks.invoices.CREATE,ZohoBooks.invoices.READ,ZohoBooks.invoices.UPDATE,ZohoBooks.invoices.DELETE
Danach den Code token kopieren:
1000.7fe6315e8848b92a2f281b885677d37a.428c02dc2309606c86271842f1f67de4
**Note:** Der Code muss für Test immer wieder neu erstellt werden, da er nur für einige Minuten gültig ist!
# Disable auto-generated invoice number
Um die Automatische Vergabe von Rechnungsnummern in Zoho zu deaktivieren kann wie folgt vorgegangen werden:
1. Unter 'Invoices' eine neue Rechnung anlegen#
2. Im Feld 'Invoice#' das Zahnrad anklicken:
<img src="disable-auto-generated-number-01.png" />
3. Und dort die Option "Enter invoice numbers manually" auswählen
<img src="disable-auto-generated-number-02.png" />

View file

@ -0,0 +1,167 @@
{
"code": 0,
"message": "The bill has been created.",
"bill": {
"bill_id": "6206847000000103003",
"vendor_id": "6206847000000100015",
"vendor_name": "Feldmuehle GmbH",
"source": "Api",
"contact_category": "",
"tax_treatment": "",
"unused_credits_payable_amount": 0.00,
"status": "paid",
"color_code": "",
"current_sub_status_id": "",
"current_sub_status": "paid",
"sub_statuses": [],
"bill_number": "28195",
"date": "2024-07-26",
"due_date": "2024-07-26",
"discount_setting": "flat",
"tds_calculation_type": "tds_item_level",
"payment_terms": 0,
"payment_terms_label": "Due on Receipt",
"payment_expected_date": "",
"reference_number": "",
"scanned_po_number": "",
"recurring_bill_id": "",
"due_by_days": 286,
"due_in_days": "",
"currency_id": "6206847000000000109",
"currency_code": "EUR",
"currency_symbol": "€",
"currency_name_formatted": "EUR- Euro",
"documents": [],
"subject_content": "",
"price_precision": 2,
"exchange_rate": 1.00,
"custom_fields": [],
"custom_field_hash": {},
"is_viewed_by_client": false,
"client_viewed_time": "",
"is_item_level_tax_calc": false,
"is_inclusive_tax": false,
"tax_rounding": "entity_level",
"is_uber_bill": false,
"is_tally_bill": false,
"track_discount_in_account": true,
"is_bill_reconciliation_violated": false,
"bill_order_type": "",
"line_items": [
{
"purchaseorder_id": "",
"purchaseorder_item_id": "",
"receive_id": "",
"line_item_id": "6206847000000103013",
"item_id": "",
"name": "AB-DEFGHI-1234-567",
"account_id": "6206847000000092271",
"account_name": "TEst",
"description": "",
"bcy_rate": 0.00,
"rate": 0.00,
"sales_rate": "",
"pricebook_id": "",
"header_id": "",
"header_name": "",
"tags": [],
"quantity": 1.00,
"discount": 0.00,
"discounts": [],
"discount_account_id": "",
"discount_account_name": "",
"markup_percent": 0.00,
"tax_id": "",
"tax_name": "",
"tax_type": "tax",
"tax_percentage": 0,
"line_item_taxes": [],
"item_total": 0.00,
"item_order": 1,
"unit": "",
"item_type": "",
"image_name": "",
"image_type": "",
"is_billable": false,
"customer_id": "",
"receipt_line_item_id": "",
"customer_name": "",
"project_id": "",
"project_name": "",
"invoice_id": "",
"invoice_number": "",
"item_custom_fields": [],
"purchase_request_items": [],
"item_matching_type": ""
}
],
"submitted_date": "",
"submitted_by": "",
"submitted_by_name": "",
"submitted_by_email": "",
"submitted_by_photo_url": "",
"submitter_id": "",
"approver_id": "",
"adjustment": 0.00,
"adjustment_description": "",
"discount_amount": 0.00,
"discount": 0.00,
"discount_applied_on_amount": 0.00,
"is_discount_before_tax": true,
"discount_account_id": "",
"discount_account_name": "",
"discount_type": "entity_level",
"sub_total": 0.00,
"sub_total_inclusive_of_tax": 0.00,
"tax_total": 0.00,
"discount_total": 0.00,
"discount_percent": 0.00,
"total": 0.00,
"payment_made": 0.00,
"vendor_credits_applied": 0.00,
"is_line_item_invoiced": false,
"purchaseorders": [],
"taxes": [],
"computation_type": "basic",
"tax_override_preference": "no_override",
"tds_override_preference": "no_override",
"balance": 0.00,
"unprocessed_payment_amount": 0.00,
"billing_address_id": "6206847000000100017",
"billing_address": {
"address": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": "",
"fax": "",
"phone": "",
"attention": ""
},
"payments": [],
"vendor_credits": [],
"created_time": "2025-05-08T21:36:04+0100",
"created_by_id": "6206847000000092001",
"last_modified_id": "6206847000000092001",
"last_modified_time": "2025-05-08T21:36:04+0100",
"reference_id": "",
"notes": "",
"terms": "",
"attachment_name": "",
"template_id": "6206847000000031017",
"template_name": "Standard Template",
"page_width": "8.27in",
"page_height": "11.69in",
"orientation": "portrait",
"template_type": "standard",
"is_approval_required": false,
"allocated_landed_costs": [],
"unallocated_landed_costs": [],
"entity_type": "bill",
"total_retention_amount": 0.00,
"retention_items": [],
"can_send_in_mail": false,
"approvers_list": []
}
}

View file

@ -0,0 +1,177 @@
{
"code": 0,
"message": "The contact has been added.",
"contact": {
"contact_id": "777249000000077029",
"contact_name": "HQ Recyclers Network e.K.",
"company_name": "HQ Recyclers Network e.K.",
"contact_number": "CUS-00008",
"contact_tax_information": "",
"first_name": "",
"last_name": "",
"designation": "",
"department": "",
"website": "",
"is_bcy_only_contact": true,
"is_credit_limit_migration_completed": true,
"language_code": "",
"language_code_formatted": "",
"contact_salutation": "",
"email": "",
"phone": "",
"mobile": "",
"invited_by": "",
"portal_status": "disabled",
"is_client_review_asked": false,
"has_transaction": false,
"contact_type": "customer",
"customer_sub_type": "business",
"owner_id": "",
"owner_name": "",
"source": "api",
"documents": [],
"twitter": "",
"facebook": "",
"is_crm_customer": false,
"is_linked_with_zohocrm": false,
"primary_contact_id": "",
"zcrm_account_id": "",
"zcrm_contact_id": "",
"crm_owner_id": "",
"payment_terms": 0,
"payment_terms_label": "Due on Receipt",
"payment_terms_id": "",
"credit_limit_exceeded_amount": 0.00,
"currency_id": "777249000000000071",
"currency_code": "EUR",
"currency_symbol": "€",
"price_precision": 2,
"exchange_rate": "",
"can_show_customer_ob": true,
"can_show_vendor_ob": true,
"opening_balance_amount": 0.00,
"opening_balance_amount_bcy": "",
"outstanding_ob_receivable_amount": 0.00,
"outstanding_ob_payable_amount": 0.00,
"outstanding_receivable_amount": 0.00,
"outstanding_receivable_amount_bcy": 0.00,
"outstanding_payable_amount": 0.00,
"outstanding_payable_amount_bcy": 0.00,
"unused_credits_receivable_amount": 0.00,
"unused_credits_receivable_amount_bcy": 0.00,
"unused_credits_payable_amount": 0.00,
"unused_credits_payable_amount_bcy": 0.00,
"unused_retainer_payments": 0.00,
"status": "active",
"payment_reminder_enabled": true,
"is_sms_enabled": true,
"is_consent_agreed": false,
"consent_date": "",
"is_client_review_settings_enabled": false,
"custom_fields": [],
"custom_field_hash": {},
"tax_reg_label": "",
"contact_category": "",
"sales_channel": "direct_sales",
"ach_supported": false,
"portal_receipt_count": 0,
"opening_balances": [],
"entity_address_id": "777249000000077035",
"billing_address": {
"address_id": "777249000000077031",
"attention": "",
"address": "",
"street2": "",
"city": "",
"state_code": "",
"state": "",
"zip": "",
"country": "",
"county": "",
"country_code": "",
"phone": "",
"fax": ""
},
"shipping_address": {
"address_id": "777249000000077033",
"attention": "",
"address": "",
"street2": "",
"city": "",
"state_code": "",
"state": "",
"zip": "",
"country": "",
"county": "",
"country_code": "",
"phone": "",
"fax": "",
"latitude": "",
"longitude": ""
},
"contact_persons": [],
"addresses": [],
"pricebook_id": "",
"pricebook_name": "",
"default_templates": {
"statement_template_id": "",
"statement_template_name": "",
"invoice_template_id": "",
"invoice_template_name": "",
"bill_template_id": "",
"bill_template_name": "",
"estimate_template_id": "",
"estimate_template_name": "",
"creditnote_template_id": "",
"creditnote_template_name": "",
"paymentthankyou_template_id": "",
"paymentthankyou_template_name": "",
"invoice_email_template_id": "",
"invoice_email_template_name": "",
"estimate_email_template_id": "",
"estimate_email_template_name": "",
"creditnote_email_template_id": "",
"creditnote_email_template_name": "",
"paymentthankyou_email_template_id": "",
"paymentthankyou_email_template_name": "",
"payment_remittance_email_template_id": "",
"payment_remittance_email_template_name": ""
},
"associated_with_square": false,
"cards": [],
"checks": [],
"bank_accounts": [],
"vpa_list": [],
"notes": "",
"created_time": "2025-04-30T11:14:42+0200",
"created_date": "2025-04-30",
"created_by_name": "Ralph Soika",
"last_modified_time": "2025-04-30T11:14:42+0200",
"tags": [],
"zohopeople_client_id": "",
"customer_currency_summaries": [
{
"currency_id": "777249000000000071",
"currency_code": "EUR",
"currency_symbol": "€",
"price_precision": 2,
"is_base_currency": true,
"currency_name_formatted": "EUR- Euro",
"outstanding_receivable_amount": 0.00,
"unused_credits_receivable_amount": 0.00
}
],
"is_valid_trn": false,
"trn_last_validated_time": "",
"trn_last_validated_time_formatted": "",
"approvers_list": [],
"submitted_date": "",
"submitted_by": "",
"submitted_by_name": "",
"submitted_by_email": "",
"submitted_by_photo_url": "",
"submitter_id": "",
"approver_id": "",
"integration_references": []
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
doc/zoho/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View file

@ -0,0 +1,273 @@
{
"code": 0,
"message": "The invoice has been created.",
"invoice": {
"invoice_id": "777249000000082026",
"invoice_number": "INV-000018",
"date": "2024-04-03",
"due_date": "2024-05-03",
"offline_created_date_with_time": "",
"customer_id": "777249000000075016",
"contact_number": "CUS-00005",
"customer_name": "Action Agenciamento de Cargas LTDA",
"customer_custom_fields": [],
"customer_custom_field_hash": {},
"email": "",
"currency_id": "777249000000000071",
"invoice_source": "Api",
"currency_code": "EUR",
"currency_symbol": "€",
"currency_name_formatted": "EUR- Euro",
"status": "draft",
"unprocessed_payment_amount": 0.00,
"custom_fields": [],
"custom_field_hash": {},
"recurring_invoice_id": "",
"is_last_child_invoice": false,
"payment_mode": "",
"bank_account_id": "",
"payment_terms": 30,
"payment_terms_label": "Net 30",
"early_payment_discount_percentage": 0.00,
"early_payment_discount_due_days": "",
"early_payment_discount_amount": 0.00,
"payment_reminder_enabled": true,
"payment_made": 0.00,
"zcrm_potential_id": "",
"zcrm_potential_name": "",
"reference_number": "",
"preceding_invoice_id": "",
"is_early_payment_discount_applicable": false,
"lock_details": {},
"is_progress_invoice": false,
"can_show_kit_return": false,
"is_kit_partial_return": false,
"line_items": [
{
"line_item_id": "777249000000082036",
"item_id": "",
"item_order": 1,
"name": "R IM-GCA-2403-110",
"internal_name": "",
"description": "",
"discount_account_id": "",
"discount_account_name": "",
"unit": "",
"quantity": 1.00,
"discount_amount": 0.00,
"discount": 0.00,
"discounts": [],
"bcy_rate": 1995.00,
"rate": 1995.00,
"account_id": "777249000000000376",
"account_name": "Sales",
"header_id": "",
"header_name": "",
"pricebook_id": "",
"tax_id": "",
"tax_name": "",
"tax_type": "tax",
"tax_percentage": 0,
"item_total": 1995.00,
"item_custom_fields": [],
"pricing_scheme": "unit",
"tags": [],
"documents": [],
"line_item_taxes": [],
"bill_id": "",
"bill_item_id": "",
"project_id": "",
"time_entry_ids": [],
"expense_id": "",
"item_type": "",
"expense_receipt_name": "",
"sales_rate": "",
"purchase_rate": "",
"salesorder_item_id": "",
"cost_amount": 0,
"markup_percent": 0,
"mapped_items": []
}
],
"total_retention_amount": 0.00,
"retention_items": [],
"retention_override_preference": "no_override",
"exchange_rate": 1.00,
"is_autobill_enabled": false,
"inprocess_transaction_present": false,
"allow_partial_payments": false,
"price_precision": 2,
"sub_total": 1995.00,
"tax_total": 0.00,
"discount_total": 0.00,
"discount_percent": 0.00,
"discount": 0.00,
"discount_applied_on_amount": 0.00,
"discount_type": "item_level",
"discount_account_id": "",
"discount_account_name": "",
"is_discount_before_tax": true,
"adjustment": 0.00,
"adjustment_description": "",
"shipping_charge_tax_id": "",
"shipping_charge_tax_name": "",
"shipping_charge_tax_type": "",
"shipping_charge_tax_percentage": "",
"shipping_charge_tax_exemption_id": "",
"shipping_charge_tax_exemption_code": "",
"shipping_charge_tax": "",
"bcy_shipping_charge_tax": "",
"shipping_charge_exclusive_of_tax": 0.000,
"shipping_charge_inclusive_of_tax": 0.000,
"shipping_charge_tax_formatted": "",
"shipping_charge_exclusive_of_tax_formatted": "€0,00",
"shipping_charge_inclusive_of_tax_formatted": "€0,00",
"shipping_charge_account_id": "",
"shipping_charge_account_name": "",
"shipping_charge": 0.00,
"bcy_shipping_charge": 0.00,
"bcy_adjustment": 0.00,
"bcy_sub_total": 1995.00,
"bcy_discount_total": 0.00,
"bcy_tax_total": 0.00,
"bcy_total": 1995.000,
"total": 1995.00,
"balance": 1995.00,
"write_off_amount": 0.00,
"roundoff_value": 0.00,
"transaction_rounding_type": "no_rounding",
"is_inclusive_tax": false,
"sub_total_inclusive_of_tax": 0.00,
"contact_category": "",
"tax_rounding": "entity_level",
"taxes": [],
"tds_calculation_type": "tds_item_level",
"can_send_invoice_sms": true,
"payment_expected_date": "",
"payment_discount": 0.00,
"stop_reminder_until_payment_expected_date": false,
"last_payment_date": "",
"ach_supported": false,
"ach_payment_initiated": false,
"payment_options": {
"payment_gateways": []
},
"reader_offline_payment_initiated": false,
"contact_persons": [],
"contact_persons_associated": [],
"bank_account_details": {
"bank_account_id": "777249000000000376",
"bank_account_name": "Sales",
"bank_account_number": "",
"is_active": false,
"iban_number": "",
"swift_code": ""
},
"attachment_name": "",
"documents": [],
"computation_type": "basic",
"deliverychallans": [],
"merchant_id": "",
"merchant_name": "",
"ecomm_operator_id": "",
"ecomm_operator_name": "",
"salesorder_id": "",
"salesorder_number": "",
"salesorders": [],
"shipping_bills": [],
"contact_persons_details": [],
"contact": {
"customer_balance": 0.00,
"credit_limit": 0.00,
"unused_customer_credits": 0.00,
"is_credit_limit_migration_completed": true
},
"salesperson_id": "",
"salesperson_name": "",
"is_emailed": false,
"reminders_sent": 0,
"last_reminder_sent_date": "",
"next_reminder_date_formatted": "",
"is_viewed_by_client": false,
"client_viewed_time": "",
"submitter_id": "",
"approver_id": "",
"submitted_date": "",
"submitted_by": "",
"submitted_by_name": "",
"submitted_by_email": "",
"submitted_by_photo_url": "",
"template_id": "777249000000000103",
"template_name": "Standard Template",
"template_type": "standard",
"notes": "Thanks for your business.",
"terms": "",
"billing_address": {
"street": "",
"address": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": "",
"fax": "",
"phone": "",
"attention": ""
},
"shipping_address": {
"street": "",
"address": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": "",
"fax": "",
"phone": "",
"attention": ""
},
"invoice_url": "https://zohosecurepay.eu/books/imixs/secure?CInvoiceID=2-64277fbd3cd8bc868d9e57c3085f4f428b1f66a1d5e3f3a32fc159e6879f623863183b0ac4651a08fdcce7621ddf18bf61770563d9fd2832f987dda624d4f11579820a40c3f55870 ",
"subject_content": "",
"can_send_in_mail": false,
"created_time": "2025-05-02T10:23:49+0200",
"last_modified_time": "2025-05-02T10:23:49+0200",
"created_date": "2025-05-02",
"created_by_id": "777249000000055227",
"created_by_name": "Ralph Soika",
"last_modified_by_id": "777249000000055227",
"page_width": "8.27in",
"page_height": "11.69in",
"orientation": "portrait",
"is_backorder": "",
"sales_channel": "direct_sales",
"color_code": "",
"current_sub_status_id": "",
"current_sub_status": "draft",
"sub_statuses": [],
"estimate_id": "",
"is_client_review_settings_enabled": false,
"unused_retainer_payments": 0.00,
"credits_applied": 0.00,
"tax_amount_withheld": 0.00,
"schedule_time": "",
"customer_default_billing_address": {
"zip": "",
"country": "",
"address": "",
"city": "",
"phone": "",
"street2": "",
"state": "",
"fax": "",
"state_code": ""
},
"includes_package_tracking_info": false,
"approvers_list": [],
"qr_code": {
"qr_source": "invoice_url",
"is_qr_enabled": false,
"qr_value": "",
"qr_description": "Scan the QR code to view the configured information."
}
}
}

View file

@ -25,7 +25,7 @@ services:
POSTGRES_CONNECTION: "jdbc:postgresql://db/office-alexander-logistics" POSTGRES_CONNECTION: "jdbc:postgresql://db/office-alexander-logistics"
TZ: "CET" TZ: "CET"
LANG: "en_US.UTF-8" LANG: "en_US.UTF-8"
MAILGATEWAY: "mailgateway" MAILGATEWAY: "mailpit"
ASYNCEVENT_PROCESSOR_ENABLED: "true" ASYNCEVENT_PROCESSOR_ENABLED: "true"
ASYNCEVENT_PROCESSOR_INITIALDELAY: "10000" ASYNCEVENT_PROCESSOR_INITIALDELAY: "10000"
@ -41,8 +41,13 @@ services:
WORKFLOW_SERVICE_USER: "admin" WORKFLOW_SERVICE_USER: "admin"
WORKFLOW_SERVICE_PASSWORD: "adminadmin" WORKFLOW_SERVICE_PASSWORD: "adminadmin"
LLM_SERVICE_ENDPOINT_USER: "admin" # LLM Integration
LLM_SERVICE_ENDPOINT_PASSWORD: "imixs4.null" LLM_CONFIG_FILE: /opt/jboss/imixs-llm.xml
# KSeF - Polen Test
KSEF_API_NIP: "9552521552"
KSEF_API_TOKEN: "20251113-EC-2751AC3000-5C5466924B-62|nip-9552521552|fc0c95d020dc45d4af491fb0aa755f3f3f674b33ecbf4250a88ea6e36fa8340b"
KSEF_API_ENDPOINT: "https://ksef-test.mf.gov.pl/api/v2"
METRICS_ENABLED: "false" METRICS_ENABLED: "false"
@ -52,14 +57,14 @@ services:
- "8787:8787" - "8787:8787"
volumes: volumes:
- ./docker/deployments:/opt/jboss/wildfly/standalone/deployments/ - ./docker/deployments:/opt/jboss/wildfly/standalone/deployments/
- ./docker/keys/imixs-llm.xml:/opt/jboss/imixs-llm.xml
- ./docker/transfer:/opt/jboss/wildfly/transfer/
############################################### ###############################################
# Tika OCR Service # Tika OCR Service
############################################### ###############################################
tika: tika:
#image: apache/tika:latest image: apache/tika:3.2.0.0-full
#image: apache/tika:1.24.1-full
image: apache/tika:2.4.1-full
environment: environment:
TZ: "Europe/Berlin" TZ: "Europe/Berlin"
ports: ports:
@ -68,24 +73,24 @@ services:
################## ##################
# Exporter Service # Exporter Service
################## ##################
imixsexporter-app: # imixsexporter-app:
image: imixs/imixs-archive-exporter # image: imixs/imixs-archive-exporter
environment: # environment:
# EXAMPLE SETUP # # EXAMPLE SETUP
WORKFLOW_SERVICE_ENDPOINT: "http://app:8080/api" # WORKFLOW_SERVICE_ENDPOINT: "http://app:8080/api"
WORKFLOW_SERVICE_USER: "admin" # WORKFLOW_SERVICE_USER: "admin"
WORKFLOW_SERVICE_PASSWORD: "adminadmin" # WORKFLOW_SERVICE_PASSWORD: "adminadmin"
WORKFLOW_SERVICE_AUTHMETHOD: "form" # WORKFLOW_SERVICE_AUTHMETHOD: "form"
METRICS_ENDPOINT: "http://localhost:9991/metrics" # METRICS_ENDPOINT: "http://localhost:9991/metrics"
HEALTH_ENDPOINT: "http://localhost:9991/health" # HEALTH_ENDPOINT: "http://localhost:9991/health"
EXPORT_PATH: "/agl/dwc-test" # EXPORT_PATH: "/agl/dwc-test"
EXPORT_FTP_HOST: "u248962.your-storagebox.de" # EXPORT_FTP_HOST: "u248962.your-storagebox.de"
EXPORT_FTP_PORT: "21" # EXPORT_FTP_PORT: "21"
EXPORT_FTP_USER: "u248962-sub4" # EXPORT_FTP_USER: "u248962-sub4"
EXPORT_FTP_PASSWORD: "en4g3f1Jw0WlQ9Yb" # EXPORT_FTP_PASSWORD: "en4g3f1Jw0WlQ9Yb"
ports: # ports:
- "8081:8080" # - "8081:8080"
- "8788:8787" # - "8788:8787"
############################################### ###############################################
# Imixs-Admin # Imixs-Admin
@ -98,12 +103,15 @@ services:
############################################### ###############################################
# Mailgateway # Mailgateway
############################################### ###############################################
mailgateway: mailpit:
image: imixs/exim4 image: axllent/mailpit:latest
container_name: mailpit
environment: environment:
EXIM_SMARTHOST: "www149.your-server.de:25" MP_SMTP_BIND_ADDR: "0.0.0.0:25"
EXIM_PASSWORD: "www149.your-server.de:webmaster@imixs.com:$MAILPASSWORD" ports:
EXIM_ALLOWED_SENDERS: "10.0.0.0/8:172.18.0.0/12:192.168.0.0/16" - "1025:25" # Host:1025 -> Container:25 (SMTP)
- "8025:8025" # Web UI
restart: unless-stopped
# prometheus: # prometheus:
# image: prom/prometheus:latest # image: prom/prometheus:latest

4
docker/.env Normal file
View file

@ -0,0 +1,4 @@
# LLM Config
LLM_API_ENDPOINT=https://api.llama.cpp.imixs.com/
LLM_API_KEY=7fdb663fa87ea16731c1e0ece8ad3214e358423eabf2403188110c731ce07321

55
docker/keys/imixs-llm.xml Normal file
View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
imixs-llm.xml - LLM Model Registry
======================================
Place this file in your deployment so it is available on the classpath,
e.g. in src/main/resources/ for a Maven project.
Each <model> element defines one logical LLM service endpoint.
A model is either a completion model OR an embedding model - never both.
The BPMN configuration references them separately by their id:
<imixs-ai name="CONDITION">
<endpoint>my-llm</endpoint>
...
</imixs-ai>
<imixs-ai name="RAG_INDEX">
<endpoint-completion>my-llm</endpoint-completion>
<endpoint-embeddings>my-embeddings</endpoint-embeddings>
...
</imixs-ai>
Environment variable placeholders are supported via ${env.VAR_NAME}.
-->
<imixs-llm>
<!--
Completion model used for chat completions, conditions, analysis etc.
This example connects to a local llama.cpp server.
-->
<endpoint id="api.llama.cpp.imixs.com">
<url>https://api.llama.cpp.imixs.com/</url>
<apikey>7fdb663fa87ea16731c1e0ece8ad3214e358423eabf2403188110c731ce07321</apikey>
<options>{
"temperature": 0.2,
"max_tokens": 1024
}
</options>
</endpoint>
<!--
Embedding model used for RAG indexing and retrieval.
This example connects to a separate embedding server.
No apikey needed for a locally hosted instance.
-->
<endpoint id="embeddings.llama.cpp.imixs.com">
<url>https://embeddings.llama.cpp.imixs.com/</url>
<apikey>7fdb663fa87ea16731c1e0ece8ad3214e358423eabf2403188110c731ce07321</apikey>
<options>{
"max_tokens": 512
}
</options>
</endpoint>
</imixs-llm>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,11 +0,0 @@
#!/bin/bash
############################################################
# Setup hotdeploy
#
############################################################
cd office-alexander-logistics-app
mvn manik-hotdeploy:hotdeploy
cd ..

View file

@ -1,53 +0,0 @@
# ML Models
Wir verwenden bei Alexander-Global Logistics ein standard Invoice ML Modell. Dieses basiert im Grund auf unserem offizielen spacy modell 'invoice-de-0.1.0'.
## Modell Nachtrainieren
Das Modell bei Alexander Logistics läst sich in der Dev Umggebung bei Bedarf nachtrainieren. Dazu geht man wie folgt vor:
**1.)** Aktuelles Modell auf Tikal Cloud Server sichern:
$ ssh imixs@master-1.tikal.imixs.com
$ cd tikal-cloud/
$ ./apps/alexander-logistics.office-workflow.de/ml_model_backup.sh
# Falls es zu einem io/error kommt, muss der spacy ml pod neu gestartet werden!
**2.)** Die Tikal-Cloud Pullen
**3.)** Um auf dem aktuellen Modell weiter zu trainierne, den Inhalt des invoice-de-0.1.0 Folders aus dem Backup directory in die lokale Dev Umgebung kopieren /
um ein neues Modell zu genereiren einfach den localen ordner 'invoice-de-0.1.0' umbenennen oder leeren.
**4.)** Jetzt lokal den Trainingsserver aufrufen
http://localhost:8081/api/openapi-ui/index.html
und das training beginnen mit der datei 'training-config-prod.xml'. Man kann das training 3-4 mal durchführen.
**5.)** Nun kann man die Inhalte des invoice-de-0.1.0 Folders zurück auf den Tikal in den modell folder /invoice-de-0.1.0 einspielen
**6.)** Nun die änderungen nach Git Puschen.
**7.)** auf dem Tikal Sever nun das aktuellisete Modell wieder einspielen
$ git pull
$ ./apps/alexander-logistics.office-workflow.de/ml_model_deploy.sh invoice-de-0.1.0/
## 22.05.2021 - invoice-de-0.1.0
NER=2.1948
## 17.02.2020 - invoice-de-0.1.0
Modell trainiert anhand der alexander-logistics Produtiv daten

View file

@ -1,491 +0,0 @@
# Test Protokoll Alexander Logistic invoice-de-0.1.0
**Validierung**
f4eaceda-f28a-4394-928e-1a05daaf2760
a5d1e7fe-d74a-4fa2-9b06-3221865759fa
c0290497-f613-4492-81b6-4ae1e1680029
d8e3fce4-d11c-46a4-8ba0-369b4c6e902f
8b766f35-828a-41f1-be04-00b4b62da4d0
**********************************************************************
** invoice-de-0.1.0-falsemodell
**12.10.2021 15:50** (sort order created)
**********************************************************************
workflow.query ($workflowgroup:"Rechnungseingang" OR $workflowgroup:"Sachrechnung") AND ($taskid:5900)
workflow.pagesize 500
ml.training.filepattern .pdf
ml.training.iterations 10
ml.training.dropoutrate 0,25
multiOccurrence false
ml.training.quality LOW
min_losses 0
RESULT
-----------------------------------------------------------------------
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 53.33% (200)
imixs-ml-training_1 | ...... quality level LOW = 31.47% (118)
imixs-ml-training_1 | ...... quality level BAD = 15.2% (57)
imixs-ml-training_1 | ...... average NER = 17.195895012525614
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 51.73% (194)
imixs-ml-training_1 | ...... quality level LOW = 32.8% (123)
imixs-ml-training_1 | ...... quality level BAD = 15.47% (58)
imixs-ml-training_1 | ...... average NER = 6.50170386961344
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 53.87% (202)
imixs-ml-training_1 | ...... quality level LOW = 31.73% (119)
imixs-ml-training_1 | ...... quality level BAD = 14.4% (54)
imixs-ml-training_1 | ...... average NER = 4.8940276912225
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 52.8% (198)
imixs-ml-training_1 | ...... quality level LOW = 32% (120)
imixs-ml-training_1 | ...... quality level BAD = 15.2% (57)
imixs-ml-training_1 | ...... average NER = 3.9605563888416824
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 54.13% (203)
imixs-ml-training_1 | ...... quality level LOW = 29.6% (111)
imixs-ml-training_1 | ...... quality level BAD = 16.27% (61)
imixs-ml-training_1 | ...... average NER = 3.744507591826106
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 53.07% (199)
imixs-ml-training_1 | ...... quality level LOW = 31.2% (117)
imixs-ml-training_1 | ...... quality level BAD = 15.73% (59)
imixs-ml-training_1 | ...... average NER = 2.8395576715820736
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 53.87% (202)
imixs-ml-training_1 | ...... quality level LOW = 32% (120)
imixs-ml-training_1 | ...... quality level BAD = 14.13% (53)
imixs-ml-training_1 | ...... average NER = 2.6799682681142363
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 53.6% (201)
imixs-ml-training_1 | ...... quality level LOW = 31.47% (118)
imixs-ml-training_1 | ...... quality level BAD = 14.93% (56)
imixs-ml-training_1 | ...... average NER = 2.520244211218683
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 49.33% (185)
imixs-ml-training_1 | ...... quality level LOW = 34.93% (131)
imixs-ml-training_1 | ...... quality level BAD = 15.73% (59)
imixs-ml-training_1 | ...... average NER = 2.1511980661715193
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 53.87% (202)
imixs-ml-training_1 | ...... quality level LOW = 31.2% (117)
imixs-ml-training_1 | ...... quality level BAD = 14.93% (56)
imixs-ml-training_1 | ...... average NER = 2.2739690429824475
**13.10.2021 12:00**
workflow.query ($workflowgroup:"Rechnungseingang" OR $workflowgroup:"Sachrechnung") AND ($taskid:5900)
workflow.pagesize 500
ml.training.filepattern .pdf|.PDF
ml.training.iterations 10
ml.training.dropoutrate 0,25
multiOccurrence false
ml.training.quality LOW
min_losses 0
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 61.33% (230)
imixs-ml-training_1 | ...... quality level LOW = 38.67% (145)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 3.790466332166552
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 61.07% (229)
imixs-ml-training_1 | ...... quality level LOW = 38.93% (146)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 3.160620521438082
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 58.13% (218)
imixs-ml-training_1 | ...... quality level LOW = 41.87% (157)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.636420357788331
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 58.13% (218)
imixs-ml-training_1 | ...... quality level LOW = 41.87% (157)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.506552163520219
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 58.93% (221)
imixs-ml-training_1 | ...... quality level LOW = 41.07% (154)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.3495061575286793
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 59.47% (223)
imixs-ml-training_1 | ...... quality level LOW = 40.53% (152)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.9351332692220107
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 61.33% (230)
imixs-ml-training_1 | ...... quality level LOW = 38.67% (145)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.8881396005118698
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 57.87% (217)
imixs-ml-training_1 | ...... quality level LOW = 42.13% (158)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.9754112840739593
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 59.73% (224)
imixs-ml-training_1 | ...... quality level LOW = 40.27% (151)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.7839739270522237
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 59.73% (224)
imixs-ml-training_1 | ...... quality level LOW = 40.27% (151)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.6024293913431429
**********************************************************************
** invoice-de-0.1.0
**12.10.2021 15:50** (sort order created)
**********************************************************************
workflow.query ($workflowgroup:"Rechnungseingang" OR $workflowgroup:"Sachrechnung") AND ($taskid:5900)
workflow.pagesize 500
ml.training.filepattern .pdf|.PDF
ml.training.iterations 10
ml.training.dropoutrate 0,25
multiOccurrence true
ml.training.quality LOW
min_losses 0
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.27% (256)
imixs-ml-training_1 | ...... quality level LOW = 31.47% (118)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 21.57255353509432
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 67.73% (254)
imixs-ml-training_1 | ...... quality level LOW = 32.27% (121)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 8.249835149395697
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.53% (257)
imixs-ml-training_1 | ...... quality level LOW = 31.2% (117)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 5.892598287488733
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.53% (257)
imixs-ml-training_1 | ...... quality level LOW = 31.2% (117)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 4.964129124089013
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.53% (257)
imixs-ml-training_1 | ...... quality level LOW = 31.2% (117)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 3.5603186705177947
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 67.2% (252)
imixs-ml-training_1 | ...... quality level LOW = 32.53% (122)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 2.692053828307031
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68% (255)
imixs-ml-training_1 | ...... quality level LOW = 31.73% (119)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 2.3509401762802873
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 65.87% (247)
imixs-ml-training_1 | ...... quality level LOW = 34.13% (128)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.2695994889458104
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.27% (256)
imixs-ml-training_1 | ...... quality level LOW = 31.47% (118)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 1.844410364015416
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 70.67% (265)
imixs-ml-training_1 | ...... quality level LOW = 29.07% (109)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (1)
imixs-ml-training_1 | ...... average NER = 1.6153951610034658
page=1 (count=500)
--------------------------------
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 69.6% (261)
imixs-ml-training_1 | ...... quality level LOW = 30.4% (114)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 7.093659738880595
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 66.4% (249)
imixs-ml-training_1 | ...... quality level LOW = 33.6% (126)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 5.201780406598962
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.27% (256)
imixs-ml-training_1 | ...... quality level LOW = 31.73% (119)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 3.8116329003426204
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 66.67% (250)
imixs-ml-training_1 | ...... quality level LOW = 33.33% (125)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 3.3164488404836154
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 66.93% (251)
imixs-ml-training_1 | ...... quality level LOW = 33.07% (124)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.7822570929398576
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 69.07% (259)
imixs-ml-training_1 | ...... quality level LOW = 30.93% (116)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.31773083524846
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 68.8% (258)
imixs-ml-training_1 | ...... quality level LOW = 31.2% (117)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.165804551920185
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 66.4% (249)
imixs-ml-training_1 | ...... quality level LOW = 33.6% (126)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.9591955652007715
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 66.4% (249)
imixs-ml-training_1 | ...... quality level LOW = 33.6% (126)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.5473874007025803
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 375
imixs-ml-training_1 | ...... quality level GOOD = 65.87% (247)
imixs-ml-training_1 | ...... quality level LOW = 34.13% (128)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 1.705957084193204
imixs-ml-training_1 | |#]
imixs-ml-training_1 |
page=0 (count=1000)
--------------------------------
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.47% (506)
imixs-ml-training_1 | ...... quality level LOW = 32.53% (244)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 3.2147245242951565
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 68.8% (516)
imixs-ml-training_1 | ...... quality level LOW = 31.07% (233)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 2.2084385109690565
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.73% (508)
imixs-ml-training_1 | ...... quality level LOW = 32.27% (242)
imixs-ml-training_1 | ...... quality level BAD = 0% (0)
imixs-ml-training_1 | ...... average NER = 2.1797281610496464
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.2% (504)
imixs-ml-training_1 | ...... quality level LOW = 32.67% (245)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.8908819163368502
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 66% (495)
imixs-ml-training_1 | ...... quality level LOW = 33.87% (254)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.7774978150912477
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.6% (507)
imixs-ml-training_1 | ...... quality level LOW = 32.27% (242)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.669098427922433
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.33% (505)
imixs-ml-training_1 | ...... quality level LOW = 32.53% (244)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.6048149396167861
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.6% (507)
imixs-ml-training_1 | ...... quality level LOW = 32.27% (242)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.4026393956412981
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 67.87% (509)
imixs-ml-training_1 | ...... quality level LOW = 32% (240)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.1139796046407426
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 65.87% (494)
imixs-ml-training_1 | ...... quality level LOW = 34% (255)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.2621875029460226
page=1 (count=1000)
--------------------------------
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.47% (476)
imixs-ml-training_1 | ...... quality level LOW = 36.4% (273)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 3.7501272727903876
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64% (480)
imixs-ml-training_1 | ...... quality level LOW = 35.87% (269)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 2.7749715296165482
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 65.47% (491)
imixs-ml-training_1 | ...... quality level LOW = 34.27% (257)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 2.191986221088383
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.2% (474)
imixs-ml-training_1 | ...... quality level LOW = 36.53% (274)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.836000005105162
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64.8% (486)
imixs-ml-training_1 | ...... quality level LOW = 34.93% (262)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.629252182245437
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64.27% (482)
imixs-ml-training_1 | ...... quality level LOW = 35.47% (266)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.5023185259959349
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.6% (477)
imixs-ml-training_1 | ...... quality level LOW = 36.13% (271)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.1618358977500587
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64.93% (487)
imixs-ml-training_1 | ...... quality level LOW = 34.93% (262)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.1362052688492958
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64.4% (483)
imixs-ml-training_1 | ...... quality level LOW = 35.33% (265)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.0497074333838767
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 65.33% (490)
imixs-ml-training_1 | ...... quality level LOW = 34.4% (258)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 0.8865013575787167
page=1 (count=1000)
--------------------------------
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.33% (475)
imixs-ml-training_1 | ...... quality level LOW = 36.4% (273)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.6325150460009787
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 61.73% (463)
imixs-ml-training_1 | ...... quality level LOW = 38% (285)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.5385085364524884
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.6% (477)
imixs-ml-training_1 | ...... quality level LOW = 36.13% (271)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.343965340697668
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64.13% (481)
imixs-ml-training_1 | ...... quality level LOW = 35.73% (268)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 1.1842750119930687
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.73% (478)
imixs-ml-training_1 | ...... quality level LOW = 36% (270)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 1.112559219903824
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 62.8% (471)
imixs-ml-training_1 | ...... quality level LOW = 36.93% (277)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 0.9444137586901881
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 64% (480)
imixs-ml-training_1 | ...... quality level LOW = 35.73% (268)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 0.9175624525798468
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 63.47% (476)
imixs-ml-training_1 | ...... quality level LOW = 36.27% (272)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 0.8877949306723629
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 62.53% (469)
imixs-ml-training_1 | ...... quality level LOW = 37.2% (279)
imixs-ml-training_1 | ...... quality level BAD = 0.27% (2)
imixs-ml-training_1 | ...... average NER = 0.7669201996298972
imixs-ml-training_1 |
imixs-ml-training_1 | ......documents trained in total = 750
imixs-ml-training_1 | ...... quality level GOOD = 62.8% (471)
imixs-ml-training_1 | ...... quality level LOW = 37.07% (278)
imixs-ml-training_1 | ...... quality level BAD = 0.13% (1)
imixs-ml-training_1 | ...... average NER = 0.7161310708827515

View file

@ -1,128 +0,0 @@
[paths]
train = null
dev = null
vectors = null
init_tok2vec = null
[system]
seed = 0
gpu_allocator = null
[nlp]
lang = "de"
pipeline = ["ner"]
disabled = []
before_creation = null
after_creation = null
after_pipeline_creation = null
batch_size = 1000
tokenizer = {"@tokenizers":"spacy.Tokenizer.v1"}
[components]
[components.ner]
factory = "ner"
incorrect_spans_key = null
moves = null
scorer = {"@scorers":"spacy.ner_scorer.v1"}
update_with_oracle_cut_size = 100
[components.ner.model]
@architectures = "spacy.TransitionBasedParser.v2"
state_type = "ner"
extra_state_tokens = false
hidden_width = 64
maxout_pieces = 2
use_upper = true
nO = null
[components.ner.model.tok2vec]
@architectures = "spacy.HashEmbedCNN.v2"
pretrained_vectors = null
width = 96
depth = 4
embed_size = 2000
window_size = 1
maxout_pieces = 3
subword_features = true
[corpora]
[corpora.dev]
@readers = "spacy.Corpus.v1"
path = ${paths.dev}
gold_preproc = false
max_length = 0
limit = 0
augmenter = null
[corpora.train]
@readers = "spacy.Corpus.v1"
path = ${paths.train}
gold_preproc = false
max_length = 0
limit = 0
augmenter = null
[training]
seed = ${system.seed}
gpu_allocator = ${system.gpu_allocator}
dropout = 0.1
accumulate_gradient = 1
patience = 1600
max_epochs = 0
max_steps = 20000
eval_frequency = 200
frozen_components = []
annotating_components = []
dev_corpus = "corpora.dev"
train_corpus = "corpora.train"
before_to_disk = null
[training.batcher]
@batchers = "spacy.batch_by_words.v1"
discard_oversize = false
tolerance = 0.2
get_length = null
[training.batcher.size]
@schedules = "compounding.v1"
start = 100
stop = 1000
compound = 1.001
t = 0.0
[training.logger]
@loggers = "spacy.ConsoleLogger.v1"
progress_bar = false
[training.optimizer]
@optimizers = "Adam.v1"
beta1 = 0.9
beta2 = 0.999
L2_is_weight_decay = true
L2 = 0.01
grad_clip = 1.0
use_averages = false
eps = 0.00000001
learn_rate = 0.001
[training.score_weights]
ents_f = 1.0
ents_p = 0.0
ents_r = 0.0
ents_per_type = null
[pretraining]
[initialize]
vectors = ${paths.vectors}
init_tok2vec = ${paths.init_tok2vec}
vocab_data = null
lookups = null
before_init = null
after_init = null
[initialize.components]
[initialize.tokenizer]

View file

@ -1,38 +0,0 @@
{
"lang":"de",
"name":"pipeline",
"version":"0.0.0",
"spacy_version":">=3.4.1,<3.5.0",
"description":"",
"author":"",
"email":"",
"url":"",
"license":"",
"spacy_git_version":"Unknown",
"vectors":{
"width":0,
"vectors":0,
"keys":0,
"name":null,
"mode":"default"
},
"labels":{
"ner":[
"cdtr.bic",
"cdtr.iban",
"cdtr.name",
"invoice.date",
"invoice.number",
"invoice.total"
]
},
"pipeline":[
"ner"
],
"components":[
"ner"
],
"disabled":[
]
}

View file

@ -1,13 +0,0 @@
{
"moves":null,
"update_with_oracle_cut_size":100,
"multitasks":[
],
"min_action_freq":1,
"learn_tokens":false,
"beam_width":1,
"beam_density":0.0,
"beam_update_prob":0.0,
"incorrect_spans_key":null
}

Binary file not shown.

View file

@ -1 +0,0 @@
¥movesÚÄ{"0":{},"1":{"invoice.total":-1,"invoice.number":-2,"cdtr.name":-3,"invoice.date":-4,"cdtr.iban":-5,"cdtr.bic":-6},"2":{"invoice.total":-1,"invoice.number":-2,"cdtr.name":-3,"invoice.date":-4,"cdtr.iban":-5,"cdtr.bic":-6},"3":{"invoice.total":-1,"invoice.number":-2,"cdtr.name":-3,"invoice.date":-4,"cdtr.iban":-5,"cdtr.bic":-6},"4":{"":1,"invoice.total":-1,"invoice.number":-2,"cdtr.name":-3,"invoice.date":-4,"cdtr.iban":-5,"cdtr.bic":-6},"5":{"":1}}£cfg<66>§neg_keyÀ

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
<EFBFBD>

View file

@ -1 +0,0 @@
<EFBFBD>

File diff suppressed because it is too large Load diff

View file

@ -1,3 +0,0 @@
{
"mode":"default"
}

View file

@ -1,127 +0,0 @@
[paths]
train = null
dev = null
vectors = null
init_tok2vec = null
[system]
seed = 0
gpu_allocator = null
[nlp]
lang = "de"
pipeline = ["ner"]
disabled = []
before_creation = null
after_creation = null
after_pipeline_creation = null
batch_size = 1000
tokenizer = {"@tokenizers":"spacy.Tokenizer.v1"}
[components]
[components.ner]
factory = "ner"
incorrect_spans_key = null
moves = null
update_with_oracle_cut_size = 100
[components.ner.model]
@architectures = "spacy.TransitionBasedParser.v2"
state_type = "ner"
extra_state_tokens = false
hidden_width = 64
maxout_pieces = 2
use_upper = true
nO = null
[components.ner.model.tok2vec]
@architectures = "spacy.HashEmbedCNN.v2"
pretrained_vectors = null
width = 96
depth = 4
embed_size = 2000
window_size = 1
maxout_pieces = 3
subword_features = true
[corpora]
[corpora.dev]
@readers = "spacy.Corpus.v1"
path = ${paths.dev}
gold_preproc = false
max_length = 0
limit = 0
augmenter = null
[corpora.train]
@readers = "spacy.Corpus.v1"
path = ${paths.train}
gold_preproc = false
max_length = 0
limit = 0
augmenter = null
[training]
seed = ${system.seed}
gpu_allocator = ${system.gpu_allocator}
dropout = 0.1
accumulate_gradient = 1
patience = 1600
max_epochs = 0
max_steps = 20000
eval_frequency = 200
frozen_components = []
annotating_components = []
dev_corpus = "corpora.dev"
train_corpus = "corpora.train"
before_to_disk = null
[training.batcher]
@batchers = "spacy.batch_by_words.v1"
discard_oversize = false
tolerance = 0.2
get_length = null
[training.batcher.size]
@schedules = "compounding.v1"
start = 100
stop = 1000
compound = 1.001
t = 0.0
[training.logger]
@loggers = "spacy.ConsoleLogger.v1"
progress_bar = false
[training.optimizer]
@optimizers = "Adam.v1"
beta1 = 0.9
beta2 = 0.999
L2_is_weight_decay = true
L2 = 0.01
grad_clip = 1.0
use_averages = false
eps = 0.00000001
learn_rate = 0.001
[training.score_weights]
ents_f = 1.0
ents_p = 0.0
ents_r = 0.0
ents_per_type = null
[pretraining]
[initialize]
vectors = ${paths.vectors}
init_tok2vec = ${paths.init_tok2vec}
vocab_data = null
lookups = null
before_init = null
after_init = null
[initialize.components]
[initialize.tokenizer]

View file

@ -1,40 +0,0 @@
{
"lang":"de",
"name":"pipeline",
"version":"0.0.0",
"spacy_version":">=3.1.1,<3.2.0",
"description":"",
"author":"",
"email":"",
"url":"",
"license":"",
"spacy_git_version":"ffaead8fe",
"vectors":{
"width":0,
"vectors":0,
"keys":0,
"name":null
},
"labels":{
"ner":[
"cdtr.bic",
"cdtr.iban",
"cdtr.name",
"invoice.date",
"invoice.number",
"invoice.total"
]
},
"pipeline":[
"ner"
],
"components":[
"ner"
],
"disabled":[
],
"_sourced_vectors_hashes":{
}
}

View file

@ -1,13 +0,0 @@
{
"moves":null,
"update_with_oracle_cut_size":100,
"multitasks":[
],
"min_action_freq":1,
"learn_tokens":false,
"beam_width":1,
"beam_density":0.0,
"beam_update_prob":0.0,
"incorrect_spans_key":null
}

View file

@ -1 +0,0 @@
¥movesÚÄ{"0":{},"1":{"cdtr.name":-1,"cdtr.iban":-2,"cdtr.bic":-3,"invoice.total":-4,"invoice.date":-5,"invoice.number":-6},"2":{"cdtr.name":-1,"cdtr.iban":-2,"cdtr.bic":-3,"invoice.total":-4,"invoice.date":-5,"invoice.number":-6},"3":{"cdtr.name":-1,"cdtr.iban":-2,"cdtr.bic":-3,"invoice.total":-4,"invoice.date":-5,"invoice.number":-6},"4":{"":1,"cdtr.name":-1,"cdtr.iban":-2,"cdtr.bic":-3,"invoice.total":-4,"invoice.date":-5,"invoice.number":-6},"5":{"":1}}£cfg<66>§neg_keyÀ

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
<EFBFBD>

View file

@ -1 +0,0 @@
<EFBFBD>

File diff suppressed because it is too large Load diff

View file

@ -1,128 +0,0 @@
[paths]
train = null
dev = null
vectors = null
init_tok2vec = null
[system]
seed = 0
gpu_allocator = null
[nlp]
lang = "de"
pipeline = ["ner"]
disabled = []
before_creation = null
after_creation = null
after_pipeline_creation = null
batch_size = 1000
tokenizer = {"@tokenizers":"spacy.Tokenizer.v1"}
[components]
[components.ner]
factory = "ner"
incorrect_spans_key = null
moves = null
scorer = {"@scorers":"spacy.ner_scorer.v1"}
update_with_oracle_cut_size = 100
[components.ner.model]
@architectures = "spacy.TransitionBasedParser.v2"
state_type = "ner"
extra_state_tokens = false
hidden_width = 64
maxout_pieces = 2
use_upper = true
nO = null
[components.ner.model.tok2vec]
@architectures = "spacy.HashEmbedCNN.v2"
pretrained_vectors = null
width = 96
depth = 4
embed_size = 2000
window_size = 1
maxout_pieces = 3
subword_features = true
[corpora]
[corpora.dev]
@readers = "spacy.Corpus.v1"
path = ${paths.dev}
gold_preproc = false
max_length = 0
limit = 0
augmenter = null
[corpora.train]
@readers = "spacy.Corpus.v1"
path = ${paths.train}
gold_preproc = false
max_length = 0
limit = 0
augmenter = null
[training]
seed = ${system.seed}
gpu_allocator = ${system.gpu_allocator}
dropout = 0.1
accumulate_gradient = 1
patience = 1600
max_epochs = 0
max_steps = 20000
eval_frequency = 200
frozen_components = []
annotating_components = []
dev_corpus = "corpora.dev"
train_corpus = "corpora.train"
before_to_disk = null
[training.batcher]
@batchers = "spacy.batch_by_words.v1"
discard_oversize = false
tolerance = 0.2
get_length = null
[training.batcher.size]
@schedules = "compounding.v1"
start = 100
stop = 1000
compound = 1.001
t = 0.0
[training.logger]
@loggers = "spacy.ConsoleLogger.v1"
progress_bar = false
[training.optimizer]
@optimizers = "Adam.v1"
beta1 = 0.9
beta2 = 0.999
L2_is_weight_decay = true
L2 = 0.01
grad_clip = 1.0
use_averages = false
eps = 0.00000001
learn_rate = 0.001
[training.score_weights]
ents_f = 1.0
ents_p = 0.0
ents_r = 0.0
ents_per_type = null
[pretraining]
[initialize]
vectors = ${paths.vectors}
init_tok2vec = ${paths.init_tok2vec}
vocab_data = null
lookups = null
before_init = null
after_init = null
[initialize.components]
[initialize.tokenizer]

View file

@ -1,38 +0,0 @@
{
"lang":"de",
"name":"pipeline",
"version":"0.0.0",
"spacy_version":">=3.4.1,<3.5.0",
"description":"",
"author":"",
"email":"",
"url":"",
"license":"",
"spacy_git_version":"Unknown",
"vectors":{
"width":0,
"vectors":0,
"keys":0,
"name":null,
"mode":"default"
},
"labels":{
"ner":[
"cdtr.bic",
"cdtr.iban",
"cdtr.name",
"invoice.date",
"invoice.number",
"invoice.total"
]
},
"pipeline":[
"ner"
],
"components":[
"ner"
],
"disabled":[
]
}

View file

@ -1,13 +0,0 @@
{
"moves":null,
"update_with_oracle_cut_size":100,
"multitasks":[
],
"min_action_freq":1,
"learn_tokens":false,
"beam_width":1,
"beam_density":0.0,
"beam_update_prob":0.0,
"incorrect_spans_key":null
}

Binary file not shown.

View file

@ -1 +0,0 @@
¥movesÚÄ{"0":{},"1":{"invoice.total":-1,"invoice.number":-2,"invoice.date":-3,"cdtr.name":-4,"cdtr.iban":-5,"cdtr.bic":-6},"2":{"invoice.total":-1,"invoice.number":-2,"invoice.date":-3,"cdtr.name":-4,"cdtr.iban":-5,"cdtr.bic":-6},"3":{"invoice.total":-1,"invoice.number":-2,"invoice.date":-3,"cdtr.name":-4,"cdtr.iban":-5,"cdtr.bic":-6},"4":{"":1,"invoice.total":-1,"invoice.number":-2,"invoice.date":-3,"cdtr.name":-4,"cdtr.iban":-5,"cdtr.bic":-6},"5":{"":1}}£cfg<66>§neg_keyÀ

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
<EFBFBD>

View file

@ -1 +0,0 @@
<EFBFBD>

File diff suppressed because it is too large Load diff

View file

@ -1,3 +0,0 @@
{
"mode":"default"
}

View file

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Workflow Instance -->
<item name="workflow.endpoint"><value xsi:type="xs:string">https://alexander-logistics.office-workflow.de/api/</value></item>
<item name="workflow.userid"><value xsi:type="xs:string">admin</value></item>
<item name="workflow.password"><value xsi:type="xs:string">imixs4.null</value></item>
<!-- -->
<item name="workflow.query"><value xsi:type="xs:string">($workflowgroup:"Rechnungseingang" OR $workflowgroup:"Sachrechnung") AND ($taskid:5900)</value></item>
<item name="workflow.pagesize"><value xsi:type="xs:int">100</value></item>
<item name="workflow.pageindex"><value xsi:type="xs:int">30</value></item>
<item name="workflow.entities">
<value xsi:type="xs:string">cdtr.name</value>
<value xsi:type="xs:string">cdtr.iban</value>
<value xsi:type="xs:string">cdtr.bic</value>
<value xsi:type="xs:string">invoice.total</value>
<value xsi:type="xs:string">invoice.date</value>
<value xsi:type="xs:string">invoice.number</value>
</item>
<item name="workflow.locale">
<value xsi:type="xs:string">en_GB</value>
<value xsi:type="xs:string">en_US</value>
<value xsi:type="xs:string">de_DE</value>
</item>
<!-- Tika OCR Server -->
<item name="tika.ocrmode"><value xsi:type="xs:string">OCR_ONLY</value></item>
<item name="tika.options">
<value xsi:type="xs:string">X-Tika-OCRLanguage=eng+deu</value>
<value xsi:type="xs:string">X-Tika-PDFocrStrategy=OCR_ONLY</value>
</item>
<!-- ML spaCy Server -->
<item name="ml.validation.endpoint"><value xsi:type="xs:string">http://imixs-ml-spacy:8000/</value></item>
<item name="ml.validation.model"><value xsi:type="xs:string">invoice-de-0.1.0</value></item>
<item name="ml.validation.filepattern"><value xsi:type="xs:string">.pdf|.PDF</value></item>
</document>

View file

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Workflow Instance -->
<item name="workflow.endpoint"><value xsi:type="xs:string">https://alexander-logistics.office-workflow.de/api/</value></item>
<item name="workflow.userid"><value xsi:type="xs:string">admin</value></item>
<item name="workflow.password"><value xsi:type="xs:string">imixs4.null</value></item>
<item name="workflow.entities">
<value xsi:type="xs:string">cdtr.name</value>
<value xsi:type="xs:string">cdtr.iban</value>
<value xsi:type="xs:string">cdtr.bic</value>
<value xsi:type="xs:string">invoice.total</value>
<value xsi:type="xs:string">invoice.date</value>
<value xsi:type="xs:string">invoice.number</value>
</item>
<item name="workflow.locale">
<value xsi:type="xs:string">en_GB</value>
<value xsi:type="xs:string">en_US</value>
<value xsi:type="xs:string">de_DE</value>
</item>
<!-- Tika OCR Server -->
<item name="tika.ocrmode"><value xsi:type="xs:string">OCR_ONLY</value></item>
<item name="tika.options">
<value xsi:type="xs:string">X-Tika-OCRLanguage=eng+deu</value>
<value xsi:type="xs:string">X-Tika-PDFocrStrategy=OCR_ONLY</value>
</item>
<!-- ML spaCy Server -->
<item name="ml.training.endpoint"><value xsi:type="xs:string">http://imixs-ml-spacy:8000/</value></item>
<item name="ml.training.model"><value xsi:type="xs:string">invoice-de-0.2.0</value></item>
<item name="ml.training.filepattern"><value xsi:type="xs:string">.pdf|.PDF</value></item>
<!-- LOW | GOOD -->
<item name="ml.training.quality"><value xsi:type="xs:string">LOW</value></item>
<!-- Define the training set and taining mode -->
<item name="workflow.query"><value xsi:type="xs:string">($workflowgroup:"Rechnungseingang" OR $workflowgroup:"Sachrechnung") AND ($taskid:5900)</value></item>
<item name="workflow.pagesize"><value xsi:type="xs:int">1000</value></item>
<item name="workflow.pageindex"><value xsi:type="xs:int">0</value></item>
<item name="ml.training.iterations"><value xsi:type="xs:string">5</value></item>
<item name="ml.training.dropoutrate"><value xsi:type="xs:string">0.0</value></item>
<item name="ml.options">
<value xsi:type="xs:string">min_losses=0.0&amp;retrain_rate=100</value>
</item>
</document>

View file

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Workflow Instance -->
<item name="workflow.endpoint"><value xsi:type="xs:string">https://alexander-logistics.office-workflow.de/api/</value></item>
<item name="workflow.userid"><value xsi:type="xs:string">admin</value></item>
<item name="workflow.password"><value xsi:type="xs:string">imixs4.null</value></item>
<item name="workflow.entities">
<value xsi:type="xs:string">cdtr.name</value>
<value xsi:type="xs:string">cdtr.iban</value>
<value xsi:type="xs:string">cdtr.bic</value>
<value xsi:type="xs:string">invoice.total</value>
<value xsi:type="xs:string">invoice.date</value>
<value xsi:type="xs:string">invoice.number</value>
</item>
<item name="workflow.locale">
<value xsi:type="xs:string">en_GB</value>
<value xsi:type="xs:string">en_US</value>
<value xsi:type="xs:string">de_DE</value>
</item>
<!-- Tika OCR Server -->
<item name="tika.ocrmode"><value xsi:type="xs:string">OCR_ONLY</value></item>
<item name="tika.options">
<value xsi:type="xs:string">X-Tika-OCRLanguage=eng+deu</value>
<value xsi:type="xs:string">X-Tika-PDFocrStrategy=OCR_ONLY</value>
</item>
<!-- ML spaCy Server -->
<item name="ml.training.endpoint"><value xsi:type="xs:string">http://imixs-ml-spacy:8000/</value></item>
<item name="ml.training.model"><value xsi:type="xs:string">invoice-de-0.2.0</value></item>
<item name="ml.training.filepattern"><value xsi:type="xs:string">.pdf|.PDF</value></item>
<!-- LOW | GOOD -->
<item name="ml.training.quality"><value xsi:type="xs:string">LOW</value></item>
<!-- Define the training set and taining mode -->
<item name="workflow.query"><value xsi:type="xs:string">($workflowgroup:"Rechnungseingang" OR $workflowgroup:"Sachrechnung") AND ($taskid:5900)</value></item>
<item name="workflow.pagesize"><value xsi:type="xs:int">100</value></item>
<item name="workflow.pageindex"><value xsi:type="xs:int">40</value></item>
</document>

View file

@ -1 +0,0 @@
/target/

View file

@ -1,395 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>office-alexander-logistics</artifactId>
<groupId>com.alexander-logistics</groupId>
<version>1.3.2</version>
</parent>
<artifactId>office-alexander-logistics-app</artifactId>
<packaging>war</packaging>
<name>Imixs Office Workflow App</name>
<profiles>
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>install</phase>
<configuration>
<target>
<exec executable="docker">
<arg value="build" />
<arg value="-t" />
<arg value="imixs/${imixs-office.applicationname}" />
<arg value="../." />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>debug</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>install</phase>
<configuration>
<target>
<exec executable="docker">
<arg value="build" />
<arg value="-f" />
<arg value="../Dockerfile-wildfly-debug" />
<arg value="-t" />
<arg value="imixs/${imixs-office.applicationname}" />
<arg value="../." />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>kubernetes</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>install</phase>
<configuration>
<target>
<exec executable="docker">
<arg value="build" />
<arg value="-t" />
<arg
value="imixs/${imixs-office.applicationname}:${project.version}" />
<arg value="../." />
</exec>
<exec executable="docker">
<arg value="tag" />
<arg
value="imixs/${imixs-office.applicationname}:${project.version}" />
<arg
value="${org.imixs.kubernetes.registry}/imixs/${imixs-office.applicationname}:${project.version}" />
</exec>
<exec executable="docker">
<arg value="push" />
<arg
value="${org.imixs.kubernetes.registry}/imixs/${imixs-office.applicationname}:${project.version}" />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<testResources>
<testResource>
<directory>${basedir}/../reports</directory>
</testResource>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<filtering>true</filtering>
<!-- this is relative to the pom.xml directory -->
<directory>${custom.webResources}</directory>
<includes>
<include>**/WEB-INF/*</include>
<!-- include any other file types you want to filter -->
</includes>
</resource>
</webResources>
<workDirectory>target/overlay-war-folder</workDirectory>
<!-- We exclude libs form the parent WAR artifact -->
<overlays>
<overlay>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-office-workflow-app</artifactId>
<excludes>
<exclude>WEB-INF/lib/*.jar</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
</plugin>
<plugin>
<groupId>org.imixs.maven</groupId>
<artifactId>manik-hotdeploy-maven-plugin</artifactId>
<version>2.0.0</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- List Source and Target folders for Autodeploy and Hotdeploy -->
<autodeployments>
<deployment>
<!-- wildcard deployment -->
<source>target/*.{war,ear,jar}</source>
<target>../docker/deployments/</target>
<unpack>true</unpack>
</deployment>
</autodeployments>
<hotdeployments>
<deployment>
<source>src/main/webapp</source>
<target>../docker/deployments/office-alexander-logistics.war</target>
</deployment>
</hotdeployments>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Imixs Workflow -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-core</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-engine</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-jax-rs</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-faces</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-index-lucene</artifactId>
<scope>compile</scope>
</dependency>
<!-- Marty -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-marty</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- Imixs-Office-Workflow -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-office-workflow-app</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-office-workflow-util</artifactId>
<scope>compile</scope>
</dependency>
<!-- Imixs-Archive -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-archive-api</artifactId>
<scope>compile</scope>
</dependency>
<!-- Imixs-Archive Documents -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-archive-documents</artifactId>
<scope>compile</scope>
</dependency>
<!-- Imixs-Archive Importer -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-archive-importer</artifactId>
<scope>compile</scope>
</dependency>
<!-- SEPA Adapter -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-adapters-sepa</artifactId>
<scope>compile</scope>
</dependency>
<!-- DATEV Adapter -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-adapters-datev</artifactId>
<scope>compile</scope>
</dependency>
<!-- QR Code -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-adapters-qrcode</artifactId>
<scope>compile</scope>
</dependency>
<!-- POI Adapter -->
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-adapters-poi</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-ai-workflow</artifactId>
<version>${org.imixs.ai.version}</version>
<scope>compile</scope>
</dependency>
<!-- xsl 2.0 support for Reporting / Chart Diagrams -->
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
</dependency>
<!-- Apache PDFBox -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${apache.pdfbox.version}</version>
<scope>compile</scope>
</dependency>
<!-- Apache Commons FTP Client -->
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.6</version>
</dependency>
<!-- Microsoft oauth token -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.3</version>
<scope>test</scope>
</dependency>
<!-- JUnit Tests
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
-->
<!-- JAX-RS 2.0 Test dependencies -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>3.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.3.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>3.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View file

@ -1,659 +0,0 @@
package com.alexanderlogistics;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.ParseException;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.imixs.marty.team.TeamService;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.data.WorkflowController;
import org.imixs.workflow.office.forms.AnalyticController;
import org.imixs.workflow.office.forms.AnalyticEvent;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.enterprise.event.Observes;
import jakarta.inject.Inject;
import jakarta.inject.Named;
/**
* Der AGLAnalyticControllerDebitor berechnet verschiedene Analyse Daten von
* Ausgangsrechnungen
*
* @author rsoika
*
*/
@Named
@ConversationScoped
public class AGLAnalyticControllerDebitor implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(AnalyticController.class.getName());
@Inject
protected DocumentService documentService;
@Inject
protected AGLConfigController aglConfigController;
@Inject
protected WorkflowController workflowController;
@Inject
TeamService teamService;
TreeMap<String, DebitorStatistikData> stats = null;
List<ItemCollection> invoices = null;
int countAll = 0;
int countOpen = 0;
int countDue = 0;
int countDunning = 0;
double totalAllCurrency1 = 0;
double totalAllCurrency2 = 0;
double totalOpenCurrency1 = 0;
double totalOpenCurrency2 = 0;
double totalDueCurrency1 = 0;
double totalDueCurrency2 = 0;
double totalDunningCurrency1 = 0;
double totalDunningCurrency2 = 0;
double averagePaymentDue = 0;
double averagePaymentDays = 0;
String chartData = "";
public void onEvent(@Observes AnalyticEvent event) {
if (!"workitem".equals(event.getWorkitem().getType())) {
// no op
return;
}
if (!event.getWorkitem().getModelVersion().startsWith("businesspartner")
&& !event.getWorkitem().getModelVersion().startsWith("analyse-debitor")) {
// no op
return;
}
String dbtrNumber = event.getWorkitem().getItemValueString("dbtr.number");
String dbtrNumberLast = event.getWorkitem().getItemValueString("dbtr.number.last");
// Recompute only if last dbtr.number has changed or no values yet computed
// load all invoices?
if (invoices == null || (!dbtrNumber.isEmpty() && !dbtrNumber.equals(dbtrNumberLast))) {
resetStats(event);
event.getWorkitem().setItemValue("dbtr.number.last", dbtrNumber);
logger.info("Analyse new debitor data for : " + dbtrNumber);
loadRechnungen(event);
chartData = buildChartData();
}
// use cache?
if (event.getWorkitem().hasItem(event.getKey())) {
// logger.info(" use cache for " + event.getKey());
// no op
return;
}
String link = "/pages/workitems/worklist.xhtml" + "?phrase=" + getDbtNr();
logger.fine("process ref=" + workflowController.getWorkitem().getItemValueString("process.ref"));
ItemCollection process = documentService
.load(workflowController.getWorkitem().getItemValueString("process.ref"));
if (process != null) {
link = link + "&processref=" + process.getUniqueID()
+ "&phrase=" + getDbtNr();
}
if ("analytic.invoices.count.all".equals(event.getKey())) {
event.setValue("" + countAll);
event.setLabel(formatTotals(totalAllCurrency1, totalAllCurrency2));
event.setDescription("Total invoices");
event.getWorkitem().setItemValue("invoices.total", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.count.open".equals(event.getKey())) {
event.setValue("" + countOpen);
event.setLabel(formatTotals(totalOpenCurrency1, totalOpenCurrency2));
event.setDescription("Total invoices not yet in due");
event.getWorkitem().setItemValue("invoices.total.open", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.count.due".equals(event.getKey())) {
event.setValue("" + countDue);
event.setLabel(formatTotals(totalDueCurrency1, totalDueCurrency2));
event.setDescription("Total invoices in due");
event.getWorkitem().setItemValue("invoices.total.due", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.count.dunning".equals(event.getKey())) {
event.setValue("" + countDunning);
event.setLabel(formatTotals(totalDunningCurrency1, totalDunningCurrency2));
event.setDescription("Total invoices in dunning");
event.getWorkitem().setItemValue("invoices.total.dunning", event.getValue());
event.setLink(link);
}
if ("analytic.payment.avg.due".equals(event.getKey())) {
event.setValue("" + averagePaymentDue);
event.setLabel("days");
event.setDescription("Average terms of credit in the last 12 months.");
event.getWorkitem().setItemValue("payment.avg.due", event.getValue());
event.setLink(link);
}
if ("analytic.payment.avg.days".equals(event.getKey())) {
event.setValue("" + averagePaymentDays);
event.setLabel("days");
event.setDescription("Average duration for payment during the last 12 months.");
event.getWorkitem().setItemValue("payment.avg.days", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.trend".equals(event.getKey())) {
event.setValue(chartData);
event.setLabel("Payment duration in days");
event.setDescription("Payment practice by week");
}
}
/**
* Formatiert zwei währungen untereinander
*
* @param totalCurrency1
* @param totalCurrency2
* @return
*/
private String formatTotals(double totalCurrency1, double totalCurrency2) {
List<String> currencies = aglConfigController.getWorkitem().getItemValueList("currency.out", String.class);
if (currencies.size() < 2) {
currencies.add(currencies.get(0));
}
String label = "<span class=\"pull-right\">" + formatCurrency(totalCurrency1) + " " + currencies.get(0)
+ "</span>";
label = label + "</br><span class=\"pull-right\">" +
formatCurrency(totalCurrency2) + " " + currencies.get(1) + "</span>";
return label;
}
private void loadRechnungen(AnalyticEvent event) {
if (getDbtNr().isEmpty()) {
invoices = new ArrayList();
stats = null;
} else {
logger.info(" ├──load invoices for " + getDbtNr() + "....");
String query = "(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $modelversion:rechnungsausgang-*";
try {
logger.info(" ├──refresh invoice stats for " + getDbtNr() + "....");
invoices = documentService.find(query, 999, 0, "$created", false);
calculateStats(event);
} catch (QueryException e) {
logger.warning("Failed to query invoices: " + query + " - Error: " + e.getMessage());
invoices = new ArrayList();
}
}
}
/**
* Läd die statistik daten zu einem debitor aus den aktuellen Rechnungen
*/
private void calculateStats(AnalyticEvent event) {
countAll = 0;
countOpen = 0;
countDue = 0;
countDunning = 0;
logger.info(" ├──calculate stats for " + getDbtNr() + "....");
// do we have data?
if (invoices != null && invoices.size() > 0) {
countAll = invoices.size();
for (ItemCollection invoice : invoices) {
// währung 1 oder 2?
if (invoice.getItemValueDouble("invoice.rate") == 0) {
totalAllCurrency1 = totalAllCurrency1 + invoice.getItemValueDouble("invoice.saldo");
} else {
totalAllCurrency2 = totalAllCurrency2 + invoice.getItemValueDouble("invoice.saldo");
}
int task = invoice.getTaskID();
// Open
if (task >= 5000 && task <= 5099) {
countOpen++;
// währung 1 oder 2?
if (invoice.getItemValueDouble("invoice.rate") == 0) {
totalOpenCurrency1 = totalOpenCurrency1 + invoice.getItemValueDouble("invoice.saldo");
} else {
totalOpenCurrency2 = totalOpenCurrency2 + invoice.getItemValueDouble("invoice.saldo");
}
}
// Due
if (task >= 5100 && task <= 5199) {
countDue++;
// währung 1 oder 2?
if (invoice.getItemValueDouble("invoice.rate") == 0) {
totalDueCurrency1 = totalDueCurrency1 + invoice.getItemValueDouble("invoice.saldo");
} else {
totalDueCurrency2 = totalDueCurrency2 + invoice.getItemValueDouble("invoice.saldo");
}
}
// Dunning
if (task >= 5200) {
countDunning++;
// währung 1 oder 2?
if (invoice.getItemValueDouble("invoice.rate") == 0) {
totalDunningCurrency1 = totalDunningCurrency1 + invoice.getItemValueDouble("invoice.saldo");
} else {
totalDunningCurrency2 = totalDunningCurrency2 + invoice.getItemValueDouble("invoice.saldo");
}
}
}
totalAllCurrency1 = InvoiceUtil.round(totalAllCurrency1);
totalAllCurrency2 = InvoiceUtil.round(totalAllCurrency2);
totalOpenCurrency1 = InvoiceUtil.round(totalOpenCurrency1);
totalOpenCurrency2 = InvoiceUtil.round(totalOpenCurrency2);
totalDueCurrency1 = InvoiceUtil.round(totalDueCurrency1);
totalDueCurrency2 = InvoiceUtil.round(totalDueCurrency2);
totalDunningCurrency1 = InvoiceUtil.round(totalDunningCurrency1);
totalDunningCurrency2 = InvoiceUtil.round(totalDunningCurrency2);
} else {
// reset data because no invoices are available ...
resetStats(event);
}
}
/**
* Setzt alle Statistikwerte zurück
*/
private void resetStats(AnalyticEvent event) {
logger.info(" ├──reset stats for " + getDbtNr() + "....");
stats = null;
totalAllCurrency1 = 0;
totalAllCurrency2 = 0;
totalOpenCurrency1 = 0;
totalOpenCurrency2 = 0;
totalDueCurrency1 = 0;
totalDueCurrency2 = 0;
totalDunningCurrency1 = 0;
totalDunningCurrency2 = 0;
// chartData = null;
chartData = "{}";
averagePaymentDue = 0;
averagePaymentDays = 0;
event.getWorkitem().removeItem("analytic.invoices.count.all");
event.getWorkitem().removeItem("analytic.invoices.count.open");
event.getWorkitem().removeItem("analytic.invoices.count.due");
event.getWorkitem().removeItem("analytic.invoices.count.dunning");
event.getWorkitem().removeItem("analytic.payment.avg.due");
event.getWorkitem().removeItem("analytic.payment.avg.days");
event.getWorkitem().removeItem("analytic.invoices.trend");
}
private void getDurchschnittZahlungsziel() {
if (stats == null) {
averagePaymentDue = 0;
return;
}
int count = 0;
long gesamt = 0;
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
DebitorStatistikData statData = entry.getValue();
if (statData.count > 0) {
gesamt = gesamt + statData.getAverageDueDays();
count++;
}
}
averagePaymentDue = Math.round((double) gesamt / count);
}
private void getDurchschnittZahlungsdauer() {
if (stats == null) {
averagePaymentDays = 0;
return;
}
int count = 0;
long gesamt = 0;
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
DebitorStatistikData statData = entry.getValue();
if (statData.count > 0) {
gesamt = gesamt + statData.getAveragePaymentDays();
count++;
}
}
averagePaymentDays = Math.round((double) gesamt / count);
}
private String formatCurrency(Double value) {
DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.getDefault());
symbols.setGroupingSeparator('.');
symbols.setDecimalSeparator(',');
DecimalFormat formatter = new DecimalFormat("#,##0.00", symbols);
return formatter.format(value);
}
/**
* Hilfsmethode die das fuehrende K/D aus der Debitorennummer entfernt
*
* @return
*/
private String getDbtNr() {
String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number");
if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) {
dbtNr = dbtNr.substring(1);
}
return dbtNr;
}
/**
* Sucht alle Rechnugnen aus einem Zeitraum und sammelt Zahlungsziel und
* Zahlungszeitspanne gruppiert nach monaten
*
*/
public Map<String, DebitorStatistikData> loadStats() {
if (stats != null) {
return stats;
}
logger.info(" ├──load stats for " + getDbtNr() + "....");
// recompute
stats = new TreeMap<String, DebitorStatistikData>();
if (getDbtNr().isEmpty()) {
return stats;
}
// Letzen 12 Monate
LocalDate endDate = LocalDate.now();
LocalDate startDate = endDate.minusMonths(12);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
String startDateStr = startDate.format(formatter);
String endDateStr = endDate.format(formatter);
String query = "(type:workitemarchive) AND "
+ " invoice.date:[" + startDateStr + " TO " + endDateStr + "] AND "
+ "dbtr.number:" + getDbtNr()
+ " AND $modelversion:rechnungsausgang-* AND ($taskid:[5900 TO 5999])";
logger.fine("query = " + query);
try {
List<ItemCollection> invoices = documentService
.findStubs(query, 9999, 0, "$created", false);
for (ItemCollection invoice : invoices) {
try {
logger.fine("Rechnung: " + invoice.getUniqueID());
Date invoiceDate = invoice.getItemValueDate("invoice.date");
Date invoiceDueDate = invoice.getItemValueDate("invoice.duedate");
Date paymentDate = findPaymentDateByWorkitem(invoice);
if (paymentDate == null) {
logger.fine("Es wurde kein Zahlungseingang gefunden");
continue;
}
if (invoiceDate != null && paymentDate != null && invoiceDueDate != null) {
// do we have a stats object?
DebitorStatistikData statData = stats.get(getYearMonth(invoiceDate));
if (statData == null) {
// create a new one
statData = new DebitorStatistikData(invoiceDate);
}
// jetzt irgendwas ausrechnen
statData.compute(invoiceDate, invoiceDueDate, paymentDate);
// .. und wieder speichern
stats.put(statData.toString(), statData);
} else {
logger.warning("No payment Date found for invoice " + invoice.getUniqueID());
}
} catch (ParseException e) {
logger.warning("Unable to parse payment Date for invoice " + invoice.getUniqueID());
}
}
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
// Step 2: Sort the list based on the alphanumeric order of the keys
completeMissingMonths();
// berechne zahluntsziel durchscnitt
getDurchschnittZahlungsziel();
getDurchschnittZahlungsdauer();
return stats;
}
/**
* Finds the payment.date for a invoice.
*
* Wir suchen alle zugeordneten Zahlungseingägne und nehmen den letzten.
*
* WICHTIG: Es muss ggf. der index neu aufgebaut werden, da payment.date nun ein
* index feld ist
*
* @param invoice
* @return
* @throws ParseException
*/
public Date findPaymentDateByWorkitem(ItemCollection invoice) throws ParseException {
// Wir selektieren alle Zahlungseingänge interessieren uns aber nur für den
// letzten
String sQuery = " (type:\"workitem\" OR type:\"workitemarchive\") " + //
" AND ($modelversion:zahlungseingang-*) AND ($workitemref:\""
+ invoice.getUniqueID() + "\" )";
List<ItemCollection> workitems = null;
try {
workitems = documentService.findStubs(sQuery, 99, 0,
"payment.date", true);
if (workitems.size() > 0) {
return workitems.get(0).getItemValueDate("payment.date");
}
} catch (QueryException e) {
e.printStackTrace();
}
// no date found!
return null;
}
/**
* Diese Methode baut die Datenstruktur für das Chart Diagram zusammen
*
*
* <pre>
{
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: 'Dataset 1',
//backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
//borderColor: window.chartColors.red,
borderWidth: 1,
data: [
70, 70, 70, 70, 79, 50, 50
]
}, {
label: 'Dataset 2',
//backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
//borderColor: window.chartColors.blue,
borderWidth: 1,
data: [
70, 70, 170, 7, 79, 50, 50
]
}]
}
* </pre>
*
* @return
*/
public String buildChartData() {
loadStats();
logger.info(" ├──build chart for " + getDbtNr() + "....");
// build a list of all lables....
List<String> statusLabels = new ArrayList<String>();
Set<String> keys = stats.keySet();
for (String _key : keys) {
statusLabels.add(_key);
}
String result = "{\n \"type\": \"bar\",\n \"data\": { ";
// Lables
result = result + "\"labels\" : [ ";
result = result + statusLabels.stream().collect(Collectors.joining("\",\"", "\"", "\""));
result = result + "],";
result = result + "\"datasets\": [";
// Datasets 1
result = result + "{\"label\": \"Days for payment\",\"borderWidth\": 1,";
result = result + " \"borderColor\": [\"#3B6B82\"],";
result = result + " \"backgroundColor\" : [\"#CFE9F5\"], \"fill\": true,\"tension\": 0.5,";
result = result + "\"data\": [";
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
result = result + entry.getValue().getAverageDueDays() + ",";
}
// cut last comma
if (result.endsWith(",")) {
result = result.substring(0, result.length() - 1);
}
result = result + "]";
result = result + "}, ";
// Datasets 2
result = result + "{\"label\": \"Payment duration\",\"borderWidth\": 1,";
result = result
+ " \"borderColor\": [\"#E73B65\"],\"backgroundColor\" : [\"#70B088\" ], \"tension\": 0.5,\"fill\": true,";
result = result
+ " \"trendlineLinear\": { \"colorMin\": \"red\", \"colorMax\": \"green\", \"lineStyle\": \"dotted\", \"width\": 2 , \"projection\": true },";
result = result + "\"data\": [";
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
result = result + entry.getValue().getAveragePaymentDays() + ",";
}
// cut last comma
if (result.endsWith(",")) {
result = result.substring(0, result.length() - 1);
}
result = result + "]";
result = result + "} ";
// ende
result = result + "] }";
result = result + "}";
return result;
}
/**
* Hilfsmethode ergänzt die fehlenden Monate
*
* @param yearMonths
* @return
*/
private void completeMissingMonths() {
if (stats == null || stats.size() < 3) {
return;
}
// Convert the list of strings to a list of LocalDate objects
List<LocalDate> dates = new ArrayList<>();
Set<String> yearMonths = this.stats.keySet();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
for (String yearMonth : yearMonths) {
dates.add(YearMonth.parse(yearMonth, formatter).atDay(1));
}
// Find the lowest and highest dates
LocalDate lowestDate = Collections.min(dates);
LocalDate highestDate = Collections.max(dates);
LocalDate current = lowestDate;
current = current.plusMonths(1);
while (!current.isAfter(highestDate)) {
// existiert der monat?
String formattedDate = current.format(formatter);
DebitorStatistikData entry = stats.get(formattedDate);
if (entry == null) {
// add missing entry
stats.put(formattedDate, new DebitorStatistikData(current.getYear(), current.getMonthValue()));
}
current = current.plusMonths(1);
}
}
/**
* returns
*
* 202304 from a given date
*/
public String getYearMonth(Date date) {
// Create a Calendar instance and set the date
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
// Get the year from the Calendar object
int year = calendar.get(Calendar.YEAR);
// Get the month from the Calendar object
int month = calendar.get(Calendar.MONTH);
// Increment the month by 1 since Calendar months are zero-based
month++;
// Convert the month to a String with leading "0" if necessary
return "" + year + (month < 10 ? "0" + month : "" + month);
}
}

View file

@ -1,208 +0,0 @@
package com.alexanderlogistics;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;
import java.util.TreeMap;
import java.util.logging.Logger;
import org.imixs.marty.team.TeamService;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.data.WorkflowController;
import org.imixs.workflow.faces.util.ResourceBundleHandler;
import org.imixs.workflow.office.forms.AnalyticController;
import org.imixs.workflow.office.forms.AnalyticEvent;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.enterprise.event.Observes;
import jakarta.inject.Inject;
import jakarta.inject.Named;
/**
* Der AGLAnalyticControllerOPListe berechnet Analyse Daten über alle offenen
* Rechnungen
* und bietet im Workflow noch eine Excel-Export Funktion
*
* @author rsoika
*
*/
@Named
@ConversationScoped
public class AGLAnalyticControllerOPListe implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(AnalyticController.class.getName());
@Inject
protected DocumentService documentService;
@Inject
protected AGLConfigController aglConfigController;
@Inject
protected WorkflowController workflowController;
@Inject
TeamService teamService;
@Inject
ResourceBundleHandler resourceBundleHandler;
TreeMap<String, DebitorStatistikData> stats = null;
String departmentID;
String departmentIDLast = null;
// String departmentName;
ItemCollection department;
int countAll = 0;
int countOpen = 0;
int countDue = 0;
int countDunning = 0;
boolean refreshCalculation = false;
public void onEvent(@Observes AnalyticEvent event) {
if (!event.getWorkitem().getModelVersion().contains("analyse-opliste-")) {
// no op
return;
}
department = null;
departmentID = event.getWorkitem().getItemValueString("space.ref");
if (departmentIDLast == null || !departmentID.equals(departmentIDLast)) {
department = documentService.load(departmentID);
if (department != null) {
event.getWorkitem().setItemValue("space.name", department.getItemValueString("name"));
}
departmentIDLast = departmentID;
resetStats(event);
calculateStats();
refreshCalculation = true;
}
// use cache?
if (event.getWorkitem().hasItem(event.getKey())) {
// logger.info(" use cache for " + event.getKey());
// no op
return;
}
String link = "/pages/workitems/worklist.xhtml";
logger.fine("process ref=" + workflowController.getWorkitem().getItemValueString("process.ref"));
ItemCollection process = documentService
.load(workflowController.getWorkitem().getItemValueString("process.ref"));
if (process != null) {
link = link + "?processref=" + process.getUniqueID() // + "&modelversion=rechnungsausgang*"
+ "&spaceref=" + departmentID;
}
if ("analytic.invoices.count.all".equals(event.getKey())) {
event.setValue("" + countAll);
event.setLabel(resourceBundleHandler.findMessage("oplist.invoices"));
event.setDescription(resourceBundleHandler.findMessage("oplist.invoices.description.all"));
event.getWorkitem().setItemValue("invoices.total", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.count.open".equals(event.getKey())) {
event.setValue("" + (countOpen));
event.setLabel(resourceBundleHandler.findMessage("oplist.invoices"));
event.setDescription(resourceBundleHandler.findMessage("oplist.invoices.description.open"));
event.getWorkitem().setItemValue("invoices.total.open", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.count.due".equals(event.getKey())) {
event.setValue("" + countDue);
event.setLabel(resourceBundleHandler.findMessage("oplist.invoices"));
event.setDescription(resourceBundleHandler.findMessage("oplist.invoices.description.due"));
event.getWorkitem().setItemValue("invoices.total.due", event.getValue());
event.setLink(link);
}
if ("analytic.invoices.count.dunning".equals(event.getKey())) {
event.setValue("" + countDunning);
event.setLabel(resourceBundleHandler.findMessage("oplist.invoices"));
event.setDescription(resourceBundleHandler.findMessage("oplist.invoices.description.dunning"));
event.getWorkitem().setItemValue("invoices.total.dunning", event.getValue());
event.setLink(link);
}
}
/**
* Reset cached analytic keys
*/
private void resetStats(AnalyticEvent event) {
event.getWorkitem().removeItem("analytic.invoices.count.all");
event.getWorkitem().removeItem("analytic.invoices.count.open");
event.getWorkitem().removeItem("analytic.invoices.count.due");
event.getWorkitem().removeItem("analytic.invoices.count.dunning");
}
/**
* Läd die statistik daten zu einem department die Anzahl an aktuellen
* Rechnungen zu ermitteln
*
* int countAll = 0;
* int countOpen = 0;
* int countDue = 0;
* int countDunning = 0;
*
*/
private void calculateStats() {
long l = System.currentTimeMillis();
countAll = 0;
countDue = 0;
countDunning = 0;
logger.info(" ├──calculate stats for " + departmentID + "....");
try {
if (departmentID == null || !departmentID.isEmpty()) {
countAll = documentService.count("(type:workitem) AND $uniqueidref:" + departmentID
+ " AND $modelversion:rechnungsausgang-*");
countDue = documentService.count("(type:workitem) AND $uniqueidref:" + departmentID
+ " AND $modelversion:rechnungsausgang-* AND $taskid:[5100 TO 5199]");
countDunning = documentService.count("(type:workitem) AND $uniqueidref:" + departmentID
+ " AND $modelversion:rechnungsausgang-* AND $taskid:[5200 TO 5399]");
countOpen = countAll - countDue - countDunning;
} else {
// countAll=documentService.count("(type:workitem OR type:workitemarchive) AND
// $modelversion:rechnungsausgang-*")
countAll = documentService.count("(type:workitem) AND $modelversion:rechnungsausgang-*");
countDue = documentService
.count("(type:workitem) AND $modelversion:rechnungsausgang-* AND $taskid:[5100 TO 5199]");
countDunning = documentService
.count("(type:workitem) AND $modelversion:rechnungsausgang-* AND $taskid:[5200 TO 5399]");
countOpen = countAll - countDue - countDunning;
}
} catch (QueryException e) {
logger.warning("Failed to query invoices: " + e.getMessage());
}
logger.info(" ├──calculate stats took " + (System.currentTimeMillis() - l) + "ms");
}
private String formatCurrency(Double value) {
DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.getDefault());
symbols.setGroupingSeparator('.');
symbols.setDecimalSeparator(',');
DecimalFormat formatter = new DecimalFormat("#,##0.00", symbols);
return formatter.format(value);
}
}

View file

@ -1,532 +0,0 @@
package com.alexanderlogistics;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import org.imixs.marty.team.TeamService;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.data.WorkflowController;
import org.imixs.workflow.office.forms.AnalyticController;
import org.imixs.workflow.office.forms.AnalyticEvent;
import jakarta.enterprise.context.RequestScoped;
import jakarta.enterprise.event.Observes;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import jakarta.json.Json;
import jakarta.json.JsonArrayBuilder;
import jakarta.json.JsonObject;
import jakarta.json.JsonObjectBuilder;
/**
* Der AGLAnalyticController berechnet verschiedene Analyse Daten
*
* @author rsoika
*
*/
@Named
@RequestScoped
public class AGLAnalyticControllerSteuer implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(AnalyticController.class.getName());
@Inject
protected DocumentService documentService;
@Inject
TeamService teamService;
@Inject
protected WorkflowController workflowController;
@Inject
protected DebitorStatistikController debitorStatistikController;
List<ItemCollection> steuerbescheide = null;
public void onEvent(@Observes AnalyticEvent event) {
if (!"workitem".equals(event.getWorkitem().getType())
|| !event.getWorkitem().getModelVersion().startsWith("analyse-steuer")) {
// no op
return;
}
ItemCollection process = documentService
.load(workflowController.getWorkitem().getItemValueString("process.ref"));
String link = "/pages/workitems/worklist.xhtml";
if (process != null) {
link = link + "?processref=" + process.getUniqueID()
+ "&workflowgroup=Steuerbescheid";
}
if ("analytic.steuer.eust".equals(event.getKey())) {
event.setValue(computeSteuerbescheideEUST());
event.setLabel("EUR");
event.setDescription("Gesamt Einfuhrumsatzsteuer (EUSt)");
event.getWorkitem().setItemValue("eust.total", event.getValue());
event.setLink(link);
}
if ("analytic.steuer.zoll".equals(event.getKey())) {
event.setValue(computeSteuerbescheideZoll());
event.setLabel("EUR");
event.setDescription("Gesamt Zölle (ZOLLEU)");
event.setLink(link);
}
if ("analytic.steuer.total".equals(event.getKey())) {
event.setValue(computeSteuerbescheideTotal());
event.setLabel("EUR");
event.setDescription("Alle Steuerbescheide die noch nicht abgerechnet wurden.");
event.setLink(link);
}
if ("analytic.steuer.saldo".equals(event.getKey())) {
event.setValue(computeSteuerbescheideSaldo());
event.setLabel("EUR");
event.setDescription("Saldo aller Steuerbescheide die noch nicht abgerechnet wurden.");
event.setLink(link);
}
if ("analytic.steuer.due".equals(event.getKey())) {
event.setValue(computeSteuerbescheideSaldoDue());
event.setLabel("EUR");
event.setDescription("Saldo aller überfälligen Steuerbescheide die noch nicht abgerechnet wurden.");
// event.setLink(link + "&task=Überfällig");
event.setLink(link + "&task=1200");
}
// Charts
if ("analytic.steuer.trend".equals(event.getKey())) {
event.setValue(accumulateSteuerbescheideByWeek());
event.setLabel("Zoll & EUST");
event.setDescription("Fälligkeiten nach KW");
}
if ("analytic.steuer.trend.abteilung".equals(event.getKey())) {
event.setValue(accumulateSteuerbescheideAbteilungByWeek());
event.setLabel("Nach Abteilungen");
event.setDescription("Offene Salden nach KW pro Abteilung");
}
}
/**
* Berechnet die Summe aller offenen EUST Beträge
* // tax.code=[0], amount=[3885.16], activity.type=[EUST],
* // filenumber=[LA-PAP-2408-024]}
*
* @return
*/
private double computeSteuerbescheideEUST() {
logger.fine("compute EUST...");
List<ItemCollection> list = getSteuerbescheide();
double result = 0;
for (ItemCollection steuerItemCol : list) {
result = result + getZollBySteuerBeleg(steuerItemCol, "EUST");
}
return InvoiceUtil.round(result);
}
/**
* Berechnet die Summe aller offenen Zoll Beträge
*
* @return
*/
private double computeSteuerbescheideZoll() {
logger.fine("compute Zoll...");
List<ItemCollection> list = getSteuerbescheide();
double result = 0;
for (ItemCollection steuerItemCol : list) {
result = result + getZollBySteuerBeleg(steuerItemCol, "ZOLL");
}
return InvoiceUtil.round(result);
}
/**
* Berechnet die Summe aller überfälligen steuer Beträge $taskID=1200
*
* @return
*/
private double computeSteuerbescheideSaldo() {
logger.fine("compute saldo...");
List<ItemCollection> list = getSteuerbescheide();
double result = 0;
for (ItemCollection steuerItemCol : list) {
result = result + steuerItemCol.getItemValueDouble("invoice.saldo");
}
return InvoiceUtil.round(result);
}
/**
* Berechnet die Summe aller überfälligen steuer Beträge $taskID=1200
*
* @return
*/
private double computeSteuerbescheideTotal() {
logger.fine("compute total...");
List<ItemCollection> list = getSteuerbescheide();
double result = 0;
for (ItemCollection steuerItemCol : list) {
result = result + steuerItemCol.getItemValueDouble("invoice.total.net");
}
return InvoiceUtil.round(result);
}
/**
* Berechnet die Summe aller überfälligen steuer Beträge $taskID=1200
*
* @return
*/
private double computeSteuerbescheideSaldoDue() {
logger.fine("compute EUST...");
List<ItemCollection> list = getSteuerbescheide();
double result = 0;
for (ItemCollection steuerItemCol : list) {
if (steuerItemCol.getTaskID() == 1200) {
result = result + steuerItemCol.getItemValueDouble("invoice.saldo");
}
}
return InvoiceUtil.round(result);
}
/**
* Berechnet die summ zoll/eust für einen Beleg
*
* @param steuerItemCol
* @return
*/
private double getZollBySteuerBeleg(ItemCollection steuerItemCol, String type) {
double result = 0;
List<ItemCollection> positionsTabelle = InvoiceUtil.explodeChildList(steuerItemCol);
for (ItemCollection pos : positionsTabelle) {
if (type.equalsIgnoreCase(pos.getItemValueString("activity.type"))) {
result = result + pos.getItemValueDouble("amount");
}
}
return result;
}
private List<ItemCollection> getSteuerbescheide() {
if (steuerbescheide != null) {
return steuerbescheide;
}
// compute steuerbescheide....
logger.info("Load Steuerbescheide for analytics....");
String query = "(type:workitem ) AND ($workflowgroup:\"Steuerbescheid\")";
try {
steuerbescheide = documentService.find(query, 999, 0, "$created", false);
return steuerbescheide;
} catch (QueryException e) {
logger.severe("Failed to get invoices: " + e.getMessage());
}
return null;
}
/**
* Berechnet Chart daten aller Steuerbescheide bei KW
*
* <pre>
*
chartCfg = {
type: 'bar',
data: {
datasets: [{
data: [20, 10],
}],
labels: ['1', '2']
}
}
*
* </pre>
*
* @return
*/
private String accumulateSteuerbescheideByWeek() {
logger.fine("accumulate steuer by week...");
List<ItemCollection> list = getSteuerbescheide();
Map<Integer, SteuerData> saldoByWeek = new HashMap<>();
Calendar calendar = Calendar.getInstance();
int earliestWeek = Integer.MAX_VALUE;
int latestWeek = Integer.MIN_VALUE;
// Step 1: Group saldo by week
for (ItemCollection steuerItemCol : list) {
double saldo = steuerItemCol.getItemValueDouble("invoice.saldo");
double total = steuerItemCol.getItemValueDouble("invoice.total.net");
Date date = steuerItemCol.getItemValueDate("invoice.date");
// Get the week number and year from the date
calendar.setTime(date);
int weekNumber = calendar.get(Calendar.WEEK_OF_YEAR);
int year = calendar.get(Calendar.YEAR);
int yearWeek = year * 100 + weekNumber; // Unique key for each year + week combination
// Accumulate the saldo per week
SteuerData steuerDataByWeek = saldoByWeek.getOrDefault(yearWeek, new SteuerData());
double eust = getZollBySteuerBeleg(steuerItemCol, "EUST");
double zoll = getZollBySteuerBeleg(steuerItemCol, "ZOLL");
steuerDataByWeek.add(eust, zoll, total, saldo, "");
saldoByWeek.put(yearWeek, steuerDataByWeek);
// Track the earliest and latest weeks
earliestWeek = Math.min(earliestWeek, yearWeek);
latestWeek = Math.max(latestWeek, yearWeek);
}
// Step 2: Prepare the JSON structure and ensure we have all weeks from earliest
// to latest
JsonArrayBuilder dataBuilderSaldo = Json.createArrayBuilder();
JsonArrayBuilder dataBuilderEust = Json.createArrayBuilder();
JsonArrayBuilder dataBuilderZoll = Json.createArrayBuilder();
JsonArrayBuilder labelsBuilder = Json.createArrayBuilder();
Calendar startCal = Calendar.getInstance();
startCal.set(Calendar.YEAR, earliestWeek / 100);
startCal.set(Calendar.WEEK_OF_YEAR, earliestWeek % 100);
Calendar endCal = Calendar.getInstance();
endCal.set(Calendar.YEAR, latestWeek / 100);
endCal.set(Calendar.WEEK_OF_YEAR, latestWeek % 100);
while (!startCal.after(endCal)) {
int weekNumber = startCal.get(Calendar.WEEK_OF_YEAR);
int year = startCal.get(Calendar.YEAR);
int yearWeek = year * 100 + weekNumber;
// Add the saldo for the week or 0.0 if no data
SteuerData steuerData = saldoByWeek.getOrDefault(yearWeek, new SteuerData());
dataBuilderSaldo.add(steuerData.saldo);
dataBuilderEust.add(steuerData.eust);
dataBuilderZoll.add(steuerData.zoll);
labelsBuilder.add(weekNumber + "/" + year); // Label as 'week/year'
// Move to the next week
startCal.add(Calendar.WEEK_OF_YEAR, 1);
}
// Step 3: Prepare the JSON structure
JsonObjectBuilder jsonBuilder = Json.createObjectBuilder()
.add("type", "bar")
.add("data", Json.createObjectBuilder()
.add("datasets", Json.createArrayBuilder()
.add(Json.createObjectBuilder() // First dataset for 'tax'
.add("label", "Zoll")
.add("backgroundColor", "#96f")
.add("borderWidth", 1)
.add("data", dataBuilderZoll))
.add(Json.createObjectBuilder() // Second dataset for 'eust'
.add("label", "EUSt")
.add("backgroundColor", "#36a2eb")
.add("borderWidth", 1)
.add("data", dataBuilderEust))
.add(Json.createObjectBuilder() // Third dataset for 'Saldo'
.add("label", "Saldo")
.add("backgroundColor", "#ff6384")
.add("borderWidth", 1)
.add("data", dataBuilderSaldo)))
.add("labels", labelsBuilder));
// Step 4: Return the JSON structure as a string
JsonObject chartCfg = jsonBuilder.build();
return chartCfg.toString();
}
/**
* Berechnet Chart daten aller Steuerbescheide bei KW
*
* <pre>
*
chartCfg = {
type: 'bar',
data: {
datasets: [{
data: [20, 10],
}],
labels: ['1', '2']
}
}
*
* </pre>
*
* @return
*/
private String accumulateSteuerbescheideAbteilungByWeek() {
logger.fine("accumulate steuer by Abteilung week...");
String[] colors = {
"#36a2eb",
"#ff6384",
"#4bc0c0",
"#ff9f40",
"#96f",
"#ffcd56",
"#c9cbcf"
};
List<ItemCollection> list = getSteuerbescheide();
Map<String, SteuerData> totalByWeek = new HashMap<>();
Calendar calendar = Calendar.getInstance();
int earliestWeek = Integer.MAX_VALUE;
int latestWeek = Integer.MIN_VALUE;
List<String> abteilungsListe = new ArrayList<>();
// Step 1: Group total by week
for (ItemCollection steuerItemCol : list) {
String abteilung = steuerItemCol.getItemValueString("space.name");
if (abteilung.isEmpty()) {
abteilung = "Keine Zuordnung";
}
if (!abteilungsListe.contains(abteilung)) {
abteilungsListe.add(abteilung);
}
double saldo = steuerItemCol.getItemValueDouble("invoice.saldo");
double total = steuerItemCol.getItemValueDouble("invoice.total.net");
Date date = steuerItemCol.getItemValueDate("invoice.date");
logger.fine(".... " + steuerItemCol.getItemValueString("$workflowSummary") + " = " + total);
// Get the week number and year from the date
calendar.setTime(date);
int weekNumber = calendar.get(Calendar.WEEK_OF_YEAR);
int year = calendar.get(Calendar.YEAR);
int yearWeek = year * 100 + weekNumber;
String key = abteilung + "~" + yearWeek;// Unique key Import Forest~202405
// Accumulate the total per week
SteuerData steuerDataByWeek = totalByWeek.getOrDefault(key, new SteuerData());
double eust = getZollBySteuerBeleg(steuerItemCol, "EUST");
double zoll = getZollBySteuerBeleg(steuerItemCol, "ZOLL");
steuerDataByWeek.add(eust, zoll, total, saldo, abteilung);
totalByWeek.put(key, steuerDataByWeek);
// Track the earliest and latest weeks
earliestWeek = Math.min(earliestWeek, yearWeek);
latestWeek = Math.max(latestWeek, yearWeek);
}
// Step 2: Prepare the JSON structure and ensure we have all weeks from earliest
// to latest
JsonArrayBuilder labelsBuilder = Json.createArrayBuilder();
Calendar startCal = Calendar.getInstance();
startCal.set(Calendar.YEAR, earliestWeek / 100);
startCal.set(Calendar.WEEK_OF_YEAR, earliestWeek % 100);
Calendar endCal = Calendar.getInstance();
endCal.set(Calendar.YEAR, latestWeek / 100);
endCal.set(Calendar.WEEK_OF_YEAR, latestWeek % 100);
// Build labels - je eines pro woche
while (!startCal.after(endCal)) {
int weekNumber = startCal.get(Calendar.WEEK_OF_YEAR);
int year = startCal.get(Calendar.YEAR);
labelsBuilder.add(weekNumber + "/" + year); // Label as 'week/year'
// Move to the next week
startCal.add(Calendar.WEEK_OF_YEAR, 1);
}
// Step 3: Baue die Balken pro abrteilung
JsonArrayBuilder datasets = Json.createArrayBuilder();
JsonObjectBuilder jsonBuilder = Json.createObjectBuilder()
.add("type", "bar");
JsonObjectBuilder dataDing = Json.createObjectBuilder();
int iColor = 0;
for (String _abteilung : abteilungsListe) {
JsonArrayBuilder dataBuilderTotals = Json.createArrayBuilder();
startCal = Calendar.getInstance();
startCal.set(Calendar.YEAR, earliestWeek / 100);
startCal.set(Calendar.WEEK_OF_YEAR, earliestWeek % 100);
endCal = Calendar.getInstance();
endCal.set(Calendar.YEAR, latestWeek / 100);
endCal.set(Calendar.WEEK_OF_YEAR, latestWeek % 100);
while (!startCal.after(endCal)) {
int weekNumber = startCal.get(Calendar.WEEK_OF_YEAR);
int year = startCal.get(Calendar.YEAR);
int yearWeek = year * 100 + weekNumber;
String key = _abteilung + "~" + yearWeek;// Unique key Import Forest~202405
// Add the total for the week or 0.0 if no data
SteuerData steuerData = totalByWeek.getOrDefault(key, new SteuerData());
logger.fine(" " + yearWeek + "=" + steuerData.total);
dataBuilderTotals.add(steuerData.total);
// Move to the next week
startCal.add(Calendar.WEEK_OF_YEAR, 1);
}
datasets.add(Json.createObjectBuilder() // First dataset for 'tax'
.add("label", _abteilung)
.add("backgroundColor", colors[iColor])
.add("borderWidth", 1)
.add("data", dataBuilderTotals));
iColor++;
if (iColor > colors.length) {
iColor = 0;
}
}
dataDing.add("datasets", datasets);
dataDing.add("labels", labelsBuilder);
jsonBuilder.add("data", dataDing);
// Step 4: Return the JSON structure as a string
JsonObject chartCfg = jsonBuilder.build();
return chartCfg.toString();
}
/**
* Helper method to hold zoll and eust totals in an object. Needed to build
* totals per week.
*/
class SteuerData {
double total = 0.0;
double zoll = 0.0;
double eust = 0.0;
double saldo = 0.0;
String abteilung = "";
public SteuerData() {
// default constructor
}
/**
* Adds new zoll and eust values and updates the total
*
* @param eustNew eust value to be added
* @param zollNew zoll value to be added
*/
public void add(double eustNew, double zollNew, double totalNew, double saldoNew, String abteilungNew) {
eust = eust + eustNew;
zoll = zoll + zollNew;
saldo = saldo + saldoNew;
total = total + totalNew;
abteilung = abteilungNew;
}
}
}

View file

@ -1,305 +0,0 @@
package com.alexanderlogistics;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import org.apache.poi.ss.usermodel.CellCopyPolicy;
import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.imixs.workflow.FileData;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.exceptions.AdapterException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.office.config.ConfigService;
import org.imixs.workflow.poi.POIFindReplaceAdapter;
import org.imixs.workflow.util.XMLParser;
import jakarta.inject.Inject;
/**
* Der AGLAnalyticExcelAdapter exportiert importiert eine Excel Datei aus einem
* Textblock und fügt die offenen Steuerbescheid Daten ein
*
* Der Adapter wird im Modell wie folgt konfiguriert
*
* <pre>
* {@code
<steuerbescheide name="excel-export">
<textblock>textblock-ref</textblock>
<template>filename</template>
<targetname>filename</targetname>
</steuerbescheide>
}
* </pre>
*
* <p>
* Der Adapter erweitert den POIAdapter somit können Felder aktualisiert werden
* (siehe POIFineReplaceAdapter).
*
* <p>
* Der Adapter kopiert die Steuerbescheiddaten in neue Zeilen, welche ab
* Zeilennummer
* 16 eingefügt werden.
* <p>
*
* Abschliessend wird die Zelle 'TOTAL' noch aktualisiert.
*
*
* @version 1.0
* @author rsoika
*/
public class AGLAnalyticExcelAdapter extends POIFindReplaceAdapter {
private static Logger logger = Logger.getLogger(AGLAnalyticExcelAdapter.class.getName());
@Inject
WorkflowService workflowService;
@Inject
InvoiceService opListExportService;
@Inject
DocumentService documentService;
@Inject
ConfigService configService;
/**
* This method finds or create the Zahlungsavis and adds a reference
* ($workitemref) to the current invoice.
*
* @throws PluginException
*/
@SuppressWarnings("unchecked")
@Override
public ItemCollection execute(ItemCollection document, ItemCollection event)
throws AdapterException, PluginException {
// ermittle die Hauptwährungen
ItemCollection configItemCollection = configService.loadConfiguration("AGL_CONFIGURATION");
List<String> currencyList = configItemCollection.getItemValue("currency.out");
if (currencyList == null || currencyList.size() < 2) {
throw new PluginException(AGLAnalyticExcelAdapter.class.getSimpleName(),
InvoiceService.ERROR_CONFIG,
"missing Currency configuration - please check parameters");
}
// read the Steuerbescheide options
ItemCollection steuerbescheideConfig = workflowService.evalWorkflowResult(event, "steuerbescheide",
document,
false);
if (steuerbescheideConfig == null || !steuerbescheideConfig.hasItem("excel-export")) {
throw new PluginException(AGLAnalyticExcelAdapter.class.getSimpleName(), CONFIG_ERROR,
"missing Steuerbescheide configuration in model event - please check model configuration");
}
List<String> excelDefList = steuerbescheideConfig.getItemValue("excel-export");
ItemCollection excelDefCollection = XMLParser.parseItemStructure(excelDefList.get(0));
String textblock = excelDefCollection.getItemValueString("textblock");
String template = excelDefCollection.getItemValueString("template");
String targetName = excelDefCollection.getItemValueString("target-name");
// adapt text....
targetName = workflowService.adaptText(targetName, document);
try {
appendExcelTemplate(document, textblock, template, targetName);
insertInvoiceRows(document, targetName);
logger.info("... loading poi configuration..");
// Process POI instructions
// read the config
ItemCollection poiConfig = workflowService.evalWorkflowResult(event, "poi-update", document,
false);
if (poiConfig == null || !poiConfig.hasItem("findreplace")) {
throw new PluginException(POIFindReplaceAdapter.class.getSimpleName(), CONFIG_ERROR,
"missing poi configuration");
}
List<String> replaceDevList = poiConfig.getItemValue("findreplace");
String eval = poiConfig.getItemValueString("eval");
logger.info("... update template with normal poi information..");
this.updateFileData(document.getFileData(targetName), document, replaceDevList, eval);
} catch (PluginException | IOException | QueryException e) {
throw new PluginException(AGLAnalyticExcelAdapter.class.getSimpleName(),
InvoiceService.ERROR_CONFIG,
"failed to update steuerbescheide: " + e.getMessage());
}
logger.info("... completed!");
return document;
}
/**
* This helper method inserts a row for each invoice at row 16
* into the excel template file
* <p>
* The method copies the Row A16 as a reference row
* <p>
* The named cell 'TOTAL' should contain the summary formula. It will be
* evaluated at the end.
*
* @throws PluginException
* @throws QueryException
*/
private void insertInvoiceRows(ItemCollection document, String fileName)
throws PluginException, QueryException {
// load dummy rechnungen
List<ItemCollection> invoices = loadSteuerbescheide();
FileData fileData = document.getFileData(fileName);
// load XSSFWorkbook
XSSFWorkbook doc = null;
try (InputStream imputStream = new ByteArrayInputStream(fileData.getContent())) {
doc = new XSSFWorkbook(imputStream);
// NOTE: we only take the first sheet !
XSSFSheet sheet = doc.getSheetAt(0);
CellReference invoiceRefCell = new CellReference("A11");
XSSFRow referenceRowInvoice = sheet.getRow(invoiceRefCell.getRow());
int referenceRowPos = 10;
int rowPos = referenceRowPos;
int lastRow = 2999;
logger.finest("Last rownum=" + lastRow);
// jetzt füge alle Rechnungen an.
int totalRowCount = invoices.size();
sheet.shiftRows(referenceRowPos, lastRow, totalRowCount, true, true);
for (ItemCollection invoice : invoices) {
logger.fine("......add invoice " + invoice.getUniqueID());
// now create a new line..
XSSFRow row = sheet.createRow(rowPos);
row.copyRowFrom(referenceRowInvoice, new CellCopyPolicy());
// insert values
row.getCell(0)
.setCellValue(invoice.getItemValueDate("$created"));
row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueString("invoice.number"));
row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDate("invoice.date"));
row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDate("invoice.booking_date"));
// Änderung Frau Mwangi am 5.12.2025
// Nun soll anstatt des Departments der Anmelder ausgegeben werden
// row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK)
// .setCellValue(invoice.getItemValueString("space.name"));
row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueString("steuer.anmelder"));
row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueString("invoice.text"));
row.getCell(6, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueString("invoice.atc.number"));
row.getCell(7, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDouble("invoice.total.net"));
row.getCell(8, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDouble("invoice.saldo"));
row.getCell(9, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDouble("steuer.eust"));
row.getCell(10, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDate("steuer.eust.due"));
row.getCell(11, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDouble("steuer.zoll"));
row.getCell(12, MissingCellPolicy.CREATE_NULL_AS_BLANK)
.setCellValue(invoice.getItemValueDate("steuer.zoll.due"));
rowPos++;
}
// Leerzeile
// categoryRow = sheet.createRow(rowPos);
rowPos++;
// write back the file
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
doc.write(byteArrayOutputStream);
byte[] newContent = byteArrayOutputStream.toByteArray();
FileData fileDataNew = new FileData(fileData.getName(), newContent, fileData.getContentType(),
null);
// update the fileData
document.addFileData(fileDataNew);
logger.finest("......new document added");
} catch (IOException e) {
throw new PluginException(AGLAnalyticExcelAdapter.class.getSimpleName(),
InvoiceService.ERROR_CONFIG,
"failed to update opliste: " + e.getMessage());
} finally {
if (doc != null) {
try {
doc.close();
} catch (IOException e) {
logger.severe("Failed to close workbook: " + e.getMessage());
e.printStackTrace();
}
}
}
}
/**
* This method loads a text-block for a specified ref and appends the named
* fileData object of this document.
*
* @param document
* @throws PluginException
*/
private void appendExcelTemplate(ItemCollection document, String textblockRef, String template,
String targetName)
throws PluginException {
if ((template == null || template.isEmpty()) || (textblockRef == null || textblockRef.isEmpty())) {
throw new PluginException(AGLAnalyticExcelAdapter.class.getSimpleName(),
InvoiceService.ERROR_CONFIG,
"invalid steuerbescheide configuration in model event - textblock/template reference not defined!");
}
// load the text block
FileData fileData = opListExportService.loadTextBlockFileData(textblockRef, template);
// do we found the document?
if (fileData == null) {
throw new PluginException(AGLAnalyticExcelAdapter.class.getSimpleName(),
InvoiceService.ERROR_CONFIG,
"invalid steuerbescheide configuration in model event - template=" + template
+ " not found!");
}
fileData.setName(targetName);
// append document
logger.info("...append new steuerbescheide Template: " + targetName);
document.addFileData(fileData);
}
/**
* Diese Methode läd alle offenen Steuerbescheide
*
* @return
*/
private List<ItemCollection> loadSteuerbescheide() {
List<ItemCollection> result = new ArrayList<>();
try {
result = documentService.find(
"$modelversion:steuerbescheid-* AND type:workitem", 9999, 0,
"invoice.number", false);
} catch (QueryException e) {
e.printStackTrace();
}
return result;
}
}

View file

@ -1,313 +0,0 @@
/*******************************************************************************
* Imixs Workflow Technology
* Copyright (C) 2003, 2008 Imixs Software Solutions GmbH,
* http://www.imixs.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You can receive a copy of the GNU General Public
* License at http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Imixs Software Solutions GmbH - initial API and implementation
* Ralph Soika
*
*******************************************************************************/
package com.alexanderlogistics;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.AccessDeniedException;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.data.WorkflowEvent;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.enterprise.event.Observes;
import jakarta.faces.context.FacesContext;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonObjectBuilder;
/**
* Der BusinessPartnerController stellt Methoden für die BusinessPartner Forms
* sowie für die das Suche-Widget 'businesspartner_search' bereit.
*
*
* @author rsoika
* @version 1.0
*/
@Named
@ConversationScoped
public class BusinessPartnerController implements Serializable {
private static final long serialVersionUID = 1L;
protected List<ItemCollection> ibanList = null;
protected List<ItemCollection> invoicesOut = null;
protected List<ItemCollection> invoicesIn = null;
protected List<ItemCollection> dunnings = null;
@Inject
DocumentService documentService;
@Inject
BusinessPartnerService businessPartnerService;
private List<BusinessPartnerSearchEntry> searchResult = null;
private static Logger logger = Logger.getLogger(BusinessPartnerController.class.getName());
public List<ItemCollection> getInvoicesOut() {
if (invoicesOut == null) {
invoicesOut = new ArrayList<>();
}
return invoicesOut;
}
public List<ItemCollection> getInvoicesIn() {
if (invoicesIn == null) {
invoicesIn = new ArrayList<>();
}
return invoicesIn;
}
public List<ItemCollection> getDunnings() {
if (dunnings == null) {
dunnings = new ArrayList<>();
}
return dunnings;
}
/**
* This method searches a text phrase within the list of DATEV kreditoren
* <p>
* JSF Integration:
*
* {@code
<h:commandScript name="datevSearch" action=
* "#{datevSearchController.searchCdtr()}"
* render="autocomplete-resultlist-datev" onevent="autocompleteShowResult" />
* }
*/
public void search(String regexPattern) {
List<ItemCollection> resultList = null;
searchResult = new ArrayList<BusinessPartnerSearchEntry>();
// get the param from faces context....
FacesContext fc = FacesContext.getCurrentInstance();
String phrase = fc.getExternalContext().getRequestParameterMap().get("phrase");
if (phrase == null) {
return;
}
logger.fine("search prase '" + phrase + "'");
if (phrase == null || phrase.length() < 2) {
return;
}
logger.fine("search for=" + phrase);
resultList = businessPartnerService.search(phrase);
// Compile the regex pattern
logger.fine("regex=" + regexPattern);
Pattern pattern = null;
if (regexPattern != null && !regexPattern.isEmpty()) {
pattern = Pattern.compile(regexPattern);
}
// Filter by Regex and convert ItemCollection into a BusinessPartnerSearchEntry
for (ItemCollection businessPartner : resultList) {
String name = businessPartner.getItemValueString("name");
// Prüfen, ob der name der Regex entspricht
if (pattern != null) {
Matcher matcher = pattern.matcher(name);
if (!matcher.matches()) {
// Kein passendes Konto
continue;
}
}
String display = businessPartner.getItemValueString("$workflowsummary");
display = display.replace("\"", "");
display = display.replace("'", "");
searchResult.add(new BusinessPartnerSearchEntry(name, display, buildJsonData(businessPartner)));
}
}
/**
* Die Resultliste wird als eine Liste einen Arrays zurückgegeben. Der Erste
* Eintrag
*
* @return
*/
public List<BusinessPartnerSearchEntry> getSearchResult() {
return searchResult;
}
/**
* WorkflowEvent listener to convert the IBAN child list embeded HashMaps into
* ItemCollections and reconvert them before processing
*
* @param workflowEvent
* @throws AccessDeniedException
*/
public void onWorkflowEvent(@Observes WorkflowEvent workflowEvent) throws AccessDeniedException {
int eventType = workflowEvent.getEventType();
ItemCollection workitem = workflowEvent.getWorkitem();
if (workitem == null || !workitem.getModelVersion().startsWith("businesspartner-")) {
return;
}
// reset orderItems if workItem has changed
if (WorkflowEvent.WORKITEM_CHANGED == eventType || WorkflowEvent.WORKITEM_CREATED == eventType) {
// reset state
ibanList = BusinessPartnerService.explodeBanks(workitem);
loadStats(workitem);
}
// before the workitem is saved we update the field txtOrderItems
if (WorkflowEvent.WORKITEM_BEFORE_PROCESS == eventType) {
BusinessPartnerService.implodeBanks(workitem, ibanList);
}
if (WorkflowEvent.WORKITEM_AFTER_PROCESS == eventType) {
// reset state
ibanList = BusinessPartnerService.explodeBanks(workitem);
}
}
/**
* Hilfsmethode die die offenen Rechnungen läd. Wird von WorktiemChanged Event
* aufgerufen.
*
* @param workitem
*/
private void loadStats(ItemCollection workitem) {
try {
// Ausgangsrechnungen
String dbtrNumber = workitem.getItemValueString("dbtr.number");
if (!dbtrNumber.isEmpty()) {
if (dbtrNumber.startsWith("D")) {
dbtrNumber = dbtrNumber.substring(1);
}
String query = "(type:workitem) AND ($modelversion:rechnungsausgang-*) "
+ " AND (dbtr.number:" + dbtrNumber + ")";
invoicesOut = documentService.findStubs(query, 999, 0, "invoice.number", false);
// Mahnungen
query = "(type:workitem) AND ($modelversion:mahnlauf-*) "
+ " AND (dbtr.number:" + dbtrNumber + ")";
dunnings = documentService.findStubs(query, 999, 0, "invoice.number", false);
}
// Eingangsrechnungen
String cdtrNumber = workitem.getItemValueString("cdtr.number");
if (!cdtrNumber.isEmpty()) {
String query = "(type:workitem) AND ($modelversion:rechnungseingang-*) "
+ " AND (cdtr.number:" + cdtrNumber + ")";
invoicesIn = documentService.findStubs(query, 999, 0, "invoice.number", false);
}
} catch (QueryException e) {
logger.severe("failed to load stats: " + e.getMessage());
}
}
public List<ItemCollection> getIbanList() {
return ibanList;
}
public void addIBAN() {
if (ibanList == null) {
ibanList = new ArrayList<ItemCollection>();
}
ItemCollection source = new ItemCollection();
ibanList.add(source);
}
/**
* Removes an dbtr item from the list
*
* @param name - name of dbtr
*/
public void removeIBAN(String id) {
if (id != null && ibanList != null) {
for (ItemCollection cdtr : ibanList) {
if (id.equals(cdtr.getItemValueString("id"))) {
ibanList.remove(cdtr);
break;
}
}
}
}
/**
* Hilfsmethode die eine JSON Struktur mit allen relevanten Daten für einen
* BusinessPartner erzeugt.
*
* @return
*/
private String buildJsonData(ItemCollection businessPartner) {
JsonObjectBuilder objectBuilder = Json.createObjectBuilder(). //
add("name", jsonVal(businessPartner.getItemValueString("name"))). //
add("cdtr.number", jsonVal(businessPartner.getItemValueString("cdtr.number"))). //
add("dbtr.number", jsonVal(businessPartner.getItemValueString("dbtr.number"))). //
add("partner.name", jsonVal(businessPartner.getItemValueString("partner.name")));
// get iban list
// {iban=[Dxxxxxx1], name=[Bank 1], id=[bank1], bic=[CITIDEFF]}
ibanList = BusinessPartnerService.getBanks(businessPartner);
int i = 1;
for (ItemCollection iban : ibanList) {
objectBuilder.add("iban" + 1, jsonVal(iban.getItemValueString("iban"))). //
add("bic" + 1, jsonVal(iban.getItemValueString("bic")));//
}
JsonObject jsonObject = objectBuilder.build();
String jsonString = "{}";
try (Writer writer = new StringWriter()) {
Json.createWriter(writer).write(jsonObject);
jsonString = writer.toString();
} catch (IOException e) {
logger.warning("Unable to build json structure");
}
return jsonString;
}
/**
* Helper method to remove " and ' characters - causing problems
*
* @param val
* @return
*/
public static String jsonVal(String val) {
val = val.replace("\"", "");
val = val.replace("'", "");
return val;
}
}

View file

@ -1,48 +0,0 @@
package com.alexanderlogistics;
/**
* Diese Kleine Hilfsklasse dient als DTO für die Übertragugn eines
* Sucheregenisses nach kreditoren an das Frontend. Die Klasse besteht aus einem
* Key, einer DisplayZeile für die Darstellung und einen JSON String der
* beliebige Daten enthalten kann.
*
* @author rsoika
*
*/
public class BusinessPartnerSearchEntry {
private String key;
private String display;
private String data;
public BusinessPartnerSearchEntry(String key, String display, String data) {
super();
this.key = key;
this.display = display;
this.data = data;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getDisplay() {
return display;
}
public void setDisplay(String display) {
this.display = display;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}

View file

@ -1,224 +0,0 @@
/*******************************************************************************
* Imixs Workflow
* Copyright (C) 2001, 2011 Imixs Software Solutions GmbH,
* http://www.imixs.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You can receive a copy of the GNU General Public
* License at http://www.gnu.org/licenses/gpl.html
*
* Project:
* http://www.imixs.org
* http://java.net/projects/imixs-workflow
*
* Contributors:
* Imixs Software Solutions GmbH - initial API and implementation
* Ralph Soika - Software Developer
*******************************************************************************/
package com.alexanderlogistics;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.logging.Logger;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ItemCollectionComparator;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.index.SchemaService;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.security.DeclareRoles;
import jakarta.annotation.security.RolesAllowed;
import jakarta.annotation.security.RunAs;
import jakarta.ejb.Singleton;
import jakarta.inject.Inject;
/**
* Der BusinessPartnerService stellt Methoden für den Zugriff auf Business
* Partner bereit.
*
* @author rsoika
*
*/
@DeclareRoles({ "org.imixs.ACCESSLEVEL.NOACCESS", "org.imixs.ACCESSLEVEL.READERACCESS",
"org.imixs.ACCESSLEVEL.AUTHORACCESS", "org.imixs.ACCESSLEVEL.EDITORACCESS",
"org.imixs.ACCESSLEVEL.MANAGERACCESS" })
@RolesAllowed({ "org.imixs.ACCESSLEVEL.NOACCESS", "org.imixs.ACCESSLEVEL.READERACCESS",
"org.imixs.ACCESSLEVEL.AUTHORACCESS", "org.imixs.ACCESSLEVEL.EDITORACCESS",
"org.imixs.ACCESSLEVEL.MANAGERACCESS" })
@Singleton
@RunAs("org.imixs.ACCESSLEVEL.MANAGERACCESS")
public class BusinessPartnerService {
public static final int MAX_SEARCH_RESULT = 100;
public static final String ITEM_IBAN_LIST = "partner.bank.list";
public static final String WORKFLOW_SERVICE_ENDPOINT = "workflow.service.endpoint";
public static final String WORKFLOW_SERVICE_USER = "workflow.service.user";
public static final String WORKFLOW_SERVICE_PASSWORD = "workflow.service.password";
private static Logger logger = Logger.getLogger(BusinessPartnerService.class.getName());
@Inject
@ConfigProperty(name = WORKFLOW_SERVICE_ENDPOINT)
Optional<String> workflowServiceEndpoint;
@Inject
@ConfigProperty(name = WORKFLOW_SERVICE_USER)
Optional<String> workflowServiceUser;
@Inject
@ConfigProperty(name = WORKFLOW_SERVICE_PASSWORD)
Optional<String> workflowServicePassword;
@Inject
DocumentService documentService;
@Inject
SchemaService schemaService;
/**
* Initialize the rest clients
*/
@PostConstruct
public void init() {
}
/**
* Diese Methode sucht einen Business Partner anhand seiner BPID
*
* @param bpid
* - business partner id phrase
* @return - matching business partner
*/
public ItemCollection getBusinessPartnerByID(String bpid) {
if (bpid == null || bpid.isEmpty()) {
return null;
}
List<ItemCollection> result;
try {
String sQuery = "(type:\"workitem\" OR type:\"workitemarchive\" ) AND ($modelversion:businesspartner-*)";
sQuery += " AND (name:" + bpid.trim() + ")";
logger.finest("SearchQuery= " + sQuery);
result = documentService.find(sQuery, 1, 0);
if (result.size() > 0) {
return result.get(0);
}
} catch (Exception e) {
logger.warning(" lucene error - " + e.getMessage());
}
return null;
}
/**
* Diese Methode sucht Business Partner anhand einer Suchphrase
*
* @param phrase
* - search phrase
* @return - list of matching business partners
*/
public List<ItemCollection> search(String phrase) {
List<ItemCollection> searchResult = new ArrayList<ItemCollection>();
if (phrase == null || phrase.isEmpty()) {
return searchResult;
}
try {
phrase = phrase.trim();
// phrase = LuceneSearchService.escapeSearchTerm(phrase);
phrase = schemaService.normalizeSearchTerm(phrase);
String sQuery = "(type:\"workitem\" OR type:\"workitemarchive\") AND ($modelversion:businesspartner-*)";
sQuery += " AND (" + phrase + "*)";
logger.finest("SearchQuery= " + sQuery);
searchResult = documentService.find(sQuery, MAX_SEARCH_RESULT, 0);
} catch (Exception e) {
logger.warning(" lucene error - " + e.getMessage());
}
// sort by txtname..
Collections.sort(searchResult, new ItemCollectionComparator("$workflowsummary", true));
return searchResult;
}
/**
* Packt die Liste der Bank Details (ItemCollections) in ein Workitem
*
* @param workitem
*/
public static void implodeBanks(ItemCollection workitem, List<ItemCollection> ibanList) {
List<Map> mapOrderItems = new ArrayList();
if (ibanList != null) {
logger.fine("Convert child items into Map...");
Iterator<?> var3 = ibanList.iterator();
while (var3.hasNext()) {
ItemCollection orderItem = (ItemCollection) var3.next();
mapOrderItems.add(orderItem.getAllItems());
}
workitem.replaceItemValue(BusinessPartnerService.ITEM_IBAN_LIST, mapOrderItems);
}
}
/**
* Enpackt die iban Map Liste von eiem Worktiem in eine Liste von ItemCollection
*
* @param workitem
*/
public static List<ItemCollection> explodeBanks(ItemCollection workitem) {
List<ItemCollection> ibanList = new ArrayList();
List<Object> mapOrderItems = workitem.getItemValue(BusinessPartnerService.ITEM_IBAN_LIST);
Iterator<?> var4 = mapOrderItems.iterator();
while (var4.hasNext()) {
Object mapOderItem = var4.next();
if (mapOderItem instanceof Map) {
ItemCollection itemCol = new ItemCollection((Map) mapOderItem);
ibanList.add(itemCol);
}
}
return ibanList;
}
/**
* Liefert die ChildItems mit den IBAN daten
*
* @param workitem
* @return
*/
public static List<ItemCollection> getBanks(ItemCollection workitem) {
List<ItemCollection> result = new ArrayList<>();
List<Object> mapOrderItems = workitem.getItemValue(BusinessPartnerService.ITEM_IBAN_LIST);
Iterator<?> var4 = mapOrderItems.iterator();
while (var4.hasNext()) {
Object mapOderItem = var4.next();
if (mapOderItem instanceof Map) {
ItemCollection itemCol = new ItemCollection((Map) mapOderItem);
result.add(itemCol);
}
}
return result;
}
}

View file

@ -1,585 +0,0 @@
package com.alexanderlogistics;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.data.WorkflowController;
import org.imixs.workflow.office.views.SearchController;
import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.faces.context.FacesContext;
import jakarta.inject.Inject;
import jakarta.inject.Named;
/**
* Der InvoiceAnalyseController dient zur Auswertung der Sachprüfungs WOrklfow
* Schritte. Die Analyse Seite ist büer das Admin Menü erreichbar.
*
* @author rsoika
*
*/
@Named
@ConversationScoped
// @SessionScoped
public class DebitorStatistikController implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(DebitorStatistikController.class.getName());
@Inject
protected DocumentService documentService;
TreeMap<String, DebitorStatistikData> stats = null;
@Inject
protected WorkflowController workflowController;
@Inject
protected SearchController searchController;
@Inject
protected KreditorDebitorService kreditorDebitorService;
/**
* Initialize default behavior initialize an opitonal id from the query string
*
*/
@PostConstruct
public void init() {
// extract the processref and page from the query string
FacesContext fc = FacesContext.getCurrentInstance();
Map<String, String> paramMap = fc.getExternalContext().getRequestParameterMap();
String id = paramMap.get("dbtr.number");
if (id != null && !id.isEmpty()) {
workflowController.getWorkitem().setItemValue("dbtr.number", id);
try {
ItemCollection dbtr = kreditorDebitorService.findDebitor(id);
if (dbtr != null) {
workflowController.getWorkitem().setItemValue("dbtr.name", dbtr.getItemValueString("_vendor_name"));
}
} catch (PluginException e) {
// e.printStackTrace();
}
}
}
public ItemCollection getWorkitem() {
return workflowController.getWorkitem();
}
public int getZahlungsmoral() {
return 0;
}
/**
* Gibt eine bookmarkable url zurück.
* Wir vom Aktualisieren button in der Page genutzt
*
* @return
*/
public String getBookmark() {
return "/pages/dbtr-stats.xhtml?dbtr.number=" + getDbtNr() + "&faces-redirect=true";
}
/*
* Gesamt
*/
public String getQueryRechnungen() {
String query = "(type:workitem OR type:workitemarchive) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\"";
return "/pages/workitems/worklist?title=Rechnungen " + getDbtNr() + " gesamt&query=" + query;
}
public int getRechnungen() {
int result = 0;
if (getDbtNr().isEmpty()) {
return 0;
}
try {
result = documentService
.count("(type:workitem OR type:workitemarchive) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\"");
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
return result;
}
/*
* Bezahlt
*/
public String getQueryRechnungenBezahlt() {
String query = "(type:workitem OR type:workitemarchive) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5900 TO 5999])";
return "/pages/workitems/worklist?title=Rechnungen " + getDbtNr() + " bezahlt&query=" + query;
}
public int getRechnungenBezahlt() {
int result = 0;
if (getDbtNr().isEmpty()) {
return 0;
}
try {
result = documentService
.count("(type:workitem OR type:workitemarchive) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5900 TO 5999])");
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
return result;
}
/*
* Offen
*/
public String getQueryRechnungenOffen() {
String query = "(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5000 TO 5099])";
return "/pages/workitems/worklist?title=Rechnungen " + getDbtNr() + " offen&query=" + query;
}
public int getRechnungenOffen() {
int result = 0;
if (getDbtNr().isEmpty()) {
return 0;
}
try {
result = documentService
.count("(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5000 TO 5099])");
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
return result;
}
/*
* Fällig
*/
public String getQueryRechnungenFaellig() {
String query = "(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5100 TO 5199])";
return "/pages/workitems/worklist?title=Rechnungen " + getDbtNr() + " fällig&query=" + query;
}
public int getRechnungenFaellig() {
int result = 0;
if (getDbtNr().isEmpty()) {
return 0;
}
try {
result = documentService
.count("(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5100 TO 5199])");
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
return result;
}
/*
* In Mahnung
*/
public String getQueryRechnungenGemahnt() {
String query = "(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5200 TO 5299])";
return "/pages/workitems/worklist?title=Rechnungen " + getDbtNr() + " in Mahnung&query=" + query;
}
public int getRechnungenGemahnt() {
int result = 0;
if (getDbtNr().isEmpty()) {
return 0;
}
try {
result = documentService
.count("(type:workitem ) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5200 TO 5299])");
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
return result;
}
/*
* Inkasso
*/
public String getQueryRechnungenInkasso() {
String query = "(type:workitem) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5300 TO 5399])";
return "/pages/workitems/worklist?title=Rechnungen " + getDbtNr() + " in Inkasso&query=" + query;
}
public int getRechnungenInkasso() {
int result = 0;
if (getDbtNr().isEmpty()) {
return 0;
}
try {
result = documentService
.count("(type:workitem OR type:workitemarchive) AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5300 TO 5399])");
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
return result;
}
/**
* Hilfsmethode die das fuehrende K/D aus der Debitorennummer entfernt
*
* @return
*/
public String getDbtNr() {
String dbtNr = getWorkitem().getItemValueString("dbtr.number");
if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) {
dbtNr = dbtNr.substring(1);
}
return dbtNr;
}
public long getDurchschnittZahlungsziel() {
getStats();
int count = 0;
long gesamt = 0;
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
DebitorStatistikData statData = entry.getValue();
if (statData.count > 0) {
gesamt = gesamt + statData.getAverageDueDays();
count++;
}
}
return Math.round((double) gesamt / count);
}
public long getDurchschnittZahlungsdauer() {
getStats();
int count = 0;
long gesamt = 0;
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
DebitorStatistikData statData = entry.getValue();
if (statData.count > 0) {
gesamt = gesamt + statData.getAveragePaymentDays();
count++;
}
}
return Math.round((double) gesamt / count);
}
/**
* Sucht alle Rechnugnen aus einem Zeitraum und sammelt Zahlungsziel und
* Zahlungszeitspanne gruppiert nach monaten
*
*/
public Map<String, DebitorStatistikData> getStats() {
if (stats != null) {
return stats;
}
// recompute
stats = new TreeMap<String, DebitorStatistikData>();
if (getDbtNr().isEmpty()) {
return stats;
}
// invoice.date:[20210101 TO 20210201]
DateFormat df = new SimpleDateFormat("yyyymmdd");
String query = "(type:workitemarchive) AND invoice.date:[20221201 TO 20500101] AND dbtr.number:" + getDbtNr()
+ " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5900 TO 5999])";
// query = query + " AND (invoice.date:[" + df.format(from) + " TO " +
// df.format(to) + "])";
logger.fine("query = " + query);
try {
List<ItemCollection> invoices = documentService
.findStubs(query, 9999, 0, "$created", false);
for (ItemCollection invoice : invoices) {
try {
logger.fine("Rechnung: " + invoice.getUniqueID());
Date invoiceDate = invoice.getItemValueDate("invoice.date");
Date invoiceDueDate = invoice.getItemValueDate("invoice.duedate");
Date paymentDate = findPaymentDateByWorkitem(invoice);
if (paymentDate == null) {
logger.warning("Es wurde kein Zahlungseingang gefunden");
continue;
}
if (invoiceDate != null && paymentDate != null && invoiceDueDate != null) {
// do we have a stats object?
DebitorStatistikData statData = stats.get(getYearMonth(invoiceDate));
if (statData == null) {
// create a new one
statData = new DebitorStatistikData(invoiceDate);
}
// jetzt irgendwas ausrechnen
statData.compute(invoiceDate, invoiceDueDate, paymentDate);
// .. und wieder speichern
stats.put(statData.toString(), statData);
} else {
logger.warning("No payment Date found for invoice " + invoice.getUniqueID());
}
} catch (ParseException e) {
logger.warning("Unable to parse payment Date for invoice " + invoice.getUniqueID());
}
}
} catch (QueryException e) {
logger.severe("Failed to get statistic: " + e.getMessage());
}
// Step 2: Sort the list based on the alphanumeric order of the keys
completeMissingMonths();
return stats;
}
/**
* Hilfsmethode ergänzt die fehlenden Monate
*
* @param yearMonths
* @return
*/
private void completeMissingMonths() {
if (stats == null || stats.size() < 3) {
return;
}
// Convert the list of strings to a list of LocalDate objects
List<LocalDate> dates = new ArrayList<>();
Set<String> yearMonths = this.stats.keySet();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
for (String yearMonth : yearMonths) {
dates.add(YearMonth.parse(yearMonth, formatter).atDay(1));
}
// Find the lowest and highest dates
LocalDate lowestDate = Collections.min(dates);
LocalDate highestDate = Collections.max(dates);
LocalDate current = lowestDate;
current = current.plusMonths(1);
while (!current.isAfter(highestDate)) {
// existiert der monat?
String formattedDate = current.format(formatter);
DebitorStatistikData entry = stats.get(formattedDate);
if (entry == null) {
// add missing entry
stats.put(formattedDate, new DebitorStatistikData(current.getYear(), current.getMonthValue()));
}
current = current.plusMonths(1);
}
}
/**
* returns
*
* 202304 from a given date
*/
public String getYearMonth(Date date) {
// Create a Calendar instance and set the date
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
// Get the year from the Calendar object
int year = calendar.get(Calendar.YEAR);
// Get the month from the Calendar object
int month = calendar.get(Calendar.MONTH);
// Increment the month by 1 since Calendar months are zero-based
month++;
// Convert the month to a String with leading "0" if necessary
return "" + year + (month < 10 ? "0" + month : "" + month);
}
/**
* Finds the payment.date for a invoice.
*
* Wir suchen alle zugeordneten Zahlungseingägne und nehmen den letzten.
*
* WICHTIG: Es muss ggf. der index neu aufgebaut werden, da payment.date nun ein
* index feld ist
*
* @param invoice
* @return
* @throws ParseException
*/
public Date findPaymentDateByWorkitem(ItemCollection invoice) throws ParseException {
// Wir selektieren alle Zahlungseingänge interessieren usn aber nur für den
// letzten
String sQuery = " (type:\"workitem\" OR type:\"workitemarchive\") " + //
" AND ($workflowgroup:Zahlungseingang) AND ($workitemref:\""
+ invoice.getUniqueID() + "\" )";
List<ItemCollection> workitems = null;
try {
workitems = documentService.findStubs(sQuery, 99, 0,
"payment.date", true);
if (workitems.size() > 0) {
return workitems.get(0).getItemValueDate("payment.date");
}
} catch (QueryException e) {
e.printStackTrace();
}
// no date found!
return null;
}
/**
* Finds the date when a workitem last reached the current task 5900 by reading
* the eventLog
*
* This method is not so save as the method findPaymentDateByWorkitem that is
* searching the payment workitem.
*
* 2023-06-28T12:40:17.437|rechnungsausgang-de-1.0|5001.50|5900|
*
* @param invoice
* @return
* @throws ParseException
*/
public Date findPaymentDateByLog(ItemCollection invoice) throws ParseException {
// Create a SimpleDateFormat instance with the desired format
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
List<String> logEntries = invoice.getItemValue("$eventlog");
// Iterate through the List from the last element to the first
for (int i = logEntries.size() - 1; i >= 0; i--) {
String entry = logEntries.get(i);
if (entry.endsWith(invoice.getTaskID() + "|")) {
// found!
String dateString = entry.substring(0, entry.indexOf("|") - 1);
// Parse the date string into a Date object
Date date = sdf.parse(dateString);
// Print the Date object
System.out.println("Date: " + date);
return date;
}
}
// no date found!
return null;
}
/**
* Diese Methode baut die Datenstruktur für das Chart Diagram zusammen
*
*
* <pre>
{
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: 'Dataset 1',
//backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
//borderColor: window.chartColors.red,
borderWidth: 1,
data: [
70, 70, 70, 70, 79, 50, 50
]
}, {
label: 'Dataset 2',
//backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
//borderColor: window.chartColors.blue,
borderWidth: 1,
data: [
70, 70, 170, 7, 79, 50, 50
]
}]
}
* </pre>
*
* @return
*/
public String buildChartData() {
getStats();
// build a list of all lables....
List<String> statusLabels = new ArrayList<String>();
Set<String> keys = stats.keySet();
for (String _key : keys) {
statusLabels.add(_key);
}
String result = "{";
// Lables
result = result + "labels : [ ";
result = result + statusLabels.stream().collect(Collectors.joining("','", "'", "'"));
result = result + "],";
result = result + "datasets: [";
// Datasets 1
result = result + "{label: 'Zahlungsziel',borderWidth: 1,";
result = result + " borderColor: [\"#3B6B82\"],";
result = result + " \"backgroundColor\" : [\"#CFE9F5\"], fill: true,tension: 0.5,";
result = result + "data: [";
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
result = result + entry.getValue().getAverageDueDays() + ",";
}
// cut last comma
result = result.substring(0, result.length() - 1);
result = result + "]";
result = result + "}, ";
// Datasets 2
result = result + "{label: 'Zahldauer',borderWidth: 1,";
result = result + " borderColor: [\"#E73B65\"],\"backgroundColor\" : [\"#70B088\" ], tension: 0.5,fill: true,";
result = result
+ " trendlineLinear: { colorMin: \"red\", colorMax: \"green\", lineStyle: \"dotted\", width: 2 , projection: true },";
result = result + "data: [";
for (Map.Entry<String, DebitorStatistikData> entry : stats.entrySet()) {
result = result + entry.getValue().getAveragePaymentDays() + ",";
}
// cut last comma
result = result.substring(0, result.length() - 1);
result = result + "]";
result = result + "} ";
// ende
result = result + "] }";
return result;
}
}

View file

@ -1,167 +0,0 @@
package com.alexanderlogistics;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.time.YearMonth;
import java.time.ZoneId;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.logging.Logger;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.index.Category;
import org.imixs.workflow.engine.index.SearchService;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.inject.Inject;
import jakarta.inject.Named;
/**
* Der InvoiceAnalyseController dient zur Auswertung der Sachprüfungs Workflow
* Schritte. Die Analyse Seite ist über das Admin Menü erreichbar.
*
* @author rsoika
*
*/
@Named
@ConversationScoped
public class InvoiceAnalyseController implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(InvoiceAnalyseController.class.getName());
@Inject
protected DocumentService documentService;
@Inject
SearchService searchService;
Category sachpruefung;
Category verteilung;
Category buchhaltung;
private ItemCollection filter;
public ItemCollection getFilter() {
if (filter == null) {
filter = new ItemCollection();
// compute start stop based on current month
YearMonth startYearMonth = YearMonth.now();
java.time.LocalDate startOfMonthDate = startYearMonth.atDay(1);
java.time.LocalDate endOfMonthDate = startYearMonth.atEndOfMonth();
filter.setItemValue("start",
java.util.Date.from(startOfMonthDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()));
filter.setItemValue("stop",
java.util.Date.from(endOfMonthDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()));
}
return filter;
}
public void setFilter(ItemCollection filter) {
this.filter = filter;
}
public Category getSachpruefung() {
return sachpruefung;
}
public Category getVerteilung() {
return verteilung;
}
public Category getBuchhaltung() {
return buchhaltung;
}
public int totalCountByCategory(Category cat) {
int result = 0;
Collection<Integer> allCounts = cat.getLabels().values();
result = allCounts.stream().reduce(0, Integer::sum);
return result;
}
/**
* Fuert verschiedene Queries aus um eine Analyse der Sachprufung durchzuführen.
*/
public void analyse() {
logger.info("start analyse....");
verteilung = null;
sachpruefung = null;
Date start = filter.getItemValueDate("start");
Date stop = filter.getItemValueDate("stop");
logger.info("...daterange=" + start + " - " + stop);
// serach date range?
String sDateFrom = "191401070000"; // because * did not work here
String sDateTo = "211401070000";
SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMddHHmm");
if (start != null) {
Calendar cal = Calendar.getInstance();
cal.setTime(start);
sDateFrom = dateformat.format(cal.getTime());
}
if (stop != null) {
Calendar cal = Calendar.getInstance();
cal.setTime(stop);
cal.add(Calendar.DATE, 1);
sDateTo = dateformat.format(cal.getTime());
}
// query Verteilung
String query = "(type:workitem OR type:workitemarchive) ";
if (start != null || stop != null) {
query += "AND (taxonomy.verteilung.stop:[" + sDateFrom + " TO " + sDateTo + "]) ";
}
logger.info(query);
List<Category> taxResult = searchService.getTaxonomyByQuery(query, "taxonomy.verteilung.stop.by");
if (taxResult.size() > 0) {
verteilung = taxResult.get(0);
}
// query Sachprüfung
query = "(type:workitem OR type:workitemarchive) ";
if (start != null || stop != null) {
query += "AND (taxonomy.sachpruefung.stop:[" + sDateFrom + " TO " + sDateTo + "]) ";
}
logger.info(query);
taxResult = searchService.getTaxonomyByQuery(query, "taxonomy.sachpruefung.stop.by");
if (taxResult.size() > 0) {
sachpruefung = taxResult.get(0);
}
// query Buchhaltung
query = "(type:workitem OR type:workitemarchive) ";
if (start != null || stop != null) {
query += "AND (taxonomy.buchhaltung.stop:[" + sDateFrom + " TO " + sDateTo + "]) ";
}
logger.info(query);
taxResult = searchService.getTaxonomyByQuery(query, "taxonomy.buchhaltung.stop.by");
if (taxResult.size() > 0) {
buchhaltung = taxResult.get(0);
}
}
/**
* This method reset the search and input state.
*/
public void reset() {
filter = new ItemCollection();
sachpruefung = null;
verteilung = null;
buchhaltung = null;
logger.fine("reset");
}
}

View file

@ -1,51 +0,0 @@
package com.alexanderlogistics;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.plugins.AbstractPlugin;
import org.imixs.workflow.exceptions.PluginException;
import jakarta.inject.Inject;
/**
* Das InvoiceOutgoingPlugin aktualisiert die Debitor E-Mail Adresse
*
* Auch das feld _img wird in Abhängigkeit vom item 'invoice.protest' gesetzt
*
* @author rsoika
* @version 1.0
*
*/
public class InvoiceOutgoingPlugin extends AbstractPlugin {
@Inject
KreditorDebitorService kreditorService;
/**
*
* @throws PluginException - if data is missing
*
**/
@Override
public ItemCollection run(ItemCollection workitem, ItemCollection event) throws PluginException {
// Update Invoice.positions
InvoiceUtil.updateInvoicePositions(workitem);
String dbtrNumber = workitem.getItemValueString("dbtr.number");
ItemCollection debitor = kreditorService.findDebitor(dbtrNumber);
if (debitor != null) {
// update mail and country
workitem.setItemValue("dbtr.mail", debitor.getItemValueString("cdtr.mail"));
workitem.setItemValue("invoice.country", debitor.getItemValueString("_vendor_country"));
}
String img = "";
if (workitem.getItemValueBoolean("invoice.protest")) {
img = img + "<img title='Reklamiert' src=\"/layout/icons/icon106.png\">";
}
workitem.setItemValue("_img", img);
return workitem;
}
}

View file

@ -1,444 +0,0 @@
package com.alexanderlogistics;
import java.time.LocalDate;
import java.util.List;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.plugins.AbstractPlugin;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.util.ResourceBundleHandler;
import jakarta.ejb.EJB;
import jakarta.inject.Inject;
/**
* Das InvoicePlugin prüft die Eingaben auf Gültigkeit, so dass diese problemlos
* nach Cargosoft exportiert werden können.
* <p>
* Konkret geht es darum, das im Status 5200 in den ChildItems keine leeren
* Zeilen vorkommen dürfen.
* <p>
* Im Status 5000 muss immer der payment.type ausgewählt werden. Dies wird vom
* Plugin explizit geprüft
* <p>
* Das Plugin prüft auch auf doppelte Rechnungsnummern. Dabei wird Systemweit
* geprüft ob die Rechnungsnummer schon einmal vorkam. Falls ja, wird eine
* Warnung ausgegeben. Der Benutzer kann diese dann skippen.
* <p>
* Zusätzlich berechnet das Plugin das Feld invoice.positions mit einer Value
* liste der Positionsnummern. Dieses Feld wird indiziert, so dass gezielt nach
* Positionsnummern gesucht werden kann.
* <p>
* 2.2.22 - Das Plugin erzeugt auch das Feld _img welches die Images von
* Sofortüberweisung, Mahnung und Ablehnung anzeigt.
*
*
* @author rsoika
* @version 1.0
*
*/
public class InvoicePlugin extends AbstractPlugin {
public static final int TASK_ERFASSUNG = 5001;
public static final int TASK_SACHPRUEFUNG = 5200;
public static final int TASK_SACHPRUEFUNG_DELEGATION = 5210;
public static final int EVENT_FREIGEBEN = 20;
public static final String ERROR_MISSING_DATA = "MISSING_DATA";
public static final String ERROR_DUPPLICATE_INVOICE_NUMBER = "DUPPLICATE_INVOICE_NUMBER";
public static final String ERROR_NEW_IBANBIC = "NEW_IBANBIC";
private static Logger logger = Logger.getLogger(InvoicePlugin.class.getName());
// Positions Pattern - kann überschrieben werden
// XX-YYY-####-### oder XX-YYYZZZ-####-###
// Default = ([A-Z]{2}-[A-Z]{3}-[0-9]{4}-[0-9]{3})
// Optional = ([A-Z]{2}-(?:[A-Z]{3}|[A-Z]{6})-[0-9]{4}-[0-9]{3})
// Nur 6- Stellig = ([A-Z]{2}-(?:[A-Z]{6})-[0-9]{4}-[0-9]{3})
public final static String INVOICE_POSITIONS_PATTERN_DEFAULT = "([A-Z]{2}-(?:[A-Z]{3}|[A-Z]{6})-[0-9]{4}-[0-9]{3})";
@Inject
@ConfigProperty(name = "invoice.position.pattern", defaultValue = INVOICE_POSITIONS_PATTERN_DEFAULT)
String invoicePositionsPattern;
// @Inject
@EJB
KreditorDebitorService kreditorService;
@Inject
ResourceBundleHandler resourceBundleHandler;
/**
* Test childworkitems for empty lines
*
* @throws PluginException - if data is missing
*
**/
@Override
public ItemCollection run(ItemCollection workitem, ItemCollection event) throws PluginException {
updateImg(workitem);
// Update Invoice.positions
InvoiceUtil.updateInvoicePositions(workitem);
// skip if validaten tag is required=false
ItemCollection evalItemCollection = this.getWorkflowService().evalWorkflowResult(event, "validation", workitem);
if (evalItemCollection != null) {
// evaluate the validation rules...
if ("false".equalsIgnoreCase(evalItemCollection.getItemValueString("required"))) {
return workitem;
}
}
boolean isPublicEvent = !("0".equals(event.getItemValueString("keypublicresult")));
// Payment.type muss immer eingetragne werden!
if (isPublicEvent && workitem.getTaskID() >= TASK_ERFASSUNG && workitem.getEventID() < 900) {
if (workitem.getItemValueString("payment.type").trim().isEmpty()) {
// throw a plugin exception!
String message = resourceBundleHandler.findMessage("ERROR_MISSING_PAYMENT");
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
// doppelte Rechnungsnummer prüfen
if (workitem.getTaskID() == TASK_ERFASSUNG) {
validateInvoiceNumber(workitem);
checkIBANNumber(workitem);
}
if (workitem.getTaskID() == TASK_ERFASSUNG || ((workitem.getTaskID() == TASK_SACHPRUEFUNG
|| workitem.getTaskID() == TASK_SACHPRUEFUNG_DELEGATION)
&& workitem.getEventID() == EVENT_FREIGEBEN)) {
// Buchungsperiode auf plausi prüfen
if (isCargoRechnung(workitem) && "workitem".equals(workitem.getType())) {
validateBuchungsperiode(workitem.getItemValueString(InvoiceUtil.ITEM_INVOICE_PERIOD));
}
// Cargosoft Kreditorennnummer prüfen
if (isCargoRechnung(workitem)) {
validateCargosoftCdtrNumber(workitem);
}
}
}
// die prüfung der positionsnummern und Category erfolgt nur im Status
// Sachprüfung (5200) und nur beim Freigeben (20)!
if (isCargoRechnung(workitem)
&& ((workitem.getTaskID() == TASK_SACHPRUEFUNG || workitem.getTaskID() == TASK_SACHPRUEFUNG_DELEGATION)
&& workitem.getEventID() == EVENT_FREIGEBEN)) {
List<ItemCollection> childs = InvoiceUtil.explodeChildList(workitem);
for (ItemCollection posItem : childs) {
if (posItem.getItemValueString("name").trim().isEmpty()) {
// throw a plugin exception - because name is missing!
String message = resourceBundleHandler.findMessage("ERROR_MISSING_POSNO");
message = message.replace("{1}", posItem.getItemValueString("numpos"));
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
// validate pos for regex pattern 'XX-YYY-####-###'
if (!posItem.getItemValueString("name").matches(invoicePositionsPattern)) {
// throw a plugin exception - because name is missing!
String message = resourceBundleHandler.findMessage("ERROR_FORMAT_POSNO");
message = message.replace("{1}", posItem.getItemValueString("numpos"));
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
if (posItem.getItemValueString("category").trim().isEmpty()) {
// throw a plugin exception - because name is missing!
String message = resourceBundleHandler.findMessage("ERROR_MISSING_CATEGORY");
message = message.replace("{1}", posItem.getItemValueString("numpos"));
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,
"Eingabefehler - Die Leistungsart in Zeile " + posItem.getItemValueString("numpos")
+ " muss ausgefüllt sein!");
}
if (posItem.getItemValueString("tax").trim().isEmpty()) {
// throw a plugin exception - because name is missing!
String message = resourceBundleHandler.findMessage("ERROR_MISSING_TAX");
message = message.replace("{1}", posItem.getItemValueString("numpos"));
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
if (posItem.getItemValueFloat("amount") == 0) {
// throw a plugin exception - because name is missing!
String message = resourceBundleHandler.findMessage("ERROR_MISSING_NET");
message = message.replace("{1}", posItem.getItemValueString("numpos"));
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
// Buchunsperiode
if (!posItem.getItemValueString(InvoiceUtil.ITEM_INVOICE_PERIOD).trim().isEmpty()) {
validateBuchungsperiode(posItem.getItemValueString(InvoiceUtil.ITEM_INVOICE_PERIOD));
}
}
// Ergaenzung 18.05.2021:
// es kann vorkommen, das die Anwender abweichende Buchungsperioden eingeben so
// das die Hauptbuchungsperiode gar ncht merh vorkommt. Das darf aber nicht der
// fall sein.
// Im folgenden überprüfen wir ob eine Buchungszeile vorkommt in der keine oder
// die Hauptbuchunsperiode ausgewählt wurde. Ist das nicht der Fal gibt es eine
// Fehlermeldung für den Anwendere
if (isCargoRechnung(workitem) && childs.size() > 0) {
String hauptBuchungsperiode = workitem.getItemValueString("invoice.period");
boolean buchungsperiodenValid = false;
for (ItemCollection posItem : childs) {
String posBuchungsperiode = posItem.getItemValueString("invoice.period");
if (posBuchungsperiode.isEmpty() || posBuchungsperiode.equals(hauptBuchungsperiode)) {
// alles fein!
buchungsperiodenValid = true;
}
}
if (buchungsperiodenValid == false) {
// fehlerhafte Buchungsperioden.
String message = resourceBundleHandler.findMessage("ERROR_MAIN_BOOKING_PERIOD");
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
}
}
return workitem;
}
/**
* Hilfsroutine die das _img item aktualisiert.
*/
private void updateImg(ItemCollection workitem) {
// Update _img icon list
String img = workitem.getItemValueString("_img");
// 031=ablehnen
// 100=sofortüberweichung
// 074=mahnen
// sofortüberweisung
if (workitem.getEventID() == 96 && !img.contains("100.png")) {
img = img + "<img title='Sofortüberweisung' src=\"/layout/icons/icon100.png\">";
}
// mahnen
if (workitem.getEventID() == 95 && !img.contains("103.png")) {
img = img + "<img title='Mahnen' src=\"/layout/icons/icon103.png\">";
}
// ablehnen
if (workitem.getTaskID() == 5100 && workitem.getEventID() == 90 && !img.contains("028.png")) {
img = img + "<img title='Abgelehnt' src=\"/layout/icons/icon028.png\">";
}
if (workitem.getTaskID() == 5200 && workitem.getEventID() == 90 && !img.contains("028.png")) {
img = img + "<img title='Abgelehnt' src=\"/layout/icons/icon028.png\">";
}
workitem.setItemValue("_img", img);
}
/**
* Diese Method prüft die Buchungsperiode auf Plausibilität
*
* YYYY(+1)01-12
*
* z.b. 202110 oder 202107 oder 202201
*
* @param workitem
* @throws PluginException
*/
private void validateBuchungsperiode(String period) throws PluginException {
// buchungsperionde nur prüfen wenn noch nicht archiviert
if (!period.isEmpty()) {
LocalDate localDate = LocalDate.now();
int year = localDate.getYear();
// build regex....
String regex = "(" + year + "|" + (year + 1) + "|" + (year - 1) + ")(1[0-2]|0[1-9])";
if (!period.matches(regex)) {
// throw a plugin exception - because name is missing!
String message = resourceBundleHandler.findMessage("ERROR_BOOKING_PERIOD");
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA, message);
}
}
}
/**
* Diese Method prüft ob die "invoice.number" bereits einmal im
* Rechnugnsworkflow vergeben wurde. Falls ja wird eine PluginExcpetion
* ausgelöst.
* <p>
* Query Example:
* <p>
* <code>NOT $uniqueid:"9f72fa50-4845-41ea-b6b9-ccd518c353be" AND
txtcooperatespace:"9dba107e-f8ef-4150-a832-040d75a6eda7" AND invoice.number:"45"</code>
*
* <p>
* in case a duplicate invoice was detected the item invoice.number.duplicate is
* filled. This item is used for a conditional event. The case is displayed as a
* warning in the form.
*
* @throws PluginException
* @throws QueryException
*
*/
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!
if (invoiceNumber.isEmpty()) {
return;
}
// rechnungseingang only workitems...
// 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) {
// wenn _invoicenumber_duplicate bereits gesetzt ist - dann geht es ohne prüfung
// weiter
if (!invoiceNumberDuplicate.isEmpty()) {
logger.warning("...validateion skipped by user with duplicate invoice number: " + invoiceNumber);
} else {
// set _invoicenumber_duplicate - dadurch wird die warnmeldung ausgegeben und
// der Vorgang nicht weitergeleitet
workitem.replaceItemValue("invoice.number.duplicate", invoiceNumber);
String message = resourceBundleHandler.findMessage("ERROR_INVOICENO");
throw new PluginException(InvoicePlugin.class.getName(), ERROR_DUPPLICATE_INVOICE_NUMBER, message);
}
} else {
// clear !
workitem.appendItemValue("invoice.number.duplicate.history",
workitem.getItemValueString("invoice.number.duplicate"));
workitem.replaceItemValue("invoice.number.duplicate", "");
}
} catch (QueryException e) {
throw new PluginException(PluginException.class.getName(), "QUERY ERROR", e.getMessage(), e);
}
}
/**
* Diese Method prüft ob die eingegebene IBAN nummer bereits in dem ausgewälten
* Kreditor bekannt ist. Fallst nicht wird diese schnell mal in den Kreditoren
* Datensatz übertragen. Dadurch muss man nicht extra die Kreditoren Verwaltung
* aufrufen. Es ist ein art selbst-lernendes System.
* <p>
* Die Mehtode ruft eine Plugin Exception aus um den User zu fragen ob er das
* möchte.
*
* @throws PluginException
* @throws QueryException
*
*/
private void checkIBANNumber(ItemCollection workitem) throws PluginException {
String cdtrNumber = workitem.getItemValueString("cdtr.number");
String iban = workitem.getItemValueString("cdtr.iban");
String bic = workitem.getItemValueString("cdtr.bic");
String overtakeIBAN = workitem.getItemValueString("ibanbic.overtake");
if (cdtrNumber.isEmpty() || iban.isEmpty() || bic.isEmpty()) {
// no op
return;
}
// wenn bereits eine Überneahme angedroht wurde dann übernehemen!
if (!overtakeIBAN.isEmpty()) {
kreditorService.addNewIBANBIC(cdtrNumber, iban, bic);
workitem.setItemValue("ibanbic.overtake", "");
return;
}
// search the kreditor
ItemCollection cdtr = kreditorService.findCreditorDebitor(cdtrNumber);
if (cdtr != null) {
// update country
workitem.setItemValue("invoice.country", cdtr.getItemValueString("_vendor_country"));
// Prüfen ob wir die IBAN schon kennen
if (iban.equals(cdtr.getItemValueString("cdtr.iban")) && bic.equals(cdtr.getItemValueString("cdtr.bic"))) {
return;
}
if (iban.equals(cdtr.getItemValueString("cdtr.iban2"))
&& bic.equals(cdtr.getItemValueString("cdtr.bic2"))) {
return;
}
if (iban.equals(cdtr.getItemValueString("cdtr.iban3"))
&& bic.equals(cdtr.getItemValueString("cdtr.bic3"))) {
return;
}
if (iban.equals(cdtr.getItemValueString("cdtr.iban4"))
&& bic.equals(cdtr.getItemValueString("cdtr.bic4"))) {
return;
}
// OK - scheinbar ist diese IBAN/BIC nicht bekannt. Also fragen wir mal nach....
workitem.setItemValue("ibanbic.overtake", iban + bic);
String message = resourceBundleHandler.findMessage("ERROR_IBAN_UNKNOWN");
throw new PluginException(InvoicePlugin.class.getName(), ERROR_NEW_IBANBIC, message);
}
}
/**
* Hilfsmethod prüft ob die cdtr.nummer mit einer nummer aus der Cargosoft
* Import Datei übereinstimmt.
*
* @param workitem
* @throws PluginException
*/
private void validateCargosoftCdtrNumber(ItemCollection workitem) throws PluginException {
String crdtrNumber = workitem.getItemValueString("cdtr.number");
// wenn keine Nummer eingegeben wurde gehts weiter!
if (crdtrNumber.isEmpty()) {
return;
}
// search creditor number in cargosoft...
// die cargosoft Kreditornummer beginnt seltsamerweise mit einem K.....
try {
String query = "(type:cargosoftkreditor) AND (name:K" + crdtrNumber + " OR name:" + crdtrNumber + ")";
List<ItemCollection> result = this.getWorkflowService().getDocumentService().find(query, 1, 0);
if (result == null || result.size() == 0) {
String message = resourceBundleHandler.findMessage("ERROR_CDTR_INVALID");
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,
message);
} else {
// update cargosoft crediotr name
ItemCollection cargo = result.get(0);
workitem.setItemValue("cdtr.name.cargosoft", cargo.getItemValueString("_VENDOR_Name"));
}
} catch (QueryException e) {
e.printStackTrace();
}
}
/**
* This method returns true if the current workitem is a Cargosoft Invoice.
*
* This can be based on different model versions e.g. rechnungseingang-de-1.2,
* rechnungseingang-pl-1.0, rechnungseingang-dwc-1.0, ...
*
* @param workitem
* @return
*/
public static boolean isCargoRechnung(ItemCollection workitem) {
String REGEX_PATTERN = "rechnungseingang-([a-z]{2}|[a-z]{3})-\\d.\\d";
// Erstellen Sie ein Pattern-Objekt
Pattern pattern = Pattern.compile(REGEX_PATTERN);
Matcher matcher = pattern.matcher(workitem.getModelVersion());
// Überprüfen, ob das Muster übereinstimmt
return matcher.matches();
}
}

View file

@ -1,139 +0,0 @@
package com.alexanderlogistics;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.logging.Logger;
import org.imixs.archive.core.SnapshotService;
import org.imixs.workflow.FileData;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.SignalAdapter;
import org.imixs.workflow.exceptions.AdapterException;
import org.imixs.workflow.exceptions.PluginException;
import jakarta.inject.Inject;
/**
* Der RenameFilenamesAdapter kann optional eingesetzt werden. Dieser Adapter
* verändert den Dateinamen von angehangenen Rechnungen
*
* Der Adapter wir beispielweise in DWC eingesetzt bevor die Dateien in einen
* FTP Server hochgeladen werden.
*
* Die Dateinamen werden vom System berechnet.
*
* sequencenumber + "_" +invoice.positions+".pdf"
*
*
* Bei Sachrechnungen
*
* sequencenumber + "_" + invoice.number.stripped + ".pdf"
* wird das Rechnungsdatum verwendet um die Buchungsperiode zu berechnen.
*
*
*
* @author rsoika
* @version 1.0
*
*/
public class RenameFilenamesAdapter implements SignalAdapter {
private static Logger logger = Logger.getLogger(RenameFilenamesAdapter.class.getName());
@Inject
SnapshotService snapshotService;
/**
* Rename Filenames
*
* @throws PluginException
*
**/
@Override
public ItemCollection execute(ItemCollection workitem, ItemCollection event)
throws AdapterException, PluginException {
int fileNameCounter = 0; // for multiple files
List<FileData> fileDataSet = workitem.getFileData();
for (FileData fileData : fileDataSet) {
String fileName = fileData.getName();
// only PDF files and X-Rechnung
if ((fileName.toLowerCase().endsWith(".pdf")
|| fileName.toLowerCase().endsWith(".xml"))) {
// Build new Filename
String newFileName = buildFileName(fileName, workitem, fileNameCounter);
if (!newFileName.equals(fileName)) {
logger.info("Rename file name " + fileName + " -> " + newFileName);
// do we have content
if (fileData.getContent().length < 10) {
// fetch snaphot data
FileData snapShotFileData = snapshotService.getWorkItemFile(workitem.getUniqueID(), fileName);
// remove old data
workitem.removeFile(fileName);
snapShotFileData.setName(newFileName);
workitem.addFileData(snapShotFileData);
} else {
fileData.setName(newFileName);
}
fileNameCounter++;
}
// Update FTP Target path information
String targetPath = "";
if (InvoiceUtil.isCreditorInvoice(workitem)) {
targetPath = "invoice-in/";
String bookingPath = workitem.getItemValueString("invoice.period");
// Sachrechnung
if (bookingPath.isEmpty()) {
// build period from invoice.date
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
LocalDate invoiceDate = workitem.getItemValueLocalDate("invoice.date");
bookingPath = invoiceDate.format(formatter);
}
if (bookingPath.length() > 4) {
targetPath = targetPath + bookingPath.substring(0, 4) + "/" + bookingPath.substring(4);
}
} else {
targetPath = "invoice-out/";
String bookingPath = workitem.getItemValueString("invoice.bookingperiod");
targetPath = targetPath + bookingPath.substring(0, 4) + "/" + bookingPath.substring(4);
}
workitem.setItemValue("ftp.target.path", targetPath + "/");
}
}
return workitem;
}
/**
* Baut einen Filenamen aus verschiedenen Attributen zusammen.
*
*
* @param workitem
* @return
*/
private String buildFileName(String fileName, ItemCollection workitem, int counter) {
String result = workitem.getItemValueString("sequencenumber") + "_";
if (InvoiceUtil.isSachrechnung(workitem)) {
result = result + workitem.getItemValueString("invoice.number.stripped");
} else {
// für ausgangsrechnungen skippen wir die Cargosoft XML Datei
if (fileName.toLowerCase().endsWith(".xml")) {
return fileName;
}
// für die PDF Datei bauen wir einen neuen Namen
result = result + workitem.getItemValueString("invoice.positions");
}
if (counter > 0) {
result = result + "_" + counter;
}
result = result + fileName.substring(fileName.lastIndexOf("."));
return result;
}
}

View file

@ -1,182 +0,0 @@
package com.alexanderlogistics;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Logger;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.plugins.AbstractPlugin;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
import jakarta.inject.Inject;
/**
* Das SteuerbescheidPlugin prüft ob
*
* - die ATC Nummer aus dem Steuerbescheid in einer Ausgangsrechnung gefunden
* wird ($taskID<5990)
* - invoice.atc.number
* - der Betrag "invoice.total.net"
* - die Währung???
* - die Positionsnummer ???
*
*
* @author rsoika
* @version 1.0
*
*/
public class SteuerbescheidPlugin extends AbstractPlugin {
private static Logger logger = Logger.getLogger(SteuerbescheidPlugin.class.getName());
@Inject
protected DocumentService documentService;
@Inject
KreditorDebitorService kreditorService;
/**
* Prüft ob der Steuerbetrag abgerechnet ist.
*
*
**/
@Override
public ItemCollection run(ItemCollection workitem, ItemCollection event) throws PluginException {
// Update Fälligkeit
updateFaelligkeit(workitem);
// Update Salden
updateTotalEustZoll(workitem);
updateInvoiceSaldo(workitem);
return workitem;
}
/**
* Aktualisiert die EUST/ZOLL Summen
*
*/
protected void updateTotalEustZoll(ItemCollection workitem) {
double saldoEust = 0;
double saldoZoll = 0;
List<ItemCollection> positionsTabelle = InvoiceUtil.explodeChildList(workitem);
for (ItemCollection pos : positionsTabelle) {
if ("EUST".equalsIgnoreCase(pos.getItemValueString("activity.type"))) {
saldoEust = saldoEust + pos.getItemValueDouble("amount");
}
if ("ZOLL".equalsIgnoreCase(pos.getItemValueString("activity.type"))) {
saldoZoll = saldoZoll + pos.getItemValueDouble("amount");
}
}
workitem.setItemValue("steuer.eust", saldoEust);
workitem.setItemValue("steuer.zoll", saldoZoll);
}
/**
* Aktualisiert die EUST/ZOLL Fälligkeiten in den Detailtabellen
* Die Daten kommen von der KI und werden auf die Positionsnummern gemappt.
*
*/
protected void updateFaelligkeit(ItemCollection workitem) {
boolean foundZoll = false;
boolean foundEust = false;
Date datEust = null;
Date datZoll = null;
// resolve datEust und datZoll from steuerbescheid.positionen ChildItems....
List<ItemCollection> steuerPositionen = InvoiceUtil.explodeChildList(workitem, "steuerbescheid.position");
for (ItemCollection steuerPos : steuerPositionen) {
if (steuerPos.getItemValueString("key").startsWith("A")) {
datZoll = steuerPos.getItemValueDate("duedate");
}
if (steuerPos.getItemValueString("key").startsWith("B")) {
datEust = steuerPos.getItemValueDate("duedate");
}
}
// Map fälligkeit auf die Cargosoft Positionen
List<ItemCollection> rows = InvoiceUtil.explodeChildList(workitem);
for (ItemCollection pos : rows) {
if (datZoll != null && "ZOLL".equalsIgnoreCase(pos.getItemValueString("activity.type"))) {
pos.setItemValue("duedate", datZoll);
foundZoll = true;
}
if (datEust != null && "EUST".equalsIgnoreCase(pos.getItemValueString("activity.type"))) {
pos.setItemValue("duedate", datEust);
foundEust = true;
}
}
if (foundEust) {
workitem.setItemValue("steuer.eust.due", datEust);
} else {
workitem.removeItem("steuer.eust.due");
}
if (foundZoll) {
workitem.setItemValue("steuer.zoll.due", datZoll);
} else {
workitem.removeItem("steuer.zoll.due");
}
InvoiceUtil.implodeChildList(workitem, rows);
}
/**
* Aktualisiert den invoice.saldo anhand der ausgehenden Rechnungen zu einer ATC
* Nummer
*
*/
protected void updateInvoiceSaldo(ItemCollection workitem) {
String atcNummer = workitem.getItemValueString("invoice.atc.number");
logger.fine("Verify ATC-Nr.: " + atcNummer);
double amount = workitem.getItemValueDouble("invoice.total.net");
List<ItemCollection> invoices = findInvoices(atcNummer);
// Beträge subtrahieren....
double saldo = amount;
logger.info("Found " + invoices.size() + " matching invoices...");
for (ItemCollection invoice : invoices) {
workitem.setItemValueUnique("$workitemRef", invoice.getUniqueID());
// suche die Zeile in der die ATC Nummer vorkommt.
List<ItemCollection> positionen = InvoiceUtil.explodeChildList(invoice);
for (ItemCollection pos : positionen) {
if (atcNummer.equals(pos.getItemValueString("atc.number"))) {
double umsatz = pos.getItemValueDouble("datev.umsatz");
logger.info("...Umsatz=" + umsatz);
saldo = InvoiceUtil.round(saldo - umsatz);
}
}
}
// Update Saldo
workitem.setItemValue("invoice.saldo", InvoiceUtil.round(saldo));
}
/*
* Sucht alle Ausgansrechnungen zu einer ATC Nummer
*/
protected List<ItemCollection> findInvoices(String atcNumber) {
List<ItemCollection> result = new ArrayList<ItemCollection>();
String query = "(type:workitem OR type:workitemarchive) AND ($taskid:[5000 TO 5990])"
+ " AND invoice.atc.number:\"" + atcNumber + "\" "
+ " AND $workflowgroup:\"Rechnungsausgang\" ";
try {
result = documentService.find(query, 999, 0, "$created", false);
return result;
} catch (QueryException e) {
logger.severe("Failed to get invoices: " + e.getMessage());
}
return result;
}
}

View file

@ -1,829 +0,0 @@
/*******************************************************************************
* Imixs Workflow
* Copyright (C) 2001, 2011 Imixs Software Solutions GmbH,
* http://www.imixs.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You can receive a copy of the GNU General Public
* License at http://www.gnu.org/licenses/gpl.html
*
* Project:
* http://www.imixs.org
* http://java.net/projects/imixs-workflow
*
* Contributors:
* Imixs Software Solutions GmbH - initial API and implementation
* Ralph Soika - Software Developer
*******************************************************************************/
package com.alexanderlogistics.api;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.imixs.marty.team.TeamService;
import org.imixs.workflow.FileData;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.exceptions.AccessDeniedException;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.ProcessingErrorException;
import org.imixs.workflow.exceptions.QueryException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.alexanderlogistics.BusinessPartnerService;
import com.alexanderlogistics.InvoiceUtil;
import com.alexanderlogistics.KreditorDebitorService;
import com.alexanderlogistics.mahnlauf.MahnlaufService;
import com.alexanderlogistics.xml.CargosoftXMLInvoiceImportService;
import jakarta.ejb.Stateless;
import jakarta.ejb.TransactionAttribute;
import jakarta.ejb.TransactionAttributeType;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
/**
** Dieser Service korrigiert falsch importierte Cargosoft daten.
* Ausgangsrechnungen die ein falsches Jahr haben.
*
* Oder DAten die über die XML Schnittstelle falsch reinkamen...
*
* @author rsoika
* @version 1.1
*/
@Stateless
@Produces({ MediaType.TEXT_HTML, MediaType.APPLICATION_XHTML_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON,
MediaType.TEXT_XML })
@Path("/cargosoft")
public class CargosoftMigrationRestService implements Serializable {
private static final long serialVersionUID = 1L;
String log = "";
int errors = 0;
int count = 0;
public static String _QUERY = "($modelversion:rechnungsausgang-de-1.0)\n" +
"AND $created:[20240604 TO 20240701]";
// public static String _QUERY = "($modelversion:rechnungsausgang-dwc-1.0)\n" +
// //
// "AND $created:[20240604 TO 20240619]";
@Inject
DocumentService documentService;
@Inject
WorkflowService workflowService;
@Inject
MahnlaufService mahnlaufService;
@Inject
TeamService teamService;
@Inject
BusinessPartnerService businessPartnerService;
private static Logger logger = Logger.getLogger(CargosoftMigrationRestService.class.getName());
public CargosoftMigrationRestService() {
super();
}
/**
* Dieser Endpunkt akutalisiert alle ausgehenden noch offenen Rechnungen in
* Bezug auf die Abteilungszugehörigkeit.
*
*
* @return
* @throws QueryException
* @throws AccessDeniedException
* @throws ProcessingErrorException
* @throws PluginException
* @throws ModelException
*/
@GET
@Path("/invoices/fix/spaces")
@Produces({ MediaType.TEXT_PLAIN })
public String updateInvoiceSpacesAssignment()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
count = 0;
String query = "($modelversion:rechnungsausgang-de-1.0) AND (type:workitem)";
// "AND $taskid:[20240604 TO 20240701]";
logger.info("query=" + query);
log = "Update Space Assignment in Outgoing Invoices\n\n" + query;
List<ItemCollection> result = documentService.find(query, 9999, 0);
log = log + " " + new Date() + "\n\n";
log = log + "\n\nFound " + result.size() + " open invoices.";
// load spaces Pos Expressions
Map<String, List<String>> spacePosMappings = mahnlaufService.loadSpacePosMappings();
for (ItemCollection invoice : result) {
String oldSpaceRef = invoice.getItemValueString("space.ref");
mahnlaufService.mapInvoiceTextToSpace(invoice, spacePosMappings);
String newSpaceRef = invoice.getItemValueString("space.ref");
if (newSpaceRef.isEmpty()) {
// wir dürfen die space.ref nicht löschen!
continue;
}
// change?
if (!oldSpaceRef.equals(newSpaceRef)) {
count++;
logger.info("...fix invoice: " + invoice.getUniqueID());
// lookup space
ItemCollection space = documentService.load(newSpaceRef);
invoice.setItemValue("space.name", space.getItemValueString("name"));
invoice.setItemValue("migration.space.ref", oldSpaceRef);
documentService.save(invoice);
}
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
/**
* Dieser Endpunkt akutalisiert alle ausgehenden noch offenen Rechnungen in
* Bezug auf die Abteilungszugehörigkeit.
*
*
* @return
* @throws QueryException
* @throws AccessDeniedException
* @throws ProcessingErrorException
* @throws PluginException
* @throws ModelException
*/
@GET
@Path("/invoices/fix/index/{page}")
@Produces({ MediaType.TEXT_PLAIN })
public String updateInvoiceIndex(@PathParam("page") int page)
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
count = 0;
String query = "($modelversion:rechnungsausgang-de-1.0) AND (type:workitem)";
logger.info("query=" + query);
log = "Update index Invoices\n\n" + query;
List<ItemCollection> result = documentService.find(query, 100, page);
log = log + " " + new Date() + "\n\n";
log = log + " size= 500 page=" + page + "\n\n";
log = log + "\n\nFound " + result.size() + " open invoices.";
logger.info("Found " + result.size() + " open invoices.");
for (ItemCollection invoice : result) {
documentService.save(invoice);
count++;
logger.info("... update index " + invoice.getUniqueID());
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
/**
* Dieser Endpunkt akutalisiert alle ausgehenden noch offenen Rechnungen in
* Bezug auf die Abteilungszugehörigkeit.
*
*
* @return
* @throws QueryException
* @throws AccessDeniedException
* @throws ProcessingErrorException
* @throws PluginException
* @throws ModelException
*/
@GET
@Path("/steuerbescheide/fix/spaces")
@Produces({ MediaType.TEXT_PLAIN })
public String updateSteuerbescheideSpacesAssignment()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
count = 0;
String query = "($modelversion:steuerbescheid-de-1.0) AND (type:workitem)";
// "AND $taskid:[20240604 TO 20240701]";
logger.info("query=" + query);
log = "Update Space Assignment in Steuerbescheide\n\n" + query;
List<ItemCollection> result = documentService.find(query, 9999, 0);
log = log + " " + new Date() + "\n\n";
log = log + "\n\nFound " + result.size() + " open steuerbescheide.";
// load spaces Pos Expressions
Map<String, List<String>> spacePosMappings = mahnlaufService.loadSpacePosMappings();
for (ItemCollection invoice : result) {
String oldSpaceRef = invoice.getItemValueString("space.ref");
mahnlaufService.mapInvoiceTextToSpace(invoice, spacePosMappings);
String newSpaceRef = invoice.getItemValueString("space.ref");
if (newSpaceRef.isEmpty()) {
// wir dürfen die space.ref nicht löschen!
continue;
}
// change?
if (!oldSpaceRef.equals(newSpaceRef)) {
count++;
logger.info("...fix invoice: " + invoice.getUniqueID());
// lookup space
ItemCollection space = documentService.load(newSpaceRef);
invoice.setItemValue("space.name", space.getItemValueString("name"));
invoice.setItemValue("migration.space.ref", oldSpaceRef);
documentService.save(invoice);
}
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
/**
* This method loads taxonomy data for a workflow group within a given process
* and builds a ChartJS data structure in JSON format
*
* @param workflowgroup
* @param task
* @return
* @throws QueryException
*/
@GET
@Path("/test")
@Produces({ MediaType.TEXT_PLAIN })
public String testeFehlerhafteCargosoftDaten() throws QueryException {
int falsch = 0;
logger.info("query=" + _QUERY);
log = "Query\n" + _QUERY;
List<ItemCollection> result = documentService.find(_QUERY, 9999, 0);
log = log + "\n\nCount=" + result.size();
if (result.size() > 9999) {
log = log + "\n\nACHTUNG ES GIBT MEHR ALS 10000 RECHNUNGEN !";
}
for (ItemCollection workitem : result) {
String type = workitem.getItemValueString("invoice.type");
if ("G".equals(type) || "SR".equals(type)) {
double total = workitem.getItemValueDouble("invoice.saldo");
if (total >= 0) {
logger.info("---Falsch: " + workitem.getUniqueID());
falsch++;
workitem.setItemValue("invoice.saldo", -total);
// documentService.save(workitem);
}
}
}
log = log + "\n\n";
log = log + "" + result.size() + " rechnungen geprüft";
log = log + "" + falsch + " davon falsch";
log = log + "\n\n";
return log;
}
/**
* This method fixes the wrong amount of a imported xml invoice.
*
* @param workflowgroup
* @param task
* @return
* @throws QueryException
* @throws ModelException
* @throws PluginException
* @throws ProcessingErrorException
* @throws AccessDeniedException
*/
public String fixMissingDueDate()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
logger.info("query=" + _QUERY);
log = "Query\n\n" + _QUERY;
List<ItemCollection> result = documentService.find(_QUERY, 9999, 0);
log = log + "\n\nSelection Count=" + result.size();
log = log + "\n\nFixes\n\n";
for (ItemCollection workitem : result) {
if (!workitem.hasItem("invoice.reminder")) {
Date dueDate = workitem.getItemValueDate("invoice.duedate");
workitem.setItemValue("invoice.reminder", dueDate);
count++;
// save only
documentService.save(workitem);
}
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
@GET
@Path("/fix")
@Produces({ MediaType.TEXT_PLAIN })
public String fixMissingRate()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
logger.info("query=" + _QUERY);
log = "Query\n\n" + _QUERY;
List<ItemCollection> result = documentService.find(_QUERY, 9999, 0);
log = log + "\n\nSelection Count=" + result.size();
log = log + "\n\nFixes\n\n";
for (ItemCollection workitem : result) {
if (!workitem.hasItem("invoice.rate")) {
// Fetch frist datev.kurs von _childitems
List<ItemCollection> childs = InvoiceUtil.explodeChildList(workitem);
if (childs != null && childs.size() > 0) {
ItemCollection child = childs.get(0);
double rate = child.getItemValueDouble("datev.kurs");
logger.info("..fix missing rate = " + rate);
workitem.setItemValue("invoice.rate", rate);
// save only
documentService.save(workitem);
}
}
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
/**
* Dieser agent prüft die Rechnungen der letzten 2 Wochen auf einen Billingtext
* der mit "24DE" beginnt und übernimmt dann diesen Text als neue ATC number
*
* @return
* @throws QueryException
* @throws AccessDeniedException
* @throws ProcessingErrorException
* @throws PluginException
* @throws ModelException
*/
@GET
@Path("/fix-atc")
@Produces({ MediaType.TEXT_PLAIN })
public String fixATCNumber()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
String query = "($modelversion:rechnungsausgang-de-1.0) " +
"AND $created:[20241001 TO 20241201]";
logger.info("query=" + query);
log = "Query\n\n" + query;
List<ItemCollection> result = documentService.find(query, 9999, 0);
log = log + "\n\nSelection Count=" + result.size();
log = log + "\n\nFixes:\n\n";
for (ItemCollection workitem : result) {
logger.info("verify: " + workitem.getUniqueID());
if (!workitem.hasItem("invoice.atc.number")) {
// Fetch _childitems and check billingText
List<ItemCollection> childs = InvoiceUtil.explodeChildList(workitem);
for (ItemCollection child : childs) {
List<String> billingTexts = child.getItemValueList("billingtext", String.class);
boolean contains24DE = false;
String atcNumber = "";
for (String str : billingTexts) {
if (str.startsWith("24DE")) {
contains24DE = true;
atcNumber = str;
logger.info(" found in " + workitem.getUniqueID());
break;
}
}
if (contains24DE) {
count++;
workitem.setItemValue("invoice.atc.number", atcNumber);
// save only
logger.info(" update: " + workitem.getUniqueID());
log = log + "\n - " + workitem.getUniqueID();
documentService.save(workitem);
break;
}
}
}
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
/**
* Dieser agent prüft die Rechnungen der letzten 2 Wochen auf einen Billingtext
* der mit "24DE" beginnt und übernimmt dann diesen Text als neue ATC number
*
* @return
* @throws QueryException
* @throws AccessDeniedException
* @throws ProcessingErrorException
* @throws PluginException
* @throws ModelException
*/
@GET
@Path("/fix-atc2")
@Produces({ MediaType.TEXT_PLAIN })
public String fixATCNumber2()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
String query = "($modelversion:rechnungsausgang-de-1.0) " +
"AND $created:[20241001 TO 20241201]";
logger.info("query=" + query);
log = "Query\n\n" + query;
List<ItemCollection> result = documentService.find(query, 9999, 0);
log = log + "\n\nSelection Count=" + result.size();
log = log + "\n\nFixes:\n\n";
for (ItemCollection workitem : result) {
logger.info("verify: " + workitem.getUniqueID());
if (workitem.hasItem("invoice.atc.number")) {
// Fetch _childitems and check billingText
List<ItemCollection> childs = InvoiceUtil.explodeChildList(workitem);
for (ItemCollection child : childs) {
List<String> billingTexts = child.getItemValueList("billingtext", String.class);
boolean contains24DE = false;
String atcNumber = "";
for (String str : billingTexts) {
if (str.startsWith("24DE")) {
contains24DE = true;
atcNumber = str;
logger.info(" found in " + workitem.getUniqueID());
child.setItemValue("atc.number", atcNumber);
break;
}
}
if (contains24DE) {
count++;
InvoiceUtil.implodeChildList(workitem, childs);
// save only
logger.info(" update: " + workitem.getUniqueID());
log = log + "\n - " + workitem.getUniqueID();
documentService.save(workitem);
break;
}
}
}
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
public String fixFehlerhafteCargosoftDatenMitSnapshot()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
logger.info("query=" + _QUERY);
log = "Query\n\n" + _QUERY;
List<ItemCollection> result = documentService.find(_QUERY, 9999, 0);
log = log + "\n\nSelection Count=" + result.size();
log = log + "\n\nFixes\n\n";
for (ItemCollection workitem : result) {
ItemCollection snapshot = null;
// load snapshot
String snapshotID = workitem.getItemValueString("$snapshotid");
if (!snapshotID.isEmpty()) {
snapshot = documentService.load(snapshotID);
}
if (snapshot == null) {
logger.warning("Unable to load snapshot for document " + workitem.getUniqueID());
log = log + "Unable to load snapshot for document " + workitem.getUniqueID() + " \n";
errors++;
continue;
}
// Get raw data....
// find the XML Attachment
String xmlFileName = null;
List<String> fileNames = snapshot.getFileNames();
for (String fileName : fileNames) {
if (fileName.endsWith(".xml")) {
xmlFileName = fileName;
break;
}
}
if (xmlFileName == null) {
logger.warning("Unable to load XML from document " + workitem.getUniqueID());
log = log + "Unable to load XML from document " + workitem.getUniqueID() + " \n";
errors++;
continue;
}
FileData xmlFileData = snapshot.getFileData(xmlFileName);
Document xmlDoc = createXMLTree(xmlFileData.getContent());
migrateDocument(workitem, xmlDoc);
}
log = log + "\n\n=== Completed! " + count + " fixes! ===\n\n";
return log;
}
/**
* Diese Methode korrigiert den Saldo um die Netto summe....
*
* @param workitem
* @param xmlDoc
* @throws ModelException
* @throws PluginException
* @throws ProcessingErrorException
* @throws AccessDeniedException
*/
private void migrateDocument(ItemCollection workitem, Document doc)
throws AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
// Haben wir schon das neue Feld 'invoice.total.net' mit dem Netto Betrag?
if (workitem.hasItem("invoice.total.tax")) {
// no migration needed
return;
}
// Net und Tax ermitteln
readXMLValue(doc, "/Invoices/Invoice/InvoiceHeader/InvoiceAmount/NetAmount/Amount/Value",
workitem, "invoice.total.net", Double.class);
readXMLValue(doc, "/Invoices/Invoice/InvoiceHeader/InvoiceAmount/VATInformation/VATAmount/Amount/Value",
workitem, "invoice.total.tax", Double.class);
// Der Total entspricht nun dem Net Amount.
// Wenn wir eine Tax haben, dann müssen wir den Total sowie den Saldo um
// diese Tax erhöhen.
// Damit ist dann die Migration abgeschlossen.
double tax = workitem.getItemValueDouble("invoice.total.tax");
if (tax > 0) {
log = log + "...Migriere " + workitem.getItemValueString("invoice.number") + " Korrektur Betrag " +
tax + "\n";
double total = workitem.getItemValueDouble("invoice.total");
double saldo = workitem.getItemValueDouble("invoice.saldo");
// Gutschrift?
if (total < 0) {
total = total - tax;
saldo = saldo - tax;
} else {
// Rechnung
total = total + tax;
saldo = saldo + tax;
}
workitem.setItemValue("invoice.total", InvoiceUtil.round(total));
workitem.setItemValue("invoice.saldo", InvoiceUtil.round(saldo));
workitem.setItemValue("cargosoft.fix.xmlerror", tax);
log = log + "....... total neu=" + total + " saldo neu=" + saldo + "\n";
if (5900 == workitem.getTaskID()) {
workitem.setEventID(942);
workflowService.processWorkItem(workitem);
} else {
// save only
documentService.save(workitem);
}
count++;
} else {
log = log + "...Keine Migration notwendig " + workitem.getItemValueString("invoice.number") +
" tax=" + tax + "\n";
}
}
/**
* Dieser agent prüft ob es für Cargosoft Krediotren/Debitoren Daten schon ein
* passendes Businesspartner Workitem gibt.
* Wenn nicht speichert der Service einmal das cargosft entity was dann zur
* automatischen Neuanlage des businesspartner workflows führt.
*
* @return
* @throws QueryException
* @throws AccessDeniedException
* @throws ProcessingErrorException
* @throws PluginException
* @throws ModelException
*/
@GET
@Path("/bp-import")
@Produces({ MediaType.TEXT_PLAIN })
public String importBusinessPartner()
throws QueryException, AccessDeniedException, ProcessingErrorException, PluginException, ModelException {
StringBuffer messageBuffer = new StringBuffer();
int MAX_COUNT = 1000;
String query = "(type:" + KreditorDebitorService.TYPE_CARGOSOFTKREDITOR + ")";
int updates = 0;
long l = System.currentTimeMillis();
int batchSize = 500;
int totalObjects = 0;
log("├── Migrate " + KreditorDebitorService.TYPE_CARGOSOFTKREDITOR, messageBuffer);
// Gesamtanzahl ermitteln
int totalCount = documentService.count(query);
log("│   ├── found " + totalCount + " " + KreditorDebitorService.TYPE_CARGOSOFTKREDITOR + " entities ",
messageBuffer);
// Berechne Anzahl der benötigten Pages
int totalPages = (int) Math.ceil((double) totalCount / batchSize);
// Verarbeite Page für Page
for (int pageIndex = 0; pageIndex < totalPages; pageIndex++) {
List<ItemCollection> cargosoftDataList = documentService.find(query, batchSize, pageIndex);
for (ItemCollection cargosoftItemCol : cargosoftDataList) {
totalObjects++;
if (verifyBusinessPartner(cargosoftItemCol, messageBuffer)) {
updates++;
}
if (updates >= MAX_COUNT)
break;
}
// Fortschritt loggen
log("│ ├── Processed page " + (pageIndex + 1) + " of " + totalPages +
" (" + updates + " total updates)", messageBuffer);
// Optional: Kurze Pause nach jedem 5. Batch
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (updates >= MAX_COUNT)
break;
}
long duration = System.currentTimeMillis() - l;
double objectsPerSecond = totalObjects / (duration / 1000.0);
log("├── Successfully imported " + updates + " business partner objects in " +
duration + "ms (" + String.format("%.1f", objectsPerSecond) + " objects/sec)", messageBuffer);
return messageBuffer.toString();
}
/**
* Hilfsmethode speichert eine cargoosft kreditor object...
*
* @param bpID
* @param messageBuffer
* @return
*/
@TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW)
public boolean verifyBusinessPartner(ItemCollection cargosoftItemCol, StringBuffer messageBuffer) {
String vendorNummer = cargosoftItemCol.getItemValueString("_vendor_num");
String bpID = InvoiceUtil.buildBPID(vendorNummer);
ItemCollection businessPartner = businessPartnerService.getBusinessPartnerByID(bpID);
if (businessPartner == null) {
documentService.save(cargosoftItemCol);
logger.finest("│   │   ├── import " + bpID);
return true;
}
return false;
}
/**
* Erzeugt einen XML Baum aus dem XML Raw Daten
*
* @param snapshot
* @return
*/
private Document createXMLTree(byte[] rawData) {
Document doc = null;
InputStream inputStream = new ByteArrayInputStream(rawData);
InputSource inputSource = new InputSource(inputStream);
DocumentBuilder documentBuilder;
try {
documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
doc = documentBuilder.parse(inputSource);
} catch (ParserConfigurationException | SAXException | IOException e) {
log = log + "Unable to load XML tree: " + e.getMessage() + " \n";
return null;
}
return doc;
}
/**
* Reads a tag value from the xml tree and set the value into the given
* workitem.
*
* /Invoices/Invoice/InvoiceHeader/Client/Code
*
* Beispiel Datum:
* <InvoiceDate>2024-05-13T00:00:00+02:00</InvoiceDate>
*
* @param doc - xml doc
* @param expression - xpath expression
* @param workitem
* @param itemName
* @param itemType
*/
private <T> void readXMLValue(Document doc, String expression, ItemCollection workitem, String itemName,
Class<T> itemType) {
// create XPath...
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath();
XPathExpression xPathExpression;
try {
xPathExpression = xpath.compile(expression);
// extract node value
Node valueNode = (Node) xPathExpression.evaluate(doc, XPathConstants.NODE);
if (valueNode != null) {
String value = valueNode.getTextContent();
if (itemType == Date.class) {
// 2024-05-13T00:00:00+02:00
SimpleDateFormat formatter = new SimpleDateFormat(CargosoftXMLInvoiceImportService.DATE_FORMAT);
formatter.setTimeZone(TimeZone.getTimeZone("CET"));
try {
workitem.setItemValue(itemName, formatter.parse(value));
} catch (ParseException e) {
logger.warning("Invalid Date Format");
}
return;
}
if (itemType == Double.class && value != null && !value.isEmpty()) {
workitem.setItemValue(itemName, Double.parseDouble(value));
return;
}
if (itemType == Integer.class && value != null && !value.isEmpty()) {
workitem.setItemValue(itemName, Integer.parseInt(value));
return;
}
// Default String format
workitem.setItemValue(itemName, value);
}
} catch (XPathExpressionException e) {
logger.warning("Unable to read data field '" + expression + "' : " + e.getMessage());
}
}
private void log(String message, StringBuffer messageLog) {
logger.info(message);
messageLog.append(message + "\n");
}
}

View file

@ -1,179 +0,0 @@
package com.alexanderlogistics.mahnlauf;
import java.util.Date;
import java.util.List;
import java.util.logging.Logger;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.Model;
import org.imixs.workflow.SignalAdapter;
import org.imixs.workflow.WorkflowKernel;
import org.imixs.workflow.engine.ModelService;
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.exceptions.AdapterException;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.sepa.services.SepaWorkflowService;
import com.alexanderlogistics.KreditorDebitorService;
import jakarta.ejb.EJB;
import jakarta.inject.Inject;
/**
* The MahnlaufRefAddAdapter links an invoice with a Mahnlauf for the
* dbtr.number item . If there is currently no open Mahnlauf for this key, the
* adapter automatically creates a new process instance. If a mahnlauf for this
* dbt.number is found, the invoice is just added.
* <p>
* If the invoice has already been linked to a Mahnlauf nothing happens.
* <p>
*
* @version 1.0
* @author rsoika
*/
public class MahnlaufRefAddAdapter implements SignalAdapter {
private static Logger logger = Logger.getLogger(MahnlaufRefAddAdapter.class.getName());
@EJB
ModelService modelService;
@EJB
KreditorDebitorService kreditorDebitorService;
@EJB
WorkflowService workflowService = null;
@Inject
SepaWorkflowService sepaWorkflowService;
/**
* This method finds or create the Mahnlauf and adds a reference ($workitemref)
* to the current invoice.
*
* @throws PluginException
*/
@SuppressWarnings("unchecked")
@Override
public ItemCollection execute(ItemCollection invoice, ItemCollection event)
throws AdapterException, PluginException {
if (invoice.getTaskID() < MahnlaufService.TASK_MAHNLAUF_START
|| invoice.getTaskID() > MahnlaufService.TASK_MAHNLAUF_END) {
throw new PluginException(MahnlaufRefAddAdapter.class.getName(),
MahnlaufService.ERROR_CONFIG,
"Der Mahnlauf kann nur für Rechnungen erstellt werden die bereits die Fälligkeit erreicht haben.");
}
String dbtrNumber = invoice.getItemValueString(MahnlaufService.ITEM_DBTR_NUMBER);
ItemCollection mahnLaufWorkitem;
try {
mahnLaufWorkitem = findMahnlauf(dbtrNumber);
if (mahnLaufWorkitem == null) {
// create one...
mahnLaufWorkitem = createNewMahnlauf(dbtrNumber, invoice, event);
}
// add Invoice to Mahnlauf
List<String> refList = mahnLaufWorkitem.getItemValue("$workitemref");
if (!refList.contains(invoice.getUniqueID())) {
mahnLaufWorkitem.appendItemValueUnique("$workitemref", invoice.getUniqueID());
}
// set event 100 and process
ItemCollection mahnlaufConfig = workflowService.evalWorkflowResult(event, "mahnlauf", invoice, true);
int eventID = mahnlaufConfig.getItemValueInteger("event");
mahnLaufWorkitem.event(eventID);
workflowService.processWorkItem(mahnLaufWorkitem);
} catch (QueryException | ModelException e) {
throw new PluginException(MahnlaufRefAddAdapter.class.getName(),
MahnlaufService.ERROR_CONFIG, "Unable to create Mahnlauf", e);
}
// set mahnlauf ref
invoice.setItemValue("dunning.ref", mahnLaufWorkitem.getUniqueID());
return invoice;
}
/**
* Helper method finds an open mahnlauf for a debtr.numbre (name)
*
* @param key
* @return
* @throws QueryException
*/
public ItemCollection findMahnlauf(String key) throws QueryException {
String query = "(type:workitem) AND ($modelversion:mahnlauf*) AND (name:\"" + key + "\")";
List<ItemCollection> resultList = workflowService.getDocumentService().find(query, 1, 0, "$modified", true);
if (resultList.size() > 0) {
return resultList.get(0);
}
// no mahnaluffound
return null;
}
/**
* Helper method to create a new Mahnlauf workitem
*
* @param key
* @param invoice
* @return
* @throws ModelException
* @throws PluginException
*/
@SuppressWarnings("unused")
public ItemCollection createNewMahnlauf(String key, ItemCollection invoice, ItemCollection event)
throws ModelException, PluginException {
String modelVersion = null;
int taskID = -1;
int eventID = -1;
// test if the event provides a sepa export configuration
ItemCollection mahnlaufConfig = workflowService.evalWorkflowResult(event, "mahnlauf", invoice, true);
if (mahnlaufConfig != null && mahnlaufConfig.hasItem("modelversion") && mahnlaufConfig.hasItem("task")) {
logger.fine("read model information from event");
modelVersion = mahnlaufConfig.getItemValueString("modelVersion");
taskID = mahnlaufConfig.getItemValueInteger("task");
eventID = mahnlaufConfig.getItemValueInteger("event");
}
// build the sepa export workitem....
ItemCollection mahnlaufWorkitem = new ItemCollection().model(modelVersion).task(taskID);
mahnlaufWorkitem.replaceItemValue("name", key);
mahnlaufWorkitem.replaceItemValue(WorkflowKernel.CREATED, new Date());
mahnlaufWorkitem.replaceItemValue(WorkflowKernel.MODIFIED, new Date());
// set unqiueid
mahnlaufWorkitem.setItemValue(WorkflowKernel.UNIQUEID, WorkflowKernel.generateUniqueID());
// copy dbtr_iban
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_NAME,
invoice.getItemValue(MahnlaufService.ITEM_DBTR_NAME));
// lookup email....
String dbtrNumber = invoice.getItemValueString("dbtr.number");
ItemCollection dbtrItemCol = kreditorDebitorService.findDebitor("D" + dbtrNumber);
if (dbtrItemCol != null) {
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_EMAIL, dbtrItemCol.getItemValue("cdtr.mail"));// dbtr.mail
}
mahnlaufWorkitem.setItemValue(MahnlaufService.ITEM_DBTR_NUMBER,
invoice.getItemValue(MahnlaufService.ITEM_DBTR_NUMBER));
mahnlaufWorkitem.setItemValue("invoice.language", invoice.getItemValue("invoice.language"));
// set workflow group name from the Task Element to identify document in xslt
Model model = modelService.getModel(modelVersion);
ItemCollection task = model.getTask(taskID);
String modelTaskGroupName = task.getItemValueString("txtworkflowgroup"); // DO NOT CHANGE!
mahnlaufWorkitem.setItemValue(WorkflowKernel.WORKFLOWGROUP, modelTaskGroupName);
logger.info("...created new mahnlauf " + key + "...");
return mahnlaufWorkitem;
}
}

View file

@ -1,182 +0,0 @@
package org.imixs.workflow.office.forms;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.faces.data.WorkflowController;
import jakarta.enterprise.context.ConversationScoped;
import jakarta.enterprise.event.Event;
import jakarta.inject.Inject;
import jakarta.inject.Named;
/**
* The AnalyticController is a conversationScoped controller that provides
* values for the analytic-custom parts.
* <p>
* A custom implementation can react on AnalyticEvent to compute values and
* datasets.
* <p>
* The controller implements a caching mechanism to avoid repeated calls for new
* analytic values. If the analytic value is already stored in the current
* workitem, no new value will be fired.
*
*
* @author rsoika
*
*/
@Named
@ConversationScoped
public class AnalyticController implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(AnalyticController.class.getName());
@Inject
protected Event<AnalyticEvent> analyticEvents;
@Inject
protected WorkflowController workflowController;
/**
* Returns a analytic value as a String for a given key.
*
* @param key
* @return
*/
public String getAsString(String key) {
ItemCollection analyticData = computeValue(key);
return analyticData.getItemValueString("value");
}
/**
* Returns a analytic value as a Json String for a given key.
*
* @param key
* @return
*/
public String getAsJson(String key) {
ItemCollection analyticData = computeValue(key);
String jsonval = analyticData.getItemValueString("value");
if (jsonval == null || jsonval.isEmpty()) {
return "null";
} else {
return jsonval;
}
}
/**
* Returns a analytic value as a Double for a given key.
*
* @param key
* @return
*/
public double getAsDouble(String key) {
ItemCollection analyticData = computeValue(key);
return analyticData.getItemValueDouble("value");
}
/**
* Returns the analytic label for a given key
*
* @param key
* @return
*/
public String getLabel(String key) {
ItemCollection analyticData = computeValue(key);
return analyticData.getItemValueString("label");
}
/**
* Returns the analytic optional link for a given key
*
* @param key
* @return
*/
public String getLink(String key) {
ItemCollection analyticData = computeValue(key);
return analyticData.getItemValueString("link");
}
/**
* Returns the analytic description for a given key
*
* @param key
* @return
*/
public String getDescription(String key) {
ItemCollection analyticData = computeValue(key);
return analyticData.getItemValueString("description");
}
/**
* Computes an analytic value. The method cache the value in the
* item key.
*
* An observer controller is responsible to cache or reset the cached values if
* needed.
*
* @param key
* @return
*/
protected ItemCollection computeValue(String key) {
if (workflowController.getWorkitem() != null) {
logger.fine("fire analytic event for key '" + key + "'");
// Fire the Analytics Event for this key
AnalyticEvent event = new AnalyticEvent(key, workflowController.getWorkitem());
if (analyticEvents != null) {
analyticEvents.fire(event);
if (event.getValue() != null) {
ItemCollection details = new ItemCollection();
details.setItemValue("value", event.getValue());
details.setItemValue("label", event.getLabel());
details.setItemValue("description", event.getDescription());
details.setItemValue("link", event.getLink());
// cache result
implodeDetails(key, details);
}
}
}
// analytic value is now already cached!
return explodeDetails(key);
}
/**
* Convert the List of ItemCollections back into a List of Map elements
*
* @param workitem
*/
@SuppressWarnings({ "rawtypes" })
private void implodeDetails(String key, ItemCollection details) {
// convert the child ItemCollection elements into a List of Map
List<Map> detailsList = new ArrayList<Map>();
detailsList.add(details.getAllItems());
workflowController.getWorkitem().replaceItemValue(key, detailsList);
}
/**
* converts the Map List of a workitem into a List of ItemCollectons
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
private ItemCollection explodeDetails(String key) {
// convert current list of childItems into ItemCollection elements
List<Object> mapOrderItems = workflowController.getWorkitem().getItemValue(key);
if (mapOrderItems != null && mapOrderItems.size() > 0) {
ItemCollection itemCol = new ItemCollection((Map) mapOrderItems.get(0));
return itemCol;
}
// return empty collection
ItemCollection dummy = new ItemCollection();
dummy.setItemValue("value", "");
dummy.setItemValue("label", "");
dummy.setItemValue("description", "No data available");
return dummy;
}
}

View file

@ -1,66 +0,0 @@
package org.imixs.workflow.office.forms;
import org.imixs.workflow.ItemCollection;
/**
* An AnalyticEvent is send by the AnalyticController during initialization
*/
public class AnalyticEvent {
private String key;
private Object value = null;
private String label = "";
private String description = "";
private String link = "";
private ItemCollection workitem = null;
public AnalyticEvent(String key, ItemCollection workitem) {
this.key = key;
this.workitem = workitem;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public ItemCollection getWorkitem() {
return workitem;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View file

@ -1,90 +0,0 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty"
xmlns:i="http://xmlns.jcp.org/jsf/composite/imixs">
<!-- Cargosoft Search integration
This subform is loaded by the form_basic.xhtml page.
The subform provides a jsf commandScript which calls the cargosoftController.searchCreditor method in the backend.
The script below inits a autocompletion feature for the input field.
See imixs-office.autocompletion.js
See also:
https://stackoverflow.com/questions/16588327/how-to-invoke-a-jsf-managed-bean-on-a-html-dom-event-using-native-javascript
https://dzone.com/articles/execute-a-jsf-ajax-request-by-just-a-function-call
https://www.w3schools.com/howto/howto_js_autocomplete.asp
-->
<h:commandScript name="cargosoftDbtrSearch" action="#{cargosoftController.searchDebitor()}"
render="autocomplete-resultlist-cargosoft" onevent="autocompleteShowResult" />
<h:commandScript name="updateDbtrNumber" action="#{opListController.updateDbtrNumber()}"
render="#{opListContainer.clientId}" onevent="ajaxUpdateInvoiceSelection" />
<script type="text/javascript">
/*<![CDATA[*/
// init ml input fields...
$(document).ready(function() {
// add autocomplete feature to dbtr.number...
var creditorField= $("input[data-item='dbtr.number']");
$(creditorField).each(function() {
$(this).addClass("imixs-ml");
// set callback function...
autocompleteInitInput(this,cargosoftDbtrSearch,'autocomplete-resultlist-cargosoft',selectDbtrCallback);
});
// add cargsoft label if available
var dbtrName="#{workflowController.workitem.item['dbtr.name']}";
// append span with dbtr.name....
creditorField.after( "<span id='dbtr-name-id' class='small'>" + dbtrName + "</p>" );
});
// Hier bekommen wir die JSON Struktur mit allen daten.
// diese Daten werden auf die einzelnen Felder verteilt.
function selectDbtrCallback(selection) {
const dbtrData = JSON.parse(selection);
// fill data into the fields....
var inputElement=$("input[data-item='dbtr.number']");
inputElement.val(dbtrData.no);
// remove old dbtr.name
$('#dbtr-name-id').remove();
// append span with dbtr.name....
inputElement.after( "<span id='dbtr-name-id' class='small'>" + dbtrData.name + "</p>" );
var inputElementDbtrName=$("input[id$='dbtr_name']");
if (inputElementDbtrName) {
inputElementDbtrName.val(dbtrData.name);
}
// check if we have a mail...
if (dbtrData.mail) {
var inputElementMail=$("input[data-item='dbtr.mail'],textarea[data-item='dbtr.mail']");
if (inputElementMail) {
inputElementMail.val(dbtrData.mail);
}
}
// finally we do a trick and trigger the commandScript updateDbtrNumber which
// refreshes the op section
updateDbtrNumber({ dbtrNumber: dbtrData.no });
}
/*]]>*/
</script>
<!-- Hier speichern das von Kreditor vorgeschlagene zahlungsziel -->
<h:inputHidden id="dbtr_creditperiod" value="#{workflowController.workitem.item['dbtr.creditperiod']}" />
<h:inputHidden id="dbtr_name" value="#{workflowController.workitem.item['dbtr.name']}" />
</ui:composition>

View file

@ -1,53 +0,0 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty"
xmlns:i="http://xmlns.jcp.org/jsf/composite/imixs">
<!-- Cargosoft Creditor Search integration -->
<ui:include src="/pages/workitems/forms/alexander/cargsoft-creditor-search.xhtml">
<ui:param name="workitem" value="#{workflowController.workitem}" />
<ui:param name="searchmode" value="multi" /> <!-- display multiple ibans in separate lines -->
</ui:include>
<ui:include src="/pages/workitems/forms/alexander/cargsoft-debitor-search.xhtml">
<ui:param name="workitem" value="#{workflowController.workitem}" />
</ui:include>
<!-- the following code computes the txtworkflow abstract from the current modelversion and processid -->
<ui:param name="instruction"
value="#{modelController.getProcessDescription(workflowController.workitem.item['$taskid'],workflowController.workitem.item['$ModelVersion'],workflowController.workitem)}"></ui:param>
<h:panelGroup layout="block" styleClass="imixs-instruction"
rendered="#{! empty instruction}">
<h:outputText escape="false" value="#{instruction}" />
</h:panelGroup>
<!-- Custom Form -->
<f:subview>
<ui:include src="/pages/workitems/forms/custom.xhtml">
<ui:param name="workitem" value="#{workflowController.workitem}" />
</ui:include>
</f:subview>
<!-- sub forms (optional) -->
<c:forEach items="#{formController.formDefinition.sections}"
var="section">
<div class="imixs-form-panel">
<h3>
<h:outputText value="#{section.name}" />
</h3>
<f:subview>
<ui:include src="/pages/workitems/forms/#{section.path}.xhtml">
<ui:param name="workitem" value="#{workflowController.workitem}" />
</ui:include>
</f:subview>
</div>
</c:forEach>
</ui:composition>

View file

@ -1,49 +0,0 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<!-- Zeit alle verknüften Zahlungen an -->
<h:panelGroup layout="block" styleClass="imixs-form-section"
id="dunnings">
<table class="imixsdatatable ">
<tr>
<th style="width: 600px;">Mahnung</th>
<th style="width: 200px;">Status</th>
<th style="">#{message.modified}</th>
</tr>
<ui:param name="dunnings"
value="#{businessPartnerController.getDunnings()}"></ui:param>
<ui:repeat var="dunning" value="#{dunnings}">
<tr>
<td><h:link outcome="/pages/workitems/workitem">
#{dunning.item['$workflowsummary']}
<f:param name="id" value="#{dunning.item['$uniqueid']}" />
</h:link></td>
<td>#{dunning.item['$workflowstatus']}</td>
<td><h:outputText value="#{dunning.item['$lastEventDate']}">
<f:convertDateTime pattern="#{message.datePatternShort}"
timeZone="#{message.timeZone}" />
</h:outputText> #{message.by} #{userController.getUserName(dunning.item['$editor'])}</td>
</tr>
</ui:repeat>
</table>
</h:panelGroup>
</ui:composition>

View file

@ -1,49 +0,0 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<!-- Zeit alle verknüften Zahlungen an -->
<h:panelGroup layout="block" styleClass="imixs-form-section"
id="invoices">
<table class="imixsdatatable ">
<tr>
<th style="width: 600px;">Rechnung</th>
<th style="width: 200px;">Status</th>
<th style="">#{message.modified}</th>
</tr>
<ui:param name="invoices"
value="#{businessPartnerController.getInvoicesIn()}"></ui:param>
<ui:repeat var="invoice" value="#{invoices}">
<tr>
<td><h:link outcome="/pages/workitems/workitem">
#{invoice.item['$workflowsummary']}
<f:param name="id" value="#{invoice.item['$uniqueid']}" />
</h:link></td>
<td>#{invoice.item['$workflowstatus']}</td>
<td><h:outputText value="#{invoice.item['$lastEventDate']}">
<f:convertDateTime pattern="#{message.datePatternShort}"
timeZone="#{message.timeZone}" />
</h:outputText> #{message.by} #{userController.getUserName(invoice.item['$editor'])}</td>
</tr>
</ui:repeat>
</table>
</h:panelGroup>
</ui:composition>

View file

@ -1,51 +0,0 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<!-- Zeit alle verknüften Zahlungen an -->
<h:panelGroup layout="block" styleClass="imixs-form-section"
id="invoices">
<table class="imixsdatatable ">
<tr>
<th style="width: 600px;">Rechnung</th>
<th style="width: 200px;">Status</th>
<th style="">#{message.modified}</th>
</tr>
<ui:param name="invoices"
value="#{businessPartnerController.getInvoicesOut()}"></ui:param>
<ui:repeat var="invoice" value="#{invoices}">
<tr>
<td><h:link outcome="/pages/workitems/workitem" styleClass="tooltip-link">
#{invoice.item['$workflowsummary']}
<f:param name="id" value="#{invoice.item['$uniqueid']}" />
<span class="tooltip-text">
<h:outputText value="#{invoice.item['$workflowabstract']}" escape="false" />
</span>
</h:link>
</td>
<td>#{invoice.item['$workflowstatus']}</td>
<td><h:outputText value="#{invoice.item['$lastEventDate']}">
<f:convertDateTime pattern="#{message.datePatternShort}"
timeZone="#{message.timeZone}" />
</h:outputText> #{message.by} #{userController.getUserName(invoice.item['$editor'])}</td>
</tr>
</ui:repeat>
</table>
</h:panelGroup>
</ui:composition>

Some files were not shown because too many files have changed in this diff Show more