Compare commits

...

156 Commits

Author SHA1 Message Date
faffe3d874 Update EspoCRM Best Practices to version 2.4 with new features and implementation patterns for Custom API Endpoints; remove outdated TESTERGEBNISSE_JUNCTION_TABLE.md file. 2026-03-12 22:52:42 +01:00
bf0f596ad4 Update configuration and localization files for CAIKnowledgeCDokumente; add metadata and scopes 2026-03-12 22:40:38 +01:00
3ecc6275bc Implement CAIKnowledge and CDokumente junction functionality; add API routes, metadata, and localization files 2026-03-12 22:39:33 +01:00
d0397e475e Remove unused CAICollectionCDokumente localization, metadata, and service files; update CAIKnowledge layout and CAdvowareAkten scope type 2026-03-12 21:50:02 +01:00
51d9f7fa22 Refactor Blake3 hashing implementation in CDokumente; update localization and metadata files 2026-03-11 22:45:42 +01:00
80dc3b40d3 Implement Blake3 hashing in CDokumente; update related metadata and localization files 2026-03-11 22:20:21 +01:00
e15dd14cab Add 'pending_sync' status to syncStatus in CAIKnowledge and CAdvowareAkten entities; update tooltips and API documentation 2026-03-11 22:05:27 +01:00
54d66da52d Add 'syncedHash' field to CAIKnowledge and CAdvowareAkten entities; update API documentation and configuration timestamps 2026-03-11 21:53:35 +01:00
ae359048af Add 'aktivierungsstatus' field to CAIKnowledge and CAdvowareAkten entities; update API documentation and configuration timestamps 2026-03-11 21:49:02 +01:00
c678660ad6 Add 'unsupported' status to dokumenteSyncstatus in CAIKnowledge and CAIKnowledgeCDokumente; update API documentation and configuration timestamps 2026-03-11 21:19:56 +01:00
c952fc40bc Update configuration and state files; adjust microtime values and add CAIKnowledgeCDokumente junction entity with metadata and API documentation 2026-03-11 20:48:35 +01:00
b2c391539d Update documentation for Junction Table UI-Integration and document propagation patterns; include new features and best practices for sync status management 2026-03-11 20:38:45 +01:00
e7b14406fb Update detail layouts for CMietinkasso and CVmhRumungsklage to include AI Knowledge and Advoware Akten; update cache and microtime state in state.php 2026-03-11 20:09:13 +01:00
4707925917 Update timestamps in config and state files; add hooks for document relation propagation in CAIKnowledge, CAdvowareAkten, CMietinkasso, and CVmhRumungsklage 2026-03-11 20:07:34 +01:00
c2c9cfe709 Remove Advoware and x.AI related fields, tooltips, and options from CDokumente JSON files. Add UpdateJunctionSyncStatus hook to manage sync status for related entities on document updates. Update configuration timestamps in state and config files. 2026-03-11 19:55:29 +01:00
9411337939 Add sync status and last sync fields to CAIKnowledge and CAdvowareAkten entities, update layouts and metadata. Implement hooks for global sync status management. 2026-03-11 19:29:55 +01:00
986cafcfd6 Add new fields and layouts for AI Knowledge and Advoware Akten, update translations and metadata 2026-03-11 19:11:41 +01:00
c12577f4f8 Add AI Knowledge entity and related localization
- Introduced CAIKnowledge entity with fields for name, description, and relationships to Mietinkasso and Räumungsklage.
- Added localization files for CAIKnowledge in multiple languages including English, German, Spanish, and more.
- Updated existing JSON files to include references to AI Knowledge where applicable.
- Created necessary metadata definitions for client, entity, and record definitions for CAIKnowledge.
- Enhanced existing documents and mietinkasso resources to support new AI Knowledge functionality.
2026-03-11 18:30:21 +01:00
f7b1adc015 Add CAdvowareAkten entity and related metadata
- Introduced new entity CAdvowareAkten with fields: name, description, createdAt, modifiedAt, assignedUser, teams, vmhRumungsklage, mietinkasso, aktenzeichen, and aktennummer.
- Defined relationships for CAdvowareAkten with existing entities: CVmhRumungsklage and CMietinkasso.
- Created client definitions, layouts, and ACL for CAdvowareAkten.
- Added internationalization support for CAdvowareAkten in multiple languages.
- Updated existing entities and metadata to include references to CAdvowareAkten.
2026-03-11 18:21:20 +01:00
0f307c7eca Remove CAICollection and CAdvowareAkten entities and their associated metadata, layouts, services, and translations. Update configuration and state files accordingly. Add side panel configuration for CMietinkasso. 2026-03-11 10:24:52 +01:00
9ab8f8b4bf Add Mietinkasso and Räumungsklage fields to translations and metadata, update layouts and configuration 2026-03-11 10:15:02 +01:00
8438af8f97 Update translations and metadata for CVmhRumungsklage, and synchronize cache timestamps 2026-03-11 09:27:54 +01:00
76c38e8ad4 Refactor code structure for improved readability and maintainability 2026-03-11 09:21:52 +01:00
c2766ec66a Update documentation for EspoCRM Best Practices and Validator Tool 2026-03-10 12:46:14 +01:00
9b18a63acf Update configuration timestamps, add custom services, and implement validation and rebuild script for EspoCRM 2026-03-10 12:35:01 +01:00
641e5c0a91 Update cache timestamps and microtime values in configuration and state files 2026-03-10 12:24:35 +01:00
3470dba301 Add junction entities and ACL for CAICollection, CAdvowareAkten, and CPulsTeam
- Introduced new junction entities: CAICollectionCDokumente, CAdvowareAktenCDokumente, and CPulsTeamZuordnung.
- Implemented respective controllers and services for handling CRUD operations.
- Added metadata definitions for new entities, including fields, links, and indexes.
- Created language files for English and German translations for the new entities.
- Developed a script to set ACL permissions for the new junction entities across existing roles.
- Updated existing entity definitions to include new relationships and fields related to Advoware and AI Collections.
2026-03-10 00:10:57 +01:00
0340c59e5c Add CAICollection and Advoware Akten entity and related resources 2026-03-09 23:57:48 +01:00
cd7c80af0f Remove CPulsTeamZuordnung entity definitions, localization files, and update cache timestamps in configuration and state files. 2026-03-09 23:56:19 +01:00
1f32fbb89b Remove CAICollectionCDokumente and CAICollections controllers, related metadata, and localization files. Update configuration and state files. 2026-03-09 23:55:42 +01:00
63e3841f86 Update documentation: Add Hook development section and Custom Entities overview 2026-03-09 23:12:30 +01:00
2e9db78c6e Refactor code structure for improved readability and maintainability 2026-03-09 23:07:05 +01:00
3361cffb14 introducing junction table extension 2026-03-09 22:42:40 +01:00
47634c81ef add CAICollections entity with metadata and localization support 2026-03-09 21:28:21 +01:00
53dd8f33d4 fix: Update fileStatus to 'synced' in CDokumente hooks and translations; adjust microtime and cacheTimestamp in config and state files 2026-03-08 21:56:00 +01:00
1b904eb15f 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 2026-03-08 21:10:08 +01:00
3547f47fc3 fix: Update xaiSyncStatus descriptions and default value; adjust microtime and cacheTimestamp in config and state files; add beforeSaveScript for x.AI sync status management 2026-03-08 20:16:51 +01:00
1d3eb86c6e fix: Update microtime and cacheTimestamp values in config and state files 2026-03-08 20:14:21 +01:00
926b6d9719 fix: Add "no_sync" status to CDokumente translations; update microtime values in config and state files 2026-03-08 20:09:14 +01:00
81a690277f fix: Add webhookAllowedAddressList to config; update cacheTimestamp and microtimeState in state 2026-03-08 19:40:20 +01:00
ded721a9d4 fix: Add "pulse" field to multiple JSON files; update microtime values in config and state files 2026-03-08 19:19:09 +01:00
218b6e0d97 some big beautiful update 2026-03-08 19:18:17 +01:00
845a55d170 fix: Swap md5sum and fileStatus fields in CDokumente layout; update microtime values in config and state files 2026-03-03 10:05:57 +01:00
6696f3f3c2 fix: Update beforeSave hook in CDokumente to ensure hash calculation on file changes; adjust microtime values in state file 2026-03-03 09:57:22 +01:00
22ac828747 fix: Remove unused Util import in CDokumente hook; update microtime values in config and state files 2026-03-03 09:55:29 +01:00
752969ec39 fix: Update CDokumente entity to allow editing after creation; adjust microtime values in config and state files 2026-03-03 08:24:21 +01:00
ec25089ab4 feat: Add file status tracking to CDokumente entity; implement beforeSave hook for hash calculation and status determination 2026-03-03 08:17:51 +01:00
ba986a32fe some big beautfiul update 2026-03-02 18:05:59 +01:00
bf7eaa965f feat: Refactor CPuls entity and related resources; enhance localization, update layouts, and improve validation logic 2026-02-13 10:28:21 +01:00
e1a963ffab feat(CPuls): Enhance CPuls entity with new fields, tooltips, and options; add localization for German and English
- Added new fields to CPuls entity including status, syncStatus, kiAnalyse, and others.
- Implemented localization for CPuls in German (de_DE) and English (en_US).
- Introduced new API actions for team activation and completion of CPuls.
- Created hooks to update team statistics and manage document counts.
- Added new entity definitions and metadata for CPulsTeamZuordnung and Team.
- Implemented validation logic in formulas to prevent completion of unclean Puls.
- Updated layouts for detail and list views of CPuls.
- Enhanced user entity with absence tracking fields.
- Added scopes for CPuls and CPulsTeamZuordnung.
2026-02-13 10:09:19 +01:00
0faf1c0657 Add CPuls entity and related resources
- Introduced a new entity "CPuls" with metadata definitions including fields, links, and indexes.
- Updated existing JSON files to include "CPuls" in various contexts such as translations, entity definitions, and client definitions.
- Added localization support for "CPuls" in multiple languages.
- Modified existing files to accommodate the new entity in the application structure.
2026-02-13 09:53:35 +01:00
300441de67 feat: Update synchronization status options and default values across multiple entity definitions and language files 2026-02-08 23:51:21 +01:00
a24bc99b67 feat: Add dynamic logic for readOnly fields in CBankverbindungen entity and update cache timestamps in configuration files 2026-02-08 21:02:21 +01:00
31479e71e1 feat: Add kommunikationHash field to CBeteiligte entity and update related metadata, layouts, and internationalization files 2026-02-08 21:01:05 +01:00
1eebc62039 feat: Add advowareRowId field to CBeteiligte entity and update related metadata and layouts 2026-02-07 23:13:41 +01:00
6e6fc841f5 fix: Remove readOnly attribute from betnr and syncStatus fields in CBeteiligte entity 2026-02-07 16:27:50 +01:00
44658e1238 feat: Update layout configurations and metadata for CBeteiligte entity 2026-02-07 16:21:03 +01:00
f95246f99f updated advanced pack to 3.12.0:
Reports:

    Non-aggregated columns in Grid report export.
    Normalized table mode for 2-dimensional Grid reports.
    Ability to create internal reports via the UI.
    Ability to show/hide and resize columns in the list report result view.
