Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions codbex-payments/codbex-payments.edm

Large diffs are not rendered by default.

384 changes: 257 additions & 127 deletions codbex-payments/codbex-payments.gen

Large diffs are not rendered by default.

105 changes: 78 additions & 27 deletions codbex-payments/codbex-payments.model
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@
{
"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",
Expand All @@ -85,9 +86,10 @@
"auditType": "NONE",
"dataLength": "34",
"dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "VARCHAR",
"description": "",
"isRequiredProperty": "true",
"name": "CounterpartyIBAN",
"tooltip": "",
"widgetIsMajor": "true",
Expand Down Expand Up @@ -244,9 +246,10 @@
{
"auditType": "NONE",
"dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "INTEGER",
"description": "",
"isRequiredProperty": "true",
"name": "PaymentMethod",
"tooltip": "",
"widgetDropDownKey": "Id",
Expand Down Expand Up @@ -360,11 +363,12 @@
{
"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",
Expand All @@ -375,9 +379,10 @@
"auditType": "NONE",
"dataLength": "34",
"dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "VARCHAR",
"description": "",
"isRequiredProperty": "true",
"name": "CounterpartyIBAN",
"tooltip": "",
"widgetIsMajor": "true",
Expand Down Expand Up @@ -530,6 +535,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",
Expand Down Expand Up @@ -631,11 +654,12 @@
{
"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",
Expand All @@ -646,9 +670,10 @@
"auditType": "NONE",
"dataLength": "34",
"dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "VARCHAR",
"description": "",
"isRequiredProperty": "true",
"name": "CounterpartyIBAN",
"tooltip": "",
"widgetIsMajor": "true",
Expand Down Expand Up @@ -801,6 +826,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",
Expand Down Expand Up @@ -882,11 +925,12 @@
{
"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",
Expand All @@ -897,9 +941,10 @@
"auditType": "NONE",
"dataLength": "34",
"dataName": "PAYMENTRECORD_COUNTERPARTYIBAN",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "VARCHAR",
"description": "",
"isRequiredProperty": "true",
"name": "CounterpartyIBAN",
"tooltip": "",
"widgetIsMajor": "true",
Expand All @@ -925,11 +970,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",
Expand All @@ -940,9 +986,10 @@
{
"auditType": "NONE",
"dataName": "PAYMENTRECORD_CURRENCY",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "INTEGER",
"description": "",
"isRequiredProperty": "true",
"name": "Currency",
"tooltip": "",
"widgetDropDownKey": "Id",
Expand All @@ -959,9 +1006,10 @@
{
"auditType": "NONE",
"dataName": "PAYMENTRECORD_PAYMENTDIRECTION",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "INTEGER",
"description": "",
"isRequiredProperty": "true",
"name": "PaymentDirection",
"tooltip": "",
"widgetDropDownKey": "Id",
Expand All @@ -978,9 +1026,10 @@
{
"auditType": "NONE",
"dataName": "PAYMENTRECORD_PAYMENTTYPE",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "INTEGER",
"description": "",
"isRequiredProperty": "true",
"name": "PaymentType",
"tooltip": "",
"widgetDropDownKey": "Id",
Expand Down Expand Up @@ -1522,9 +1571,10 @@
"auditType": "NONE",
"dataLength": "20",
"dataName": "PAYMENTTYPE_NAME",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "VARCHAR",
"description": "",
"isRequiredProperty": "true",
"name": "Name",
"tooltip": "",
"widgetIsMajor": "true",
Expand Down Expand Up @@ -1839,7 +1889,7 @@
{
"auditType": "NONE",
"dataName": "PAYMENTADJUSTMENT_DATE",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "DATE",
"description": "",
"isRequiredProperty": "true",
Expand All @@ -1853,7 +1903,7 @@
{
"auditType": "NONE",
"dataName": "PAYMENTADJUSTMENT_VALOR",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "DATE",
"description": "",
"isRequiredProperty": "true",
Expand All @@ -1868,7 +1918,7 @@
"auditType": "NONE",
"dataLength": "16",
"dataName": "PAYMENTADJUSTMENT_AMOUNT",
"dataNullable": "true",
"dataNullable": "false",
"dataPrecision": "16",
"dataScale": "2",
"dataType": "DECIMAL",
Expand All @@ -1884,7 +1934,7 @@
{
"auditType": "NONE",
"dataName": "PAYMENTADJUSTMENT_CURRENCY",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "INTEGER",
"description": "",
"isRequiredProperty": "true",
Expand All @@ -1904,7 +1954,7 @@
{
"auditType": "NONE",
"dataName": "PAYMENTADJUSTMENT_COMPANY",
"dataNullable": "true",
"dataNullable": "false",
"dataType": "INTEGER",
"description": "",
"isRequiredProperty": "true",
Expand Down Expand Up @@ -1942,6 +1992,7 @@
"dataName": "PAYMENTADJUSTMENT_UUID",
"dataNullable": "true",
"dataType": "VARCHAR",
"dataUnique": "true",
"description": "",
"isCalculatedProperty": "true",
"name": "UUID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,14 @@ 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 (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`);
Expand Down Expand Up @@ -208,6 +214,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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,14 @@ 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 (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`);
Expand Down Expand Up @@ -208,6 +214,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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,33 @@ 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 (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 (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`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down
Loading
Loading