Compare commits

...

18 Commits

Author SHA1 Message Date
David Domenech 2a224e2823 Merge branch 'test' into 6372-ExpenseManual-Error
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
2024-02-23 12:12:18 +00:00
Pablo Natek ae078f66c1 fix(version): refs #6372 fix version error on deploy
gitea/salix/pipeline/pr-dev This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details
2024-02-23 13:09:59 +01:00
David Domenech 0fed15434d refs #6372
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-23 12:15:10 +01:00
Alex Moreno 9f6bc8971c Merge branch 'dev' into 6372-ExpenseManual-Error
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-23 06:47:45 +00:00
Alex Moreno 201e70175d Merge pull request 'refs #6414 fix(newWorker): back test' (!2075) from 6414-fix_backTest_newWorker into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2075
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-02-23 06:47:31 +00:00
Alex Moreno 607b908814 Merge branch 'dev' into 6414-fix_backTest_newWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-23 06:41:36 +00:00
David Domenech a797ea7b1b refs #6372
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-23 07:26:20 +01:00
Alex Moreno 2b19004783 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head There was a failure building this commit Details
2024-02-23 07:13:05 +01:00
David Domenech ba167d52ef Merge pull request '6372-ExpenseManual-Error' (!2072) from 6372-ExpenseManual-Error into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2072
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-02-23 06:11:30 +00:00
David Domenech f2b1418419 Merge branch 'dev' into 6372-ExpenseManual-Error
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-23 06:03:14 +00:00
Alex Moreno a0593804ab Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head There was a failure building this commit Details
2024-02-22 14:56:53 +01:00
Carlos Satorres 4c7d7f2ab7 Merge pull request 'refs #6922 change order' (!2071) from 6922-invoiceOutOrder into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2071
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-02-22 13:40:46 +00:00
Carlos Satorres fac7071bae refs #6414 fix(newWorker): back test
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-22 14:38:26 +01:00
Carlos Satorres 8a2cff5308 Merge branch 'dev' into 6922-invoiceOutOrder
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-22 10:01:01 +00:00
David Domenech c348900c80 Merge branch 'dev' into 6372-ExpenseManual-Error
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-22 09:50:24 +00:00
David Domenech d9119f9ab7 Merge branch '6372-ExpenseManual-Error' of https://gitea.verdnatura.es/verdnatura/salix into 6372-ExpenseManual-Error
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-22 10:47:28 +01:00
David Domenech 13249fae08 refs #6372 2024-02-22 10:47:27 +01:00
Carlos Satorres b6086e74c1 refs #6922 change order
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-22 10:39:34 +01:00
5 changed files with 44 additions and 20 deletions

View File

