Merge branch 'dev' into 3977-invoiceIn.tax
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Jimenez Ruiz 2022-05-11 13:37:29 +00:00
commit c749438f32
10 changed files with 9643 additions and 10082 deletions

View File

@ -1,35 +0,0 @@
module.exports = Self => {
Self.remoteMethod('collectionFaults', {
description: 'Update sale of a collection',
accessType: 'WRITE',
accepts: [{
arg: 'shelvingFk',
type: 'String',
required: true,
description: 'The shalving id'
}, {
arg: 'quantity',
type: 'Number',
required: true,
description: 'The quantity to sale'
}, {
arg: 'itemFk',
type: 'Number',
required: true,
description: 'The ticket id'
}],
returns: {
type: 'Object',
root: true
},
http: {
path: `/collectionFaults`,
verb: 'POST'
}
});
Self.collectionFaults = async(shelvingFk, quantity, itemFk) => {
query = `CALL vn.collection_faults(?,?,?)`;
return await Self.rawSql(query, [shelvingFk, quantity, itemFk]);
};
};

View File

@ -1,9 +0,0 @@
const app = require('vn-loopback/server/server');
describe('collectionFaults()', () => {
it('return shelving afected', async() => {
let response = await app.models.Collection.collectionFaults('UXN', 0, 1);
expect(response.length).toBeGreaterThan(0);
expect(response[0][0].shelvingFk).toEqual('UXN');
});
});

View File