2026-02-07 16:09:20 +01:00
26db904407 feat: Update internationalization files and metadata for Advoware integration 2026-02-07 16:08:30 +01:00
127fa6503b chore: Update copyright year from 2025 to 2026 across core files
- Updated copyright headers in 3,055 core application files
- Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026'
- Added 123 new files from EspoCRM core updates
- Removed 4 deprecated files
- Total changes: 61,637 insertions, 54,283 deletions

This is a routine maintenance update for the new year 2026.
2026-02-07 16:05:21 +01:00
6a8a4a2882 Add development plan for intelligent inbox system with AI analysis
- Introduced comprehensive specifications for the "Entwicklungen-System" aimed at automating document processing for eviction lawsuits, rent collection, and terminations.
- Defined core principles, architecture overview, and detailed entity models including CEntwicklung and CEntwicklungTeamZuordnung.
- Implemented validation rules, custom API endpoints, and middleware integration for document processing and absence management.
- Established testing and quality assurance strategies, including unit tests and integration scenarios.
- Outlined deployment checklist and rollback plan to ensure smooth implementation.
- Included future roadmap for potential enhancements and defined roles and responsibilities for team members.
2026-01-25 22:13:44 +01:00
3dab9243de feat: Expand file permission checks and automatic correction for critical system files 2026-01-25 21:37:36 +01:00
ba7796d7a9 feat: Enhance file permission checks and automatic correction for critical system files 2026-01-25 21:37:10 +01:00
c846d38f1e feat: Update configuration and metadata files for improved functionality and new features 2026-01-25 21:34:39 +01:00
b7bcfbe574 fix: Remove direct Mietobjekt relationships from services
- Removed mietobjekte linking in CVmhRumungsklage.php
- Removed mietobjekte linking in CVmhMietverhltnis.php
- Both entities now connect indirectly via Mietverhältnis
- Fixes 500 errors when creating Räumungsklage/Mietinkasso
- Resolved cache timestamp conflict in config.php
2026-01-25 20:50:19 +01:00
7473bbe270 feat: Clarify Mietobjekte collection process in CVmhRumungsklage class 2026-01-25 20:47:04 +01:00
c67f287a98 feat: Update layout configuration and reorder document indices in bottomPanelsDetail.json 2026-01-25 20:46:03 +01:00
858f7ea27e feat: Add new document types to relationship panels in CDokumente.json and update cache timestamps in config.php 2026-01-25 20:37:59 +01:00
0c133920d4 feat: Add important layout directory guidelines and best practices to README.md 2026-01-25 20:36:17 +01:00
c1bffb1ee9 feat: Update cache timestamps in config.php and recreate listSmall.json layout 2026-01-25 20:35:28 +01:00
842406df82 feat: Update cache timestamps in config.php and add new layout metadata in listSmall.json 2026-01-25 20:29:27 +01:00
9af2e58f3f feat: Update tab configuration and add dynamic logic to stream section in bottomPanelsDetail.json 2026-01-25 20:01:15 +01:00
229a2a5906 feat: Remove unused fields from JSON files and update layout configurations 2026-01-25 19:57:33 +01:00
c8233ef0d1 feat: Update README.md handling and add reminder to read documentation in output 2026-01-25 19:48:43 +01:00
e2b2a5a3b9 feat: Update tab labels and reorganize sections in bottomPanelsDetail.json 2026-01-25 19:44:14 +01:00
bb83df2577 feat: Update type from 'Base' to 'BasePlus' in multiple JSON metadata files 2026-01-25 19:40:19 +01:00
6d883aca8c feat: Update tab labels from 'Stream' to 'Ereignisse' across multiple JSON files 2026-01-25 19:39:10 +01:00
955b0de220 feat: Add 'Stream' label and related configurations across multiple JSON files 2026-01-25 19:15:47 +01:00
ec2c55d058 feat: Implement logging for Mietinkasso and Kündigung actions in CVmhMietverhltnis service 2026-01-25 18:39:26 +01:00
a4df1aac14 feat: Add logging for Räumungsklage creation to source entity stream 2026-01-25 18:38:27 +01:00
2d0f04f77e feat: Update ACL permissions from 'edit' to 'stream' for eviction actions 2026-01-25 18:36:42 +01:00
b3d56d6b74 feat: Refactor eviction lawsuit initiation to delegate to CVmhRumungsklage service 2026-01-25 18:23:11 +01:00
9249628ff4 feat: Update eviction lawsuit naming to use first Mietverhältnis if available 2026-01-25 14:25:11 +01:00
067344866d fix: Update navigation route for Kündigung to Kuendigung in termination action handler 2026-01-25 14:14:46 +01:00
c92dbf7191 feat: Implement eviction lawsuit initiation from Kündigung with related data handling 2026-01-25 14:10:50 +01:00
146a046a0e feat: Update identifiers in JSON files and improve terminal command approvals 2026-01-25 13:18:48 +01:00
1bd3729791 renamed entity kndigung to kuendigung 2026-01-25 13:07:07 +01:00
416cddd496 added e2e testsuite 2026-01-25 12:57:12 +01:00
552540e214 feat: Add KI-Einstiegsscript for comprehensive project overview
- Introduced `ki_project_overview.py` for automated analysis of EspoCRM project structure, entities, relationships, custom PHP classes, workflows, frontend adjustments, and internationalization.
- Created `ki-overview.sh` wrapper script for executing the Python script with various output options.
- Updated `README.md` to include a quick start section for the new KI entry script.
- Added detailed documentation in `KI_OVERVIEW_README.md` explaining the script's purpose, usage, and output format.
- Summarized the new features and files in `KI_OVERVIEW_SUMMARY.md`.
- Enhanced `.vscode/settings.json` to approve new scripts for execution.
2026-01-25 12:34:46 +01:00
b8147f6e61 Update cacheTimestamp and microtime values in config.php for improved caching 2026-01-25 12:13:04 +01:00
f7a24b8aef Enhance CKndigung entity: add new fields, update layouts, and implement document synchronization hook 2026-01-25 11:56:10 +01:00
292a0b57b9 Refactor termination and rental object entities
- Removed the "Kündigungen" field from the German and English rental object JSON files.
- Updated the termination JSON files to reflect new field names and structure, including renaming "kuendigungsart" to "beendigungsTatbestand" and "kuendigungsgrund" to "kuendigungsgrund" with updated options.
- Deleted the old "CKuendigung" entity definition and related metadata, consolidating functionality into "CKndigung".
- Adjusted the service logic to accommodate the new structure, ensuring proper linking of landlords and tenants.
- Updated dynamic visibility logic for fields based on conditions related to termination reasons and delivery methods.
- Cleaned up metadata definitions for both termination and rental object entities, removing unnecessary relationships and fields.
- Incremented cache and microtime values in the configuration file.
2026-01-25 11:41:57 +01:00
4e4597e124 Merge detached HEAD: Add Kündigung entity with complete layouts and fix all false placeholders in detail.json files for EspoCRM 7.x compatibility 2026-01-25 10:31:03 +01:00
3a987547b3 Refactor layout configurations in multiple detail.json files; replace 'false' with empty objects for improved structure and consistency 2026-01-25 10:29:46 +01:00
fb6ef2b960 Enhance layout validation in EntityValidator; add critical checks for bottomPanelsDetail.json and detail.json files, and improve error/warning reporting 2026-01-25 10:28:19 +01:00
eaeba65487 Add CKndigung layout files and update cache timestamps; improve UI structure and error handling 2026-01-25 10:26:44 +01:00
30326da8c6 Add termination (Kündigung) functionality and related translations
- Implemented the ability to initiate terminations from Mietverhältnisse.
- Added new fields and options for terminations in both German and English language files.
- Updated metadata definitions to include relationships for terminations with Mietobjekte and Beteiligte.
- Enhanced the service layer to handle termination creation, including linking relevant entities and copying documents.
- Updated configuration timestamps for deployment.
2026-01-25 10:06:02 +01:00
07ff3c5c54 Add CKndigung entity and related resources
- Created CKndigung controller extending BasePlus.
- Added internationalization support for CKndigung in multiple languages (ar_AR, bg_BG, cs_CZ, da_DK, de_DE, en_GB, en_US, es_ES, es_MX, fa_IR, fr_FR, hr_HR, hu_HU, id_ID, it_IT, ja_JP, lt_LT, lv_LV, nb_NO, nl_NL, pl_PL, pt_BR, pt_PT, ro_RO, ru_RU, sk_SK, sl_SI, sr_RS, sv_SE, th_TH, tr_TR, uk_UA, vi_VN, zh_CN, zh_TW).
- Defined CKndigung metadata including entity definitions, record definitions, and scopes.
- Updated global configuration to include CKndigung in relevant lists.
2026-01-24 13:01:04 +01:00
0d2d35bca1 feat: Add termination functionality for rental agreements
- Introduced new entity `CKuendigung` for managing terminations.
- Added fields for termination details including date, reason, type, and status.
- Implemented backend service to initiate terminations from rental agreements.
- Created frontend handler for termination actions with confirmation dialog.
- Updated metadata and layouts for `CKuendigung` to support new functionality.
- Added internationalization support for English and German languages.
- Enhanced existing entities to establish relationships with terminations.
2026-01-24 12:45:57 +01:00
e490e261b7 Add CKndigung entity and related resources
- Introduced CKndigung entity with metadata definitions including fields, links, indexes, and scopes.
- Added CKndigung controller for handling requests.
- Created internationalization files for CKndigung in multiple languages.
- Updated existing metadata and resource files to include CKndigung references.
- Enhanced global translations to support CKndigung terminology.
2026-01-24 12:34:02 +01:00
2bc3158cd5 Refactor eviction and rent collection features; migrate logic from Mietobjekt to Mietverhältnis; update localization and UI handlers 2026-01-24 12:28:37 +01:00
6e0c104c6f Update cache timestamps in config; add README for custom actions implementation 2026-01-24 11:59:46 +01:00
ec612318c3 Implement eviction lawsuit initiation feature for Mietobjekt; add related UI and backend logic; update localization and configuration 2026-01-24 11:51:16 +01:00
3da6d140c7 Refactor checkbox field styling for better layout; update cache timestamps in config 2026-01-24 00:52:59 +01:00
e781c49491 Update validation command approvals in settings; enhance checkbox toggle slider styles for checklist items; adjust cache timestamps in config 2026-01-24 00:44:46 +01:00
933df204f2 Add CSS validation and new checkbox toggle slider styles; update validation tools documentation 2026-01-24 00:38:56 +01:00
dfb0ff1fbc Add new CVMHBeteiligte entity with localization support; update related links and fields in multiple JSON files 2026-01-24 00:15:54 +01:00
00a6e1c238 Enhance rebuild process with Docker support; update cache handling and fallback logic 2026-01-24 00:10:18 +01:00
71ba417a27 Add validation script approval for Python-based rebuild; update CBankverbindungen entity to include contactsBankverbindung relation 2026-01-24 00:07:47 +01:00
9ca366d80f Add relationships for Mietobjekte in CMietinkasso and CVmhRumungsklage; update Contact entity to reference CBankverbindungen 2026-01-24 00:06:41 +01:00
b6cf03c4cf Replace legacy Bash check and rebuild script with a new Python-based validator; add comprehensive validation checks and improve documentation for usage and features. 2026-01-24 00:05:18 +01:00
ee7a36ef41 Add DISG personality type and caller type fields; update visibility logic for CBeteiligte and Contact entities 2026-01-23 23:52:17 +01:00
65af6fd80b Add rent collection fields and update layouts for CBeteiligte entity 2026-01-23 23:41:30 +01:00
8317190bb8 Remove unused Beteiligte tab and related fields from CAdressen layout; update detail layout to include Beteiligte field 2026-01-23 23:30:27 +01:00
8d7ffb30c5 Remove note text and style from Miethöhe field; clean up dynamic logic in CVmhMietverhltnis metadata 2026-01-23 23:17:26 +01:00
cc142af834 Add warmmiete calculation logic and related metadata; implement custom view for warmmiete field 2026-01-23 23:14:31 +01:00
ebe8d86732 Add new fields for rental details and update localization; enhance layout for better visibility 2026-01-23 23:13:12 +01:00
b59e91f278 Add dateOfBirth field and localization support for CBeteiligte entity; update layouts and metadata 2026-01-23 23:09:00 +01:00
daa812ea21 Add Mietinkasso entity and related localization, layouts, and metadata 2026-01-23 23:06:10 +01:00
4b66d5f356 Add CMietinkasso entity and localization support
- Introduced a new entity "CMietinkasso" with its metadata definitions, including fields, links, and indexes.
- Added controller for CMietinkasso to handle business logic.
- Created localization files for CMietinkasso in multiple languages (e.g., English, German, Spanish, etc.) to support internationalization.
- Updated global JSON files to include references to the new entity.
- Modified configuration files to integrate CMietinkasso into the application structure.
2026-01-23 22:43:04 +01:00
e3a984bb5d Enhance error handling in check_and_rebuild.sh: display last log entries on rebuild failure 2026-01-23 22:39:50 +01:00
2e5b0d8e6f Add 'Vorbereitung' status option in German and English translations; update cache timestamps 2026-01-23 22:36:44 +01:00
908b20aef7 Remove 'syncStatus' field from bank connections layout and update cache timestamps 2026-01-23 21:53:28 +01:00
a04d6547b6 Update README.md: reorder table of contents and add section on common errors 2026-01-23 21:51:13 +01:00
9f069d1fe2 Update EspoCRM Custom Directory documentation and modify cache timestamps in config
- Enhanced the EspoCRM Custom Directory documentation to provide a comprehensive overview of the directory structure and customization options.
- Updated cache timestamps in the configuration file to reflect recent changes.
2026-01-23 21:46:38 +01:00
a5f1437131 Add 'copyToClipboard' property to various fields and update cache timestamps 2026-01-23 21:31:16 +01:00
d675d9fcb1 Update layouts for bank connections: add 'kontoinhaber' field, adjust link properties, and refresh cache timestamps 2026-01-23 21:19:51 +01:00
45456d8bf9 Add 'bankverbindungens' field and related layout; update cache timestamps 2026-01-23 21:17:09 +01:00
d433a01b65 Update CSS for 'vorzusch1Instanz' highlighting and adjust cache timestamps in config 2026-01-23 21:05:00 +01:00
ac6b9a87f6 Add highlight styles for 'vorzusch1Instanz' costs and update client metadata 2026-01-23 20:56:18 +01:00
e6e44317d6 Update note style for fee calculation to info in CVmhErstgespraech layout; adjust cache timestamps in config 2026-01-23 20:48:01 +01:00
8700e4cd42 Add 'beruecksichtigtePersonen' field and implement dynamic text updates in CVmhErstgespraech entity; enhance templates and localization 2026-01-23 20:43:24 +01:00
56271ca05a Add 'kostenRaeumungsantrag' field and update related calculations and localization in CVmhErstgespraech entity 2026-01-23 20:14:43 +01:00
42d396f460 Add RVG calculation module and integrate cost calculations into CVmhErstgespraech entity 2026-01-23 19:45:00 +01:00
cf60d2a91d Add warmmiete and streitwert calculations; enhance check_and_rebuild script for cache clearing 2026-01-23 17:53:41 +01:00
e1a7158931 Add IBAN and BIC validation with custom hooks; update localization messages and cache timestamps 2026-01-23 16:20:26 +01:00
15ecc7068f Refactor CBankverbindungen entity: remove IBAN validation formula and update metadata; adjust cache timestamps 2026-01-23 16:00:16 +01:00
ac58b51452 Add CBankverbindungen entity with multilingual support, tooltips, and layout definitions 2026-01-23 15:51:42 +01:00
185524e432 Add CBankverbindungen entity with multilingual support and metadata definitions 2026-01-23 15:15:29 +01:00
99045d55d2 Add report integration for BpmnUserTask with filters and panels; update cache timestamps 2026-01-22 13:40:14 +01:00
c9e5846110 Remove backup workflow definition for vmh-erstberatung-abschließen to streamline workflow management 2026-01-21 00:11:29 +01:00
37e158c806 Enhance workflow manager and definitions with category support for better organization 2026-01-21 00:01:51 +01:00
8c83e54650 Enhance documentation and workflow management in EspoCRM
- Update README.md to include a table of contents and detailed sections on workflow management and custom scripts.
- Remove deprecated 'runWorkflow' field from CVmhErstgespraech localization files.
- Add 'runWorkflow' field to detail layout for CVmhErstgespraech.
- Update workflow_manager.php to improve workflow listing and management functionality.
- Adjust cache timestamps in config.php.
- Create CUSTOM_DIRECTORY.md to outline the custom directory structure and best practices.
- Add README.md for workflow definitions with usage examples and JSON format specifications.
- Introduce new workflow definitions for 'vmh-erstberatung-abschließen' and its backup.
2026-01-20 23:58:29 +01:00
e878125489 Update labels for Mietverhältnisse in CMietobjekt.json to clarify terminology 2026-01-20 22:56:02 +01:00
06326d4d0b Add new entity definitions and fields for CVMHBeteiligte, update existing metadata for CBeteiligte, CDokumente, CMietobjekt, CVmhErstgespraech, CVmhMietverhltnis, CVmhRumungsklage, CVmhVermieter, and Contact; adjust cache timestamps in config.php 2026-01-20 22:55:28 +01:00
96becef2ba Refactor localization and metadata for CVMHBeteiligte
- Added "Location" field and tooltip to CMietobjekt localization.
- Removed CVMHBeteiligte localization files in multiple languages (es_ES, es_MX, fa_IR, fr_FR, hr_HR, hu_HU, id_ID, it_IT, ja_JP, lt_LT, lv_LV, nb_NO, nl_NL, pl_PL, pt_BR, pt_PT, ro_RO, ru_RU, sk_SK, sl_SI, sr_RS, sv_SE, th_TH, tr_TR, uk_UA, vi_VN, zh_CN, zh_TW).
- Deleted CVMHBeteiligte layout definitions and metadata.
- Updated Call, Contact, PhoneNumber, and User localization files in German and English.
- Removed references to CVMHBeteiligte in various entity definitions and metadata.
- Updated configuration file with new cache timestamp.
2026-01-20 22:43:39 +01:00
5750c4486e Update permissions correction logic in check_and_rebuild.sh; adjust cache timestamps in config.php; add listSmall.json layout for CVmhRumungsklage 2026-01-20 22:32:32 +01:00
8d912c6613 Refactor CVmhErstgespraech layout by updating field names and removing width attributes; adjust cache timestamps in config. 2026-01-20 22:27:57 +01:00
156c712737 Add new fields to CAdressen JSON and metadata; update layout for Advoware Sync; refresh cache timestamps in config. 2026-01-20 21:58:48 +01:00
88068364cc Refactor layouts in CBeteiligte and CDokumente by removing unnecessary array elements; update cache timestamps in config. 2026-01-20 21:56:47 +01:00
2f3f686421 Add new fields to CVmhRumungsklage JSON and update layout; refresh cache timestamps in config 2026-01-20 21:55:16 +01:00
e51f0f2cfb Update layout widths in CVmhMietverhltnis; adjust cache timestamps in config 2026-01-20 21:40:12 +01:00
1ef2617bc7 Refactor CVmhMietverhltnis and CMietobjekt layouts; add dynamic logic for fields; update cache timestamps in config; adjust permissions for check & rebuild script. 2026-01-20 21:39:00 +01:00
8a814681b0 Refactor layouts for CBeteiligte and CDokumente; add new layout for CAdressen; update widths and add modifiedAt field in JSON files; adjust config timestamps. 2026-01-20 21:24:22 +01:00
ed710c73a5 Refactor layouts by updating widths in CVmhMietverhltnis and adding new listSmall layout for CAdressen; create layout for CVmhRumungsklage; update cache timestamps in config. 2026-01-20 21:17:25 +01:00
475e387c68 Update VSCode settings for auto-approval of check and rebuild script; modify layout widths in CMietobjekt list and refresh cache timestamps in config 2026-01-20 20:57:28 +01:00
7523 changed files with 1110069 additions and 36152 deletions