@ -3068,3 +3068,6 @@ INSERT INTO `vn`.`cmr` (id,truckPlate,observations,senderInstruccions,paymentIns
VALUES (1,'123456A','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',442,1,2,1,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet'),
(2,'123456N','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',69,3,4,2,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet'),
(3,'123456B','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',567,5,6,69,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet');
UPDATE vn.department
SET workerFk = null;

View File

@ -1,24 +1,32 @@
ALTER TABLE IF EXISTS vn2008.gastos_resumen DROP FOREIGN KEY IF EXISTS gastos_resumen_expense_FK;
ALTER TABLE IF EXISTS `vn2008`.`gastos_resumen` RENAME `vn`.`expenseManual`;
DELETE FROM vn2008.gastos_resumen
WHERE Id_Gasto IN (
SELECT DISTINCT g.Id_Gasto
FROM vn2008.gastos_resumen g
LEFT JOIN expense e ON e.id = g.Id_Gasto COLLATE utf8mb3_general_ci
WHERE e.id IS NULL
);
ALTER TABLE IF EXISTS `vn`.`expenseManual`
ALTER TABLE `vn2008`.`gastos_resumen` DROP FOREIGN KEY gastos_resumen_expense_FK;
ALTER TABLE IF EXISTS `vn2008`.`gastos_resumen` RENAME `vn`.`expenseManual`;
ALTER TABLE `vn`.`expenseManual`
CHANGE COLUMN IF EXISTS `Id_Gasto` `expenseFk` varchar(10) NOT NULL,
CHANGE COLUMN IF EXISTS `importe` `amount` decimal(10,2) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `empresa_id` `companyFk` int(11) NOT NULL;
ALTER TABLE IF EXISTS vn.expenseManual COLLATE=utf8mb3_general_ci;
ALTER TABLE vn.expenseManual MODIFY COLUMN IF EXISTS expenseFk varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;
ALTER TABLE IF EXISTS vn.expenseManual MODIFY COLUMN IF EXISTS expenseFk varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;
ALTER TABLE IF EXISTS vn.expenseManual ADD CONSTRAINT expenseManual_expense_FK FOREIGN KEY IF NOT EXISTS (expenseFk) REFERENCES vn.expense(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE IF EXISTS vn.expenseManual MODIFY COLUMN IF EXISTS companyFk int(10) unsigned NOT NULL;
ALTER TABLE vn.expenseManual DROP PRIMARY KEY;
ALTER TABLE vn.expenseManual MODIFY COLUMN companyFk int(10) unsigned NULL;
ALTER TABLE vn.expenseManual ADD CONSTRAINT expenseManual_expense_FK FOREIGN KEY IF NOT EXISTS (expenseFk) REFERENCES vn.expense(id) ON DELETE CASCADE ON UPDATE CASCADE;
UPDATE vn.expenseManual
SET companyFK= NULL
WHERE companyFk= 0;
ALTER TABLE IF EXISTS vn.expenseManual ADD CONSTRAINT expenseManual_company_FK FOREIGN KEY IF NOT EXISTS (companyFk) REFERENCES vn.company(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.expenseManual ADD CONSTRAINT expenseManual_company_FK FOREIGN KEY IF NOT EXISTS (companyFk) REFERENCES vn.company(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE vn.expenseManual ADD COLUMN id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY FIRST;
ALTER TABLE vn.expenseManual ADD CONSTRAINT expenseManual_unique UNIQUE KEY IF NOT EXISTS (expenseFk,`year`,`month`,companyFk);

View File

@ -1,8 +1,12 @@
DROP TRIGGER IF EXISTS `vn2008`.`movement_label_afterUpdate`;
ALTER TABLE vn2008.movement_label DROP FOREIGN KEY movement_label_ibfk_1;
DROP VIEW IF EXISTS `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn2008`.`movement_label` RENAME `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn`.`saleLabel`
CHANGE COLUMN IF EXISTS `Id_movimiento` `saleFk` int(11) NOT NULL;
ALTER TABLE vn.saleLabel ADD CONSTRAINT saleLabel_sale_FK FOREIGN KEY (saleFk) REFERENCES vn.sale(id) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -139,9 +139,12 @@ describe('Worker new', () => {
});
it('should create a new worker', async() => {
const newWorker = await models.Worker.new({args: defaultWorker, req});
await removeWorker(newWorker.id);
let newWorker;
try {
newWorker = await models.Worker.new({args: defaultWorker, req});
} finally {
await removeWorker(newWorker.id);
}
expect(newWorker.id).toBeDefined();
});
@ -173,9 +176,12 @@ describe('Worker new', () => {
}),
req
};
const newWorker = await models.Worker.new(newWorkerData);
await models.Worker.destroyById(newWorker.id);
let newWorker;
try {
newWorker = await models.Worker.new(newWorkerData);
} finally {
await models.Worker.destroyById(newWorker.id);
}
expect(newWorker.id).toEqual(bruceWayneId);
});

View File

@ -7,7 +7,8 @@ SELECT
s.discount,
s.itemFk,
s.concept,
tc.code vatType
tc.code vatType,
it.isPackaging
FROM vn.invoiceOut io
JOIN vn.ticket t ON t.refFk = io.ref
JOIN vn.supplier su ON su.id = io.companyFk
@ -34,9 +35,10 @@ SELECT
ts.quantity,
ts.price,
0 discount,
'',
ts.description concept,
tc.code vatType
NULL,
ts.description,
tc.code,
NULL
FROM vn.invoiceOut io
JOIN vn.ticket t ON t.refFk = io.ref
JOIN vn.ticketService ts ON ts.ticketFk = t.id
@ -46,3 +48,4 @@ SELECT
JOIN vn.supplierAccount sa ON sa.id = co.supplierAccountFk
JOIN vn.taxClass tc ON tc.id = ts.taxClassFk
WHERE t.refFk = ?
ORDER BY (isPackaging), concept, itemFk