#7897 - masterTest_24_36 #2909

Merged
jsegarra merged 132 commits from 7897_masterTest_24_36 into master 2024-09-03 06:37:54 +00:00
9 changed files with 26 additions and 13 deletions
Showing only changes of commit d9d2ae2f7b - Show all commits

View File

@ -412,7 +412,7 @@ INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
(1103, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
(1104, -30, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH));
INSERT INTO `vn`.`mandateType`(`id`, `name`)
INSERT INTO `vn`.`mandateType`(`id`, `code`)
VALUES
(1, 'B2B'),
(2, 'CORE'),
@ -3945,11 +3945,11 @@ VALUES
(35, 'ES12346B12345679', 3, 241);
INSERT INTO vn.accountDetailType
(id, description)
(id, description, code)
VALUES
(1, 'IBAN'),
(2, 'SWIFT'),
(3, 'Referencia Remesas'),
(4, 'Referencia Transferencias'),
(5, 'Referencia Nominas'),
(6, 'ABA');
(1, 'IBAN', 'IBAN'),
(2, 'SWIFT', 'SWIFT'),
(3, 'Referencia Remesas', 'REM'),
(4, 'Referencia Transferencias', 'TRAN'),
(5, 'Referencia Nominas', 'NOM'),
(6, 'ABA', 'ABA');

View File

@ -2,5 +2,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`mandato_tipo`
AS SELECT `m`.`id` AS `idmandato_tipo`,
`m`.`name` AS `Nombre`
`m`.`code` AS `Nombre`
FROM `vn`.`mandateType` `m`

View File

@ -0,0 +1,2 @@
ALTER TABLE vn.mandateType
CHANGE name code VARCHAR(45) DEFAULT NULL;

View File

@ -0,0 +1,2 @@
ALTER TABLE vn.accountDetailType
ADD COLUMN code VARCHAR(45) DEFAULT NULL;

View File

@ -0,0 +1,9 @@
UPDATE vn.accountDetailType
SET code = CASE id
WHEN 1 THEN 'IBAN'
WHEN 2 THEN 'SWIFT'
WHEN 3 THEN 'REM'
WHEN 4 THEN 'TRAN'
WHEN 5 THEN 'NOM'
WHEN 6 THEN 'ABA'
END;

View File

@ -27,7 +27,7 @@ module.exports = Self => {
// Renew mandate
if (mandate) {
const mandateType = await models.MandateType.findOne({
where: {name: mandate.type}
where: {code: mandate.type}
});
const oldMandate = await models.Mandate.findOne({

View File

@ -12,7 +12,7 @@
"type": "number",
"description": "Identifier"
},
"name": {
"code": {
"type": "string"
}
}

View File

@ -26,7 +26,7 @@
<vn-tr ng-repeat="mandate in mandates">
<vn-td number>{{::mandate.id}}</vn-td>
<vn-td>{{::mandate.company.code}}</vn-td>
<vn-td>{{::mandate.mandateType.name}}</vn-td>
<vn-td>{{::mandate.mandateType.code}}</vn-td>
<vn-td shrink-datetime>{{::mandate.created | date:'dd/MM/yyyy HH:mm' | dashIfEmpty}}</vn-td>
<vn-td shrink-datetime>{{::mandate.finished | date:'dd/MM/yyyy HH:mm' | dashIfEmpty}}</vn-td>
</vn-tr>

View File

@ -9,7 +9,7 @@ class Controller extends Section {
{
relation: 'mandateType',
scope: {
fields: ['id', 'name']
fields: ['id', 'code']
}
}, {
relation: 'company',