View File

@@ -0,0 +1,548 @@
---
description: "EspoCRM developer specialist. Use when: creating entities, implementing relationships, developing API endpoints, writing Controllers/Services, building workflows, implementing hooks, creating layouts, adding i18n translations, fixing bugs, or any EspoCRM custom development task following documented best practices."
name: "EspoCRM Developer"
tools: [read, edit, search, execute]
user-invocable: true
argument-hint: "Describe the development task (entity, relationship, API, etc.)"
---
You are an **Expert EspoCRM Developer** specializing in custom development for EspoCRM 9.3.2.
## Your Identity
You are a senior developer with deep expertise in:
- EspoCRM custom entity development
- Many-to-Many relationships with Junction Tables
- REST API development (Controller/Service/Repository pattern)
- PHP 8.2.30 with strict typing
- MariaDB 12.2.2 database design
- Frontend customization (JavaScript, Layouts)
- Workflow automation
- ACL and permissions management
## Your Mission
Implement high-quality EspoCRM customizations following documented best practices, ensuring:
1. ✅ Code follows project conventions
2. ✅ All required files are created (entityDefs, scopes, i18n, etc.)
3. ✅ Relationships are bidirectional
4. ✅ Validation passes before deployment
5. ✅ Changes are tested and working
## Primary Reference: Documentation
**ALWAYS consult these files BEFORE implementing:**
```bash
# Main reference - read this FIRST
cat custom/docs/ESPOCRM_BEST_PRACTICES.md
# Project overview for context
python3 custom/scripts/ki_project_overview.py
# Specific topics
cat custom/docs/TESTERGEBNISSE_JUNCTION_TABLE.md # Junction Tables
cat custom/CUSTOM_DIRECTORY.md # File structure
cat custom/README.md # Architecture patterns
```
## Implementation Workflow
### Before Starting ANY Task
1. **Read documentation for the specific pattern:**
```bash
# Entity development
cat custom/docs/ESPOCRM_BEST_PRACTICES.md | grep -A 100 "Entity-Entwicklung"
# Relationships
cat custom/docs/ESPOCRM_BEST_PRACTICES.md | grep -A 150 "Relationship-Patterns"
# API development
cat custom/docs/ESPOCRM_BEST_PRACTICES.md | grep -A 150 "API-Entwicklung"
```
2. **Check existing implementations as examples:**
```bash
# Find similar entities
find custom/Espo/Custom/Resources/metadata/entityDefs -name "*.json"
# Find similar controllers
find custom/Espo/Custom/Controllers -name "*.php"
```
3. **Understand current project structure:**
```bash
python3 custom/scripts/ki_project_overview.py | grep -A 50 "ENTITÄTEN ANALYSE"
```
### Entity Development Pattern
**Required files (in order):**
1. **Entity Definition**
- Path: `custom/Espo/Custom/Resources/metadata/entityDefs/{EntityName}.json`
- Template from: ESPOCRM_BEST_PRACTICES.md section "Entity Definition Template"
- Must include: fields, links
- Naming: `C{EntityName}` for custom entities
2. **Scope Definition**
- Path: `custom/Espo/Custom/Resources/metadata/scopes/{EntityName}.json`
- Template from: ESPOCRM_BEST_PRACTICES.md section "Scope Definition"
- Configure: tab, acl, stream, calendar
3. **i18n - BEIDE Sprachen (CRITICAL):**
- Path: `custom/Espo/Custom/Resources/i18n/de_DE/{EntityName}.json`
- Path: `custom/Espo/Custom/Resources/i18n/en_US/{EntityName}.json`
- Must include: labels, fields, links, options, tooltips
- en_US is FALLBACK - must be complete!
4. **Layouts (if needed):**
- Path: `custom/Espo/Custom/Resources/layouts/{EntityName}/detail.json`
- Path: `custom/Espo/Custom/Resources/layouts/{EntityName}/list.json`
- **CRITICAL**: Use `{}` not `false` as placeholder (EspoCRM 7.x+)
5. **Validate IMMEDIATELY:**
```bash
python3 custom/scripts/validate_and_rebuild.py
```
### Relationship Implementation Pattern
**CRITICAL: Relationships must be BIDIRECTIONAL**
**One-to-Many Example:**
```json
// Parent Entity (CMietobjekt)
{
"links": {
"mietverhltnisse": {
"type": "hasMany",
"entity": "CVmhMietverhltnis",
"foreign": "mietobjekt" // ← Must point to link name in child
}
}
}
// Child Entity (CVmhMietverhltnis)
{
"fields": {
"mietobjektId": {"type": "varchar", "len": 17},
"mietobjektName": {"type": "varchar"}
},
"links": {
"mietobjekt": {
"type": "belongsTo",
"entity": "CMietobjekt",
"foreign": "mietverhltnisse" // ← Must point to link name in parent
}
}
}
```
**Many-to-Many with Junction Table:**
```json
// Both entities need identical relationName
// Entity 1
{
"links": {
"relatedEntities": {
"type": "hasMany",
"entity": "EntityB",
"foreign": "relatedFromA",
"relationName": "EntityAEntityB" // ← MUST MATCH
}
}
}
// Entity 2
{
"links": {
"relatedFromA": {
"type": "hasMany",
"entity": "EntityA",
"foreign": "relatedEntities",
"relationName": "EntityAEntityB" // ← MUST MATCH
}
}
}
```
**Junction Table with additionalColumns:**
- Follow: `custom/docs/TESTERGEBNISSE_JUNCTION_TABLE.md`
- Create Junction Entity with Controller + Service
- Set `tab: false` in scope
- ⚠️ **NEVER** display in UI relationship panels (causes 405 errors)
- ✅ Use API-only pattern: `/api/v1/JunctionEntityName`
### API Development Pattern
**Structure (3 files minimum):**
1. **Controller:**
```php
<?php
namespace Espo\Custom\Controllers;
use Espo\Core\Controllers\Record;
use Espo\Core\Api\Request;
class CMyEntity extends Record
{
/**
* POST /api/v1/CMyEntity/action/customAction
*/
public function postActionCustomAction(Request $request): array
{
$data = $request->getParsedBody();
// Delegate to service
$result = $this->getRecordService()->customAction($data);
return ['success' => true, 'data' => $result];
}
}
```
2. **Service:**
```php
<?php
namespace Espo\Custom\Services;
use Espo\Services\Record;
use Espo\Core\Exceptions\{Forbidden, NotFound, BadRequest};
class CMyEntity extends Record
{
public function customAction(\stdClass $data): array
{
// ACL Check
if (!$this->getAcl()->checkEntityEdit($this->entityType)) {
throw new Forbidden();
}
// Validation
if (!isset($data->id)) {
throw new BadRequest('ID is required');
}
// Load Entity
$entity = $this->getEntityManager()->getEntity($this->entityType, $data->id);
if (!$entity) {
throw new NotFound();
}
// Business Logic
$entity->set('status', 'Updated');
$this->getEntityManager()->saveEntity($entity);
return $entity->getValueMap();
}
}
```
3. **i18n (labels for API actions):**
```json
{
"labels": {
"Custom Action": "Benutzerdefinierte Aktion"
}
}
```
### Layout Development Pattern
**CRITICAL RULES:**
1. EspoCRM 7.x+ requires `{}` not `false` as placeholder
2. bottomPanelsDetail.json must be OBJECT not ARRAY
**Detail Layout:**
```json
[
{
"label": "Overview",
"rows": [
[
{"name": "name"},
{"name": "status"}
],
[
{"name": "description"},
{}
]
]
}
]
```
**Bottom Panels Detail:**
```json
{
"activities": {
"name": "activities",
"label": "Activities",
"view": "views/record/panels/activities",
"order": 3
},
"customPanel": {
"name": "customPanel",
"label": "Custom Panel",
"view": "views/record/panels/relationship",
"layout": "relationships/customLink",
"order": 10
}
}
```
### Validation & Testing Pattern
**ALWAYS run after ANY change:**
```bash
# Full validation + rebuild
python3 custom/scripts/validate_and_rebuild.py
# If errors, logs are automatically shown
# Fix errors and re-run until clean
```
**After successful rebuild:**
```bash
# Test CRUD operations
python3 custom/scripts/e2e_tests.py
# Manual API test
curl -X GET "https://crm.example.com/api/v1/CMyEntity" \
-H "X-Api-Key: your-key"
```
## Critical Knowledge Base
### Common Pitfalls & Solutions
**1. Missing i18n (en_US)**
- **Symptom**: English fallback in UI
- **Solution**: Create BOTH de_DE AND en_US files
- **Check**: `ls custom/Espo/Custom/Resources/i18n/*/EntityName.json`
**2. Relationship not working**
- **Symptom**: Link doesn't show in UI
- **Check**: `foreign` field points to correct link name in other entity
- **Check**: `relationName` matches on both sides (M2M only)
- **Fix**: Run `validate_and_rebuild.py` - it checks this automatically
**3. Layout placeholder error**
- **Symptom**: Rebuild fails or layout broken
- **Fix**: Replace all `false` with `{}` in layout JSON
- **Version**: Required in EspoCRM 7.x+
**4. 405 Method Not Allowed**
- **Symptom**: Error when viewing relationship panel
- **Cause**: additionalColumns in relationship panel
- **Solution**: Remove panel, use Junction Entity API only
- **Reference**: TESTERGEBNISSE_JUNCTION_TABLE.md
**5. ACL 403 Forbidden**
- **Symptom**: API returns 403 even with admin
- **Check**: Role has permissions on entity
- **Fix**: Admin UI → Roles → Add entity permissions
- **Quick SQL**:
```sql
UPDATE role
SET data = JSON_SET(data, '$.table.CMyEntity',
JSON_OBJECT('create','yes','read','all','edit','all','delete','all')
)
WHERE name = 'RoleName';
```
**6. Rebuild fails with JSON error**
- **Symptom**: Syntax error in metadata
- **Check**: `python3 custom/scripts/validate_and_rebuild.py --dry-run`
- **Common**: Trailing commas, unquoted keys, wrong brackets
### Naming Conventions
**Entities:**
- Custom: `C{Name}` (e.g., `CMietobjekt`)
- VMH prefix: `CVmh{Name}` (e.g., `CVmhMietverhltnis`)
- Junction: `{EntityA}{EntityB}` (e.g., `CAICollectionCDokumente`)
**Fields:**
- camelCase: `myFieldName`
- Link IDs: `{linkName}Id` (e.g., `mietobjektId`)
- Link Names: `{linkName}Name` (e.g., `mietobjektName`)
**Files:**
- Entity Defs: PascalCase matching entity name
- Controllers/Services: Namespace matches entity name
- Layouts: lowercase entity name for directory
### File Permissions
**After creating files:**
```bash
sudo chown -R www-data:www-data custom/
sudo find custom/ -type f -exec chmod 664 {} \;
sudo find custom/ -type d -exec chmod 775 {} \;
```
**Automatic**: `validate_and_rebuild.py` fixes permissions
## Implementation Checklist
### New Entity:
- [ ] Read Entity Development Pattern from BEST_PRACTICES.md
- [ ] Create entityDefs/{EntityName}.json
- [ ] Create scopes/{EntityName}.json
- [ ] Create i18n/de_DE/{EntityName}.json
- [ ] Create i18n/en_US/{EntityName}.json (REQUIRED!)
- [ ] Create layouts if needed (detail.json, list.json)
- [ ] Run validate_and_rebuild.py
- [ ] Verify in UI
- [ ] Test CRUD via API or e2e_tests.py
### New Relationship:
- [ ] Read Relationship Pattern from BEST_PRACTICES.md
- [ ] Add link in Entity A with correct `foreign`
- [ ] Add link in Entity B with correct `foreign`
- [ ] Match `relationName` if Many-to-Many
- [ ] Add i18n for link labels in both languages
- [ ] Run validate_and_rebuild.py (checks bidirectionality)
- [ ] Test relationship in UI
- [ ] Verify via API
### New API Endpoint:
- [ ] Read API Development Pattern from BEST_PRACTICES.md
- [ ] Create or extend Controller with action method
- [ ] Implement business logic in Service
- [ ] Add ACL checks
- [ ] Add i18n labels
- [ ] Run validate_and_rebuild.py
- [ ] Test with curl or Postman
- [ ] Document endpoint usage
### Junction Table with additionalColumns:
- [ ] Read TESTERGEBNISSE_JUNCTION_TABLE.md COMPLETELY
- [ ] Add relationName and additionalColumns to both entities
- [ ] Create Junction Entity (entityDefs + scopes)
- [ ] Create Junction Controller (extends Record)
- [ ] Create Junction Service (extends Record)
- [ ] Set tab: false in Junction scope
- [ ] Add i18n for Junction Entity
- [ ] Set ACL permissions via SQL
- [ ] Run validate_and_rebuild.py
- [ ] Test via API: GET /api/v1/JunctionEntityName
- [ ] DO NOT add UI panel (causes 405!)
## Output Format
### For Entity Creation:
```markdown
## ✅ Entity Created: {EntityName}
### Files Created:
1. [entityDefs/{EntityName}.json](custom/Espo/Custom/Resources/metadata/entityDefs/{EntityName}.json)
- {X} fields defined
- {Y} links configured
2. [scopes/{EntityName}.json](custom/Espo/Custom/Resources/metadata/scopes/{EntityName}.json)
- Tab: {true/false}
- ACL: enabled
3. [i18n/de_DE/{EntityName}.json](custom/Espo/Custom/Resources/i18n/de_DE/{EntityName}.json)
- German translations complete
4. [i18n/en_US/{EntityName}.json](custom/Espo/Custom/Resources/i18n/en_US/{EntityName}.json)
- English fallback complete
### Validation:
```bash
python3 custom/scripts/validate_and_rebuild.py
```
Status: ✅ PASSED / ❌ ERRORS (see above)
### Next Steps:
- [ ] Add relationships to other entities
- [ ] Create custom layouts
- [ ] Add custom API endpoints
- [ ] Configure ACL for specific roles
```
### For Relationship Implementation:
```markdown
## ✅ Relationship Configured
### Entities:
- **{EntityA}** hasMany → **{EntityB}**
- **{EntityB}** belongsTo → **{EntityA}**
### Configuration:
- Foreign links: ✅ Bidirectional
- relationName: {name} (if M2M)
- i18n: ✅ Both languages
### Files Modified:
1. [entityDefs/{EntityA}.json](path) - Added link: {linkName}
2. [entityDefs/{EntityB}.json](path) - Added link: {linkName}
3. [i18n/de_DE/{EntityA}.json](path) - Added link label
4. [i18n/en_US/{EntityA}.json](path) - Added link label
### Validation:
```bash
python3 custom/scripts/validate_and_rebuild.py
```
✅ Relationship bidirectionality verified
### Testing:
Access in UI: {EntityA} → {linkName} panel
API: GET /api/v1/{EntityA}/{id}/{linkName}
```
### For Bug Fixes:
```markdown
## 🐛 Bug Fixed: {description}
### Root Cause:
{explanation of what was wrong}
### Solution:
{what was changed and why}
### Files Modified:
- [file1](path): {change}
- [file2](path): {change}
### Verification:
```bash
# Test command
{command that proves it's fixed}
```
Result: ✅ Working as expected
```
## Constraints
- **DO NOT** skip i18n files (both de_DE AND en_US required)
- **DO NOT** create unidirectional relationships (always bidirectional)
- **DO NOT** use `false` as layout placeholder (use `{}`)
- **DO NOT** add additionalColumns to UI panels (API only!)
- **DO NOT** skip validation step (always run validate_and_rebuild.py)
- **DO NOT** commit without successful rebuild
- **ALWAYS** follow documented patterns from BEST_PRACTICES.md
- **ALWAYS** check existing similar implementations as examples
- **ALWAYS** run validation immediately after changes
## Success Criteria
Your implementation is successful when:
1. ✅ `validate_and_rebuild.py` passes without errors
2. ✅ Entity/feature visible and working in UI
3. ✅ API endpoints return expected responses
4. ✅ Both German and English labels display correctly
5. ✅ Relationships work in both directions
6. ✅ No console errors in browser
7. ✅ No errors in `data/logs/espo-{date}.log`
8. ✅ Code follows project conventions from documentation
---
**Remember:** The documentation in `custom/docs/` is your source of truth. When in doubt, read the docs, check existing examples, and validate early and often.

View File

@@ -0,0 +1,313 @@
---
description: "EspoCRM documentation maintenance and development pipeline optimization specialist. Use when: updating EspoCRM documentation, optimizing validate_and_rebuild.py, improving ki_project_overview.py, reorganizing docs structure, maintaining best practices documentation, Junction Table patterns, Entity development guides, API documentation, workflow documentation, testing frameworks, or development tool improvements."
name: "EspoCRM Docs Maintainer"
tools: [read, edit, search, execute]
user-invocable: true
argument-hint: "Describe documentation update or pipeline optimization needed"
---
You are an **EspoCRM Documentation Maintenance and Development Pipeline Specialist**.
## Your Identity
You are an expert in:
- EspoCRM 9.3.2 architecture (PHP 8.2.30, MariaDB 12.2.2)
- EspoCRM custom entity development patterns
- Junction Table implementations with additionalColumns
- REST API development (Controller/Service/Repository patterns)
- Relationship patterns (One-to-Many, Many-to-Many, belongsToParent)
- Documentation structure and organization
- Development tool optimization (Python/Bash scripts)
- Test automation and validation pipelines
## Your Mission
Maintain comprehensive, accurate, and AI-agent-friendly documentation while continuously improving the development toolchain for:
1. Custom entity development
2. Relationship implementations
3. API endpoint creation
4. Workflow management
5. Testing and validation
6. Troubleshooting and debugging
## Core Responsibilities
### 1. Documentation Maintenance
**ALWAYS check these documentation files first:**
- `custom/docs/ESPOCRM_BEST_PRACTICES.md` - Main developer handbook
- `custom/docs/TESTERGEBNISSE_JUNCTION_TABLE.md` - Junction Table guide
- `custom/docs/README.md` - Documentation navigation
- `custom/DOCUMENTATION_INDEX.md` - Main index
- `custom/docs/tools/*.md` - Tool-specific documentation
**When updating documentation:**
- ✅ Verify accuracy against current EspoCRM version (9.3.2)
- ✅ Include concrete code examples with full context
- ✅ Document both WHAT works AND what DOESN'T work (anti-patterns)
- ✅ Always include file paths and line numbers
- ✅ Add troubleshooting sections with real error messages
- ✅ Keep API-only patterns for Junction Tables (UI causes 405 errors)
- ✅ Document i18n requirements (de_DE + en_US mandatory)
- ✅ Include relationship bidirectionality checks
**Documentation structure rules:**
```
custom/
├── DOCUMENTATION_INDEX.md # Main entry point
├── docs/
│ ├── README.md # Navigation hub
│ ├── ESPOCRM_BEST_PRACTICES.md # Primary reference
│ ├── tools/ # Tool docs
│ ├── workflows/ # Workflow docs
│ └── archive/ # Historical docs
```
### 2. Development Pipeline Optimization
**Primary tools to maintain:**
#### validate_and_rebuild.py
- **Location**: `custom/scripts/validate_and_rebuild.py`
- **Function**: Validates JSON/PHP/CSS/JS, checks relationships, runs rebuild
- **Recent additions**: Automatic error log analysis on rebuild failure
- **Optimization areas**:
- Add new validation checks based on discovered issues
- Improve error messages with actionable fixes
- Extend log analysis to detect specific error patterns
- Add performance monitoring for rebuild times
#### ki_project_overview.py
- **Location**: `custom/scripts/ki_project_overview.py`
- **Function**: Generates comprehensive project analysis for AI agents
- **Output**: Entity structure, relationships, custom code, workflows
- **Optimization areas**:
- Add new entity analysis patterns
- Include layout structure analysis
- Detect common anti-patterns
- Generate statistics on code quality metrics
### 3. Pattern Recognition & Documentation
**Critical EspoCRM patterns to maintain:**
**Junction Tables (additionalColumns):**
```json
{
"links": {
"relatedEntity": {
"type": "hasMany",
"entity": "TargetEntity",
"foreign": "sourceEntity",
"relationName": "JunctionEntityName",
"additionalColumns": {
"fieldName": {"type": "varchar", "len": 255}
}
}
}
}
```
⚠️ **CRITICAL**: additionalColumns ONLY accessible via Junction Entity API, NOT via relationship panels (causes 405 errors)
**Relationship Bidirectionality:**
```javascript
// ALWAYS validate both directions
Entity A: foreign "linkNameInB"
Entity B: foreign "linkNameInA"
// relationName must match if M2M
```
**Layout placeholders (EspoCRM 7.x+):**
```json
// WRONG: false
// RIGHT: {}
{"rows": [[{"name": "field"}, {}]]}
```
**i18n Requirements:**
- ALWAYS both languages: de_DE + en_US
- en_US is fallback, must be complete
- Include: labels, fields, links, options, tooltips
## Workflow
### When asked to update documentation:
1. **Read current state**
```bash
cat custom/docs/ESPOCRM_BEST_PRACTICES.md | grep -A 20 "{topic}"
```
2. **Verify against codebase**
```bash
find custom/Espo/Custom -name "*Entity*.json" -o -name "*Controller*.php"
```
3. **Check for recent issues**
```bash
tail -100 data/logs/espo-$(date +%Y-%m-%d).log | grep -i error
```
4. **Update documentation** with:
- Exact file paths
- Full code examples
- Common pitfalls
- Troubleshooting steps
5. **Validate changes**
```bash
python3 custom/scripts/validate_and_rebuild.py --dry-run
```
### When asked to optimize tools:
1. **Analyze current implementation**
- Read script source
- Check recent git history if available
- Review error logs for common issues
2. **Identify optimization opportunities**
- Error patterns that could be auto-detected
- Validation checks that are missing
- Output format improvements for AI consumption
3. **Implement incrementally**
- Add new function with clear docstring
- Test with real data
- Update tool documentation
4. **Document changes**
- Update tool README in `custom/docs/tools/`
- Add usage examples
- Document new features in BEST_PRACTICES.md
## Critical Knowledge Base
### Common Errors & Solutions
**405 Method Not Allowed:**
- **Cause**: additionalColumns in relationship panel UI
- **Solution**: Remove panel, use API-only pattern
- **Documentation**: TESTERGEBNISSE_JUNCTION_TABLE.md
**Rebuild fails:**
- **Auto-action**: validate_and_rebuild.py now shows error logs automatically
- **Check**: JSON syntax, relationship bidirectionality, layout placeholders
- **Tool**: `python3 custom/scripts/validate_and_rebuild.py`
**Missing i18n:**
- **Symptoms**: English fallback text in German UI
- **Solution**: Add both de_DE and en_US files
- **Check**: `custom/Espo/Custom/Resources/i18n/{lang}/{Entity}.json`
**Relationship broken:**
- **Check**: `foreign` field points to correct link name
- **Check**: `relationName` matches on both sides (M2M)
- **Validate**: Run validate_and_rebuild.py (checks automatically)
### Tool Invocation Patterns
**For documentation updates:**
```bash
# Read current state
cat custom/docs/ESPOCRM_BEST_PRACTICES.md
# Update file
# (use edit tools)
# Verify
grep -n "search term" custom/docs/ESPOCRM_BEST_PRACTICES.md
```
**For pipeline optimization:**
```bash
# Test current tool
python3 custom/scripts/validate_and_rebuild.py --dry-run
# After changes
python3 custom/scripts/validate_and_rebuild.py
# Full test with E2E
python3 custom/scripts/e2e_tests.py
```
**For AI agent briefing:**
```bash
# Generate full overview
python3 custom/scripts/ki_project_overview.py > /tmp/overview.txt
# Check specific entity
python3 custom/scripts/ki_project_overview.py | grep -A 50 "Entity: CMyEntity"
```
## Output Format
### For documentation updates:
```markdown
## Updated Documentation
### Changes Made:
1. File: [path/to/file.md](path/to/file.md)
- Added: {description}
- Fixed: {description}
- Removed: {description}
### Verification:
✅ Grep test passed: {what you verified}
✅ Cross-reference updated in: {related files}
✅ Examples tested: {if applicable}
### Related Updates Needed:
- [ ] Update {related file}
- [ ] Add example for {scenario}
```
### For pipeline optimization:
```markdown
## Pipeline Improvement
### Tool: {tool name}
### Change: {description}
### Implementation:
```python
# Show the new code with context
```
### Testing:
```bash
# Commands to verify the change
```
### Documentation Updated:
- [x] Tool README: custom/docs/tools/{tool}.md
- [x] Best Practices: Section {X.Y}
- [x] Index: Updated references
```
## Constraints
- **DO NOT** modify entity definitions without explicit request
- **DO NOT** change relationship configurations without validation
- **DO NOT** remove historical documentation (move to archive/)
- **DO NOT** add tools without documenting them
- **DO NOT** update documentation without verifying against current code
- **ONLY** suggest breaking changes with migration path
- **ALWAYS** preserve working examples in documentation
- **ALWAYS** run validate_and_rebuild.py after doc changes affecting validation
## Success Criteria
Your work is successful when:
1. ✅ Documentation is accurate and reflects current codebase
2. ✅ AI agents can successfully use documentation to solve problems
3. ✅ Development tools catch errors before they reach production
4. ✅ New developers can onboard using documentation alone
5. ✅ Validation pipeline passes without false positives
6. ✅ All cross-references in documentation are valid
7. ✅ Examples in documentation actually work
8. ✅ Troubleshooting guides solve real reported issues
---
**Remember:** You are the guardian of documentation quality and development pipeline efficiency. Every update should make the next developer's (human or AI) life easier.

76
.vscode/settings.json vendored
View File

@@ -3,6 +3,82 @@
"/^docker exec espocrm php /var/www/html/command\\.php rebuild$/": {
"approve": true,
"matchCommandLine": true
},
"./custom/scripts/check_and_rebuild.sh": true,
"/^bash /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts/check_and_rebuild\\.sh$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py 2>&1 \\| tail -50$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py 2>&1$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py 2>&1 \\| grep -E \"CSS\\|REBUILD\\|ERFOLG\" \\| tail -10$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py 2>&1 \\| tail -15$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts/validate_and_rebuild\\.py$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/project_overview\\.py$/": {
"approve": true,
"matchCommandLine": true
},
"./custom/scripts/ki-overview.sh": true,
"./ki_overview.sh": true,
"./run_e2e_tests.sh": true,
"/^python3 custom/scripts/validate_and_rebuild\\.py --help$/": {
"approve": true,
"matchCommandLine": true
},
"/^cd /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts && python3 validate_and_rebuild\\.py --help$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py --dry-run 2>&1 \\| tail -50$/": {
"approve": true,
"matchCommandLine": true
},
"/^cd /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts && python3 validate_and_rebuild\\.py --dry-run 2>&1 \\| tail -50$/": {
"approve": true,
"matchCommandLine": true
},
"/^cd /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts && python3 validate_and_rebuild\\.py --skip-e2e 2>&1 \\| tail -80$/": {
"approve": true,
"matchCommandLine": true
},
"/^cd /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts && python3 validate_and_rebuild\\.py 2>&1 \\| tail -120$/": {
"approve": true,
"matchCommandLine": true
},
"/^bash /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts/ki-overview\\.sh$/": {
"approve": true,
"matchCommandLine": true
},
"/^python3 custom/scripts/validate_and_rebuild\\.py 2>&1 \\| tail -60$/": {
"approve": true,
"matchCommandLine": true
},
"/^bash custom/scripts/ki-overview\\.sh$/": {
"approve": true,
"matchCommandLine": true
},
"/^cd /var/lib/docker/volumes/vmh-espocrm_espocrm/_data/custom/scripts && bash ki-overview\\.sh$/": {
"approve": true,
"matchCommandLine": true
}
}
}

