8713-testToMaster #3523

Merged
alexm merged 383 commits from 8713-testToMaster into master 2025-03-04 06:52:15 +00:00
4 changed files with 59 additions and 22 deletions
Showing only changes of commit 921edb238c - Show all commits

View File

@ -4051,7 +4051,7 @@ INSERT IGNORE INTO vn.inventoryConfig
supplierFk = 4; supplierFk = 4;
INSERT INTO vn.vehicleState (state, hasToNotify) INSERT INTO vn.vehicleState (state, hasToNotify)
VALUES VALUES
('Operativo', NULL), ('Operativo', NULL),
('Prestado', NULL), ('Prestado', NULL),
('Robado', NULL), ('Robado', NULL),
@ -4061,13 +4061,13 @@ VALUES
('ITV', NULL); ('ITV', NULL);
INSERT INTO vn.vehicleEvent (started, finished, vehicleStateFk, description, vehicleFk, userFk, notified) INSERT INTO vn.vehicleEvent (started, finished, vehicleStateFk, description, vehicleFk, userFk, notified)
VALUES VALUES
('2000-12-01', '2000-12-02', 4, 'cambio de aceite', 5, 103, NULL), ('2000-12-01', '2000-12-02', 4, 'cambio de aceite', 5, 103, NULL),
('2000-12-15', '2000-12-18', 2, 'viaje fin de curso', 5, 103, NULL), ('2000-12-15', '2000-12-18', 2, 'viaje fin de curso', 5, 103, NULL),
('2000-12-20', '2001-01-01', 3, 'llaves puestas', 2, 103, NULL); ('2000-12-20', '2001-01-01', 3, 'llaves puestas', 2, 103, NULL);
INSERT INTO vn.fuelType (id, name, code) INSERT INTO vn.fuelType (id, name, code)
VALUES VALUES
(1, 'gasoil', 'gasoil'), (1, 'gasoil', 'gasoil'),
(2, 'gas', 'gas'), (2, 'gas', 'gas'),
(3, 'adblue', 'adblue'), (3, 'adblue', 'adblue'),
@ -4076,6 +4076,11 @@ VALUES
(6, 'electrico', 'electric'); (6, 'electrico', 'electric');
INSERT INTO vn.bankPolicy (id, `ref`, amount, committedFee, nonCommittedFee, annualFee, started, ended, accountingFk, companyFk, supplierFk, description, hasGuarantee, dmsFk, notaryFk, currencyFk, amortizationTypeFk, periodicityTypeFk, insuranceExpired) INSERT INTO vn.bankPolicy (id, `ref`, amount, committedFee, nonCommittedFee, annualFee, started, ended, accountingFk, companyFk, supplierFk, description, hasGuarantee, dmsFk, notaryFk, currencyFk, amortizationTypeFk, periodicityTypeFk, insuranceExpired)
VALUES VALUES
(1, '11112222', 500000.0, 0.028, 0.0, 0.001, '2001-01-01', '2001-02-01', 1, 442, NULL, NULL, 0, NULL, NULL, 1, NULL, NULL, NULL), (1, '11112222', 500000.0, 0.028, 0.0, 0.001, '2001-01-01', '2001-02-01', 1, 442, NULL, NULL, 0, NULL, NULL, 1, NULL, NULL, NULL),
(2, '33334444', 100000.0, 0.017, 0.0, 0.0, '2001-01-01', '2001-02-01', 1, 2, NULL, NULL, 0, NULL, NULL, 2, NULL, NULL, NULL); (2, '33334444', 100000.0, 0.017, 0.0, 0.0, '2001-01-01', '2001-02-01', 1, 2, NULL, NULL, 0, NULL, NULL, 2, NULL, NULL, NULL);
INSERT INTO vn.ppe (id, amortization, firstAmortizated, lastAmortizated, finished, value, planFk, groupFk, account, endowment, elementAccount, nature, location, discharged, cause, isInvestmentAsset, workerFk, companyFk, description, isDone)
VALUES
(1, 0.00, '2001-01-01', NULL, NULL, 700.95, 16, 4, '3456000000', '4320000000', '12345', 'INMOVILIZADO', 'V02', NULL, NULL, 0, NULL, 442, 'UTILLAJE LASER ROTATIVO AUTONIVELANTE 500M', NULL),
(2, 0.00, '2001-01-01', NULL, NULL, 400.00, 16, 4, '5678000000', '1230000000', '67891', 'INMOVILIZADO', 'V02', NULL, NULL, 0, NULL, 442, 'UTILLAJE BALANZA Z100 150KILOS', NULL);

View File

@ -17,6 +17,9 @@
"FuelType": { "FuelType": {
"dataSource": "vn" "dataSource": "vn"
}, },
"Ppe": {
"dataSource": "vn"
},
"RoadmapAddress": { "RoadmapAddress": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -0,0 +1,23 @@
{
"name": "Ppe",
"base": "VnModel",
"options": {
"mysql": {
"table": "ppe"
}
},
"properties": {
"id": {
"type": "number",
"id": true
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "delivery",
"permission": "ALLOW"
}
]
}

View File

@ -93,6 +93,12 @@
"type": "belongsTo", "type": "belongsTo",
"model": "FuelType", "model": "FuelType",
"foreignKey": "fuelTypeFk" "foreignKey": "fuelTypeFk"
},
"ppe": {
"type": "hasOne",
"model": "Ppe",
"foreignKey": "id",
"property": "ppeFk"
} }
}, },
"scope": { "scope": {