Merge pull request '3468-export-database' (#836) from 3468-export-database into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #836
Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2022-01-04 09:30:54 +00:00
commit 60aa908309
4 changed files with 7369 additions and 2373 deletions

File diff suppressed because one or more lines are too long

View File

@ -1076,11 +1076,15 @@ INSERT INTO `vn`.`itemPlacement`(`id`, `itemFk`, `warehouseFk`, `code`)
(3, 1, 3, 'A33'), (3, 1, 3, 'A33'),
(4, 2, 1, 'A44'); (4, 2, 1, 'A44');
INSERT INTO `vn`.`train`(`id`, `name`)
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`, `created`)
VALUES VALUES
(1, 1106, 5, DATE_ADD(CURDATE(),INTERVAL +1 DAY)), (1, 'Train1'),
(2, 1106, 14, CURDATE()); (2, 'Train2');
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`, `created`, `trainFk`)
VALUES
(1, 1106, 5, DATE_ADD(CURDATE(),INTERVAL +1 DAY), 1),
(2, 1106, 14, CURDATE(), 1);
INSERT INTO `vn`.`ticketCollection`(`id`, `ticketFk`, `collectionFk`) INSERT INTO `vn`.`ticketCollection`(`id`, `ticketFk`, `collectionFk`)
VALUES VALUES

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,8 @@ describe('InvoiceOut download()', () => {
}; };
it('should return the downloaded file name', async() => { it('should return the downloaded file name', async() => {
const year = new Date().getFullYear();
spyOn(models.InvoiceContainer, 'container').and.returnValue({ spyOn(models.InvoiceContainer, 'container').and.returnValue({
client: {root: '/path'} client: {root: '/path'}
}); });
@ -23,6 +25,6 @@ describe('InvoiceOut download()', () => {
const result = await models.InvoiceOut.download(ctx, invoiceId); const result = await models.InvoiceOut.download(ctx, invoiceId);
expect(result[1]).toEqual('application/pdf'); expect(result[1]).toEqual('application/pdf');
expect(result[2]).toEqual('filename="2021T1111111.pdf"'); expect(result[2]).toEqual(`filename="${year}T1111111.pdf"`);
}); });
}); });