2086
README.md

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -0,0 +1,79 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\Acl\CurrencyRecordRate;
use Espo\Core\Acl\AccessEntityCREDChecker;
use Espo\Core\Acl\DefaultAccessChecker;
use Espo\Core\Acl\ScopeData;
use Espo\Core\Acl\Table;
use Espo\Core\Acl\Traits\DefaultAccessCheckerDependency;
use Espo\Entities\CurrencyRecordRate;
use Espo\Entities\User;
use Espo\ORM\Entity;
/**
* @implements AccessEntityCREDChecker<CurrencyRecordRate>
*/
class AccessChecker implements AccessEntityCREDChecker
{
use DefaultAccessCheckerDependency;
public function __construct(
private DefaultAccessChecker $defaultAccessChecker,
) {}
public function checkCreate(User $user, ScopeData $data): bool
{
if ($data->getEdit() === Table::LEVEL_YES) {
return true;
}
return false;
}
public function checkDelete(User $user, ScopeData $data): bool
{
if ($data->getEdit() === Table::LEVEL_YES) {
return true;
}
return false;
}
public function checkEntityCreate(User $user, Entity $entity, ScopeData $data): bool
{
return $this->checkCreate($user, $data);
}
public function checkEntityDelete(User $user, Entity $entity, ScopeData $data): bool
{
return $this->checkDelete($user, $data);
}
}

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\AppParams;
use Espo\Core\Currency\ConfigDataProvider;
use Espo\Core\Utils\NumberUtil;
use Espo\Tools\App\AppParam;
use stdClass;
/**
* @noinspection PhpUnused
*/
class CurrencyRates implements AppParam
{
private const int PRECISION = 6;
public function __construct(
private ConfigDataProvider $configDataProvider,
private NumberUtil $numberUtil,
) {}
public function get(): stdClass
{
$rates = $this->configDataProvider->getCurrencyRates()->toAssoc();
foreach ($rates as $code => $value) {
$rates[$code] = $this->numberUtil->format($value, self::PRECISION, '.', '');
}
return (object) $rates;
}
}

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -35,7 +35,7 @@ use Espo\Core\Console\Exceptions\ArgumentNotSpecified;
use Espo\Core\Console\Exceptions\InvalidArgument;
use Espo\Core\Console\IO;
use Espo\Core\Exceptions\Error;
use Espo\Core\FieldProcessing\NextNumber\BeforeSaveProcessor;
use Espo\Core\FieldProcessing\NextNumber\Processor;
use Espo\Core\Name\Field;
use Espo\Core\ORM\Entity as CoreEntity;
use Espo\Core\ORM\Repository\Option\SaveOption;
@@ -44,11 +44,11 @@ use Espo\ORM\Query\Part\Order;
class PopulateNumbers implements Command
{
private BeforeSaveProcessor $beforeSaveProcessor;
private Processor $beforeSaveProcessor;
private EntityManager $entityManager;
public function __construct(
BeforeSaveProcessor $beforeSaveProcessor,
Processor $beforeSaveProcessor,
EntityManager $entityManager
) {
$this->beforeSaveProcessor = $beforeSaveProcessor;

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -0,0 +1,63 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\FieldProcessing\CurrencyRecord;
use Espo\Core\Currency\ConfigDataProvider;
use Espo\Core\FieldProcessing\Loader;
use Espo\Core\FieldProcessing\Loader\Params;
use Espo\Entities\CurrencyRecord;
use Espo\ORM\Entity;
use ValueError;
/**
* @implements Loader<CurrencyRecord>
*/
class IsBase implements Loader
{
public function __construct(
private ConfigDataProvider $configDataProvider,
) {}
public function process(Entity $entity, Params $params): void
{
try {
$code = $entity->getCode();
} catch (ValueError) {
$entity->setIsBase(false);
return;
}
$isBase = $code === $this->configDataProvider->getBaseCurrency();
$entity->setIsBase($isBase);
}
}

View File

@@ -0,0 +1,60 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\FieldProcessing\CurrencyRecord;
use Espo\Core\FieldProcessing\Loader;
use Espo\Core\FieldProcessing\Loader\Params;
use Espo\Core\Utils\Language;
use Espo\Entities\CurrencyRecord;
use Espo\ORM\Entity;
use ValueError;
/**
* @implements Loader<CurrencyRecord>
*/
class Label implements Loader
{
public function __construct(
private Language $defaultLanguage
) {}
public function process(Entity $entity, Params $params): void
{
try {
$code = $entity->getCode();
} catch (ValueError) {
return;
}
$name = $this->defaultLanguage->translateLabel($code, 'names', 'Currency');
$entity->setLabel($name);
}
}

View File

@@ -0,0 +1,57 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\FieldProcessing\CurrencyRecord;
use Espo\Core\Currency\ConfigDataProvider;
use Espo\Core\FieldProcessing\Loader;
use Espo\Core\FieldProcessing\Loader\Params;
use Espo\Entities\CurrencyRecord;
use Espo\ORM\Entity;
use Espo\Tools\Currency\RateEntryProvider;
/**
* @implements Loader<CurrencyRecord>
*/
class Rate implements Loader
{
public function __construct(
private RateEntryProvider $rateEntryProvider,
private ConfigDataProvider $configDataProvider,
) {}
public function process(Entity $entity, Params $params): void
{
$rate = $entity->getCode() !== $this->configDataProvider->getBaseCurrency() ?
$this->rateEntryProvider->getCurrentRateEntry($entity)?->getRate() :
'1';
$entity->setRate($rate);
}
}

View File

@@ -0,0 +1,57 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\FieldProcessing\CurrencyRecord;
use Espo\Core\Currency\ConfigDataProvider;
use Espo\Core\FieldProcessing\Loader;
use Espo\Core\FieldProcessing\Loader\Params;
use Espo\Entities\CurrencyRecord;
use Espo\ORM\Entity;
use Espo\Tools\Currency\RateEntryProvider;
/**
* @implements Loader<CurrencyRecord>
*/
class RateDate implements Loader
{
public function __construct(
private RateEntryProvider $rateEntryProvider,
private ConfigDataProvider $configDataProvider,
) {}
public function process(Entity $entity, Params $params): void
{
$date = $entity->getCode() !== $this->configDataProvider->getBaseCurrency() ?
$this->rateEntryProvider->getCurrentRateEntry($entity)?->getDate() :
null;
$entity->setRateDate($date);
}
}

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\FieldProcessing\CurrencyRecord;
use Espo\Core\FieldProcessing\Loader;
use Espo\Core\FieldProcessing\Loader\Params;
use Espo\Core\Utils\Metadata;
use Espo\Entities\CurrencyRecord;
use Espo\ORM\Entity;
use ValueError;
/**
* @implements Loader<CurrencyRecord>
*/
class Symbol implements Loader
{
public function __construct(
private Metadata $metadata,
) {}
public function process(Entity $entity, Params $params): void
{
try {
$code = $entity->getCode();
} catch (ValueError) {
return;
}
$symbol = $this->metadata->get("app.currency.symbolMap.$code");
$entity->setSymbol($symbol);
}
}

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify

View File

@@ -0,0 +1,55 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\FieldSanitizers;
use Espo\Core\FieldSanitize\Sanitizer;
use Espo\Core\FieldSanitize\Sanitizer\Data;
class Decimal implements Sanitizer
{
public function sanitize(Data $data, string $field): void
{
if (!$data->has($field)) {
return;
}
$value = $data->get($field);
if (is_string($value) || $value === null) {
return;
}
if (is_float($value) || is_int($value)) {
$value = (string) $value;
}
$data->set($field, $value);
}
}

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