Add CBankverbindungen entity with multilingual support, tooltips, and layout definitions
This commit is contained in:
12
custom/Espo/Custom/Resources/metadata/app/formula.json
Normal file
12
custom/Espo/Custom/Resources/metadata/app/formula.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"functionList": [
|
||||
"__APPEND__",
|
||||
{
|
||||
"name": "iban\\validate",
|
||||
"insertText": "iban\\validate(IBAN)"
|
||||
}
|
||||
],
|
||||
"functionClassNameMap": {
|
||||
"iban\\validate": "Espo\\Custom\\Classes\\FormulaFunctions\\IbanGroup\\ValidateType"
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,89 @@
|
||||
"name": {
|
||||
"type": "varchar",
|
||||
"required": true,
|
||||
"pattern": "$noBadCharacters"
|
||||
"pattern": "$noBadCharacters",
|
||||
"tooltip": true
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
"iban": {
|
||||
"type": "varchar",
|
||||
"required": false,
|
||||
"maxLength": 42,
|
||||
"pattern": "/^[A-Z]{2}[0-9]{2}[\\s]?[A-Z0-9]{4}[\\s]?[A-Z0-9]{4}[\\s]?[A-Z0-9]{4}[\\s]?[A-Z0-9]{4}[\\s]?[A-Z0-9]{0,4}[\\s]?[A-Z0-9]{0,2}$/i",
|
||||
"tooltip": true,
|
||||
"isCustom": true,
|
||||
"copyToClipboard": true,
|
||||
"audited": true,
|
||||
"options": []
|
||||
},
|
||||
"bic": {
|
||||
"type": "varchar",
|
||||
"required": false,
|
||||
"maxLength": 11,
|
||||
"pattern": "/^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$/i",
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"kontoinhaber": {
|
||||
"type": "varchar",
|
||||
"required": false,
|
||||
"maxLength": 255,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"bankname": {
|
||||
"type": "varchar",
|
||||
"required": false,
|
||||
"maxLength": 255,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"istAktiv": {
|
||||
"type": "bool",
|
||||
"default": true,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"istStandard": {
|
||||
"type": "bool",
|
||||
"default": false,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"advowareKontoId": {
|
||||
"type": "int",
|
||||
"required": false,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"advowareLastSync": {
|
||||
"type": "datetime",
|
||||
"required": false,
|
||||
"readOnly": true,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"syncStatus": {
|
||||
"type": "enum",
|
||||
"required": false,
|
||||
"options": [
|
||||
"clean",
|
||||
"unclean",
|
||||
"failed"
|
||||
],
|
||||
"style": {
|
||||
"clean": "success",
|
||||
"unclean": "warning",
|
||||
"failed": "danger"
|
||||
},
|
||||
"default": "clean",
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"beteiligte": {
|
||||
"type": "link",
|
||||
"required": false,
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "datetime",
|
||||
@@ -37,6 +116,12 @@
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"beteiligte": {
|
||||
"type": "belongsTo",
|
||||
"entity": "CBeteiligte",
|
||||
"foreign": "bankverbindungens",
|
||||
"isCustom": true
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "belongsTo",
|
||||
"entity": "User"
|
||||
@@ -60,6 +145,9 @@
|
||||
"orderBy": "createdAt",
|
||||
"order": "desc"
|
||||
},
|
||||
"formula": {
|
||||
"beforeSaveApiScript": "// IBAN-Validierung mit Modulo-97-Algorithmus\nif (!string\\isEmpty(iban)) {\n // Leerzeichen entfernen für Validierung\n $ibanClean = string\\replace(iban, ' ', '');\n \n // Mathematische IBAN-Prüfung\n if (!iban\\validate($ibanClean)) {\n recordService\\throwBadRequest('Ungültige IBAN: Die Prüfziffer ist mathematisch falsch. Bitte überprüfen Sie die eingegebene IBAN.');\n }\n}"
|
||||
},
|
||||
"indexes": {
|
||||
"name": {
|
||||
"columns": [
|
||||
|
||||
@@ -152,6 +152,9 @@
|
||||
],
|
||||
"tooltip": true,
|
||||
"isCustom": true
|
||||
},
|
||||
"bankverbindungens": {
|
||||
"type": "linkMultiple"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
@@ -258,6 +261,13 @@
|
||||
"entity": "CDokumente",
|
||||
"audited": false,
|
||||
"isCustom": true
|
||||
},
|
||||
"bankverbindungens": {
|
||||
"type": "hasMany",
|
||||
"foreign": "beteiligte",
|
||||
"entity": "CBankverbindungen",
|
||||
"audited": false,
|
||||
"isCustom": true
|
||||
}
|
||||
},
|
||||
"collection": {
|
||||
|
||||
Reference in New Issue
Block a user