From 1b904eb15fea2b21f49edc5f163f21f739135551 Mon Sep 17 00:00:00 2001 From: bsiggel Date: Sun, 8 Mar 2026 21:10:08 +0100 Subject: [PATCH] fix: Update synchronization status messages and add "no_sync" option; adjust microtime and cacheTimestamp in config and state files; add beforeSaveScripts for Advoware sync status management --- .../Espo/Custom/Resources/i18n/de_DE/CDokumente.json | 7 ++++--- .../Custom/Resources/i18n/de_DE/CKuendigung.json | 5 +++-- .../Custom/Resources/i18n/de_DE/CMietinkasso.json | 7 ++++--- .../Resources/i18n/de_DE/CVmhRumungsklage.json | 7 ++++--- .../Espo/Custom/Resources/i18n/en_US/CDokumente.json | 7 ++++--- .../Custom/Resources/i18n/en_US/CKuendigung.json | 6 ++++-- .../Custom/Resources/i18n/en_US/CMietinkasso.json | 8 +++++--- .../Resources/i18n/en_US/CVmhRumungsklage.json | 12 ++++++++++++ .../Resources/metadata/entityDefs/CDokumente.json | 8 +++++--- .../Resources/metadata/entityDefs/CKuendigung.json | 8 +++++--- .../Resources/metadata/entityDefs/CMietinkasso.json | 8 +++++--- .../metadata/entityDefs/CVmhRumungsklage.json | 8 +++++--- .../Resources/metadata/formula/CDokumente.json | 2 +- .../Resources/metadata/formula/CKuendigung.json | 3 +++ .../Resources/metadata/formula/CMietinkasso.json | 3 +++ .../Resources/metadata/formula/CVmhRumungsklage.json | 3 +++ data/config.php | 2 +- data/state.php | 4 ++-- 18 files changed, 73 insertions(+), 35 deletions(-) create mode 100644 custom/Espo/Custom/Resources/metadata/formula/CKuendigung.json create mode 100644 custom/Espo/Custom/Resources/metadata/formula/CMietinkasso.json create mode 100644 custom/Espo/Custom/Resources/metadata/formula/CVmhRumungsklage.json diff --git a/custom/Espo/Custom/Resources/i18n/de_DE/CDokumente.json b/custom/Espo/Custom/Resources/i18n/de_DE/CDokumente.json index 54617d02..4c7c8ea3 100644 --- a/custom/Espo/Custom/Resources/i18n/de_DE/CDokumente.json +++ b/custom/Espo/Custom/Resources/i18n/de_DE/CDokumente.json @@ -39,7 +39,7 @@ "tooltips": { "aktennr": "Eindeutige Dokument-Nummer aus Advoware", "advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware", - "syncStatus": "Status der Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich, unclean = Abweichungen, failed = Fehler", + "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert", "xaiId": "Eindeutige ID für x.AI Synchronisation", "xaiCollections": "Liste der x.AI Collections für dieses Dokument", "xaiSyncStatus": "Status der x.AI Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert", @@ -49,8 +49,9 @@ "syncStatus": { "pending_sync": "Warte auf Sync", "clean": "Synchronisiert", - "unclean": "Abweichungen", - "failed": "Fehlgeschlagen" + "unclean": "Änderungen ausstehend", + "failed": "Fehlgeschlagen", + "no_sync": "Kein Sync" }, "xaiSyncStatus": { "pending_sync": "Warte auf Sync", diff --git a/custom/Espo/Custom/Resources/i18n/de_DE/CKuendigung.json b/custom/Espo/Custom/Resources/i18n/de_DE/CKuendigung.json index b6200c90..e1d67b9a 100644 --- a/custom/Espo/Custom/Resources/i18n/de_DE/CKuendigung.json +++ b/custom/Espo/Custom/Resources/i18n/de_DE/CKuendigung.json @@ -99,13 +99,14 @@ "pending_sync": "Warte auf Sync", "clean": "Synchronisiert", "unclean": "Änderungen ausstehend", - "failed": "Fehler" + "failed": "Fehler", + "no_sync": "Kein Sync" } }, "tooltips": { "advowareAktenzeichen": "Aktenzeichen aus Advoware für die Synchronisation", "aktennr": "Eindeutige Kündigungs-Nummer aus Advoware", - "syncStatus": "Status der Synchronisation mit Advoware", + "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert", "sendungsverfolgungsnummer": "Sendungsverfolgungsnummer für Einschreiben", "mietrueckstand": "Gesamthöhe des Mietrückstands (nur bei Kündigungsgrund Mietrückstand)", "mietkaution": "Einbehaltene oder ausstehende Mietkaution", diff --git a/custom/Espo/Custom/Resources/i18n/de_DE/CMietinkasso.json b/custom/Espo/Custom/Resources/i18n/de_DE/CMietinkasso.json index 7d2b646b..0085d1f8 100644 --- a/custom/Espo/Custom/Resources/i18n/de_DE/CMietinkasso.json +++ b/custom/Espo/Custom/Resources/i18n/de_DE/CMietinkasso.json @@ -40,14 +40,15 @@ "advowareAktenzeichen": "Aktenzeichen aus dem Advoware-System", "aktennr": "Eindeutige Inkasso-Nummer aus Advoware", "advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware", - "syncStatus": "Status der Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich, unclean = Abweichungen, failed = Fehler" + "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert" }, "options": { "syncStatus": { "pending_sync": "Warte auf Sync", "clean": "Synchronisiert", - "unclean": "Abweichungen", - "failed": "Fehlgeschlagen" + "unclean": "Änderungen ausstehend", + "failed": "Fehlgeschlagen", + "no_sync": "Kein Sync" } } } \ No newline at end of file diff --git a/custom/Espo/Custom/Resources/i18n/de_DE/CVmhRumungsklage.json b/custom/Espo/Custom/Resources/i18n/de_DE/CVmhRumungsklage.json index dd02573a..073f9379 100644 --- a/custom/Espo/Custom/Resources/i18n/de_DE/CVmhRumungsklage.json +++ b/custom/Espo/Custom/Resources/i18n/de_DE/CVmhRumungsklage.json @@ -42,15 +42,16 @@ "advowareAktenzeichen": "Aktenzeichen aus dem Advoware-System", "aktennr": "Eindeutige Klage-Nummer aus Advoware", "advowareLastSync": "Zeitpunkt der letzten Synchronisation mit Advoware", - "syncStatus": "Status der Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich, unclean = Abweichungen, failed = Fehler", + "syncStatus": "Status der Advoware-Synchronisation: pending_sync = Warte auf Sync, clean = erfolgreich synchronisiert, unclean = Änderungen ausstehend, failed = Fehler, no_sync = Nicht synchronisiert", "xaiCollectionId": "Collection ID für x.AI Synchronisation" }, "options": { "syncStatus": { "pending_sync": "Warte auf Sync", "clean": "Synchronisiert", - "unclean": "Abweichungen", - "failed": "Fehlgeschlagen" + "unclean": "Änderungen ausstehend", + "failed": "Fehlgeschlagen", + "no_sync": "Kein Sync" } } } \ No newline at end of file diff --git a/custom/Espo/Custom/Resources/i18n/en_US/CDokumente.json b/custom/Espo/Custom/Resources/i18n/en_US/CDokumente.json index 668a136b..ea4759d6 100644 --- a/custom/Espo/Custom/Resources/i18n/en_US/CDokumente.json +++ b/custom/Espo/Custom/Resources/i18n/en_US/CDokumente.json @@ -42,7 +42,7 @@ "tooltips": { "aktennr": "Unique document number from Advoware", "advowareLastSync": "Time of last synchronization with Advoware", - "syncStatus": "Synchronization status: pending_sync = Waiting for sync, clean = successful, unclean = discrepancies, failed = error", + "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized", "xaiId": "Unique ID for x.AI synchronization", "xaiCollections": "List of x.AI collections for this document", "xaiSyncStatus": "x.AI synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized", @@ -52,8 +52,9 @@ "syncStatus": { "pending_sync": "Waiting for Sync", "clean": "Synchronized", - "unclean": "Discrepancies", - "failed": "Failed" + "unclean": "Changes Pending", + "failed": "Failed", + "no_sync": "No Sync" }, "xaiSyncStatus": { "pending_sync": "Waiting for Sync", diff --git a/custom/Espo/Custom/Resources/i18n/en_US/CKuendigung.json b/custom/Espo/Custom/Resources/i18n/en_US/CKuendigung.json index 40dae44b..a4d46dd8 100644 --- a/custom/Espo/Custom/Resources/i18n/en_US/CKuendigung.json +++ b/custom/Espo/Custom/Resources/i18n/en_US/CKuendigung.json @@ -95,15 +95,17 @@ "JaBesorgnisgrund259ZPO": "Yes, Concern, § 259 ZPO" }, "syncStatus": { + "pending_sync": "Waiting for Sync", "clean": "Synchronized", "unclean": "Changes Pending", - "failed": "Failed" + "failed": "Failed", + "no_sync": "No Sync" } }, "tooltips": { "advowareAktenzeichen": "File number from Advoware for synchronization", "aktennr": "Case number from Advoware", - "syncStatus": "Synchronization status with Advoware", + "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized", "sendungsverfolgungsnummer": "Tracking number for registered mail", "mietrueckstand": "Total amount of rent arrears (only for termination reason rent arrears)", "mietkaution": "Withheld or outstanding security deposit", diff --git a/custom/Espo/Custom/Resources/i18n/en_US/CMietinkasso.json b/custom/Espo/Custom/Resources/i18n/en_US/CMietinkasso.json index d9afeadc..588a5b0f 100644 --- a/custom/Espo/Custom/Resources/i18n/en_US/CMietinkasso.json +++ b/custom/Espo/Custom/Resources/i18n/en_US/CMietinkasso.json @@ -40,13 +40,15 @@ "advowareAktenzeichen": "Case number from Advoware system", "aktennr": "Unique collection number from Advoware", "advowareLastSync": "Time of last synchronization with Advoware", - "syncStatus": "Synchronization status: clean = successful, unclean = discrepancies, failed = error" + "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized" }, "options": { "syncStatus": { + "pending_sync": "Waiting for Sync", "clean": "Synchronized", - "unclean": "Discrepancies", - "failed": "Failed" + "unclean": "Changes Pending", + "failed": "Failed", + "no_sync": "No Sync" } } } diff --git a/custom/Espo/Custom/Resources/i18n/en_US/CVmhRumungsklage.json b/custom/Espo/Custom/Resources/i18n/en_US/CVmhRumungsklage.json index 81a7182b..1c6bbeb1 100644 --- a/custom/Espo/Custom/Resources/i18n/en_US/CVmhRumungsklage.json +++ b/custom/Espo/Custom/Resources/i18n/en_US/CVmhRumungsklage.json @@ -30,5 +30,17 @@ }, "labels": { "Create CVmhRumungsklage": "Create Räumungsklage" + }, + "tooltips": { + "syncStatus": "Advoware synchronization status: pending_sync = Waiting for sync, clean = successfully synchronized, unclean = changes pending, failed = error, no_sync = Not synchronized" + }, + "options": { + "syncStatus": { + "pending_sync": "Waiting for Sync", + "clean": "Synchronized", + "unclean": "Changes Pending", + "failed": "Failed", + "no_sync": "No Sync" + } } } \ No newline at end of file diff --git a/custom/Espo/Custom/Resources/metadata/entityDefs/CDokumente.json b/custom/Espo/Custom/Resources/metadata/entityDefs/CDokumente.json index e75afd0f..e02ce754 100644 --- a/custom/Espo/Custom/Resources/metadata/entityDefs/CDokumente.json +++ b/custom/Espo/Custom/Resources/metadata/entityDefs/CDokumente.json @@ -95,15 +95,17 @@ "pending_sync", "clean", "unclean", - "failed" + "failed", + "no_sync" ], "style": { "pending_sync": "default", "clean": "success", "unclean": "warning", - "failed": "danger" + "failed": "danger", + "no_sync": null }, - "default": "pending_sync", + "default": "no_sync", "tooltip": true, "isCustom": true }, diff --git a/custom/Espo/Custom/Resources/metadata/entityDefs/CKuendigung.json b/custom/Espo/Custom/Resources/metadata/entityDefs/CKuendigung.json index 726aa356..1894bb6e 100644 --- a/custom/Espo/Custom/Resources/metadata/entityDefs/CKuendigung.json +++ b/custom/Espo/Custom/Resources/metadata/entityDefs/CKuendigung.json @@ -80,15 +80,17 @@ "pending_sync", "clean", "unclean", - "failed" + "failed", + "no_sync" ], "style": { "pending_sync": "default", "clean": "success", "unclean": "warning", - "failed": "danger" + "failed": "danger", + "no_sync": null }, - "default": "pending_sync", + "default": "no_sync", "tooltip": true, "isCustom": true }, diff --git a/custom/Espo/Custom/Resources/metadata/entityDefs/CMietinkasso.json b/custom/Espo/Custom/Resources/metadata/entityDefs/CMietinkasso.json index fd46922b..4016682d 100644 --- a/custom/Espo/Custom/Resources/metadata/entityDefs/CMietinkasso.json +++ b/custom/Espo/Custom/Resources/metadata/entityDefs/CMietinkasso.json @@ -80,15 +80,17 @@ "pending_sync", "clean", "unclean", - "failed" + "failed", + "no_sync" ], "style": { "pending_sync": "default", "clean": "success", "unclean": "warning", - "failed": "danger" + "failed": "danger", + "no_sync": null }, - "default": "pending_sync", + "default": "no_sync", "tooltip": true, "isCustom": true }, diff --git a/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhRumungsklage.json b/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhRumungsklage.json index d9d6c5ef..a53df63b 100644 --- a/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhRumungsklage.json +++ b/custom/Espo/Custom/Resources/metadata/entityDefs/CVmhRumungsklage.json @@ -88,15 +88,17 @@ "pending_sync", "clean", "unclean", - "failed" + "failed", + "no_sync" ], "style": { "pending_sync": "default", "clean": "success", "unclean": "warning", - "failed": "danger" + "failed": "danger", + "no_sync": null }, - "default": "pending_sync", + "default": "no_sync", "tooltip": true, "isCustom": true }, diff --git a/custom/Espo/Custom/Resources/metadata/formula/CDokumente.json b/custom/Espo/Custom/Resources/metadata/formula/CDokumente.json index 1609b504..74e7525c 100644 --- a/custom/Espo/Custom/Resources/metadata/formula/CDokumente.json +++ b/custom/Espo/Custom/Resources/metadata/formula/CDokumente.json @@ -1,3 +1,3 @@ { - "beforeSaveScript": "// Automatische x.AI Sync-Status Verwaltung\n\n// Fall 1: xaiId wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('xaiId') != null &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}\n// Fall 2: xaiId wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('xaiId') == null &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 3: Dokument hat xaiId und relevante Felder haben sich geändert\nelse if (\n xaiId != null &&\n xaiSyncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('description') ||\n attribute\\isChanged('dokumentId') ||\n attribute\\isChanged('md5sum') ||\n attribute\\isChanged('sha256')\n )\n) {\n xaiSyncStatus = 'unclean';\n}\n// Fall 4: Bei neuem Dokument MIT xaiId → pending_sync\nelse if (\n entity\\isNew() &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuem Dokument OHNE xaiId → no_sync\nelse if (\n entity\\isNew() &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}" + "beforeSaveScript": "// Automatische x.AI Sync-Status Verwaltung\n\n// Fall 1: xaiId wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('xaiId') != null &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}\n// Fall 2: xaiId wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('xaiId') == null &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 3: Dokument hat xaiId und relevante Felder haben sich geändert\nelse if (\n xaiId != null &&\n xaiSyncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('description') ||\n attribute\\isChanged('dokumentId') ||\n attribute\\isChanged('md5sum') ||\n attribute\\isChanged('sha256')\n )\n) {\n xaiSyncStatus = 'unclean';\n}\n// Fall 4: Bei neuem Dokument MIT xaiId → pending_sync\nelse if (\n entity\\isNew() &&\n xaiId != null\n) {\n xaiSyncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuem Dokument OHNE xaiId → no_sync\nelse if (\n entity\\isNew() &&\n xaiId == null\n) {\n xaiSyncStatus = 'no_sync';\n}\n\n// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Dokument hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('description') ||\n attribute\\isChanged('dokumentId') ||\n attribute\\isChanged('md5sum') ||\n attribute\\isChanged('sha256')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuem Dokument MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuem Dokument OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}" } diff --git a/custom/Espo/Custom/Resources/metadata/formula/CKuendigung.json b/custom/Espo/Custom/Resources/metadata/formula/CKuendigung.json new file mode 100644 index 00000000..796a6761 --- /dev/null +++ b/custom/Espo/Custom/Resources/metadata/formula/CKuendigung.json @@ -0,0 +1,3 @@ +{ + "beforeSaveScript": "// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Entität hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('advowareAktenzeichen') ||\n attribute\\isChanged('kuendigungsdatum') ||\n attribute\\isChanged('beendigungstermin') ||\n attribute\\isChanged('status')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuer Entität MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuer Entität OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}" +} diff --git a/custom/Espo/Custom/Resources/metadata/formula/CMietinkasso.json b/custom/Espo/Custom/Resources/metadata/formula/CMietinkasso.json new file mode 100644 index 00000000..e7d9302a --- /dev/null +++ b/custom/Espo/Custom/Resources/metadata/formula/CMietinkasso.json @@ -0,0 +1,3 @@ +{ + "beforeSaveScript": "// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Entität hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('advowareAktenzeichen') ||\n attribute\\isChanged('gerichtsrubrum') ||\n attribute\\isChanged('gegenstandswert')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuer Entität MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuer Entität OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}" +} diff --git a/custom/Espo/Custom/Resources/metadata/formula/CVmhRumungsklage.json b/custom/Espo/Custom/Resources/metadata/formula/CVmhRumungsklage.json new file mode 100644 index 00000000..e7d9302a --- /dev/null +++ b/custom/Espo/Custom/Resources/metadata/formula/CVmhRumungsklage.json @@ -0,0 +1,3 @@ +{ + "beforeSaveScript": "// Automatische Advoware Sync-Status Verwaltung\n\n// Fall 1: aktennr wurde gelöscht (war vorher vorhanden, jetzt leer)\nif (\n attribute\\fetched('aktennr') != null &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}\n// Fall 2: aktennr wird neu gesetzt (war vorher leer, jetzt gefüllt)\nelse if (\n attribute\\fetched('aktennr') == null &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 3: Entität hat aktennr und relevante Felder haben sich geändert\nelse if (\n aktennr != null &&\n syncStatus != 'no_sync' &&\n (\n attribute\\isChanged('name') ||\n attribute\\isChanged('advowareAktenzeichen') ||\n attribute\\isChanged('gerichtsrubrum') ||\n attribute\\isChanged('gegenstandswert')\n )\n) {\n syncStatus = 'unclean';\n}\n// Fall 4: Bei neuer Entität MIT aktennr → pending_sync\nelse if (\n entity\\isNew() &&\n aktennr != null\n) {\n syncStatus = 'pending_sync';\n}\n// Fall 5: Bei neuer Entität OHNE aktennr → no_sync\nelse if (\n entity\\isNew() &&\n aktennr == null\n) {\n syncStatus = 'no_sync';\n}" +} diff --git a/data/config.php b/data/config.php index 266d2bc6..e3d355b7 100644 --- a/data/config.php +++ b/data/config.php @@ -358,7 +358,7 @@ return [ 0 => 'youtube.com', 1 => 'google.com' ], - 'microtime' => 1772997342.745464, + 'microtime' => 1772999883.405378, 'siteUrl' => 'https://crm.bitbylaw.com', 'fullTextSearchMinLength' => 4, 'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws', diff --git a/data/state.php b/data/state.php index 6a6d4dc2..d2490867 100644 --- a/data/state.php +++ b/data/state.php @@ -1,7 +1,7 @@ 1772997342, - 'microtimeState' => 1772997342.877304, + 'cacheTimestamp' => 1772999883, + 'microtimeState' => 1772999883.544947, 'currencyRates' => [ 'EUR' => 1.0 ],