7409-workerIncome #2597

Merged
carlossa merged 14 commits from 7409-workerIncome into dev 2024-06-26 09:38:02 +00:00
6 changed files with 109 additions and 6 deletions

View File

@ -3889,11 +3889,25 @@ INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHoli
(1, '2001-05-17', 1, 5), (1, '2001-05-17', 1, 5),
(1, '2001-05-18', 1, 5); (1, '2001-05-18', 1, 5);
INSERT INTO vn.payrollComponent
(id, name, isSalaryAgreed, isVariable, isException)
VALUES
(1, 'Salario1', 1, 0, 0),
(2, 'Salario2', 1, 1, 0),
(3, 'Salario3', 1, 0, 1);
INSERT INTO dipole.printer (id, description)
VALUES(1, '');
INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode, INSERT INTO vn.workerIncome
truckName, clientFk, phone, province, agency, m3, workerCode, itemFk, quantity, longName, shelvingFk, comments) (debit, credit, incomeTypeFk, paymentDate, workerFk, concept)
VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL); VALUES
(1000.00, 900.00, 2, '2000-01-01', 1106, NULL),
(1001.00, 800.00, 2, '2000-01-01', 1106, NULL);
INSERT INTO dipole.printer (id, description)
VALUES(1, '');
INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode,
truckName, clientFk, phone, province, agency, m3, workerCode, itemFk, quantity, longName, shelvingFk, comments)
VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL);

View File

@ -0,0 +1,6 @@
-- Place your SQL code here
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES
('WorkerIncome', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('PayrollComponent', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('Worker', '__get__incomes', '*', 'ALLOW', 'ROLE', 'hr');

View File

@ -125,6 +125,12 @@
"Locker": { "Locker": {
"dataSource": "vn" "dataSource": "vn"
}, },
"PayrollComponent": {
"dataSource": "vn"
},
"WorkerIncome": {
"dataSource": "vn"
},
"TrainingCourse": { "TrainingCourse": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -0,0 +1,27 @@
{
"name": "PayrollComponent",
"base": "VnModel",
"options": {
"mysql": {
"table": "payrollComponent"
}
},
"properties": {
"id": {
"id": true,
"type": "number"
},
"name": {
"type": "string"
},
"isSalaryAgreed": {
"type": "number"
},
"isVariable": {
"type": "number"
},
"isException": {
"type": "number"
}
}
}

View File

@ -0,0 +1,45 @@
{
"name": "WorkerIncome",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerIncome"
}
},
"properties": {
"id": {
"id": true,
"type": "number"
},
"debit": {
"type": "number"
},
"credit": {
"type": "number"
},
"incomeTypeFk": {
"type": "number"
},
"paymentDate": {
"type": "date"
},
"workerFk": {
"type": "number"
},
"concept": {
"type": "string"
}
},
"relations": {
"payrollComponent": {
"type": "belongsTo",
"model": "PayrollComponent",
"foreignKey": "id"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
}
}
}

View File

@ -116,6 +116,11 @@
"model": "Locker", "model": "Locker",
"foreignKey": "workerFk" "foreignKey": "workerFk"
}, },
"incomes": {
"type": "hasMany",
"model": "WorkerIncome",
"foreignKey": "workerFk"
},
"trainingCourse": { "trainingCourse": {
"type": "hasMany", "type": "hasMany",
"model": "TrainingCourse", "model": "TrainingCourse",
@ -131,4 +136,4 @@
"principalId": "$owner" "principalId": "$owner"
} }
] ]
} }