@ -12,9 +12,9 @@ describe('docuware download()', () => {
}
};
const fileCabinetName = 'deliveryClientTest';
const fileCabinetName = 'deliveryClient';
const dialogDisplayName = 'find';
const dialogName = 'findTest';
const dialogName = 'findTicket';
const gotGetResponse = {
body: JSON.stringify(

View File

@ -14,9 +14,9 @@ describe('docuware download()', () => {
};
it('should return the downloaded file name', async() => {
const fileCabinetName = 'deliveryClientTest';
const fileCabinetName = 'deliveryClient';
const dialogDisplayName = 'find';
const dialogName = 'findTest';
const dialogName = 'findTicket';
const gotGetResponse = {
body: JSON.stringify(
{

View File

@ -3,5 +3,4 @@ module.exports = Self => {
require('../methods/collection/newCollection')(Self);
require('../methods/collection/getSectors')(Self);
require('../methods/collection/setSaleQuantity')(Self);
require('../methods/collection/collectionFaults')(Self);
};

File diff suppressed because one or more lines are too long

View File

@ -54,28 +54,7 @@ INSERT INTO `vn`.`educationLevel` (`id`, `name`)
INSERT INTO `vn`.`worker`(`id`,`code`, `firstName`, `lastName`, `userFk`, `bossFk`)
SELECT id,UPPER(LPAD(role, 3, '0')), name, name, id, 9
FROM `vn`.`user`;
ALTER TABLE `vn`.`worker` ADD `originCountryFk` mediumint(8) unsigned NULL COMMENT 'País de origen';
ALTER TABLE `vn`.`worker` ADD `educationLevelFk` SMALLINT NULL;
ALTER TABLE `vn`.`worker` ADD `SSN` varchar(15) NULL;
ALTER TABLE `vn`.`worker` CHANGE `maritalStatus__` `maritalStatus` enum('S','M') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;
ALTER TABLE `vn`.`worker` MODIFY COLUMN `maritalStatus` enum('S','M') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;
ALTER TABLE `vn`.`worker` CHANGE `maritalStatus` maritalStatus enum('S','M') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER sectorFk;
ALTER TABLE `vn`.`worker` ADD CONSTRAINT `worker_FK_2` FOREIGN KEY (`educationLevelFk`) REFERENCES `vn`.`educationLevel`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE `vn`.`worker` ADD CONSTRAINT `worker_FK_1` FOREIGN KEY (`originCountryFk`) REFERENCES `vn`.`country`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
UPDATE `vn`.`worker` `w`
SET `maritalStatus` = 'S';
UPDATE `vn`.`worker` `w`
SET `originCountryFk` = '1';
UPDATE `vn`.`worker` `w`
SET `educationLevelFk` = '2';
UPDATE `vn`.`worker` `w`
SET `SSN` = '123456789123';
FROM `vn`.`user`;
UPDATE `vn`.`worker` SET bossFk = NULL WHERE id = 20;
UPDATE `vn`.`worker` SET bossFk = 20 WHERE id = 1 OR id = 9;
@ -147,15 +126,6 @@ INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`,
(19,'Francia', 1, 'FR', 1, 27, 4, 0, 1),
(30,'Canarias', 1, 'IC', 1, 24, 4, 1, 2);
INSERT INTO `hedera`.`language` (`code`, `name`, `orgName`, `isActive`)
VALUES
('ca', 'Català' , 'Catalan' , TRUE),
('en', 'English' , 'English' , TRUE),
('es', 'Español' , 'Spanish' , TRUE),
('fr', 'Français' , 'French' , TRUE),
('mn', 'Португалий', 'Mongolian' , TRUE),
('pt', 'Português' , 'Portuguese', TRUE);
INSERT INTO `vn`.`warehouseAlias`(`id`, `name`)
VALUES
(1, 'Main Warehouse'),
@ -182,8 +152,9 @@ INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingO
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `parked`, `userFk`)
VALUES
('GVC', '1', '0', '1', '0', '1106'),
('HEJ', '2', '0', '1', '0', '1106');
('GVC', 1, 0, 1, 0, 1106),
('HEJ', 2, 0, 1, 0, 1106),
('UXN', 1, 0, 1, 0, 1106);
INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`, `maxAmount`)
VALUES
@ -1078,10 +1049,11 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
(32, 36, -92.324),
(32, 39, 0.994);
INSERT INTO `vn`.`itemShelving` (`id`, `itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `shelve`, `visible`, `grouping`, `packing`, `userFk`)
VALUES
('1', '2', 'GVC', 'A', '0', '1', '1', '1', '1', '1', '1', '1106'),
('2', '4', 'HEJ', 'A', '0', '2', '1', '1', '1', '1', '1', '1106');
(2, 'GVC', 'A', 1, 1, 1, 1106),
(4, 'HEJ', 'A', 1, 1, 1, 1106),
(1, 'UXN', 'A', 2, 12, 12, 1106);
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
VALUES
@ -1135,14 +1107,6 @@ INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
VALUES
('100', '01', 1, '100-01', 1);
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `priority`, `userFk`)
VALUES
('UXN', 1, 1, 1106);
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
VALUES
(1, 'UXN', 'A', 2, 12, 12, 12, 12, 12, 1, 1106);
INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `level`)
VALUES
(1, 1, 1);
@ -2538,7 +2502,7 @@ INSERT INTO `bs`.`sale` (`saleFk`, `amount`, `dated`, `typeFk`, `clientFk`)
INSERT INTO `vn`.`docuware` (`code`, `fileCabinetName`, `dialogName` , `find`)
VALUES
('deliveryClientTest', 'deliveryClientTest', 'findTest', 'word');
('deliveryClient', 'deliveryClient', 'findTicket', 'word');
INSERT INTO `vn`.`docuwareConfig` (`url`)
VALUES

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,8 @@ echo "" > "$DUMPED_FILE"
TABLES=(
util
config
version
versionLog
)
dump_tables ${TABLES[@]}
@ -74,10 +76,20 @@ dump_tables ${TABLES[@]}
TABLES=(
hedera
browser
imageCollection
imageCollectionSize
language
link
location
menu
message
metatag
newsTag
restPriv
social
tpvError
tpvResponse
imageCollectionSize
)
dump_tables ${TABLES[@]}

View File

@ -49,6 +49,7 @@ IGNORETABLES=(
--ignore-table=vn.grantGroup
--ignore-table=vn.invoiceCorrection__
--ignore-table=vn.itemTaxCountrySpain
--ignore-table=vn.itemShelvingPlacementSupplyStock__
--ignore-table=vn.itemFreeNumber__
--ignore-table=vn.mail__
--ignore-table=vn.manaSpellers