export production structure and fixtures updated
gitea/salix/test This commit looks good Details

This commit is contained in:
Bernat 2019-05-30 13:45:13 +02:00
parent e01765e34e
commit d4a3a1a72e
7 changed files with 7879 additions and 5776 deletions

View File

@ -2519,7 +2519,7 @@ VIEW `vn`.`component` AS
-- componentType --------------------------------------------------------
CREATE
CREATE OR REPLACE
ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER

File diff suppressed because one or more lines are too long

View File

@ -141,33 +141,6 @@ INSERT INTO `vn`.`province`(`id`, `name`, `countryFk`, `warehouseFk`, `zoneFk`)
(4, 'Province four', 1, NULL, 2),
(5, 'Province five', 1, NULL, 1);
INSERT INTO `vn`.`agencyHour`(`id`, `agencyFk`, `weekDay`, `warehouseFk`, `provinceFk`, `maxHour`)
VALUES
( 1 , 1, 0, 1, 1, 22),
( 2 , 1, 1, 1, 1, 22),
( 3 , 1, 2, 1, 1, 22),
( 4 , 1, 3, 1, 1, 22),
( 5 , 1, 4, 1, 1, 22),
( 6 , 2, 0, 1, 1, 22),
( 7 , 2, 1, 1, 1, 22),
( 8 , 2, 2, 1, 1, 22),
( 9 , 2, 3, 1, 1, 22),
( 10, 2, 4, 1, 1, 22),
( 11, 7, 0, 1, 1, 22),
( 12, 7, 1, 1, 1, 22),
( 13, 7, 2, 1, 1, 22),
( 14, 7, 3, 1, 1, 22),
( 15, 7, 4, 1, 1, 22),
( 16, 7, 5, 1, 1, 22),
( 17, 7, 6, 1, 1, 22),
( 18, 8, 0, 1, 1, 22),
( 19, 8, 1, 1, 1, 22),
( 20, 8, 2, 1, 1, 22),
( 21, 8, 3, 1, 1, 22),
( 22, 8, 4, 1, 1, 22),
( 23, 8, 5, 1, 1, 22),
( 24, 8, 6, 1, 1, 22);
INSERT INTO `vn`.`clientType`(`id`, `code`, `type`)
VALUES
(1, 'normal', 'Normal'),
@ -283,10 +256,16 @@ UPDATE `vn`.`client` SET defaultAddressFk = 10 WHERE id = 110;
UPDATE `vn`.`client` SET defaultAddressFk = 11 WHERE id = 200;
UPDATE `vn`.`client` SET defaultAddressFk = 12 WHERE id = 400;
UPDATE `vn`.`client` `c`
JOIN `vn`.`address` `a` ON `a`.`clientFk` = `c`.`id`
SET `c`.`defaultAddressFk` = `a`.`id`
WHERE `defaultAddressFk` IS NULL;
DROP TEMPORARY TABLE IF EXISTS tmp.address;
CREATE TEMPORARY TABLE tmp.address
SELECT * FROM `vn`.`address`;
UPDATE `vn`.`client` `c`
JOIN `tmp`.`address` `a` ON `a`.`clientFk` = `c`.`id`
SET `c`.`defaultAddressFk` = `a`.`id`
WHERE `defaultAddressFk` IS NULL;
DROP TEMPORARY TABLE tmp.address;
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
VALUES
@ -990,34 +969,7 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `companyFk`,
( 3, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3, 442, 'Movimiento 3'),
( 4, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 69, 'Movimiento 4');
INSERT INTO `vn`.`agencyProvince`(`provinceFk`, `agencyFk`, `zone`, `warehouseFk`)
VALUES
( 1, 1, 1, 1),
( 1, 1, 1, 2),
( 1, 1, 1, 3),
( 1, 2, 2, 2),
( 1, 2, 2, 3),
( 1, 7, 2, 1),
( 1, 8, 2, 1);
INSERT INTO `vn`.`agencyModeZone`(`agencyModeFk`, `zone`, `price`, `itemFk`, `warehouseFk`, `minimCost`, `inflation`)
VALUES
( 1, 1, 10 , 71, 1, 1, 1.00),
( 2, 1, 20 , 71, 1, 1, 1.00),
( 3, 1, 10 , 71, 1, 1, 1.00),
( 4, 1, 20 , 71, 1, 1, 2.00),
( 5, 2, 10 , 71, 1, 0, 2.00),
( 6, 2, 10 , 71, 1, 0, 2.00),
( 7, 2, 50 , 71, 1, 1, 1.00),
( 8, 2, 100, 71, 1, 1, 2.00);
INSERT INTO `vn`.`agencyWeekDayBonus`(`id`, `warehouseFk`, `agencyFk`, `weekDay`, `zone`, `bonus`)
VALUES
( 1, 1, 1, 0, 1, -1.00),
( 2, 1, 1, 1, 1, -1.00),
( 3, 1, 1, 0, 2, -1.00),
( 4, 1, 1, 1, 2, -1.00),
( 5, 2, 2, 2, 3, 0);
INSERT INTO `bi`.`claims_ratio`(`id_Cliente`, `Consumo`, `Reclamaciones`, `Ratio`, `recobro`, `inflacion`)
VALUES

File diff suppressed because it is too large Load Diff

View File

@ -84,6 +84,7 @@ dump_tables ${TABLES[@]}
TABLES=(
hedera
imageCollection
tpvConfig
tpvError
tpvResponse

View File

@ -7,7 +7,7 @@ describe('Client activeWorkersWithRole', () => {
let isSalesPerson = await app.models.Account.hasRole(result[0].id, 'salesPerson');
expect(result.length).toEqual(11);
expect(result.length).toEqual(12);
expect(isSalesPerson).toBeTruthy();
});

View File

@ -7,6 +7,8 @@ describe('ticket getTotalVolume()', () => {
let expectedResult = 0.066;
let result = await app.models.Ticket.getTotalVolume(ticketFk);
console.log(result);
console.log(result.totalVolume);
expect(result.totalVolume).toEqual(expectedResult);
});