From 8762c60b853ce0541a0ee654b33903356a17f144 Mon Sep 17 00:00:00 2001 From: MinaDoncheva Date: Thu, 12 Mar 2026 16:13:54 +0200 Subject: [PATCH 1/9] Refactor numbers to be generated by type --- codbex-payments/codbex-payments.edm | 8 +- codbex-payments/codbex-payments.gen | 84 +++++++++---------- codbex-payments/codbex-payments.model | 6 +- .../CustomerPaymentRepository.ts | 2 +- .../EmployeePaymentRepository.ts | 2 +- .../SupplierPaymentRepository.ts | 2 +- .../CustomerPaymentRepository.ts | 4 +- .../EmployeePaymentRepository.ts | 4 +- .../SupplierPaymentRepository.ts | 4 +- 9 files changed, 58 insertions(+), 58 deletions(-) diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index 37af8ac..a59a87b 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -13,7 +13,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -199,5 +199,5 @@ - + \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index 33647ce..c201e5d 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -4,13 +4,46 @@ "brandUrl": "https://www.codbex.com/", "title": "Payments Management Module", "description": "Managing Payments Data", + "fileName": "codbex-payments", + "genFolderName": "codbex-payments", + "dataSource": "DefaultDB", + "roles": [ + { + "entityName": "CustomerPayment", + "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" + }, + { + "entityName": "SupplierPayment", + "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" + }, + { + "entityName": "EmployeePayment", + "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" + }, + { + "entityName": "PaymentRecord", + "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" + }, + { + "entityName": "PaymentType", + "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", + "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" + }, + { + "entityName": "PaymentAdjustment", + "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" + } + ], + "tprefix": "codbex-payments-model", "projectName": "codbex-payments", "workspaceName": "workspace", "filePath": "codbex-payments.model", "templateId": "template-application-angular-v2/template/template.js", - "fileName": "codbex-payments", - "genFolderName": "codbex-payments", - "dataSource": "DefaultDB", "perspectives": { "CustomerPayment": { "views": [ @@ -231,39 +264,6 @@ "role": "" } }, - "roles": [ - { - "entityName": "CustomerPayment", - "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", - "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" - }, - { - "entityName": "SupplierPayment", - "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", - "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" - }, - { - "entityName": "EmployeePayment", - "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", - "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" - }, - { - "entityName": "PaymentRecord", - "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", - "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" - }, - { - "entityName": "PaymentType", - "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", - "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" - }, - { - "entityName": "PaymentAdjustment", - "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", - "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" - } - ], - "tprefix": "codbex-payments-model", "models": [ { "properties": [ @@ -620,7 +620,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(18)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')", "dataLength": "20", "dataName": "CUSTOMERPAYMENT_NAME", "dataNullable": true, @@ -1127,7 +1127,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(18)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')", "dataLength": "20", "dataName": "CUSTOMERPAYMENT_NAME", "dataNullable": true, @@ -1547,7 +1547,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(19)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')", "dataLength": "20", "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": true, @@ -2017,7 +2017,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(19)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')", "dataLength": "20", "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": true, @@ -2464,7 +2464,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(20)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", "dataLength": "20", "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": true, @@ -2934,7 +2934,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(20)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", "dataLength": "20", "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": true, diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model index 5fdb37b..4ffd5d5 100644 --- a/codbex-payments/codbex-payments.model +++ b/codbex-payments/codbex-payments.model @@ -196,7 +196,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(18)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')", "dataLength": "20", "dataName": "CUSTOMERPAYMENT_NAME", "dataNullable": "true", @@ -486,7 +486,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(19)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')", "dataLength": "20", "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": "true", @@ -757,7 +757,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generate(20)", + "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", "dataLength": "20", "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": "true", diff --git a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts index 900aacb..5f78e8b 100644 --- a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts @@ -324,7 +324,7 @@ export class CustomerPaymentRepository { EntityUtils.setLocalDate(entity, "Date"); EntityUtils.setLocalDate(entity, "Valor"); // @ts-ignore - (entity as CustomerPaymentEntity).Name = new NumberGeneratorService().generate(18); + (entity as CustomerPaymentEntity).Name = new NumberGeneratorService().generateByType('Customer Payment'); // @ts-ignore (entity as CustomerPaymentEntity).UUID = require("sdk/utils/uuid").random(); const id = this.dao.insert(entity); diff --git a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts index 88ae4d6..0b0356d 100644 --- a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts @@ -310,7 +310,7 @@ export class EmployeePaymentRepository { EntityUtils.setLocalDate(entity, "Date"); EntityUtils.setLocalDate(entity, "Valor"); // @ts-ignore - (entity as EmployeePaymentEntity).Name = new NumberGeneratorService().generate(20); + (entity as EmployeePaymentEntity).Name = new NumberGeneratorService().generateByType('Employee Payment'); // @ts-ignore (entity as EmployeePaymentEntity).UUID = require("sdk/utils/uuid").random(); const id = this.dao.insert(entity); diff --git a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts index 084af67..0361e73 100644 --- a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts @@ -310,7 +310,7 @@ export class SupplierPaymentRepository { EntityUtils.setLocalDate(entity, "Date"); EntityUtils.setLocalDate(entity, "Valor"); // @ts-ignore - (entity as SupplierPaymentEntity).Name = new NumberGeneratorService().generate(19); + (entity as SupplierPaymentEntity).Name = new NumberGeneratorService().generateByType('Supplier Payment'); // @ts-ignore (entity as SupplierPaymentEntity).UUID = require("sdk/utils/uuid").random(); const id = this.dao.insert(entity); diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts index c9b4705..8e2f5f5 100644 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts @@ -14,13 +14,13 @@ export class CustomerPaymentRepository extends Repository } public override create(entity: CustomerPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generate(18); + entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); entity.UUID = require("sdk/utils/uuid").random(); return super.create(entity); } public override upsert(entity: CustomerPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generate(18); + entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); entity.UUID = require("sdk/utils/uuid").random(); return super.upsert(entity); } diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts index 4b3c526..e193cc5 100644 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts @@ -14,13 +14,13 @@ export class EmployeePaymentRepository extends Repository } public override create(entity: EmployeePaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generate(20); + entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); entity.UUID = require("sdk/utils/uuid").random(); return super.create(entity); } public override upsert(entity: EmployeePaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generate(20); + entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); entity.UUID = require("sdk/utils/uuid").random(); return super.upsert(entity); } diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts index b783480..11f6660 100644 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts @@ -14,13 +14,13 @@ export class SupplierPaymentRepository extends Repository } public override create(entity: SupplierPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generate(19); + entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); entity.UUID = require("sdk/utils/uuid").random(); return super.create(entity); } public override upsert(entity: SupplierPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generate(19); + entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); entity.UUID = require("sdk/utils/uuid").random(); return super.upsert(entity); } From 8e223087eb02494d9fbe295ac5dc71944b0d9a94 Mon Sep 17 00:00:00 2001 From: Nikol Georgieva Date: Tue, 24 Mar 2026 00:19:59 +0200 Subject: [PATCH 2/9] Update package.json --- codbex-payments/package.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/codbex-payments/package.json b/codbex-payments/package.json index 8b39717..e70b286 100644 --- a/codbex-payments/package.json +++ b/codbex-payments/package.json @@ -8,12 +8,10 @@ "publishConfig": { "registry": "https://npm.pkg.github.com" }, - "scripts": { - "build": "tsc" - }, "dependencies": { - "@codbex/codbex-partners": "0.9.2", - "@codbex/codbex-employees": "0.6.0", - "@codbex/codbex-currencies": "1.0.0" + "@codbex/codbex-partners": "^0.9.2", + "@codbex/codbex-employees": "^0.6.0", + "@codbex/codbex-currencies": "^1.0.0", + "@codbex/codbex-number-generator": "^1.1.0" } } From dce64f2a525fb802f8f5e800a1a09e5a95e5bdcc Mon Sep 17 00:00:00 2001 From: Nikol Georgieva Date: Tue, 24 Mar 2026 00:20:24 +0200 Subject: [PATCH 3/9] Update package.json --- codbex-payments/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codbex-payments/package.json b/codbex-payments/package.json index e70b286..cfaca4c 100644 --- a/codbex-payments/package.json +++ b/codbex-payments/package.json @@ -12,6 +12,7 @@ "@codbex/codbex-partners": "^0.9.2", "@codbex/codbex-employees": "^0.6.0", "@codbex/codbex-currencies": "^1.0.0", - "@codbex/codbex-number-generator": "^1.1.0" + "@codbex/codbex-number-generator": "^1.1.0", + "@codbex/codbex-number-generator-data": "^1.0.0" } } From 37a0fb58292ed121dddb67b50575f671a5bf0903 Mon Sep 17 00:00:00 2001 From: Nikol Georgieva Date: Tue, 24 Mar 2026 00:27:36 +0200 Subject: [PATCH 4/9] Delete codbex-payments/tsconfig.json --- codbex-payments/tsconfig.json | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 codbex-payments/tsconfig.json diff --git a/codbex-payments/tsconfig.json b/codbex-payments/tsconfig.json deleted file mode 100644 index 9b957e3..0000000 --- a/codbex-payments/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "ESNext", - "target": "ES6", - "moduleResolution": "Node", - "baseUrl": "../", - "lib": [ - "ESNext", - "DOM" - ], - "paths": { - "sdk/*": [ - "./modules/src/*" - ], - "/*": [ - "./*" - ] - }, - "types": [ - "../modules/types" - ] - } -} \ No newline at end of file From e68e40617fa7be781d3253de7dd432899c61c5e4 Mon Sep 17 00:00:00 2001 From: Nikol Georgieva Date: Tue, 24 Mar 2026 00:27:52 +0200 Subject: [PATCH 5/9] Update project.json --- codbex-payments/project.json | 51 ++---------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/codbex-payments/project.json b/codbex-payments/project.json index a5e6620..a44f109 100644 --- a/codbex-payments/project.json +++ b/codbex-payments/project.json @@ -1,50 +1,3 @@ { - "guid": "codbex-payments", - "repository": { - "type": "git", - "branch": "main", - "url": "https://github.com/codbex/codbex-payments.git" - }, - "dependencies": [ - { - "guid": "codbex-partners", - "type": "git", - "url": "https://github.com/codbex/codbex-partners.git", - "branch": "main" - }, - { - "guid": "codbex-employees", - "type": "git", - "url": "https://github.com/codbex/codbex-employees.git", - "branch": "main" - }, - { - "guid": "codbex-currencies", - "type": "git", - "url": "https://github.com/codbex/codbex-currencies.git", - "branch": "main" - }, - { - "guid": "codbex-navigation-groups", - "type": "git", - "url": "https://github.com/codbex/codbex-navigation-groups", - "branch": "main" - } - ], - "actions": [ - { - "name": "Build TypeScript", - "commands": [ - { - "os": "unix", - "command": "tsc" - }, - { - "os": "windows", - "command": "cmd /c tsc" - } - ], - "registry": "true" - } - ] -} \ No newline at end of file + "guid": "codbex-payments" +} From c6d871f3606827d86917e5b34ac78588254936ff Mon Sep 17 00:00:00 2001 From: Nikol Georgieva Date: Tue, 24 Mar 2026 00:29:11 +0200 Subject: [PATCH 6/9] Update package.json --- codbex-payments/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codbex-payments/package.json b/codbex-payments/package.json index cfaca4c..a87758c 100644 --- a/codbex-payments/package.json +++ b/codbex-payments/package.json @@ -9,9 +9,9 @@ "registry": "https://npm.pkg.github.com" }, "dependencies": { - "@codbex/codbex-partners": "^0.9.2", - "@codbex/codbex-employees": "^0.6.0", - "@codbex/codbex-currencies": "^1.0.0", + "@codbex/codbex-partners": "^1.0.0", + "@codbex/codbex-employees": "^1.0.0", + "@codbex/codbex-currencies": "^1.2.0", "@codbex/codbex-number-generator": "^1.1.0", "@codbex/codbex-number-generator-data": "^1.0.0" } From 11409daf269fd2fc62c91e52c62049fa4d67d6f9 Mon Sep 17 00:00:00 2001 From: NicoleNG18 Date: Tue, 24 Mar 2026 00:31:04 +0200 Subject: [PATCH 7/9] regenerate module to remove dao folder --- codbex-payments/codbex-payments.gen | 72 +-- .../CustomerPaymentController.ts | 2 +- .../EmployeePaymentController.ts | 2 +- .../PaymentAdjustmentController.ts | 2 +- .../PaymentRecord/PaymentRecordController.ts | 2 +- .../Settings/PaymentDirectionController.ts | 2 +- .../api/Settings/PaymentTypeController.ts | 2 +- .../SupplierPaymentController.ts | 2 +- .../CustomerPayment.extensionpoint | 4 - .../CustomerPaymentRepository.ts | 419 ----------------- .../EmployeePayment.extensionpoint | 4 - .../EmployeePaymentRepository.ts | 405 ---------------- .../PaymentAdjustment.extensionpoint | 4 - .../PaymentAdjustmentRepository.ts | 293 ------------ .../PaymentRecord.extensionpoint | 4 - .../PaymentRecord/PaymentRecordRepository.ts | 444 ------------------ .../Settings/PaymentDirection.extensionpoint | 4 - .../Settings/PaymentDirectionRepository.ts | 198 -------- .../dao/Settings/PaymentType.extensionpoint | 4 - .../dao/Settings/PaymentTypeRepository.ts | 197 -------- .../SupplierPayment.extensionpoint | 4 - .../SupplierPaymentRepository.ts | 405 ---------------- .../codbex-payments/dao/utils/EntityUtils.ts | 20 - .../CustomerPaymentRepository.ts | 20 +- .../EmployeePaymentRepository.ts | 20 +- .../PaymentAdjustmentRepository.ts | 20 +- .../PaymentRecord/PaymentRecordRepository.ts | 22 +- .../Settings/PaymentDirectionRepository.ts | 2 +- .../data/Settings/PaymentTypeRepository.ts | 2 +- .../SupplierPaymentRepository.ts | 20 +- codbex-payments/project.json | 2 +- 31 files changed, 143 insertions(+), 2460 deletions(-) delete mode 100644 codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPayment.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePayment.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustment.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustmentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecord.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirection.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirectionRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/Settings/PaymentType.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/Settings/PaymentTypeRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPayment.extensionpoint delete mode 100644 codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/dao/utils/EntityUtils.ts diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index c201e5d..e6373c5 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -4,46 +4,13 @@ "brandUrl": "https://www.codbex.com/", "title": "Payments Management Module", "description": "Managing Payments Data", - "fileName": "codbex-payments", - "genFolderName": "codbex-payments", - "dataSource": "DefaultDB", - "roles": [ - { - "entityName": "CustomerPayment", - "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", - "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" - }, - { - "entityName": "SupplierPayment", - "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", - "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" - }, - { - "entityName": "EmployeePayment", - "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", - "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" - }, - { - "entityName": "PaymentRecord", - "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", - "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" - }, - { - "entityName": "PaymentType", - "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", - "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" - }, - { - "entityName": "PaymentAdjustment", - "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", - "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" - } - ], - "tprefix": "codbex-payments-model", "projectName": "codbex-payments", "workspaceName": "workspace", "filePath": "codbex-payments.model", "templateId": "template-application-angular-v2/template/template.js", + "fileName": "codbex-payments", + "genFolderName": "codbex-payments", + "dataSource": "DefaultDB", "perspectives": { "CustomerPayment": { "views": [ @@ -264,6 +231,39 @@ "role": "" } }, + "roles": [ + { + "entityName": "CustomerPayment", + "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" + }, + { + "entityName": "SupplierPayment", + "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" + }, + { + "entityName": "EmployeePayment", + "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" + }, + { + "entityName": "PaymentRecord", + "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" + }, + { + "entityName": "PaymentType", + "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", + "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" + }, + { + "entityName": "PaymentAdjustment", + "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" + } + ], + "tprefix": "codbex-payments-model", "models": [ { "properties": [ diff --git a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts index 4a469bc..9de63a0 100644 --- a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts @@ -46,7 +46,7 @@ class CustomerPaymentController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts index beeda30..cedf151 100644 --- a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts @@ -46,7 +46,7 @@ class EmployeePaymentController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts b/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts index 5e0e429..54baa9d 100644 --- a/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts +++ b/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts @@ -44,7 +44,7 @@ class PaymentAdjustmentController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts index 4e2bc9f..918fa98 100644 --- a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts +++ b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts @@ -44,7 +44,7 @@ class PaymentRecordController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts index 5c8d54c..b50fbe2 100644 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts +++ b/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts @@ -40,7 +40,7 @@ class PaymentDirectionController { try { this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts index 32ffd2b..d015aef 100644 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts +++ b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts @@ -44,7 +44,7 @@ class PaymentTypeController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts index 4f9580f..8e1ef92 100644 --- a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts @@ -46,7 +46,7 @@ class SupplierPaymentController { this.checkPermissions('write'); this.validateEntity(entity); entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentService.ts/' + entity.Id); + response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts/' + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { diff --git a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPayment.extensionpoint b/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPayment.extensionpoint deleted file mode 100644 index 4136418..0000000 --- a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPayment.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-CustomerPayment-CustomerPayment", - "description": "Extension Point for the codbex-payments-CustomerPayment-CustomerPayment entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts deleted file mode 100644 index 5f78e8b..0000000 --- a/codbex-payments/gen/codbex-payments/dao/CustomerPayment/CustomerPaymentRepository.ts +++ /dev/null @@ -1,419 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; -import { EntityUtils } from "../utils/EntityUtils"; -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -export interface CustomerPaymentEntity { - readonly Id: number; - Customer: number; - Date: Date; - Valor: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount: number; - Currency: number; - Reason: string; - Description?: string; - Company?: number; - Name?: string; - UUID: string; - Reference?: string; - PaymentMethod?: number; -} - -export interface CustomerPaymentCreateEntity { - readonly Customer: number; - readonly Date: Date; - readonly Valor: Date; - readonly CompanyIBAN?: string; - readonly CounterpartyIBAN?: string; - readonly CounterpartyName?: string; - readonly Amount: number; - readonly Currency: number; - readonly Reason: string; - readonly Description?: string; - readonly Company?: number; - readonly Reference?: string; - readonly PaymentMethod?: number; -} - -export interface CustomerPaymentUpdateEntity extends CustomerPaymentCreateEntity { - readonly Id: number; -} - -export interface CustomerPaymentEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Customer?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - Name?: string | string[]; - UUID?: string | string[]; - Reference?: string | string[]; - PaymentMethod?: number | number[]; - }; - notEquals?: { - Id?: number | number[]; - Customer?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - Name?: string | string[]; - UUID?: string | string[]; - Reference?: string | string[]; - PaymentMethod?: number | number[]; - }; - contains?: { - Id?: number; - Customer?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - PaymentMethod?: number; - }; - greaterThan?: { - Id?: number; - Customer?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - PaymentMethod?: number; - }; - greaterThanOrEqual?: { - Id?: number; - Customer?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - PaymentMethod?: number; - }; - lessThan?: { - Id?: number; - Customer?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - PaymentMethod?: number; - }; - lessThanOrEqual?: { - Id?: number; - Customer?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - PaymentMethod?: number; - }; - }, - $select?: (keyof CustomerPaymentEntity)[], - $sort?: string | (keyof CustomerPaymentEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface CustomerPaymentEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface CustomerPaymentUpdateEntityEvent extends CustomerPaymentEntityEvent { - readonly previousEntity: CustomerPaymentEntity; -} - -export class CustomerPaymentRepository { - - private static readonly DEFINITION = { - table: "CODBEX_CUSTOMERPAYMENT", - properties: [ - { - name: "Id", - column: "CUSTOMERPAYMENT_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Customer", - column: "CUSTOMERPAYMENT_CUSTOMER", - type: "INTEGER", - required: true - }, - { - name: "Date", - column: "CUSTOMERPAYMENT_DATE", - type: "DATE", - required: true - }, - { - name: "Valor", - column: "CUSTOMERPAYMENT_VALOR", - type: "DATE", - required: true - }, - { - name: "CompanyIBAN", - column: "CUSTOMERPAYMENT_COMPANYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyIBAN", - column: "CUSTOMERPAYMENT_COUNTERPARTYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyName", - column: "CUSTOMERPAYMENT_COUNTERPARTYNAME", - type: "VARCHAR", - }, - { - name: "Amount", - column: "CUSTOMERPAYMENT_AMOUNT", - type: "DECIMAL", - required: true - }, - { - name: "Currency", - column: "CUSTOMERPAYMENT_CURRENCY", - type: "INTEGER", - required: true - }, - { - name: "Reason", - column: "CUSTOMERPAYMENT_REASON", - type: "VARCHAR", - required: true - }, - { - name: "Description", - column: "CUSTOMERPAYMENT_DESCRIPTION", - type: "VARCHAR", - }, - { - name: "Company", - column: "CUSTOMERPAYMENT_COMPANY", - type: "INTEGER", - }, - { - name: "Name", - column: "CUSTOMERPAYMENT_NAME", - type: "VARCHAR", - }, - { - name: "UUID", - column: "CUSTOMERPAYMENT_UUID", - type: "VARCHAR", - required: true - }, - { - name: "Reference", - column: "CUSTOMERPAYMENT_REFERENCE", - type: "VARCHAR", - }, - { - name: "PaymentMethod", - column: "CUSTOMERPAYMENT_PAYMENTMETHOD", - type: "INTEGER", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(CustomerPaymentRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: CustomerPaymentEntityOptions = {}): CustomerPaymentEntity[] { - if (options.$sort === undefined && options.$order === undefined) { - options.$sort = "Date"; - options.$order = "DESC"; - } - let list = this.dao.list(options).map((e: CustomerPaymentEntity) => { - EntityUtils.setDate(e, "Date"); - EntityUtils.setDate(e, "Valor"); - return e; - }); - return list; - } - - public findById(id: number, options: CustomerPaymentEntityOptions = {}): CustomerPaymentEntity | undefined { - const entity = this.dao.find(id); - EntityUtils.setDate(entity, "Date"); - EntityUtils.setDate(entity, "Valor"); - return entity ?? undefined; - } - - public create(entity: CustomerPaymentCreateEntity): number { - EntityUtils.setLocalDate(entity, "Date"); - EntityUtils.setLocalDate(entity, "Valor"); - // @ts-ignore - (entity as CustomerPaymentEntity).Name = new NumberGeneratorService().generateByType('Customer Payment'); - // @ts-ignore - (entity as CustomerPaymentEntity).UUID = require("sdk/utils/uuid").random(); - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_CUSTOMERPAYMENT", - entity: entity, - key: { - name: "Id", - column: "CUSTOMERPAYMENT_ID", - value: id - } - }); - return id; - } - - public update(entity: CustomerPaymentUpdateEntity): void { - // EntityUtils.setLocalDate(entity, "Date"); - // EntityUtils.setLocalDate(entity, "Valor"); - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_CUSTOMERPAYMENT", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "CUSTOMERPAYMENT_ID", - value: entity.Id - } - }); - } - - public upsert(entity: CustomerPaymentCreateEntity | CustomerPaymentUpdateEntity): number { - const id = (entity as CustomerPaymentUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as CustomerPaymentUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_CUSTOMERPAYMENT", - entity: entity, - key: { - name: "Id", - column: "CUSTOMERPAYMENT_ID", - value: id - } - }); - } - - public count(options?: CustomerPaymentEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_CUSTOMERPAYMENT"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: CustomerPaymentEntityEvent | CustomerPaymentUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-CustomerPayment-CustomerPayment", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-CustomerPayment-CustomerPayment").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePayment.extensionpoint b/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePayment.extensionpoint deleted file mode 100644 index 3516966..0000000 --- a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePayment.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-EmployeePayment-EmployeePayment", - "description": "Extension Point for the codbex-payments-EmployeePayment-EmployeePayment entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts deleted file mode 100644 index 0b0356d..0000000 --- a/codbex-payments/gen/codbex-payments/dao/EmployeePayment/EmployeePaymentRepository.ts +++ /dev/null @@ -1,405 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; -import { EntityUtils } from "../utils/EntityUtils"; -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -export interface EmployeePaymentEntity { - readonly Id: number; - Employee: number; - Date: Date; - Valor: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount: number; - Currency: number; - Reason: string; - Description?: string; - Company?: number; - Name?: string; - UUID: string; - Reference?: string; -} - -export interface EmployeePaymentCreateEntity { - readonly Employee: number; - readonly Date: Date; - readonly Valor: Date; - readonly CompanyIBAN?: string; - readonly CounterpartyIBAN?: string; - readonly CounterpartyName?: string; - readonly Amount: number; - readonly Currency: number; - readonly Reason: string; - readonly Description?: string; - readonly Company?: number; - readonly Reference?: string; -} - -export interface EmployeePaymentUpdateEntity extends EmployeePaymentCreateEntity { - readonly Id: number; -} - -export interface EmployeePaymentEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Employee?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - Name?: string | string[]; - UUID?: string | string[]; - Reference?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Employee?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - Name?: string | string[]; - UUID?: string | string[]; - Reference?: string | string[]; - }; - contains?: { - Id?: number; - Employee?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - greaterThan?: { - Id?: number; - Employee?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Employee?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - lessThan?: { - Id?: number; - Employee?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - lessThanOrEqual?: { - Id?: number; - Employee?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - }, - $select?: (keyof EmployeePaymentEntity)[], - $sort?: string | (keyof EmployeePaymentEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface EmployeePaymentEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface EmployeePaymentUpdateEntityEvent extends EmployeePaymentEntityEvent { - readonly previousEntity: EmployeePaymentEntity; -} - -export class EmployeePaymentRepository { - - private static readonly DEFINITION = { - table: "CODBEX_EMPLOYEEPAYMENT", - properties: [ - { - name: "Id", - column: "EMPLOYEEPAYMENT_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Employee", - column: "EMPLOYEEPAYMENT_EMPLOYEE", - type: "INTEGER", - required: true - }, - { - name: "Date", - column: "EMPLOYEEPAYMENT_DATE", - type: "DATE", - required: true - }, - { - name: "Valor", - column: "EMPLOYEEPAYMENT_VALOR", - type: "DATE", - required: true - }, - { - name: "CompanyIBAN", - column: "EMPLOYEEPAYMENT_COMPANYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyIBAN", - column: "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyName", - column: "EMPLOYEEPAYMENT_COUNTERPARTYNAME", - type: "VARCHAR", - }, - { - name: "Amount", - column: "EMPLOYEEPAYMENT_AMOUNT", - type: "DECIMAL", - required: true - }, - { - name: "Currency", - column: "EMPLOYEEPAYMENT_CURRENCY", - type: "INTEGER", - required: true - }, - { - name: "Reason", - column: "EMPLOYEEPAYMENT_REASON", - type: "VARCHAR", - required: true - }, - { - name: "Description", - column: "EMPLOYEEPAYMENT_DESCRIPTION", - type: "VARCHAR", - }, - { - name: "Company", - column: "EMPLOYEEPAYMENT_COMPANY", - type: "INTEGER", - }, - { - name: "Name", - column: "EMPLOYEEPAYMENT_NAME", - type: "VARCHAR", - }, - { - name: "UUID", - column: "EMPLOYEEPAYMENT_UUID", - type: "VARCHAR", - required: true - }, - { - name: "Reference", - column: "EMPLOYEEPAYMENT_REFERENCE", - type: "VARCHAR", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(EmployeePaymentRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: EmployeePaymentEntityOptions = {}): EmployeePaymentEntity[] { - if (options.$sort === undefined && options.$order === undefined) { - options.$sort = "Date"; - options.$order = "DESC"; - } - let list = this.dao.list(options).map((e: EmployeePaymentEntity) => { - EntityUtils.setDate(e, "Date"); - EntityUtils.setDate(e, "Valor"); - return e; - }); - return list; - } - - public findById(id: number, options: EmployeePaymentEntityOptions = {}): EmployeePaymentEntity | undefined { - const entity = this.dao.find(id); - EntityUtils.setDate(entity, "Date"); - EntityUtils.setDate(entity, "Valor"); - return entity ?? undefined; - } - - public create(entity: EmployeePaymentCreateEntity): number { - EntityUtils.setLocalDate(entity, "Date"); - EntityUtils.setLocalDate(entity, "Valor"); - // @ts-ignore - (entity as EmployeePaymentEntity).Name = new NumberGeneratorService().generateByType('Employee Payment'); - // @ts-ignore - (entity as EmployeePaymentEntity).UUID = require("sdk/utils/uuid").random(); - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_EMPLOYEEPAYMENT", - entity: entity, - key: { - name: "Id", - column: "EMPLOYEEPAYMENT_ID", - value: id - } - }); - return id; - } - - public update(entity: EmployeePaymentUpdateEntity): void { - // EntityUtils.setLocalDate(entity, "Date"); - // EntityUtils.setLocalDate(entity, "Valor"); - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_EMPLOYEEPAYMENT", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "EMPLOYEEPAYMENT_ID", - value: entity.Id - } - }); - } - - public upsert(entity: EmployeePaymentCreateEntity | EmployeePaymentUpdateEntity): number { - const id = (entity as EmployeePaymentUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as EmployeePaymentUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_EMPLOYEEPAYMENT", - entity: entity, - key: { - name: "Id", - column: "EMPLOYEEPAYMENT_ID", - value: id - } - }); - } - - public count(options?: EmployeePaymentEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_EMPLOYEEPAYMENT"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: EmployeePaymentEntityEvent | EmployeePaymentUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-EmployeePayment-EmployeePayment", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-EmployeePayment-EmployeePayment").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustment.extensionpoint b/codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustment.extensionpoint deleted file mode 100644 index 98bfe6f..0000000 --- a/codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustment.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-PaymentAdjustment-PaymentAdjustment", - "description": "Extension Point for the codbex-payments-PaymentAdjustment-PaymentAdjustment entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustmentRepository.ts b/codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustmentRepository.ts deleted file mode 100644 index 423e823..0000000 --- a/codbex-payments/gen/codbex-payments/dao/PaymentAdjustment/PaymentAdjustmentRepository.ts +++ /dev/null @@ -1,293 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; -import { EntityUtils } from "../utils/EntityUtils"; - -export interface PaymentAdjustmentEntity { - readonly Id: number; - Date?: Date; - Valor?: Date; - Amount?: number; - Currency?: number; - Company?: number; - Reason?: string; - UUID?: string; -} - -export interface PaymentAdjustmentCreateEntity { - readonly Date?: Date; - readonly Valor?: Date; - readonly Amount?: number; - readonly Currency?: number; - readonly Company?: number; - readonly Reason?: string; -} - -export interface PaymentAdjustmentUpdateEntity extends PaymentAdjustmentCreateEntity { - readonly Id: number; -} - -export interface PaymentAdjustmentEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - Amount?: number | number[]; - Currency?: number | number[]; - Company?: number | number[]; - Reason?: string | string[]; - UUID?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - Amount?: number | number[]; - Currency?: number | number[]; - Company?: number | number[]; - Reason?: string | string[]; - UUID?: string | string[]; - }; - contains?: { - Id?: number; - Date?: Date; - Valor?: Date; - Amount?: number; - Currency?: number; - Company?: number; - Reason?: string; - UUID?: string; - }; - greaterThan?: { - Id?: number; - Date?: Date; - Valor?: Date; - Amount?: number; - Currency?: number; - Company?: number; - Reason?: string; - UUID?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Date?: Date; - Valor?: Date; - Amount?: number; - Currency?: number; - Company?: number; - Reason?: string; - UUID?: string; - }; - lessThan?: { - Id?: number; - Date?: Date; - Valor?: Date; - Amount?: number; - Currency?: number; - Company?: number; - Reason?: string; - UUID?: string; - }; - lessThanOrEqual?: { - Id?: number; - Date?: Date; - Valor?: Date; - Amount?: number; - Currency?: number; - Company?: number; - Reason?: string; - UUID?: string; - }; - }, - $select?: (keyof PaymentAdjustmentEntity)[], - $sort?: string | (keyof PaymentAdjustmentEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface PaymentAdjustmentEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface PaymentAdjustmentUpdateEntityEvent extends PaymentAdjustmentEntityEvent { - readonly previousEntity: PaymentAdjustmentEntity; -} - -export class PaymentAdjustmentRepository { - - private static readonly DEFINITION = { - table: "CODBEX_PAYMENTADJUSTMENT", - properties: [ - { - name: "Id", - column: "PAYMENTADJUSTMENT_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Date", - column: "PAYMENTADJUSTMENT_DATE", - type: "DATE", - }, - { - name: "Valor", - column: "PAYMENTADJUSTMENT_VALOR", - type: "DATE", - }, - { - name: "Amount", - column: "PAYMENTADJUSTMENT_AMOUNT", - type: "DECIMAL", - }, - { - name: "Currency", - column: "PAYMENTADJUSTMENT_CURRENCY", - type: "INTEGER", - }, - { - name: "Company", - column: "PAYMENTADJUSTMENT_COMPANY", - type: "INTEGER", - }, - { - name: "Reason", - column: "PAYMENTADJUSTMENT_REASON", - type: "VARCHAR", - }, - { - name: "UUID", - column: "PAYMENTADJUSTMENT_UUID", - type: "VARCHAR", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(PaymentAdjustmentRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: PaymentAdjustmentEntityOptions = {}): PaymentAdjustmentEntity[] { - let list = this.dao.list(options).map((e: PaymentAdjustmentEntity) => { - EntityUtils.setDate(e, "Date"); - EntityUtils.setDate(e, "Valor"); - return e; - }); - return list; - } - - public findById(id: number, options: PaymentAdjustmentEntityOptions = {}): PaymentAdjustmentEntity | undefined { - const entity = this.dao.find(id); - EntityUtils.setDate(entity, "Date"); - EntityUtils.setDate(entity, "Valor"); - return entity ?? undefined; - } - - public create(entity: PaymentAdjustmentCreateEntity): number { - EntityUtils.setLocalDate(entity, "Date"); - EntityUtils.setLocalDate(entity, "Valor"); - // @ts-ignore - (entity as PaymentAdjustmentEntity).UUID = require("sdk/utils/uuid").random(); - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_PAYMENTADJUSTMENT", - entity: entity, - key: { - name: "Id", - column: "PAYMENTADJUSTMENT_ID", - value: id - } - }); - return id; - } - - public update(entity: PaymentAdjustmentUpdateEntity): void { - // EntityUtils.setLocalDate(entity, "Date"); - // EntityUtils.setLocalDate(entity, "Valor"); - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_PAYMENTADJUSTMENT", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "PAYMENTADJUSTMENT_ID", - value: entity.Id - } - }); - } - - public upsert(entity: PaymentAdjustmentCreateEntity | PaymentAdjustmentUpdateEntity): number { - const id = (entity as PaymentAdjustmentUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as PaymentAdjustmentUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_PAYMENTADJUSTMENT", - entity: entity, - key: { - name: "Id", - column: "PAYMENTADJUSTMENT_ID", - value: id - } - }); - } - - public count(options?: PaymentAdjustmentEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_PAYMENTADJUSTMENT"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: PaymentAdjustmentEntityEvent | PaymentAdjustmentUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-PaymentAdjustment-PaymentAdjustment", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-PaymentAdjustment-PaymentAdjustment").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecord.extensionpoint b/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecord.extensionpoint deleted file mode 100644 index b1251db..0000000 --- a/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecord.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-PaymentRecord-PaymentRecord", - "description": "Extension Point for the codbex-payments-PaymentRecord-PaymentRecord entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts b/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts deleted file mode 100644 index c557eb4..0000000 --- a/codbex-payments/gen/codbex-payments/dao/PaymentRecord/PaymentRecordRepository.ts +++ /dev/null @@ -1,444 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; -import { EntityUtils } from "../utils/EntityUtils"; - -export interface PaymentRecordEntity { - readonly Id: number; - Date: Date; - Valor: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - PaymentDirection?: number; - PaymentType?: number; - Reason?: string; - Description?: string; - Company?: number; - UUID: string; - Reference?: string; - Deleted?: boolean; - DeletedAt?: Date; - DeletedReason?: string; -} - -export interface PaymentRecordCreateEntity { - readonly Date: Date; - readonly Valor: Date; - readonly CompanyIBAN?: string; - readonly CounterpartyIBAN?: string; - readonly CounterpartyName?: string; - readonly Amount?: number; - readonly Currency?: number; - readonly PaymentDirection?: number; - readonly PaymentType?: number; - readonly Reason?: string; - readonly Description?: string; - readonly Company?: number; - readonly Reference?: string; - readonly Deleted?: boolean; - readonly DeletedAt?: Date; - readonly DeletedReason?: string; -} - -export interface PaymentRecordUpdateEntity extends PaymentRecordCreateEntity { - readonly Id: number; -} - -export interface PaymentRecordEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - PaymentDirection?: number | number[]; - PaymentType?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - UUID?: string | string[]; - Reference?: string | string[]; - Deleted?: boolean | boolean[]; - DeletedAt?: Date | Date[]; - DeletedReason?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - PaymentDirection?: number | number[]; - PaymentType?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - UUID?: string | string[]; - Reference?: string | string[]; - Deleted?: boolean | boolean[]; - DeletedAt?: Date | Date[]; - DeletedReason?: string | string[]; - }; - contains?: { - Id?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - PaymentDirection?: number; - PaymentType?: number; - Reason?: string; - Description?: string; - Company?: number; - UUID?: string; - Reference?: string; - Deleted?: boolean; - DeletedAt?: Date; - DeletedReason?: string; - }; - greaterThan?: { - Id?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - PaymentDirection?: number; - PaymentType?: number; - Reason?: string; - Description?: string; - Company?: number; - UUID?: string; - Reference?: string; - Deleted?: boolean; - DeletedAt?: Date; - DeletedReason?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - PaymentDirection?: number; - PaymentType?: number; - Reason?: string; - Description?: string; - Company?: number; - UUID?: string; - Reference?: string; - Deleted?: boolean; - DeletedAt?: Date; - DeletedReason?: string; - }; - lessThan?: { - Id?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - PaymentDirection?: number; - PaymentType?: number; - Reason?: string; - Description?: string; - Company?: number; - UUID?: string; - Reference?: string; - Deleted?: boolean; - DeletedAt?: Date; - DeletedReason?: string; - }; - lessThanOrEqual?: { - Id?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - PaymentDirection?: number; - PaymentType?: number; - Reason?: string; - Description?: string; - Company?: number; - UUID?: string; - Reference?: string; - Deleted?: boolean; - DeletedAt?: Date; - DeletedReason?: string; - }; - }, - $select?: (keyof PaymentRecordEntity)[], - $sort?: string | (keyof PaymentRecordEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface PaymentRecordEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface PaymentRecordUpdateEntityEvent extends PaymentRecordEntityEvent { - readonly previousEntity: PaymentRecordEntity; -} - -export class PaymentRecordRepository { - - private static readonly DEFINITION = { - table: "CODBEX_PAYMENTRECORD", - properties: [ - { - name: "Id", - column: "PAYMENTRECORD_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Date", - column: "PAYMENTRECORD_DATE", - type: "DATE", - required: true - }, - { - name: "Valor", - column: "PAYMENTRECORD_VALOR", - type: "DATE", - required: true - }, - { - name: "CompanyIBAN", - column: "PAYMENTRECORD_COMPANYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyIBAN", - column: "PAYMENTRECORD_COUNTERPARTYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyName", - column: "PAYMENTRECORD_COUNTERPARTYNAME", - type: "VARCHAR", - }, - { - name: "Amount", - column: "PAYMENTRECORD_AMOUNT", - type: "DECIMAL", - }, - { - name: "Currency", - column: "PAYMENTRECORD_CURRENCY", - type: "INTEGER", - }, - { - name: "PaymentDirection", - column: "PAYMENTRECORD_PAYMENTDIRECTION", - type: "INTEGER", - }, - { - name: "PaymentType", - column: "PAYMENTRECORD_PAYMENTTYPE", - type: "INTEGER", - }, - { - name: "Reason", - column: "PAYMENTRECORD_REASON", - type: "VARCHAR", - }, - { - name: "Description", - column: "PAYMENTRECORD_DESCRIPTION", - type: "VARCHAR", - }, - { - name: "Company", - column: "PAYMENTRECORD_COMPANY", - type: "INTEGER", - }, - { - name: "UUID", - column: "PAYMENTRECORD_UUID", - type: "VARCHAR", - required: true - }, - { - name: "Reference", - column: "PAYMENTRECORD_REFERENCE", - type: "VARCHAR", - }, - { - name: "Deleted", - column: "PAYMENTRECORD_DELETED", - type: "BOOLEAN", - }, - { - name: "DeletedAt", - column: "PAYMENTRECORD_DELETEDAT", - type: "TIMESTAMP", - }, - { - name: "DeletedReason", - column: "PAYMENTRECORD_DELETEDREASON", - type: "VARCHAR", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(PaymentRecordRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: PaymentRecordEntityOptions = {}): PaymentRecordEntity[] { - if (options.$sort === undefined && options.$order === undefined) { - options.$sort = "Date"; - options.$order = "DESC"; - } - let list = this.dao.list(options).map((e: PaymentRecordEntity) => { - EntityUtils.setDate(e, "Date"); - EntityUtils.setDate(e, "Valor"); - EntityUtils.setBoolean(e, "Deleted"); - return e; - }); - return list; - } - - public findById(id: number, options: PaymentRecordEntityOptions = {}): PaymentRecordEntity | undefined { - const entity = this.dao.find(id); - EntityUtils.setDate(entity, "Date"); - EntityUtils.setDate(entity, "Valor"); - EntityUtils.setBoolean(entity, "Deleted"); - return entity ?? undefined; - } - - public create(entity: PaymentRecordCreateEntity): number { - EntityUtils.setLocalDate(entity, "Date"); - EntityUtils.setLocalDate(entity, "Valor"); - EntityUtils.setBoolean(entity, "Deleted"); - // @ts-ignore - (entity as PaymentRecordEntity).UUID = require("sdk/utils/uuid").random(); - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_PAYMENTRECORD", - entity: entity, - key: { - name: "Id", - column: "PAYMENTRECORD_ID", - value: id - } - }); - return id; - } - - public update(entity: PaymentRecordUpdateEntity): void { - // EntityUtils.setLocalDate(entity, "Date"); - // EntityUtils.setLocalDate(entity, "Valor"); - EntityUtils.setBoolean(entity, "Deleted"); - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_PAYMENTRECORD", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "PAYMENTRECORD_ID", - value: entity.Id - } - }); - } - - public upsert(entity: PaymentRecordCreateEntity | PaymentRecordUpdateEntity): number { - const id = (entity as PaymentRecordUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as PaymentRecordUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_PAYMENTRECORD", - entity: entity, - key: { - name: "Id", - column: "PAYMENTRECORD_ID", - value: id - } - }); - } - - public count(options?: PaymentRecordEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_PAYMENTRECORD"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: PaymentRecordEntityEvent | PaymentRecordUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-PaymentRecord-PaymentRecord", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-PaymentRecord-PaymentRecord").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirection.extensionpoint b/codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirection.extensionpoint deleted file mode 100644 index 44517c5..0000000 --- a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirection.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-Settings-PaymentDirection", - "description": "Extension Point for the codbex-payments-Settings-PaymentDirection entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirectionRepository.ts b/codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirectionRepository.ts deleted file mode 100644 index 93ca471..0000000 --- a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentDirectionRepository.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; - -export interface PaymentDirectionEntity { - readonly Id: number; - Name: string; -} - -export interface PaymentDirectionCreateEntity { - readonly Name: string; -} - -export interface PaymentDirectionUpdateEntity extends PaymentDirectionCreateEntity { - readonly Id: number; -} - -export interface PaymentDirectionEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Name?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Name?: string | string[]; - }; - contains?: { - Id?: number; - Name?: string; - }; - greaterThan?: { - Id?: number; - Name?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Name?: string; - }; - lessThan?: { - Id?: number; - Name?: string; - }; - lessThanOrEqual?: { - Id?: number; - Name?: string; - }; - }, - $select?: (keyof PaymentDirectionEntity)[], - $sort?: string | (keyof PaymentDirectionEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface PaymentDirectionEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface PaymentDirectionUpdateEntityEvent extends PaymentDirectionEntityEvent { - readonly previousEntity: PaymentDirectionEntity; -} - -export class PaymentDirectionRepository { - - private static readonly DEFINITION = { - table: "CODBEX_PAYMENTDIRECTION", - properties: [ - { - name: "Id", - column: "PAYMENTDIRECTION_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Name", - column: "PAYMENTDIRECTION_NAME", - type: "VARCHAR", - required: true - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(PaymentDirectionRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: PaymentDirectionEntityOptions = {}): PaymentDirectionEntity[] { - let list = this.dao.list(options); - return list; - } - - public findById(id: number, options: PaymentDirectionEntityOptions = {}): PaymentDirectionEntity | undefined { - const entity = this.dao.find(id); - return entity ?? undefined; - } - - public create(entity: PaymentDirectionCreateEntity): number { - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_PAYMENTDIRECTION", - entity: entity, - key: { - name: "Id", - column: "PAYMENTDIRECTION_ID", - value: id - } - }); - return id; - } - - public update(entity: PaymentDirectionUpdateEntity): void { - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_PAYMENTDIRECTION", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "PAYMENTDIRECTION_ID", - value: entity.Id - } - }); - } - - public upsert(entity: PaymentDirectionCreateEntity | PaymentDirectionUpdateEntity): number { - const id = (entity as PaymentDirectionUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as PaymentDirectionUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_PAYMENTDIRECTION", - entity: entity, - key: { - name: "Id", - column: "PAYMENTDIRECTION_ID", - value: id - } - }); - } - - public count(options?: PaymentDirectionEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_PAYMENTDIRECTION"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: PaymentDirectionEntityEvent | PaymentDirectionUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-Settings-PaymentDirection", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-Settings-PaymentDirection").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentType.extensionpoint b/codbex-payments/gen/codbex-payments/dao/Settings/PaymentType.extensionpoint deleted file mode 100644 index 5e9fecc..0000000 --- a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentType.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-Settings-PaymentType", - "description": "Extension Point for the codbex-payments-Settings-PaymentType entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentTypeRepository.ts b/codbex-payments/gen/codbex-payments/dao/Settings/PaymentTypeRepository.ts deleted file mode 100644 index 00caa5c..0000000 --- a/codbex-payments/gen/codbex-payments/dao/Settings/PaymentTypeRepository.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; - -export interface PaymentTypeEntity { - readonly Id: number; - Name?: string; -} - -export interface PaymentTypeCreateEntity { - readonly Name?: string; -} - -export interface PaymentTypeUpdateEntity extends PaymentTypeCreateEntity { - readonly Id: number; -} - -export interface PaymentTypeEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Name?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Name?: string | string[]; - }; - contains?: { - Id?: number; - Name?: string; - }; - greaterThan?: { - Id?: number; - Name?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Name?: string; - }; - lessThan?: { - Id?: number; - Name?: string; - }; - lessThanOrEqual?: { - Id?: number; - Name?: string; - }; - }, - $select?: (keyof PaymentTypeEntity)[], - $sort?: string | (keyof PaymentTypeEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface PaymentTypeEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface PaymentTypeUpdateEntityEvent extends PaymentTypeEntityEvent { - readonly previousEntity: PaymentTypeEntity; -} - -export class PaymentTypeRepository { - - private static readonly DEFINITION = { - table: "CODBEX_PAYMENTTYPE", - properties: [ - { - name: "Id", - column: "PAYMENTTYPE_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Name", - column: "PAYMENTTYPE_NAME", - type: "VARCHAR", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(PaymentTypeRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: PaymentTypeEntityOptions = {}): PaymentTypeEntity[] { - let list = this.dao.list(options); - return list; - } - - public findById(id: number, options: PaymentTypeEntityOptions = {}): PaymentTypeEntity | undefined { - const entity = this.dao.find(id); - return entity ?? undefined; - } - - public create(entity: PaymentTypeCreateEntity): number { - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_PAYMENTTYPE", - entity: entity, - key: { - name: "Id", - column: "PAYMENTTYPE_ID", - value: id - } - }); - return id; - } - - public update(entity: PaymentTypeUpdateEntity): void { - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_PAYMENTTYPE", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "PAYMENTTYPE_ID", - value: entity.Id - } - }); - } - - public upsert(entity: PaymentTypeCreateEntity | PaymentTypeUpdateEntity): number { - const id = (entity as PaymentTypeUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as PaymentTypeUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_PAYMENTTYPE", - entity: entity, - key: { - name: "Id", - column: "PAYMENTTYPE_ID", - value: id - } - }); - } - - public count(options?: PaymentTypeEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_PAYMENTTYPE"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: PaymentTypeEntityEvent | PaymentTypeUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-Settings-PaymentType", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-Settings-PaymentType").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPayment.extensionpoint b/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPayment.extensionpoint deleted file mode 100644 index b8295aa..0000000 --- a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPayment.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-payments-SupplierPayment-SupplierPayment", - "description": "Extension Point for the codbex-payments-SupplierPayment-SupplierPayment entity" -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts deleted file mode 100644 index 0361e73..0000000 --- a/codbex-payments/gen/codbex-payments/dao/SupplierPayment/SupplierPaymentRepository.ts +++ /dev/null @@ -1,405 +0,0 @@ -import { sql, query } from "@aerokit/sdk/db"; -import { producer } from "@aerokit/sdk/messaging"; -import { extensions } from "@aerokit/sdk/extensions"; -import { dao as daoApi } from "@aerokit/sdk/db"; -import { EntityUtils } from "../utils/EntityUtils"; -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -export interface SupplierPaymentEntity { - readonly Id: number; - Supplier: number; - Date: Date; - Valor: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount: number; - Currency: number; - Reason: string; - Description?: string; - Company?: number; - Name?: string; - UUID: string; - Reference?: string; -} - -export interface SupplierPaymentCreateEntity { - readonly Supplier: number; - readonly Date: Date; - readonly Valor: Date; - readonly CompanyIBAN?: string; - readonly CounterpartyIBAN?: string; - readonly CounterpartyName?: string; - readonly Amount: number; - readonly Currency: number; - readonly Reason: string; - readonly Description?: string; - readonly Company?: number; - readonly Reference?: string; -} - -export interface SupplierPaymentUpdateEntity extends SupplierPaymentCreateEntity { - readonly Id: number; -} - -export interface SupplierPaymentEntityOptions { - $filter?: { - equals?: { - Id?: number | number[]; - Supplier?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - Name?: string | string[]; - UUID?: string | string[]; - Reference?: string | string[]; - }; - notEquals?: { - Id?: number | number[]; - Supplier?: number | number[]; - Date?: Date | Date[]; - Valor?: Date | Date[]; - CompanyIBAN?: string | string[]; - CounterpartyIBAN?: string | string[]; - CounterpartyName?: string | string[]; - Amount?: number | number[]; - Currency?: number | number[]; - Reason?: string | string[]; - Description?: string | string[]; - Company?: number | number[]; - Name?: string | string[]; - UUID?: string | string[]; - Reference?: string | string[]; - }; - contains?: { - Id?: number; - Supplier?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - greaterThan?: { - Id?: number; - Supplier?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - greaterThanOrEqual?: { - Id?: number; - Supplier?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - lessThan?: { - Id?: number; - Supplier?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - lessThanOrEqual?: { - Id?: number; - Supplier?: number; - Date?: Date; - Valor?: Date; - CompanyIBAN?: string; - CounterpartyIBAN?: string; - CounterpartyName?: string; - Amount?: number; - Currency?: number; - Reason?: string; - Description?: string; - Company?: number; - Name?: string; - UUID?: string; - Reference?: string; - }; - }, - $select?: (keyof SupplierPaymentEntity)[], - $sort?: string | (keyof SupplierPaymentEntity)[], - $order?: 'ASC' | 'DESC', - $offset?: number, - $limit?: number, - $language?: string -} - -export interface SupplierPaymentEntityEvent { - readonly operation: 'create' | 'update' | 'delete'; - readonly table: string; - readonly entity: Partial; - readonly key: { - name: string; - column: string; - value: number; - } -} - -export interface SupplierPaymentUpdateEntityEvent extends SupplierPaymentEntityEvent { - readonly previousEntity: SupplierPaymentEntity; -} - -export class SupplierPaymentRepository { - - private static readonly DEFINITION = { - table: "CODBEX_SUPPLIERPAYMENT", - properties: [ - { - name: "Id", - column: "SUPPLIERPAYMENT_ID", - type: "INTEGER", - id: true, - autoIncrement: true, - }, - { - name: "Supplier", - column: "SUPPLIERPAYMENT_SUPPLIER", - type: "INTEGER", - required: true - }, - { - name: "Date", - column: "SUPPLIERPAYMENT_DATE", - type: "DATE", - required: true - }, - { - name: "Valor", - column: "SUPPLIERPAYMENT_VALOR", - type: "DATE", - required: true - }, - { - name: "CompanyIBAN", - column: "SUPPLIERPAYMENT_COMPANYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyIBAN", - column: "SUPPLIERPAYMENT_COUNTERPARTYIBAN", - type: "VARCHAR", - }, - { - name: "CounterpartyName", - column: "SUPPLIERPAYMENT_COUNTERPARTYNAME", - type: "VARCHAR", - }, - { - name: "Amount", - column: "SUPPLIERPAYMENT_AMOUNT", - type: "DECIMAL", - required: true - }, - { - name: "Currency", - column: "SUPPLIERPAYMENT_CURRENCY", - type: "INTEGER", - required: true - }, - { - name: "Reason", - column: "SUPPLIERPAYMENT_REASON", - type: "VARCHAR", - required: true - }, - { - name: "Description", - column: "SUPPLIERPAYMENT_DESCRIPTION", - type: "VARCHAR", - }, - { - name: "Company", - column: "SUPPLIERPAYMENT_COMPANY", - type: "INTEGER", - }, - { - name: "Name", - column: "SUPPLIERPAYMENT_NAME", - type: "VARCHAR", - }, - { - name: "UUID", - column: "SUPPLIERPAYMENT_UUID", - type: "VARCHAR", - required: true - }, - { - name: "Reference", - column: "SUPPLIERPAYMENT_REFERENCE", - type: "VARCHAR", - } - ] - }; - - private readonly dao; - - constructor(dataSource = "DefaultDB") { - this.dao = daoApi.create(SupplierPaymentRepository.DEFINITION, undefined, dataSource); - } - - public findAll(options: SupplierPaymentEntityOptions = {}): SupplierPaymentEntity[] { - if (options.$sort === undefined && options.$order === undefined) { - options.$sort = "Date"; - options.$order = "DESC"; - } - let list = this.dao.list(options).map((e: SupplierPaymentEntity) => { - EntityUtils.setDate(e, "Date"); - EntityUtils.setDate(e, "Valor"); - return e; - }); - return list; - } - - public findById(id: number, options: SupplierPaymentEntityOptions = {}): SupplierPaymentEntity | undefined { - const entity = this.dao.find(id); - EntityUtils.setDate(entity, "Date"); - EntityUtils.setDate(entity, "Valor"); - return entity ?? undefined; - } - - public create(entity: SupplierPaymentCreateEntity): number { - EntityUtils.setLocalDate(entity, "Date"); - EntityUtils.setLocalDate(entity, "Valor"); - // @ts-ignore - (entity as SupplierPaymentEntity).Name = new NumberGeneratorService().generateByType('Supplier Payment'); - // @ts-ignore - (entity as SupplierPaymentEntity).UUID = require("sdk/utils/uuid").random(); - const id = this.dao.insert(entity); - this.triggerEvent({ - operation: "create", - table: "CODBEX_SUPPLIERPAYMENT", - entity: entity, - key: { - name: "Id", - column: "SUPPLIERPAYMENT_ID", - value: id - } - }); - return id; - } - - public update(entity: SupplierPaymentUpdateEntity): void { - // EntityUtils.setLocalDate(entity, "Date"); - // EntityUtils.setLocalDate(entity, "Valor"); - const previousEntity = this.findById(entity.Id); - this.dao.update(entity); - this.triggerEvent({ - operation: "update", - table: "CODBEX_SUPPLIERPAYMENT", - entity: entity, - previousEntity: previousEntity, - key: { - name: "Id", - column: "SUPPLIERPAYMENT_ID", - value: entity.Id - } - }); - } - - public upsert(entity: SupplierPaymentCreateEntity | SupplierPaymentUpdateEntity): number { - const id = (entity as SupplierPaymentUpdateEntity).Id; - if (!id) { - return this.create(entity); - } - - const existingEntity = this.findById(id); - if (existingEntity) { - this.update(entity as SupplierPaymentUpdateEntity); - return id; - } else { - return this.create(entity); - } - } - - public deleteById(id: number): void { - const entity = this.dao.find(id); - this.dao.remove(id); - this.triggerEvent({ - operation: "delete", - table: "CODBEX_SUPPLIERPAYMENT", - entity: entity, - key: { - name: "Id", - column: "SUPPLIERPAYMENT_ID", - value: id - } - }); - } - - public count(options?: SupplierPaymentEntityOptions): number { - return this.dao.count(options); - } - - public customDataCount(): number { - const resultSet = query.execute('SELECT COUNT(*) AS COUNT FROM "CODBEX_SUPPLIERPAYMENT"'); - if (resultSet !== null && resultSet[0] !== null) { - if (resultSet[0].COUNT !== undefined && resultSet[0].COUNT !== null) { - return resultSet[0].COUNT; - } else if (resultSet[0].count !== undefined && resultSet[0].count !== null) { - return resultSet[0].count; - } - } - return 0; - } - - private async triggerEvent(data: SupplierPaymentEntityEvent | SupplierPaymentUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-payments-SupplierPayment-SupplierPayment", ["trigger"]); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - producer.topic("codbex-payments-SupplierPayment-SupplierPayment").send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/dao/utils/EntityUtils.ts b/codbex-payments/gen/codbex-payments/dao/utils/EntityUtils.ts deleted file mode 100644 index 0f8815d..0000000 --- a/codbex-payments/gen/codbex-payments/dao/utils/EntityUtils.ts +++ /dev/null @@ -1,20 +0,0 @@ -export class EntityUtils { - - public static setDate(obj: any, property: string): void { - if (obj && obj[property]) { - obj[property] = new Date(obj[property]).getTime(); - } - } - - public static setLocalDate(obj: any, property: string): void { - if (obj && obj[property]) { - obj[property] = new Date(new Date(obj[property]).setHours(-(new Date().getTimezoneOffset() / 60), 0, 0, 0)).toISOString(); - } - } - - public static setBoolean(obj: any, property: string): void { - if (obj && obj[property] !== undefined) { - obj[property] = obj[property] ? true : false; - } - } -} \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts index 8e2f5f5..aac6864 100644 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' @@ -13,6 +13,24 @@ export class CustomerPaymentRepository extends Repository super((CustomerPaymentEntity as EntityConstructor)); } + public override findById(id: string | number, options?: Options): CustomerPaymentEntity | undefined { + const entity = super.findById(id, options); + if (entity) { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + } + return entity; + } + + public override findAll(options?: Options): CustomerPaymentEntity[] { + const entities = super.findAll(options); + entities.forEach(entity => { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + }); + return entities; + } + public override create(entity: CustomerPaymentEntity): string | number { entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); entity.UUID = require("sdk/utils/uuid").random(); diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts index e193cc5..93e2db5 100644 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' @@ -13,6 +13,24 @@ export class EmployeePaymentRepository extends Repository super((EmployeePaymentEntity as EntityConstructor)); } + public override findById(id: string | number, options?: Options): EmployeePaymentEntity | undefined { + const entity = super.findById(id, options); + if (entity) { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + } + return entity; + } + + public override findAll(options?: Options): EmployeePaymentEntity[] { + const entities = super.findAll(options); + entities.forEach(entity => { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + }); + return entities; + } + public override create(entity: EmployeePaymentEntity): string | number { entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); entity.UUID = require("sdk/utils/uuid").random(); diff --git a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts b/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts index e72bae2..1f1ea96 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' @@ -11,6 +11,24 @@ export class PaymentAdjustmentRepository extends Repository { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + }); + return entities; + } + public override create(entity: PaymentAdjustmentEntity): string | number { entity.UUID = require("sdk/utils/uuid").random(); return super.create(entity); diff --git a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts index 42d5761..3e684b7 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' @@ -11,6 +11,26 @@ export class PaymentRecordRepository extends Repository { super((PaymentRecordEntity as EntityConstructor)); } + public override findById(id: string | number, options?: Options): PaymentRecordEntity | undefined { + const entity = super.findById(id, options); + if (entity) { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + entity.DeletedAt = entity.DeletedAt ? new Date(entity.DeletedAt) : undefined; + } + return entity; + } + + public override findAll(options?: Options): PaymentRecordEntity[] { + const entities = super.findAll(options); + entities.forEach(entity => { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + entity.DeletedAt = entity.DeletedAt ? new Date(entity.DeletedAt) : undefined; + }); + return entities; + } + public override create(entity: PaymentRecordEntity): string | number { entity.UUID = require("sdk/utils/uuid").random(); return super.create(entity); diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts index 353f921..f6967a9 100644 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts index b8ac15c..b089429 100644 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts index 11f6660..abf645a 100644 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts +++ b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts @@ -1,4 +1,4 @@ -import { Repository, EntityEvent, EntityConstructor } from '@aerokit/sdk/db' +import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' import { Component } from '@aerokit/sdk/component' import { Producer } from '@aerokit/sdk/messaging' import { Extensions } from '@aerokit/sdk/extensions' @@ -13,6 +13,24 @@ export class SupplierPaymentRepository extends Repository super((SupplierPaymentEntity as EntityConstructor)); } + public override findById(id: string | number, options?: Options): SupplierPaymentEntity | undefined { + const entity = super.findById(id, options); + if (entity) { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + } + return entity; + } + + public override findAll(options?: Options): SupplierPaymentEntity[] { + const entities = super.findAll(options); + entities.forEach(entity => { + entity.Date = entity.Date ? new Date(entity.Date) : undefined; + entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; + }); + return entities; + } + public override create(entity: SupplierPaymentEntity): string | number { entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); entity.UUID = require("sdk/utils/uuid").random(); diff --git a/codbex-payments/project.json b/codbex-payments/project.json index a44f109..672c5ae 100644 --- a/codbex-payments/project.json +++ b/codbex-payments/project.json @@ -1,3 +1,3 @@ { "guid": "codbex-payments" -} +} \ No newline at end of file From 0eeba7fc8556155f5ffb47e6b0144d9ea3c36d8e Mon Sep 17 00:00:00 2001 From: ThuF Date: Thu, 2 Apr 2026 15:07:15 +0000 Subject: [PATCH 8/9] Resolves conflicts --- codbex-payments/codbex-payments.edm | 56 +- codbex-payments/codbex-payments.gen | 512 +++++++++++------- codbex-payments/codbex-payments.model | 121 +++-- .../CustomerPaymentController.ts | 19 +- .../EmployeePaymentController.ts | 19 +- .../PaymentRecord/PaymentRecordController.ts | 28 +- .../api/Settings/PaymentTypeController.ts | 3 + .../SupplierPaymentController.ts | 19 +- .../CustomerPayment/CustomerPaymentEntity.ts | 13 +- .../EmployeePayment/EmployeePaymentEntity.ts | 17 +- .../PaymentAdjustmentEntity.ts | 5 - .../data/PaymentRecord/PaymentRecordEntity.ts | 22 +- .../data/Settings/PaymentTypeEntity.ts | 3 +- .../SupplierPayment/SupplierPaymentEntity.ts | 17 +- .../schema/codbex-payments.schema | 54 +- .../dialog-filter/controller.js | 4 +- .../CustomerPayment/dialog-filter/index.html | 14 +- .../CustomerPayment/dialog-window/index.html | 30 +- .../CustomerPayment/index.html | 2 +- .../CustomerPayment/main-details/index.html | 30 +- .../dialog-filter/controller.js | 8 +- .../EmployeePayment/dialog-filter/index.html | 30 +- .../EmployeePayment/dialog-window/index.html | 46 +- .../EmployeePayment/index.html | 5 +- .../EmployeePayment/main-details/index.html | 46 +- .../PaymentRecord/dialog-filter/controller.js | 4 +- .../PaymentRecord/dialog-filter/index.html | 14 +- .../PaymentRecord/dialog-window/index.html | 42 +- .../ui/PaymentRecord/PaymentRecord/index.html | 2 +- .../PaymentRecord/main-details/index.html | 42 +- .../PaymentRecord/dialog-filter/controller.js | 4 +- .../PaymentRecord/dialog-filter/index.html | 14 +- .../PaymentRecord/dialog-print/controller.js | 4 +- .../PaymentRecord/dialog-print/index.html | 4 +- .../PaymentRecord/dialog-window/index.html | 32 +- .../ui/Reports/PaymentRecord/index.html | 4 +- .../PaymentType/dialog-window/index.html | 4 +- .../dialog-filter/controller.js | 8 +- .../SupplierPayment/dialog-filter/index.html | 30 +- .../SupplierPayment/dialog-window/index.html | 46 +- .../SupplierPayment/index.html | 5 +- .../SupplierPayment/main-details/index.html | 46 +- .../en-US/codbex-payments.model.json | 10 +- 43 files changed, 932 insertions(+), 506 deletions(-) diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index a59a87b..5759155 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -5,8 +5,8 @@ - - + + @@ -16,15 +16,15 @@ - + - - + + @@ -34,14 +34,15 @@ + - - + + @@ -51,18 +52,19 @@ + - - + + - - - - + + + + @@ -102,11 +104,11 @@ - + - + - + @@ -139,23 +141,23 @@ - - - - - + + + + + - + - + - + @@ -189,6 +191,10 @@ + + + + CustomerPaymentsales-navigation-group/services/web/resources/unicons/usd-square.svg300 @@ -199,5 +205,5 @@ - + \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index e6373c5..21e0ed6 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -4,13 +4,46 @@ "brandUrl": "https://www.codbex.com/", "title": "Payments Management Module", "description": "Managing Payments Data", + "fileName": "codbex-payments", + "genFolderName": "codbex-payments", + "dataSource": "DefaultDB", + "roles": [ + { + "entityName": "CustomerPayment", + "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" + }, + { + "entityName": "SupplierPayment", + "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" + }, + { + "entityName": "EmployeePayment", + "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" + }, + { + "entityName": "PaymentRecord", + "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" + }, + { + "entityName": "PaymentType", + "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", + "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" + }, + { + "entityName": "PaymentAdjustment", + "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" + } + ], + "tprefix": "codbex-payments-model", "projectName": "codbex-payments", "workspaceName": "workspace", "filePath": "codbex-payments.model", "templateId": "template-application-angular-v2/template/template.js", - "fileName": "codbex-payments", - "genFolderName": "codbex-payments", - "dataSource": "DefaultDB", "perspectives": { "CustomerPayment": { "views": [ @@ -231,39 +264,6 @@ "role": "" } }, - "roles": [ - { - "entityName": "CustomerPayment", - "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", - "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" - }, - { - "entityName": "SupplierPayment", - "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", - "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" - }, - { - "entityName": "EmployeePayment", - "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", - "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" - }, - { - "entityName": "PaymentRecord", - "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", - "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" - }, - { - "entityName": "PaymentType", - "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", - "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" - }, - { - "entityName": "PaymentAdjustment", - "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", - "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" - } - ], - "tprefix": "codbex-payments-model", "models": [ { "properties": [ @@ -383,50 +383,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "CUSTOMERPAYMENT_COMPANYIBAN", - "dataNullable": true, + "dataName": "CUSTOMERPAYMENT_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -436,7 +438,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -710,9 +712,10 @@ { "auditType": "NONE", "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", @@ -725,11 +728,10 @@ "relationshipEntityName": "PaymentMethod", "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentMethod", @@ -890,50 +892,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "CUSTOMERPAYMENT_COMPANYIBAN", - "dataNullable": true, + "dataName": "CUSTOMERPAYMENT_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -943,7 +947,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -1158,9 +1162,10 @@ { "auditType": "NONE", "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", @@ -1173,11 +1178,10 @@ "relationshipEntityName": "PaymentMethod", "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentMethod", @@ -1310,50 +1314,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "SUPPLIERPAYMENT_COMPANYIBAN", - "dataNullable": true, + "dataName": "SUPPLIERPAYMENT_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -1363,7 +1369,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -1633,6 +1639,36 @@ "minLength": 0, "maxLength": 20, "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentMethod", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "methods", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" } ], "caption": "Manage entity SupplierPayment", @@ -1680,6 +1716,11 @@ "name": "Company", "project": "codbex-companies", "genFolderName": "codbex-companies" + }, + { + "name": "PaymentMethod", + "project": "codbex-methods", + "genFolderName": "codbex-methods" } ], "dataOrderBy": "DESC", @@ -1780,50 +1821,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "SUPPLIERPAYMENT_COMPANYIBAN", - "dataNullable": true, + "dataName": "SUPPLIERPAYMENT_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -1833,7 +1876,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -2103,6 +2146,36 @@ "minLength": 0, "maxLength": 20, "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentMethod", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "methods", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" } ] }, @@ -2227,50 +2300,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", - "dataNullable": true, + "dataName": "EMPLOYEEPAYMENT_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -2280,7 +2355,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -2550,6 +2625,36 @@ "minLength": 0, "maxLength": 36, "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_PAYMENTMETHOD", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentMethod", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "relationshipName": "EmployeePayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "methods", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" } ], "caption": "Manage entity EmployeePayment", @@ -2597,6 +2702,11 @@ "name": "Company", "project": "codbex-companies", "genFolderName": "codbex-companies" + }, + { + "name": "PaymentMethod", + "project": "codbex-methods", + "genFolderName": "codbex-methods" } ], "dataOrderBy": "DESC", @@ -2697,50 +2807,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", - "dataNullable": true, + "dataName": "EMPLOYEEPAYMENT_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -2750,7 +2862,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -3020,6 +3132,36 @@ "minLength": 0, "maxLength": 36, "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_PAYMENTMETHOD", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentMethod", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "relationshipName": "EmployeePayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "methods", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" } ] }, @@ -3112,50 +3254,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "PAYMENTRECORD_COMPANYIBAN", - "dataNullable": true, + "dataName": "PAYMENTRECORD_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -3165,7 +3309,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -3200,22 +3344,22 @@ "auditType": "NONE", "dataLength": "16", "dataName": "PAYMENTRECORD_AMOUNT", - "dataNullable": true, + "dataNullable": false, "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", "description": "", + "isRequiredProperty": true, "name": "Amount", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "NUMBER", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Amount", @@ -3228,9 +3372,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_CURRENCY", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "Currency", "tooltip": "", "widgetDropDownKey": "Id", @@ -3243,11 +3388,10 @@ "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", @@ -3260,9 +3404,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_PAYMENTDIRECTION", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "PaymentDirection", "tooltip": "", "widgetDropDownKey": "Id", @@ -3274,12 +3419,11 @@ "relationshipName": "PaymentRecord_PaymentDirection", "relationshipEntityName": "PaymentDirection", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentDirection", @@ -3292,9 +3436,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_PAYMENTTYPE", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "PaymentType", "tooltip": "", "widgetDropDownKey": "Id", @@ -3306,12 +3451,11 @@ "relationshipName": "PaymentRecord_PaymentType", "relationshipEntityName": "PaymentType", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentType", @@ -3660,50 +3804,52 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "PAYMENTRECORD_COMPANYIBAN", - "dataNullable": true, + "dataName": "PAYMENTRECORD_OURPARTYIBAN", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": true, + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "CompanyIBAN", + "widgetLabel": "OurPartyIBAN", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", "dataLength": "34", "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "CounterpartyIBAN", @@ -3713,7 +3859,7 @@ "dataTypeTypescript": "string", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "NONE", @@ -3748,22 +3894,22 @@ "auditType": "NONE", "dataLength": "16", "dataName": "PAYMENTRECORD_AMOUNT", - "dataNullable": true, + "dataNullable": false, "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", "description": "", + "isRequiredProperty": true, "name": "Amount", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "NUMBER", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Amount", @@ -3776,9 +3922,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_CURRENCY", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "Currency", "tooltip": "", "widgetDropDownKey": "Id", @@ -3791,11 +3938,10 @@ "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", @@ -3808,9 +3954,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_PAYMENTDIRECTION", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "PaymentDirection", "tooltip": "", "widgetDropDownKey": "Id", @@ -3822,12 +3969,11 @@ "relationshipName": "PaymentRecord_PaymentDirection", "relationshipEntityName": "PaymentDirection", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentDirection", @@ -3840,9 +3986,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_PAYMENTTYPE", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", + "isRequiredProperty": true, "name": "PaymentType", "tooltip": "", "widgetDropDownKey": "Id", @@ -3854,12 +4001,11 @@ "relationshipName": "PaymentRecord_PaymentType", "relationshipEntityName": "PaymentType", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentType", @@ -4755,20 +4901,20 @@ "auditType": "NONE", "dataLength": "20", "dataName": "PAYMENTTYPE_NAME", - "dataNullable": true, + "dataNullable": false, "dataType": "VARCHAR", "description": "", + "isRequiredProperty": true, "name": "Name", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Name", @@ -5293,7 +5439,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_DATE", - "dataNullable": true, + "dataNullable": false, "dataType": "DATE", "description": "", "isRequiredProperty": true, @@ -5303,7 +5449,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DATE", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5320,7 +5466,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_VALOR", - "dataNullable": true, + "dataNullable": false, "dataType": "DATE", "description": "", "isRequiredProperty": true, @@ -5330,7 +5476,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DATE", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5348,7 +5494,7 @@ "auditType": "NONE", "dataLength": "16", "dataName": "PAYMENTADJUSTMENT_AMOUNT", - "dataNullable": true, + "dataNullable": false, "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", @@ -5360,7 +5506,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "NUMBER", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5376,7 +5522,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_CURRENCY", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, @@ -5392,7 +5538,7 @@ "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5408,7 +5554,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_COMPANY", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, @@ -5424,7 +5570,7 @@ "relationshipEntityName": "Company", "relationshipEntityPerspectiveName": "Companies", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5473,6 +5619,7 @@ "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", "isCalculatedProperty": true, "name": "UUID", @@ -5484,7 +5631,6 @@ "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, "isRequiredProperty": false, "isReadOnlyProperty": false, "widgetLabel": "UUID", @@ -5546,7 +5692,7 @@ "title": { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_DATE", - "dataNullable": true, + "dataNullable": false, "dataType": "DATE", "description": "", "isRequiredProperty": true, @@ -5556,7 +5702,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DATE", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5574,7 +5720,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_VALOR", - "dataNullable": true, + "dataNullable": false, "dataType": "DATE", "description": "", "isRequiredProperty": true, @@ -5584,7 +5730,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DATE", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5602,7 +5748,7 @@ "auditType": "NONE", "dataLength": "16", "dataName": "PAYMENTADJUSTMENT_AMOUNT", - "dataNullable": true, + "dataNullable": false, "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", @@ -5614,7 +5760,7 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "NUMBER", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5630,7 +5776,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_CURRENCY", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, @@ -5646,7 +5792,7 @@ "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5662,7 +5808,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_COMPANY", - "dataNullable": true, + "dataNullable": false, "dataType": "INTEGER", "description": "", "isRequiredProperty": true, @@ -5678,7 +5824,7 @@ "relationshipEntityName": "Company", "relationshipEntityPerspectiveName": "Companies", "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, @@ -5727,6 +5873,7 @@ "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", "isCalculatedProperty": true, "name": "UUID", @@ -5738,7 +5885,6 @@ "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, "isRequiredProperty": false, "isReadOnlyProperty": false, "widgetLabel": "UUID", diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model index 4ffd5d5..a310069 100644 --- a/codbex-payments/codbex-payments.model +++ b/codbex-payments/codbex-payments.model @@ -70,14 +70,16 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "CUSTOMERPAYMENT_COMPANYIBAN", - "dataNullable": "true", + "dataName": "CUSTOMERPAYMENT_OURPARTYIBAN", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -85,13 +87,15 @@ "auditType": "NONE", "dataLength": "34", "dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN", - "dataNullable": "true", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", + "isRequiredProperty": "true", "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -244,9 +248,10 @@ { "auditType": "NONE", "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", + "isRequiredProperty": "true", "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", @@ -360,14 +365,16 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "SUPPLIERPAYMENT_COMPANYIBAN", - "dataNullable": "true", + "dataName": "SUPPLIERPAYMENT_OURPARTYIBAN", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -375,13 +382,15 @@ "auditType": "NONE", "dataLength": "34", "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", - "dataNullable": "true", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", + "isRequiredProperty": "true", "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -530,6 +539,24 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "PaymentMethod", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "methods" } ], "caption": "Manage entity SupplierPayment", @@ -631,14 +658,16 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "EMPLOYEEPAYMENT_COMPANYIBAN", - "dataNullable": "true", + "dataName": "EMPLOYEEPAYMENT_OURPARTYIBAN", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -646,13 +675,15 @@ "auditType": "NONE", "dataLength": "34", "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", - "dataNullable": "true", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", + "isRequiredProperty": "true", "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -801,6 +832,24 @@ "widgetLength": "36", "widgetSize": "", "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_PAYMENTMETHOD", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "PaymentMethod", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "relationshipName": "EmployeePayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "methods" } ], "caption": "Manage entity EmployeePayment", @@ -882,14 +931,16 @@ { "auditType": "NONE", "dataLength": "34", - "dataName": "PAYMENTRECORD_COMPANYIBAN", - "dataNullable": "true", + "dataName": "PAYMENTRECORD_OURPARTYIBAN", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", - "name": "CompanyIBAN", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -897,13 +948,15 @@ "auditType": "NONE", "dataLength": "34", "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", - "dataNullable": "true", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", + "isRequiredProperty": "true", "name": "CounterpartyIBAN", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "", "widgetType": "TEXTBOX" }, @@ -925,11 +978,12 @@ "auditType": "NONE", "dataLength": "16", "dataName": "PAYMENTRECORD_AMOUNT", - "dataNullable": "true", + "dataNullable": "false", "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", "description": "", + "isRequiredProperty": "true", "name": "Amount", "tooltip": "", "widgetIsMajor": "true", @@ -940,9 +994,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_CURRENCY", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", + "isRequiredProperty": "true", "name": "Currency", "tooltip": "", "widgetDropDownKey": "Id", @@ -959,9 +1014,10 @@ { "auditType": "NONE", "dataName": "PAYMENTRECORD_PAYMENTDIRECTION", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", + "isRequiredProperty": "true", "name": "PaymentDirection", "tooltip": "", "widgetDropDownKey": "Id", @@ -973,14 +1029,15 @@ "relationshipName": "PaymentRecord_PaymentDirection", "relationshipEntityName": "PaymentDirection", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipEntityPerspectiveLabel": "Settings" }, { "auditType": "NONE", "dataName": "PAYMENTRECORD_PAYMENTTYPE", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", + "isRequiredProperty": "true", "name": "PaymentType", "tooltip": "", "widgetDropDownKey": "Id", @@ -992,7 +1049,7 @@ "relationshipName": "PaymentRecord_PaymentType", "relationshipEntityName": "PaymentType", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipEntityPerspectiveLabel": "Settings" }, { "auditType": "NONE", @@ -1522,9 +1579,10 @@ "auditType": "NONE", "dataLength": "20", "dataName": "PAYMENTTYPE_NAME", - "dataNullable": "true", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", + "isRequiredProperty": "true", "name": "Name", "tooltip": "", "widgetIsMajor": "true", @@ -1551,7 +1609,7 @@ "name": "PaymentType", "perspectiveHeader": "", "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveLabel": "Entities", + "perspectiveLabel": "Settings", "perspectiveName": "Settings", "perspectiveNavId": "", "perspectiveOrder": "100", @@ -1839,7 +1897,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_DATE", - "dataNullable": "true", + "dataNullable": "false", "dataType": "DATE", "description": "", "isRequiredProperty": "true", @@ -1853,7 +1911,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_VALOR", - "dataNullable": "true", + "dataNullable": "false", "dataType": "DATE", "description": "", "isRequiredProperty": "true", @@ -1868,7 +1926,7 @@ "auditType": "NONE", "dataLength": "16", "dataName": "PAYMENTADJUSTMENT_AMOUNT", - "dataNullable": "true", + "dataNullable": "false", "dataPrecision": "16", "dataScale": "2", "dataType": "DECIMAL", @@ -1884,7 +1942,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_CURRENCY", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", @@ -1904,7 +1962,7 @@ { "auditType": "NONE", "dataName": "PAYMENTADJUSTMENT_COMPANY", - "dataNullable": "true", + "dataNullable": "false", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", @@ -1942,6 +2000,7 @@ "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", "isCalculatedProperty": "true", "name": "UUID", @@ -2030,7 +2089,7 @@ "name": "PaymentDirection", "perspectiveHeader": "", "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveLabel": "Entities", + "perspectiveLabel": "Settings", "perspectiveName": "Settings", "perspectiveNavId": "", "perspectiveOrder": "100", diff --git a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts index 9de63a0..3f6e86e 100644 --- a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts @@ -175,12 +175,24 @@ class CustomerPaymentController { if (entity.Valor === null || entity.Valor === undefined) { throw new ValidationError(`The 'Valor' property is required, provide a valid value`); } - if (entity.CompanyIBAN?.length > 34) { - throw new ValidationError(`The 'CompanyIBAN' exceeds the maximum length of [34] characters`); + if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { + throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); + } + if (entity.OurPartyIBAN?.length > 34) { + throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); + } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { + throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } + if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { + throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); } if (entity.CounterpartyIBAN?.length > 34) { throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { + throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } if (entity.CounterpartyName?.length > 100) { throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); } @@ -208,6 +220,9 @@ class CustomerPaymentController { if (entity.Reference?.length > 36) { throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); } + if (entity.PaymentMethod === null || entity.PaymentMethod === undefined) { + throw new ValidationError(`The 'PaymentMethod' property is required, provide a valid value`); + } for (const next of validationModules) { next.validate(entity); } diff --git a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts index cedf151..f7a62d4 100644 --- a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts @@ -175,12 +175,24 @@ class EmployeePaymentController { if (entity.Valor === null || entity.Valor === undefined) { throw new ValidationError(`The 'Valor' property is required, provide a valid value`); } - if (entity.CompanyIBAN?.length > 34) { - throw new ValidationError(`The 'CompanyIBAN' exceeds the maximum length of [34] characters`); + if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { + throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); + } + if (entity.OurPartyIBAN?.length > 34) { + throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); + } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { + throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } + if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { + throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); } if (entity.CounterpartyIBAN?.length > 34) { throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { + throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } if (entity.CounterpartyName?.length > 100) { throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); } @@ -208,6 +220,9 @@ class EmployeePaymentController { if (entity.Reference?.length > 36) { throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); } + if (entity.PaymentMethod === null || entity.PaymentMethod === undefined) { + throw new ValidationError(`The 'PaymentMethod' property is required, provide a valid value`); + } for (const next of validationModules) { next.validate(entity); } diff --git a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts index 918fa98..5646025 100644 --- a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts +++ b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts @@ -170,15 +170,39 @@ class PaymentRecordController { if (entity.Valor === null || entity.Valor === undefined) { throw new ValidationError(`The 'Valor' property is required, provide a valid value`); } - if (entity.CompanyIBAN?.length > 34) { - throw new ValidationError(`The 'CompanyIBAN' exceeds the maximum length of [34] characters`); + if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { + throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); + } + if (entity.OurPartyIBAN?.length > 34) { + throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); + } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { + throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } + if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { + throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); } if (entity.CounterpartyIBAN?.length > 34) { throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { + throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } if (entity.CounterpartyName?.length > 100) { throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); } + if (entity.Amount === null || entity.Amount === undefined) { + throw new ValidationError(`The 'Amount' property is required, provide a valid value`); + } + if (entity.Currency === null || entity.Currency === undefined) { + throw new ValidationError(`The 'Currency' property is required, provide a valid value`); + } + if (entity.PaymentDirection === null || entity.PaymentDirection === undefined) { + throw new ValidationError(`The 'PaymentDirection' property is required, provide a valid value`); + } + if (entity.PaymentType === null || entity.PaymentType === undefined) { + throw new ValidationError(`The 'PaymentType' property is required, provide a valid value`); + } if (entity.Reason?.length > 100) { throw new ValidationError(`The 'Reason' exceeds the maximum length of [100] characters`); } diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts index d015aef..d537d7d 100644 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts +++ b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts @@ -164,6 +164,9 @@ class PaymentTypeController { } private validateEntity(entity: any): void { + if (entity.Name === null || entity.Name === undefined) { + throw new ValidationError(`The 'Name' property is required, provide a valid value`); + } if (entity.Name?.length > 20) { throw new ValidationError(`The 'Name' exceeds the maximum length of [20] characters`); } diff --git a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts index 8e1ef92..48a6b39 100644 --- a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts +++ b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts @@ -175,12 +175,24 @@ class SupplierPaymentController { if (entity.Valor === null || entity.Valor === undefined) { throw new ValidationError(`The 'Valor' property is required, provide a valid value`); } - if (entity.CompanyIBAN?.length > 34) { - throw new ValidationError(`The 'CompanyIBAN' exceeds the maximum length of [34] characters`); + if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { + throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); + } + if (entity.OurPartyIBAN?.length > 34) { + throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); + } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { + throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } + if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { + throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); } if (entity.CounterpartyIBAN?.length > 34) { throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); } + if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { + throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); + } if (entity.CounterpartyName?.length > 100) { throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); } @@ -208,6 +220,9 @@ class SupplierPaymentController { if (entity.Reference?.length > 36) { throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); } + if (entity.PaymentMethod === null || entity.PaymentMethod === undefined) { + throw new ValidationError(`The 'PaymentMethod' property is required, provide a valid value`); + } for (const next of validationModules) { next.validate(entity); } diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts index 964b4ee..ffcccc5 100644 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts @@ -35,23 +35,21 @@ export class CustomerPaymentEntity { }) public Valor!: Date; - @Documentation('CompanyIBAN') + @Documentation('OurPartyIBAN') @Column({ - name: 'CUSTOMERPAYMENT_COMPANYIBAN', + name: 'CUSTOMERPAYMENT_OURPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CompanyIBAN?: string; + public OurPartyIBAN!: string; @Documentation('CounterpartyIBAN') @Column({ name: 'CUSTOMERPAYMENT_COUNTERPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CounterpartyIBAN?: string; + public CounterpartyIBAN!: string; @Documentation('CounterpartyName') @Column({ @@ -133,9 +131,8 @@ export class CustomerPaymentEntity { @Column({ name: 'CUSTOMERPAYMENT_PAYMENTMETHOD', type: 'integer', - nullable: true, }) - public PaymentMethod?: number; + public PaymentMethod!: number; } diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts index 552834d..c78a7be 100644 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts @@ -35,23 +35,21 @@ export class EmployeePaymentEntity { }) public Valor!: Date; - @Documentation('CompanyIBAN') + @Documentation('OurPartyIBAN') @Column({ - name: 'EMPLOYEEPAYMENT_COMPANYIBAN', + name: 'EMPLOYEEPAYMENT_OURPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CompanyIBAN?: string; + public OurPartyIBAN!: string; @Documentation('CounterpartyIBAN') @Column({ name: 'EMPLOYEEPAYMENT_COUNTERPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CounterpartyIBAN?: string; + public CounterpartyIBAN!: string; @Documentation('CounterpartyName') @Column({ @@ -129,6 +127,13 @@ export class EmployeePaymentEntity { }) public Reference?: string; + @Documentation('PaymentMethod') + @Column({ + name: 'EMPLOYEEPAYMENT_PAYMENTMETHOD', + type: 'integer', + }) + public PaymentMethod!: number; + } (new EmployeePaymentEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts b/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts index d29a0c4..5a02de0 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts @@ -18,7 +18,6 @@ export class PaymentAdjustmentEntity { @Column({ name: 'PAYMENTADJUSTMENT_DATE', type: 'date', - nullable: true, }) public Date!: Date; @@ -26,7 +25,6 @@ export class PaymentAdjustmentEntity { @Column({ name: 'PAYMENTADJUSTMENT_VALOR', type: 'date', - nullable: true, }) public Valor!: Date; @@ -36,7 +34,6 @@ export class PaymentAdjustmentEntity { type: 'big_decimal', precision: 16, scale: 2, - nullable: true, }) public Amount!: number; @@ -44,7 +41,6 @@ export class PaymentAdjustmentEntity { @Column({ name: 'PAYMENTADJUSTMENT_CURRENCY', type: 'integer', - nullable: true, }) public Currency!: number; @@ -52,7 +48,6 @@ export class PaymentAdjustmentEntity { @Column({ name: 'PAYMENTADJUSTMENT_COMPANY', type: 'integer', - nullable: true, }) public Company!: number; diff --git a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts index 3e26043..fd89733 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts @@ -28,23 +28,21 @@ export class PaymentRecordEntity { }) public Valor!: Date; - @Documentation('CompanyIBAN') + @Documentation('OurPartyIBAN') @Column({ - name: 'PAYMENTRECORD_COMPANYIBAN', + name: 'PAYMENTRECORD_OURPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CompanyIBAN?: string; + public OurPartyIBAN!: string; @Documentation('CounterpartyIBAN') @Column({ name: 'PAYMENTRECORD_COUNTERPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CounterpartyIBAN?: string; + public CounterpartyIBAN!: string; @Documentation('CounterpartyName') @Column({ @@ -61,33 +59,29 @@ export class PaymentRecordEntity { type: 'big_decimal', precision: 16, scale: 2, - nullable: true, }) - public Amount?: number; + public Amount!: number; @Documentation('Currency') @Column({ name: 'PAYMENTRECORD_CURRENCY', type: 'integer', - nullable: true, }) - public Currency?: number; + public Currency!: number; @Documentation('PaymentDirection') @Column({ name: 'PAYMENTRECORD_PAYMENTDIRECTION', type: 'integer', - nullable: true, }) - public PaymentDirection?: number; + public PaymentDirection!: number; @Documentation('PaymentType') @Column({ name: 'PAYMENTRECORD_PAYMENTTYPE', type: 'integer', - nullable: true, }) - public PaymentType?: number; + public PaymentType!: number; @Documentation('Reason') @Column({ diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts index ed3c1db..ed6ee30 100644 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts @@ -19,9 +19,8 @@ export class PaymentTypeEntity { name: 'PAYMENTTYPE_NAME', type: 'string', length: 20, - nullable: true, }) - public Name?: string; + public Name!: string; } diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts index 18993b0..179d110 100644 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts +++ b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts @@ -35,23 +35,21 @@ export class SupplierPaymentEntity { }) public Valor!: Date; - @Documentation('CompanyIBAN') + @Documentation('OurPartyIBAN') @Column({ - name: 'SUPPLIERPAYMENT_COMPANYIBAN', + name: 'SUPPLIERPAYMENT_OURPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CompanyIBAN?: string; + public OurPartyIBAN!: string; @Documentation('CounterpartyIBAN') @Column({ name: 'SUPPLIERPAYMENT_COUNTERPARTYIBAN', type: 'string', length: 34, - nullable: true, }) - public CounterpartyIBAN?: string; + public CounterpartyIBAN!: string; @Documentation('CounterpartyName') @Column({ @@ -129,6 +127,13 @@ export class SupplierPaymentEntity { }) public Reference?: string; + @Documentation('PaymentMethod') + @Column({ + name: 'SUPPLIERPAYMENT_PAYMENTMETHOD', + type: 'integer', + }) + public PaymentMethod!: number; + } (new SupplierPaymentEntity()); diff --git a/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema b/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema index 0589dcf..6f446f0 100644 --- a/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema +++ b/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema @@ -27,13 +27,11 @@ { "type": "VARCHAR", "length": 34, - "nullable": true, - "name": "CUSTOMERPAYMENT_COMPANYIBAN" + "name": "CUSTOMERPAYMENT_OURPARTYIBAN" }, { "type": "VARCHAR", "length": 34, - "nullable": true, "name": "CUSTOMERPAYMENT_COUNTERPARTYIBAN" }, { @@ -89,7 +87,6 @@ }, { "type": "INTEGER", - "nullable": true, "name": "CUSTOMERPAYMENT_PAYMENTMETHOD" } ] @@ -120,13 +117,11 @@ { "type": "VARCHAR", "length": 34, - "nullable": true, - "name": "SUPPLIERPAYMENT_COMPANYIBAN" + "name": "SUPPLIERPAYMENT_OURPARTYIBAN" }, { "type": "VARCHAR", "length": 34, - "nullable": true, "name": "SUPPLIERPAYMENT_COUNTERPARTYIBAN" }, { @@ -179,6 +174,10 @@ "length": 36, "nullable": true, "name": "SUPPLIERPAYMENT_REFERENCE" + }, + { + "type": "INTEGER", + "name": "SUPPLIERPAYMENT_PAYMENTMETHOD" } ] }, @@ -208,13 +207,11 @@ { "type": "VARCHAR", "length": 34, - "nullable": true, - "name": "EMPLOYEEPAYMENT_COMPANYIBAN" + "name": "EMPLOYEEPAYMENT_OURPARTYIBAN" }, { "type": "VARCHAR", "length": 34, - "nullable": true, "name": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN" }, { @@ -267,6 +264,10 @@ "length": 36, "nullable": true, "name": "EMPLOYEEPAYMENT_REFERENCE" + }, + { + "type": "INTEGER", + "name": "EMPLOYEEPAYMENT_PAYMENTMETHOD" } ] }, @@ -292,13 +293,11 @@ { "type": "VARCHAR", "length": 34, - "nullable": true, - "name": "PAYMENTRECORD_COMPANYIBAN" + "name": "PAYMENTRECORD_OURPARTYIBAN" }, { "type": "VARCHAR", "length": 34, - "nullable": true, "name": "PAYMENTRECORD_COUNTERPARTYIBAN" }, { @@ -312,22 +311,18 @@ "length": 16, "precision": "16", "scale": "2", - "nullable": true, "name": "PAYMENTRECORD_AMOUNT" }, { "type": "INTEGER", - "nullable": true, "name": "PAYMENTRECORD_CURRENCY" }, { "type": "INTEGER", - "nullable": true, "name": "PAYMENTRECORD_PAYMENTDIRECTION" }, { "type": "INTEGER", - "nullable": true, "name": "PAYMENTRECORD_PAYMENTTYPE" }, { @@ -391,7 +386,6 @@ { "type": "VARCHAR", "length": 20, - "nullable": true, "name": "PAYMENTTYPE_NAME" } ] @@ -409,12 +403,10 @@ }, { "type": "DATE", - "nullable": true, "name": "PAYMENTADJUSTMENT_DATE" }, { "type": "DATE", - "nullable": true, "name": "PAYMENTADJUSTMENT_VALOR" }, { @@ -422,17 +414,14 @@ "length": 16, "precision": "16", "scale": "2", - "nullable": true, "name": "PAYMENTADJUSTMENT_AMOUNT" }, { "type": "INTEGER", - "nullable": true, "name": "PAYMENTADJUSTMENT_CURRENCY" }, { "type": "INTEGER", - "nullable": true, "name": "PAYMENTADJUSTMENT_COMPANY" }, { @@ -445,6 +434,7 @@ "type": "VARCHAR", "length": 36, "nullable": true, + "unique": true, "name": "PAYMENTADJUSTMENT_UUID" } ] @@ -530,6 +520,15 @@ "referencedTable": "CODBEX_COMPANY", "referencedColumns": "COMPANY_ID" }, + { + "name": "SupplierPayment_PaymentMethod", + "type": "foreignKey", + "table": "CODBEX_SUPPLIERPAYMENT", + "constraintName": "SupplierPayment_PaymentMethod", + "columns": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "referencedTable": "CODBEX_PAYMENTMETHOD", + "referencedColumns": "PAYMENTMETHOD_ID" + }, { "name": "EmployeePayment_Employee", "type": "foreignKey", @@ -557,6 +556,15 @@ "referencedTable": "CODBEX_COMPANY", "referencedColumns": "COMPANY_ID" }, + { + "name": "EmployeePayment_PaymentMethod", + "type": "foreignKey", + "table": "CODBEX_EMPLOYEEPAYMENT", + "constraintName": "EmployeePayment_PaymentMethod", + "columns": "EMPLOYEEPAYMENT_PAYMENTMETHOD", + "referencedTable": "CODBEX_PAYMENTMETHOD", + "referencedColumns": "PAYMENTMETHOD_ID" + }, { "name": "PaymentRecord_Currency", "type": "foreignKey", diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js index 162544a..9f088f8 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js @@ -62,8 +62,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; filter.$filter.conditions.push(condition); } - if (entity.CompanyIBAN) { - const condition = { propertyName: 'CompanyIBAN', operator: 'LIKE', value: `%${entity.CompanyIBAN}%` }; + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; filter.$filter.conditions.push(condition); } if (entity.CounterpartyIBAN) { diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html index 91f0d1c..ced7655 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html @@ -90,17 +90,17 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN' | t }}
- - + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN)'} }}">
diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html index 363c880..9a63c8f 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html @@ -71,40 +71,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -274,13 +276,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }}
{{next.Date | date: "dd/MMM/yyyy"}} | {{next.Valor | date: "dd/MMM/yyyy"}} | - {{next.CompanyIBAN}} | + {{next.OurPartyIBAN}} | {{next.CounterpartyIBAN}} | {{next.CounterpartyName}} | {{next.Amount}} | diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html index ea6ae3d..5e516d1 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html @@ -73,40 +73,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -284,13 +286,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN' | t }}
- - + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN)'} }}">
@@ -267,6 +267,22 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html index cffcbf0..ef9583b 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html @@ -71,40 +71,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -272,6 +274,26 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html index ad1b1fd..c74af3f 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html @@ -42,7 +42,7 @@ {{next.Date | date: "dd/MMM/yyyy"}} | {{next.Valor | date: "dd/MMM/yyyy"}} | - {{next.CompanyIBAN}} | + {{next.OurPartyIBAN}} | {{next.CounterpartyIBAN}} | {{next.CounterpartyName}} | {{next.Amount}} | @@ -52,7 +52,8 @@ {{optionsCompanyValue(next.Company)}} | {{next.Name}} | {{next.UUID}} | - {{next.Reference}} + {{next.Reference}} | + {{next.PaymentMethod}} diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html index 8390676..5ecaa1f 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html @@ -73,40 +73,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -282,6 +284,26 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js index 499b400..3d5537d 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js @@ -64,8 +64,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; filter.$filter.conditions.push(condition); } - if (entity.CompanyIBAN) { - const condition = { propertyName: 'CompanyIBAN', operator: 'LIKE', value: `%${entity.CompanyIBAN}%` }; + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; filter.$filter.conditions.push(condition); } if (entity.CounterpartyIBAN) { diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html index b6c72a7..92f771a 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html @@ -75,17 +75,17 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }}
- - + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN)'} }}">
diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html index 83258ec..2e84454 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html @@ -54,40 +54,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -117,13 +119,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }}
@@ -132,13 +134,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }}
{{next.Valor | date: "dd/MMM/yyyy"}} | - {{next.CompanyIBAN}} | + {{next.OurPartyIBAN}} | {{next.CounterpartyIBAN}} | {{next.CounterpartyName}} | {{next.Amount}} | diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html index d60c2c6..8624285 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html @@ -52,40 +52,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -115,13 +117,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }}
@@ -130,13 +132,13 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }}
- - + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN)'} }}">
diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js index bc57e32..90b4588 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js @@ -36,8 +36,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; filter.$filter.conditions.push(condition); } - if (entity.CompanyIBAN) { - const condition = { propertyName: 'CompanyIBAN', operator: 'LIKE', value: `%${entity.CompanyIBAN}%` }; + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; filter.$filter.conditions.push(condition); } if (entity.CounterpartyIBAN) { diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html index 1b842c8..a9b0493 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html @@ -22,7 +22,7 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t:'Date' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t:'Valor' }} - {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t:'CompanyIBAN' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t:'OurPartyIBAN' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t:'CounterpartyIBAN' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t:'CounterpartyName' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t:'Amount' }} @@ -50,7 +50,7 @@ - {{next.CompanyIBAN}} + {{next.OurPartyIBAN}} {{next.CounterpartyIBAN}} {{next.CounterpartyName}} {{next.Amount}} diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html index 49e914d..8c22be1 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html @@ -45,27 +45,27 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }}
- + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }}
@@ -105,12 +105,12 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }}
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t:'Date' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t:'Valor' }} - {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANYIBAN' | t:'CompanyIBAN' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t:'OurPartyIBAN' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t:'CounterpartyIBAN' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t:'CounterpartyName' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t:'Amount' }} @@ -56,7 +56,7 @@ - {{next.CompanyIBAN}} + {{next.OurPartyIBAN}} {{next.CounterpartyIBAN}} {{next.CounterpartyName}} {{next.Amount}} diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html index e0fce33..afeb1a6 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html @@ -20,7 +20,7 @@
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE_NAME' | t }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE_NAME' | t }}
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN' | t }}
- - + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN)'} }}">
@@ -267,6 +267,22 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html index 92976b3..bbfd58a 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html @@ -71,40 +71,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -272,6 +274,26 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html index f235e32..15c6588 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html @@ -42,7 +42,7 @@ {{next.Date | date: "dd/MMM/yyyy"}} | {{next.Valor | date: "dd/MMM/yyyy"}} | - {{next.CompanyIBAN}} | + {{next.OurPartyIBAN}} | {{next.CounterpartyIBAN}} | {{next.CounterpartyName}} | {{next.Amount}} | @@ -52,7 +52,8 @@ {{optionsCompanyValue(next.Company)}} | {{next.Name}} | {{next.UUID}} | - {{next.Reference}} + {{next.Reference}} | + {{next.PaymentMethod}} diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html index 1b56224..287b1fd 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html @@ -73,40 +73,42 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN' | t }}
- + + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputEnter' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN)'} }}">
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }}
+ text="{{ 'codbex-payments:codbex-payments-model.messages.error.pattern' | t:{'rule':'^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'} }}"> @@ -282,6 +284,26 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + +
+
diff --git a/codbex-payments/translations/en-US/codbex-payments.model.json b/codbex-payments/translations/en-US/codbex-payments.model.json index 83c6602..3cc6272 100644 --- a/codbex-payments/translations/en-US/codbex-payments.model.json +++ b/codbex-payments/translations/en-US/codbex-payments.model.json @@ -71,7 +71,7 @@ "CUSTOMERPAYMENT_CUSTOMER": "Customer", "CUSTOMERPAYMENT_DATE": "Date", "CUSTOMERPAYMENT_VALOR": "Valor", - "CUSTOMERPAYMENT_COMPANYIBAN": "CompanyIBAN", + "CUSTOMERPAYMENT_OURPARTYIBAN": "OurPartyIBAN", "CUSTOMERPAYMENT_COUNTERPARTYIBAN": "CounterpartyIBAN", "CUSTOMERPAYMENT_COUNTERPARTYNAME": "CounterpartyName", "CUSTOMERPAYMENT_AMOUNT": "Amount", @@ -88,7 +88,7 @@ "SUPPLIERPAYMENT_SUPPLIER": "Supplier", "SUPPLIERPAYMENT_DATE": "Date", "SUPPLIERPAYMENT_VALOR": "Valor", - "SUPPLIERPAYMENT_COMPANYIBAN": "CompanyIBAN", + "SUPPLIERPAYMENT_OURPARTYIBAN": "OurPartyIBAN", "SUPPLIERPAYMENT_COUNTERPARTYIBAN": "CounterpartyIBAN", "SUPPLIERPAYMENT_COUNTERPARTYNAME": "CounterpartyName", "SUPPLIERPAYMENT_AMOUNT": "Amount", @@ -99,12 +99,13 @@ "SUPPLIERPAYMENT_NAME": "Name", "SUPPLIERPAYMENT_UUID": "UUID", "SUPPLIERPAYMENT_REFERENCE": "Reference", + "SUPPLIERPAYMENT_PAYMENTMETHOD": "PaymentMethod", "EMPLOYEEPAYMENT": "EmployeePayment", "EMPLOYEEPAYMENT_ID": "Id", "EMPLOYEEPAYMENT_EMPLOYEE": "Employee", "EMPLOYEEPAYMENT_DATE": "Date", "EMPLOYEEPAYMENT_VALOR": "Valor", - "EMPLOYEEPAYMENT_COMPANYIBAN": "CompanyIBAN", + "EMPLOYEEPAYMENT_OURPARTYIBAN": "OurPartyIBAN", "EMPLOYEEPAYMENT_COUNTERPARTYIBAN": "CounterpartyIBAN", "EMPLOYEEPAYMENT_COUNTERPARTYNAME": "CounterpartyName", "EMPLOYEEPAYMENT_AMOUNT": "Amount", @@ -115,11 +116,12 @@ "EMPLOYEEPAYMENT_NAME": "Name", "EMPLOYEEPAYMENT_UUID": "UUID", "EMPLOYEEPAYMENT_REFERENCE": "Reference", + "EMPLOYEEPAYMENT_PAYMENTMETHOD": "PaymentMethod", "PAYMENTRECORD": "PaymentRecord", "PAYMENTRECORD_ID": "Id", "PAYMENTRECORD_DATE": "Date", "PAYMENTRECORD_VALOR": "Valor", - "PAYMENTRECORD_COMPANYIBAN": "CompanyIBAN", + "PAYMENTRECORD_OURPARTYIBAN": "OurPartyIBAN", "PAYMENTRECORD_COUNTERPARTYIBAN": "CounterpartyIBAN", "PAYMENTRECORD_COUNTERPARTYNAME": "CounterpartyName", "PAYMENTRECORD_AMOUNT": "Amount", From 5afa35ce6001baa22403db4d0e0d7308ec0706cb Mon Sep 17 00:00:00 2001 From: ThuF Date: Thu, 2 Apr 2026 15:18:08 +0000 Subject: [PATCH 9/9] Fix EDM --- codbex-payments/codbex-payments.edm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index 98765c8..5759155 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -13,7 +13,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -205,5 +205,5 @@ - + \ No newline at end of file