Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2996-route_tickets_recalc
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
e054145b49
|
@ -6,7 +6,7 @@ describe('Chat sendCheckingPresence()', () => {
|
||||||
const ctx = {req: {accessToken: {userId: 1}}};
|
const ctx = {req: {accessToken: {userId: 1}}};
|
||||||
const chatModel = app.models.Chat;
|
const chatModel = app.models.Chat;
|
||||||
const departmentId = 23;
|
const departmentId = 23;
|
||||||
const workerId = 107;
|
const workerId = 1107;
|
||||||
|
|
||||||
it(`should call send() method with the worker name if he's currently working then return a response`, async() => {
|
it(`should call send() method with the worker name if he's currently working then return a response`, async() => {
|
||||||
spyOn(chatModel, 'send').and.callThrough();
|
spyOn(chatModel, 'send').and.callThrough();
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('getCollection()', () => {
|
describe('getCollection()', () => {
|
||||||
it('return list of collection', async() => {
|
it('return list of collection', async() => {
|
||||||
let ctx = {req: {accessToken: {userId: 106}}};
|
let ctx = {req: {accessToken: {userId: 1106}}};
|
||||||
let response = await app.models.Collection.getCollection(ctx);
|
let response = await app.models.Collection.getCollection(ctx);
|
||||||
|
|
||||||
expect(response.length).toBeGreaterThan(0);
|
expect(response.length).toBeGreaterThan(0);
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('newCollection()', () => {
|
describe('newCollection()', () => {
|
||||||
it('return a new collection', async() => {
|
it('return a new collection', async() => {
|
||||||
let ctx = {req: {accessToken: {userId: 106}}};
|
let ctx = {req: {accessToken: {userId: 1106}}};
|
||||||
let response = await app.models.Collection.newCollection(ctx, 1, 1, 1);
|
let response = await app.models.Collection.newCollection(ctx, 1, 1, 1);
|
||||||
|
|
||||||
expect(response.length).toBeGreaterThan(0);
|
expect(response.length).toBeGreaterThan(0);
|
||||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('updateCollectionSale()', () => {
|
describe('updateCollectionSale()', () => {
|
||||||
it('should return a new collection', async() => {
|
it('should return a new collection', async() => {
|
||||||
const sectorOneWarehouseID = 1;
|
const sectorOneWarehouseID = 1;
|
||||||
let ctx = {req: {accessToken: {userId: 106}}};
|
let ctx = {req: {accessToken: {userId: 1106}}};
|
||||||
ctx.args = {
|
ctx.args = {
|
||||||
sale: 1,
|
sale: 1,
|
||||||
originalQuantity: 5,
|
originalQuantity: 5,
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('dms downloadFile()', () => {
|
||||||
let dmsId = 1;
|
let dmsId = 1;
|
||||||
|
|
||||||
it('should return a response for an employee with text content-type', async() => {
|
it('should return a response for an employee with text content-type', async() => {
|
||||||
let workerId = 107;
|
let workerId = 1107;
|
||||||
let ctx = {req: {accessToken: {userId: workerId}}};
|
let ctx = {req: {accessToken: {userId: workerId}}};
|
||||||
const result = await app.models.Dms.downloadFile(ctx, dmsId);
|
const result = await app.models.Dms.downloadFile(ctx, dmsId);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ describe('dms downloadFile()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an error for a user without enough privileges', async() => {
|
it('should return an error for a user without enough privileges', async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let ctx = {req: {accessToken: {userId: clientId}}};
|
let ctx = {req: {accessToken: {userId: clientId}}};
|
||||||
|
|
||||||
let error;
|
let error;
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('dms removeFile()', () => {
|
||||||
let dmsId = 1;
|
let dmsId = 1;
|
||||||
|
|
||||||
it(`should return an error for a user without enough privileges`, async() => {
|
it(`should return an error for a user without enough privileges`, async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let ctx = {req: {accessToken: {userId: clientId}}};
|
let ctx = {req: {accessToken: {userId: clientId}}};
|
||||||
|
|
||||||
let error;
|
let error;
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('dms updateFile()', () => {
|
describe('dms updateFile()', () => {
|
||||||
it(`should return an error for a user without enough privileges`, async() => {
|
it(`should return an error for a user without enough privileges`, async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let companyId = 442;
|
let companyId = 442;
|
||||||
let warehouseId = 1;
|
let warehouseId = 1;
|
||||||
let dmsTypeId = 14;
|
let dmsTypeId = 14;
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('dms uploadFile()', () => {
|
describe('dms uploadFile()', () => {
|
||||||
it(`should return an error for a user without enough privileges`, async() => {
|
it(`should return an error for a user without enough privileges`, async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let ticketDmsTypeId = 14;
|
let ticketDmsTypeId = 14;
|
||||||
let ctx = {req: {accessToken: {userId: clientId}}, args: {dmsTypeId: ticketDmsTypeId}};
|
let ctx = {req: {accessToken: {userId: clientId}}, args: {dmsTypeId: ticketDmsTypeId}};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe('image download()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should return false if the user doesn't have image`, async() => {
|
it(`should return false if the user doesn't have image`, async() => {
|
||||||
const userId = 110;
|
const userId = 1110;
|
||||||
const image = await app.models.Image.download(ctx, collection, size, userId);
|
const image = await app.models.Image.download(ctx, collection, size, userId);
|
||||||
|
|
||||||
expect(image).toBeFalse();
|
expect(image).toBeFalse();
|
||||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('image upload()', () => {
|
describe('image upload()', () => {
|
||||||
describe('as buyer', () => {
|
describe('as buyer', () => {
|
||||||
const buyerId = 35;
|
const buyerId = 35;
|
||||||
const workerId = 106;
|
const workerId = 1106;
|
||||||
const itemId = 4;
|
const itemId = 4;
|
||||||
|
|
||||||
it('should try to upload a file for the collection "catalog" and throw a privileges error', async() => {
|
it('should try to upload a file for the collection "catalog" and throw a privileges error', async() => {
|
||||||
|
@ -45,7 +45,7 @@ describe('image upload()', () => {
|
||||||
|
|
||||||
describe('as marketing', () => {
|
describe('as marketing', () => {
|
||||||
const marketingId = 51;
|
const marketingId = 51;
|
||||||
const workerId = 106;
|
const workerId = 1106;
|
||||||
const itemId = 4;
|
const itemId = 4;
|
||||||
|
|
||||||
it('should be able to call to the TempContainer upload method for the collection "user"', async() => {
|
it('should be able to call to the TempContainer upload method for the collection "user"', async() => {
|
||||||
|
@ -87,7 +87,7 @@ describe('image upload()', () => {
|
||||||
|
|
||||||
describe('as hhrr', () => {
|
describe('as hhrr', () => {
|
||||||
const hhrrId = 37;
|
const hhrrId = 37;
|
||||||
const workerId = 106;
|
const workerId = 1106;
|
||||||
const itemId = 4;
|
const itemId = 4;
|
||||||
|
|
||||||
it('should upload a file for the collection "user" and call to the TempContainer upload method', async() => {
|
it('should upload a file for the collection "user" and call to the TempContainer upload method', async() => {
|
||||||
|
|
|
@ -36,14 +36,14 @@ describe('Dms', () => {
|
||||||
describe('checkRole()', () => {
|
describe('checkRole()', () => {
|
||||||
const dmsId = 1;
|
const dmsId = 1;
|
||||||
it('should return a true for an employee with permission', async() => {
|
it('should return a true for an employee with permission', async() => {
|
||||||
let ctx = {req: {accessToken: {userId: 107}}};
|
let ctx = {req: {accessToken: {userId: 1107}}};
|
||||||
const result = await Dms.checkRole(ctx, dmsId);
|
const result = await Dms.checkRole(ctx, dmsId);
|
||||||
|
|
||||||
expect(result).toBeTruthy();
|
expect(result).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return false for an employee without permission', async() => {
|
it('should return false for an employee without permission', async() => {
|
||||||
let ctx = {req: {accessToken: {userId: 101}}};
|
let ctx = {req: {accessToken: {userId: 1101}}};
|
||||||
const result = await Dms.checkRole(ctx, dmsId);
|
const result = await Dms.checkRole(ctx, dmsId);
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
|
||||||
VALUES
|
|
||||||
('SupplierAddress', '*', '*', 'ALLOW', 'ROLE', 'employee'),
|
|
||||||
('SalesMonitor', '*', '*', 'ALLOW', 'ROLE', 'employee');
|
|
|
@ -1 +0,0 @@
|
||||||
INSERT INTO salix.module (code) VALUES ('Monitors');
|
|
|
@ -1,3 +0,0 @@
|
||||||
UPDATE salix.ACL
|
|
||||||
SET principalId = "salesAssistant"
|
|
||||||
WHERE model = 'Client' AND property = 'createReceipt';
|
|
|
@ -1,18 +0,0 @@
|
||||||
CREATE TABLE `vn`.`supplierAddress`
|
|
||||||
(
|
|
||||||
id INT NULL AUTO_INCREMENT,
|
|
||||||
supplierFk INT NULL,
|
|
||||||
nickname VARCHAR(40) NULL,
|
|
||||||
street VARCHAR(255) NULL,
|
|
||||||
provinceFk SMALLINT(6) UNSIGNED NULL,
|
|
||||||
postalCode VARCHAR(10) NULL,
|
|
||||||
city VARCHAR(50) NULL,
|
|
||||||
phone VARCHAR(15) NULL,
|
|
||||||
mobile VARCHAR(15) NULL,
|
|
||||||
CONSTRAINT supplierAddress_pk
|
|
||||||
PRIMARY KEY (id),
|
|
||||||
CONSTRAINT supplierAddress_province_fk
|
|
||||||
FOREIGN KEY (provinceFk) REFERENCES province (id)
|
|
||||||
ON UPDATE CASCADE
|
|
||||||
);
|
|
||||||
|
|
|
@ -1,193 +0,0 @@
|
||||||
DROP PROCEDURE IF EXISTS `vn`.`sale_getProblems`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
$$
|
|
||||||
CREATE
|
|
||||||
DEFINER = root@`%` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative TINYINT(1))
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Calcula los problemas de cada venta
|
|
||||||
* para un conjunto de tickets.
|
|
||||||
*
|
|
||||||
* @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Identificadores de los tickets a calcular
|
|
||||||
* @return tmp.sale_problems
|
|
||||||
*/
|
|
||||||
DECLARE vWarehouse INT;
|
|
||||||
DECLARE vDate DATE;
|
|
||||||
DECLARE vAvailableCache INT;
|
|
||||||
DECLARE vDone INT DEFAULT 0;
|
|
||||||
DECLARE vComponentCount INT;
|
|
||||||
|
|
||||||
DECLARE vCursor CURSOR FOR
|
|
||||||
SELECT DISTINCT tt.warehouseFk, IF(vIsTodayRelative, CURDATE(), date(tt.shipped))
|
|
||||||
FROM tmp.sale_getProblems tt
|
|
||||||
WHERE DATE(tt.shipped) BETWEEN CURDATE()
|
|
||||||
AND TIMESTAMPADD(DAY, IF(vIsTodayRelative, 9.9, 1.9), CURDATE());
|
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = 1;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale_problems;
|
|
||||||
CREATE TEMPORARY TABLE tmp.sale_problems (
|
|
||||||
ticketFk INT(11),
|
|
||||||
saleFk INT(11),
|
|
||||||
isFreezed INTEGER(1) DEFAULT 0,
|
|
||||||
risk DECIMAL(10,2) DEFAULT 0,
|
|
||||||
hasTicketRequest INTEGER(1) DEFAULT 0,
|
|
||||||
isAvailable INTEGER(1) DEFAULT 1,
|
|
||||||
itemShortage VARCHAR(250),
|
|
||||||
isTaxDataChecked INTEGER(1) DEFAULT 1,
|
|
||||||
itemDelay VARCHAR(250),
|
|
||||||
hasComponentLack INTEGER(1),
|
|
||||||
PRIMARY KEY (ticketFk, saleFk)
|
|
||||||
) ENGINE = MEMORY;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticket_list;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticket_list
|
|
||||||
(PRIMARY KEY (ticketFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT tp.ticketFk, c.id clientFk
|
|
||||||
FROM tmp.sale_getProblems tp
|
|
||||||
JOIN vn.client c ON c.id = tp.clientFk;
|
|
||||||
|
|
||||||
SELECT COUNT(*) INTO vComponentCount
|
|
||||||
FROM vn.component c
|
|
||||||
WHERE c.isRequired;
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk)
|
|
||||||
SELECT tl.ticketFk, (COUNT(DISTINCT s.id) * vComponentCount > COUNT(c.id)), s.id
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.sale s ON s.ticketFk = tl.ticketFk
|
|
||||||
LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id
|
|
||||||
LEFT JOIN vn.component c ON c.id = sc.componentFk AND c.isRequired
|
|
||||||
GROUP BY tl.ticketFk, s.id;
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, isFreezed)
|
|
||||||
SELECT DISTINCT tl.ticketFk, TRUE
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.client c ON c.id = tl.clientFk
|
|
||||||
WHERE c.isFreezed
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
isFreezed = c.isFreezed;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
|
|
||||||
CREATE TEMPORARY TABLE tmp.clientGetDebt
|
|
||||||
(PRIMARY KEY (clientFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT DISTINCT clientFk
|
|
||||||
FROM tmp.ticket_list;
|
|
||||||
|
|
||||||
CALL clientGetDebt(CURDATE());
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, risk)
|
|
||||||
SELECT DISTINCT tl.ticketFk, r.risk
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.agencyMode a ON t.agencyModeFk = a.id
|
|
||||||
JOIN tmp.risk r ON r.clientFk = t.clientFk
|
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
|
||||||
JOIN vn.clientConfig cc
|
|
||||||
WHERE r.risk - cc.riskTolerance > c.credit + 10
|
|
||||||
AND a.isRiskFree = FALSE
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
risk = r.risk;
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, hasTicketRequest)
|
|
||||||
SELECT DISTINCT tl.ticketFk, TRUE
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.ticketRequest tr ON tr.ticketFk = tl.ticketFk
|
|
||||||
WHERE tr.isOK IS NULL
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
hasTicketRequest = TRUE;
|
|
||||||
|
|
||||||
OPEN vCursor;
|
|
||||||
|
|
||||||
WHILE NOT vDone
|
|
||||||
DO
|
|
||||||
FETCH vCursor INTO vWarehouse, vDate;
|
|
||||||
|
|
||||||
CALL cache.available_refresh(vAvailableCache, FALSE, vWarehouse, vDate);
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, isAvailable, saleFk)
|
|
||||||
SELECT tl.ticketFk, FALSE, s.id
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
|
||||||
JOIN vn.itemType it on it.id = i.typeFk
|
|
||||||
LEFT JOIN cache.available av ON av.item_id = i.id
|
|
||||||
AND av.calc_id = vAvailableCache
|
|
||||||
WHERE date(t.shipped) = vDate
|
|
||||||
AND it.categoryFk != 6
|
|
||||||
AND IFNULL(av.available, 0) < 0
|
|
||||||
AND s.isPicked = FALSE
|
|
||||||
AND NOT i.generic
|
|
||||||
AND vWarehouse = t.warehouseFk
|
|
||||||
GROUP BY tl.ticketFk
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
isAvailable = FALSE, saleFk = VALUE(saleFk);
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, itemShortage, saleFk)
|
|
||||||
SELECT ticketFk, problem, saleFk
|
|
||||||
FROM (
|
|
||||||
SELECT tl.ticketFk, CONCAT('F: ',GROUP_CONCAT(i.id, ' ', i.longName, ' ')) problem, s.id AS saleFk
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
|
||||||
JOIN vn.itemType it on it.id = i.typeFk
|
|
||||||
LEFT JOIN vn.itemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk
|
|
||||||
LEFT JOIN cache.available av ON av.item_id = i.id AND av.calc_id = vAvailableCache
|
|
||||||
WHERE IFNULL(av.available, 0) < 0
|
|
||||||
AND s.quantity > IFNULL(issw.visible, 0)
|
|
||||||
AND s.quantity > 0
|
|
||||||
AND s.isPicked = FALSE
|
|
||||||
AND s.reserved = FALSE
|
|
||||||
AND it.categoryFk != 6
|
|
||||||
AND IF(vIsTodayRelative, TRUE, date(t.shipped) = vDate)
|
|
||||||
AND NOT i.generic
|
|
||||||
AND CURDATE() = vDate
|
|
||||||
AND t.warehouseFk = vWarehouse
|
|
||||||
GROUP BY tl.ticketFk LIMIT 1) sub
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
itemShortage = sub.problem, saleFk = sub.saleFk;
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, itemDelay, saleFk)
|
|
||||||
SELECT ticketFk, problem, saleFk
|
|
||||||
FROM (
|
|
||||||
SELECT tl.ticketFk, GROUP_CONCAT('I: ',i.id, ' ', i.longName, ' ') problem, s.id AS saleFk
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
|
||||||
JOIN vn.itemType it on it.id = i.typeFk
|
|
||||||
LEFT JOIN vn.itemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk
|
|
||||||
WHERE s.quantity > IFNULL(issw.visible, 0)
|
|
||||||
AND s.quantity > 0
|
|
||||||
AND s.isPicked = FALSE
|
|
||||||
AND s.reserved = FALSE
|
|
||||||
AND it.categoryFk != 6
|
|
||||||
AND IF(vIsTodayRelative, TRUE, date(t.shipped) = vDate)
|
|
||||||
AND NOT i.generic
|
|
||||||
AND CURDATE() = vDate
|
|
||||||
AND t.warehouseFk = vWarehouse
|
|
||||||
GROUP BY tl.ticketFk LIMIT 1) sub
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
itemDelay = sub.problem, saleFk = sub.saleFk;
|
|
||||||
END WHILE;
|
|
||||||
|
|
||||||
CLOSE vCursor;
|
|
||||||
|
|
||||||
INSERT INTO tmp.sale_problems(ticketFk, isTaxDataChecked)
|
|
||||||
SELECT DISTINCT tl.ticketFk, FALSE
|
|
||||||
FROM tmp.ticket_list tl
|
|
||||||
JOIN vn.client c ON c.id = tl.clientFk
|
|
||||||
WHERE c.isTaxDataChecked = FALSE
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
isTaxDataChecked = FALSE;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
|
||||||
tmp.clientGetDebt,
|
|
||||||
tmp.ticket_list;
|
|
||||||
END;;$$
|
|
||||||
DELIMITER ;
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
DROP PROCEDURE IF EXISTS `vn`.`sale_getProblemsByTicket`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
$$
|
|
||||||
CREATE
|
|
||||||
DEFINER = root@`%` PROCEDURE `vn`.`sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1))
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Calcula los problemas de cada venta
|
|
||||||
* para un conjunto de tickets.
|
|
||||||
*
|
|
||||||
* @return Problems result
|
|
||||||
*/
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems;
|
|
||||||
CREATE TEMPORARY TABLE tmp.sale_getProblems
|
|
||||||
(INDEX (ticketFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT t.id ticketFk, t.clientFk, t.warehouseFk, t.shipped
|
|
||||||
FROM ticket t
|
|
||||||
WHERE t.id = vTicketFk;
|
|
||||||
|
|
||||||
CALL sale_getProblems(vIsTodayRelative);
|
|
||||||
|
|
||||||
SELECT * FROM tmp.sale_problems;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
|
||||||
tmp.sale_getProblems,
|
|
||||||
tmp.sale_problems;
|
|
||||||
END;;$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,187 +0,0 @@
|
||||||
DROP PROCEDURE IF EXISTS `vn`.`ticketGetProblems`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
$$
|
|
||||||
CREATE
|
|
||||||
DEFINER = root@`%` PROCEDURE `vn`.`ticketGetProblems`(IN vIsTodayRelative TINYINT(1))
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* @deprecated Use ticket_getProblems() instead
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
DECLARE vWarehouse INT;
|
|
||||||
DECLARE vDate DATE;
|
|
||||||
DECLARE vAvailableCache INT;
|
|
||||||
DECLARE vDone INT DEFAULT 0;
|
|
||||||
DECLARE vComponentCount INT;
|
|
||||||
|
|
||||||
DECLARE vCursor CURSOR FOR
|
|
||||||
SELECT DISTINCT tt.warehouseFk, IF(vIsTodayRelative, CURDATE(), date(tt.shipped))
|
|
||||||
FROM tmp.ticketGetProblems tt
|
|
||||||
WHERE DATE(tt.shipped) BETWEEN CURDATE()
|
|
||||||
AND TIMESTAMPADD(DAY, IF(vIsTodayRelative, 9.9, 1.9), CURDATE());
|
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = 1;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketProblems;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticketProblems (
|
|
||||||
ticketFk INT(11) PRIMARY KEY,
|
|
||||||
isFreezed INTEGER(1) DEFAULT 0,
|
|
||||||
risk DECIMAL(10,2) DEFAULT 0,
|
|
||||||
hasTicketRequest INTEGER(1) DEFAULT 0,
|
|
||||||
isAvailable INTEGER(1) DEFAULT 1,
|
|
||||||
itemShortage VARCHAR(250),
|
|
||||||
isTaxDataChecked INTEGER(1) DEFAULT 1,
|
|
||||||
itemDelay VARCHAR(250),
|
|
||||||
componentLack INTEGER(1)
|
|
||||||
) ENGINE = MEMORY;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketList;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticketList
|
|
||||||
(PRIMARY KEY (ticketFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT tp.ticketFk, c.id clientFk
|
|
||||||
FROM tmp.ticketGetProblems tp
|
|
||||||
JOIN vn.client c ON c.id = tp.clientFk;
|
|
||||||
|
|
||||||
SELECT COUNT(*) INTO vComponentCount
|
|
||||||
FROM vn.component c
|
|
||||||
WHERE c.isRequired;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, componentLack)
|
|
||||||
SELECT tl.ticketFk, (COUNT(DISTINCT s.id) * vComponentCount > COUNT(c.id))
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.sale s ON s.ticketFk = tl.ticketFk
|
|
||||||
LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id
|
|
||||||
LEFT JOIN vn.component c ON c.id = sc.componentFk AND c.isRequired
|
|
||||||
GROUP BY tl.ticketFk;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, isFreezed)
|
|
||||||
SELECT DISTINCT tl.ticketFk, 1
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.client c ON c.id = tl.clientFk
|
|
||||||
WHERE c.isFreezed
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
isFreezed = c.isFreezed;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
|
|
||||||
CREATE TEMPORARY TABLE tmp.clientGetDebt
|
|
||||||
(PRIMARY KEY (clientFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT DISTINCT clientFk
|
|
||||||
FROM tmp.ticketList;
|
|
||||||
|
|
||||||
CALL clientGetDebt(CURDATE());
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, risk)
|
|
||||||
SELECT DISTINCT tl.ticketFk, r.risk
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.agencyMode a ON t.agencyModeFk = a.id
|
|
||||||
JOIN tmp.risk r ON r.clientFk = t.clientFk
|
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
|
||||||
JOIN vn.clientConfig cc
|
|
||||||
WHERE r.risk - cc.riskTolerance > c.credit + 10
|
|
||||||
AND a.isRiskFree = FALSE
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
risk = r.risk;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, hasTicketRequest)
|
|
||||||
SELECT DISTINCT tl.ticketFk, 1
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.ticketRequest tr ON tr.ticketFk = tl.ticketFk
|
|
||||||
WHERE tr.isOK IS NULL AND tr.saleFk IS NOT NULL
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
hasTicketRequest = 1;
|
|
||||||
|
|
||||||
OPEN vCursor;
|
|
||||||
|
|
||||||
WHILE NOT vDone
|
|
||||||
DO
|
|
||||||
FETCH vCursor INTO vWarehouse, vDate;
|
|
||||||
|
|
||||||
CALL cache.available_refresh(vAvailableCache, FALSE, vWarehouse, vDate);
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, isAvailable)
|
|
||||||
SELECT tl.ticketFk, 0
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
|
||||||
JOIN vn.itemType it on it.id = i.typeFk
|
|
||||||
LEFT JOIN cache.available av ON av.item_id = i.id
|
|
||||||
AND av.calc_id = vAvailableCache
|
|
||||||
WHERE date(t.shipped) = vDate
|
|
||||||
AND it.categoryFk != 6
|
|
||||||
AND IFNULL(av.available, 0) < 0
|
|
||||||
AND s.isPicked = FALSE
|
|
||||||
AND NOT i.generic
|
|
||||||
AND vWarehouse = t.warehouseFk
|
|
||||||
GROUP BY tl.ticketFk
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
isAvailable = 0;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, itemShortage)
|
|
||||||
SELECT ticketFk, problem
|
|
||||||
FROM (
|
|
||||||
SELECT tl.ticketFk, CONCAT('F: ',GROUP_CONCAT(i.id, ' ', i.longName, ' ')) problem
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
|
||||||
JOIN vn.itemType it on it.id = i.typeFk
|
|
||||||
LEFT JOIN vn.itemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk
|
|
||||||
LEFT JOIN cache.available av ON av.item_id = i.id AND av.calc_id = vAvailableCache
|
|
||||||
WHERE IFNULL(av.available, 0) < 0
|
|
||||||
AND s.quantity > IFNULL(issw.visible, 0)
|
|
||||||
AND s.quantity > 0
|
|
||||||
AND s.isPicked = FALSE
|
|
||||||
AND s.reserved = FALSE
|
|
||||||
AND it.categoryFk != 6
|
|
||||||
AND IF(vIsTodayRelative, TRUE, date(t.shipped) = vDate)
|
|
||||||
AND NOT i.generic
|
|
||||||
AND CURDATE() = vDate
|
|
||||||
AND t.warehouseFk = vWarehouse
|
|
||||||
GROUP BY tl.ticketFk) sub
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
itemShortage = sub.problem;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, itemDelay)
|
|
||||||
SELECT ticketFk, problem
|
|
||||||
FROM (
|
|
||||||
SELECT tl.ticketFk, GROUP_CONCAT('I: ',i.id, ' ', i.longName, ' ') problem
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
|
||||||
JOIN vn.itemType it on it.id = i.typeFk
|
|
||||||
LEFT JOIN vn.itemShelvingStock_byWarehouse issw ON issw.itemFk = i.id AND issw.warehouseFk = t.warehouseFk
|
|
||||||
WHERE s.quantity > IFNULL(issw.visible, 0)
|
|
||||||
AND s.quantity > 0
|
|
||||||
AND s.isPicked = FALSE
|
|
||||||
AND s.reserved = FALSE
|
|
||||||
AND it.categoryFk != 6
|
|
||||||
AND IF(vIsTodayRelative, TRUE, date(t.shipped) = vDate)
|
|
||||||
AND NOT i.generic
|
|
||||||
AND CURDATE() = vDate
|
|
||||||
AND t.warehouseFk = vWarehouse
|
|
||||||
GROUP BY tl.ticketFk) sub
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
itemDelay = sub.problem;
|
|
||||||
END WHILE;
|
|
||||||
|
|
||||||
CLOSE vCursor;
|
|
||||||
|
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, isTaxDataChecked)
|
|
||||||
SELECT DISTINCT tl.ticketFk, FALSE
|
|
||||||
FROM tmp.ticketList tl
|
|
||||||
JOIN vn.client c ON c.id = tl.clientFk
|
|
||||||
WHERE c.isTaxDataChecked= FALSE
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
isTaxDataChecked = FALSE;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
|
||||||
tmp.clientGetDebt,
|
|
||||||
tmp.ticketList;
|
|
||||||
END;;$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,92 +0,0 @@
|
||||||
DROP PROCEDURE `vn`.`ticket_componentMakeUpdate`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
$$
|
|
||||||
CREATE
|
|
||||||
DEFINER = root@`%` PROCEDURE `vn`.`ticket_componentMakeUpdate`(IN vTicketFk INT, IN vClientFk INT, IN vAgencyModeFk INT,
|
|
||||||
IN vAddressFk INT, IN vZoneFk INT, IN vWarehouseFk TINYINT,
|
|
||||||
IN vCompanyFk SMALLINT, IN vShipped DATETIME,
|
|
||||||
IN vLanded DATE, IN vIsDeleted TINYINT(1),
|
|
||||||
IN vHasToBeUnrouted TINYINT(1), IN vOption INT)
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Modifica en el ticket los campos que se le pasan por parámetro
|
|
||||||
* y cambia sus componentes.
|
|
||||||
* Este procedimiento es transacionado en Salix
|
|
||||||
*
|
|
||||||
* @param vTicketFk Id del ticket a modificar
|
|
||||||
* @param vClientFk nuevo cliente
|
|
||||||
* @param vAgencyModeFk nueva agencia
|
|
||||||
* @param vAddressFk nuevo consignatario
|
|
||||||
* @param vZoneFk nueva zona
|
|
||||||
* @param vWarehouseFk nuevo almacen
|
|
||||||
* @param vCompanyFk nueva empresa
|
|
||||||
* @param vShipped nueva fecha del envio de mercancia
|
|
||||||
* @param vLanded nueva fecha de recepcion de mercancia
|
|
||||||
* @param vIsDeleted si se borra el ticket
|
|
||||||
* @param vHasToBeUnrouted si se le elimina la ruta al ticket
|
|
||||||
* @param vOption opcion para el case del proc ticketComponentUpdateSale
|
|
||||||
*/
|
|
||||||
DECLARE vPrice DECIMAL(10,2);
|
|
||||||
DECLARE vBonus DECIMAL(10,2);
|
|
||||||
|
|
||||||
CALL ticket_componentPreview (vTicketFk, vLanded, vAddressFk, vZoneFk, vWarehouseFk);
|
|
||||||
|
|
||||||
IF (SELECT addressFk FROM ticket WHERE id = vTicketFk) <> vAddressFk THEN
|
|
||||||
|
|
||||||
UPDATE ticket t
|
|
||||||
JOIN address a ON a.id = vAddressFk
|
|
||||||
SET t.nickname = a.nickname
|
|
||||||
WHERE t.id = vTicketFk;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
CALL zone_getShippedWarehouse(vlanded, vAddressFk, vAgencyModeFk);
|
|
||||||
|
|
||||||
SELECT zoneFk, price, bonus INTO vZoneFk, vPrice, vBonus
|
|
||||||
FROM tmp.zoneGetShipped
|
|
||||||
WHERE shipped BETWEEN DATE(vShipped) AND util.dayEnd(vShipped) AND warehouseFk = vWarehouseFk LIMIT 1;
|
|
||||||
|
|
||||||
UPDATE ticket t
|
|
||||||
SET
|
|
||||||
t.clientFk = vClientFk,
|
|
||||||
t.agencyModeFk = vAgencyModeFk,
|
|
||||||
t.addressFk = vAddressFk,
|
|
||||||
t.zoneFk = vZoneFk,
|
|
||||||
t.zonePrice = vPrice,
|
|
||||||
t.zoneBonus = vBonus,
|
|
||||||
t.warehouseFk = vWarehouseFk,
|
|
||||||
t.companyFk = vCompanyFk,
|
|
||||||
t.landed = vLanded,
|
|
||||||
t.shipped = vShipped,
|
|
||||||
t.isDeleted = vIsDeleted
|
|
||||||
WHERE
|
|
||||||
t.id = vTicketFk;
|
|
||||||
|
|
||||||
IF vHasToBeUnrouted THEN
|
|
||||||
UPDATE ticket t SET t.routeFk = NULL
|
|
||||||
WHERE t.id = vTicketFk;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF vOption <> 8 THEN
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
|
||||||
CREATE TEMPORARY TABLE tmp.sale
|
|
||||||
(PRIMARY KEY (saleFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT id AS saleFk, vWarehouseFk warehouseFk
|
|
||||||
FROM sale s WHERE s.ticketFk = vTicketFk;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticketComponent
|
|
||||||
SELECT * FROM tmp.ticketComponentPreview;
|
|
||||||
|
|
||||||
CALL ticketComponentUpdateSale (vOption);
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.sale;
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketComponent;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.zoneGetShipped, tmp.ticketComponentPreview;
|
|
||||||
END;;$$
|
|
||||||
DELIMITER ;
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
DROP PROCEDURE IF EXISTS `vn`.`ticket_getProblems`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
$$
|
|
||||||
CREATE
|
|
||||||
DEFINER = root@`%` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative TINYINT(1))
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Calcula los problemas para un conjunto de tickets.
|
|
||||||
* Agrupados por ticket
|
|
||||||
*
|
|
||||||
* @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Identificadores de los tickets a calcular
|
|
||||||
* @return tmp.ticket_problems
|
|
||||||
*/
|
|
||||||
CALL sale_getProblems(vIsTodayRelative);
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticket_problems;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticket_problems
|
|
||||||
(INDEX (ticketFk))
|
|
||||||
ENGINE = MEMORY
|
|
||||||
SELECT
|
|
||||||
ticketFk,
|
|
||||||
MAX(p.isFreezed) AS isFreezed,
|
|
||||||
MAX(p.risk) AS risk,
|
|
||||||
MAX(p.hasTicketRequest) AS hasTicketRequest,
|
|
||||||
MIN(p.isAvailable) AS isAvailable,
|
|
||||||
MAX(p.itemShortage) AS itemShortage,
|
|
||||||
MIN(p.isTaxDataChecked) AS isTaxDataChecked,
|
|
||||||
MAX(p.hasComponentLack) AS hasComponentLack
|
|
||||||
FROM tmp.sale_problems p
|
|
||||||
GROUP BY ticketFk;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
|
||||||
tmp.sale_problems;
|
|
||||||
END;;$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,4 +0,0 @@
|
||||||
ALTER TABLE `vn`.`warehouse`
|
|
||||||
ADD `code` VARCHAR(3) NULL AFTER name;
|
|
||||||
|
|
||||||
UPDATE `vn`.`warehouse` SET `code` = 'ALG' WHERE `id` = 60;
|
|
|
@ -1,9 +0,0 @@
|
||||||
ALTER TABLE `vn`.`starredModule`
|
|
||||||
ADD `position` INT NOT NULL AFTER `moduleFk`;
|
|
||||||
|
|
||||||
SET @count:=0;
|
|
||||||
UPDATE `vn`.`starredModule` sm
|
|
||||||
JOIN (
|
|
||||||
SELECT sm.id, IF(@workerFk = sm.workerFk, @count:=@count+1, @count:=1) AS position, @workerFk:=sm.workerFk
|
|
||||||
FROM `vn`.`starredModule` sm ORDER BY workerFk, moduleFk ASC) AS smt ON smt.id = sm.id
|
|
||||||
SET sm.position = smt.position;
|
|
|
@ -0,0 +1 @@
|
||||||
|
Delete me
|
File diff suppressed because one or more lines are too long
|
@ -53,18 +53,18 @@ INSERT INTO `hedera`.`tpvConfig`(`id`, `currency`, `terminal`, `transactionType`
|
||||||
|
|
||||||
INSERT INTO `account`.`user`(`id`,`name`,`nickname`, `password`,`role`,`active`,`email`,`lang`, `image`)
|
INSERT INTO `account`.`user`(`id`,`name`,`nickname`, `password`,`role`,`active`,`email`,`lang`, `image`)
|
||||||
VALUES
|
VALUES
|
||||||
(101, 'BruceWayne', 'Bruce Wayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1101, 'BruceWayne', 'Bruce Wayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(102, 'PetterParker', 'Petter Parker', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'PetterParker@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1102, 'PetterParker', 'Petter Parker', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'PetterParker@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(103, 'ClarkKent', 'Clark Kent', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'ClarkKent@mydomain.com', 'fr', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1103, 'ClarkKent', 'Clark Kent', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'ClarkKent@mydomain.com', 'fr', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(104, 'TonyStark', 'Tony Stark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1104, 'TonyStark', 'Tony Stark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(105, 'MaxEisenhardt', 'Max Eisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1105, 'MaxEisenhardt', 'Max Eisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(106, 'DavidCharlesHaller', 'David Charles Haller', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'DavidCharlesHaller@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1106, 'DavidCharlesHaller', 'David Charles Haller', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'DavidCharlesHaller@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(107, 'HankPym', 'Hank Pym', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'HankPym@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1107, 'HankPym', 'Hank Pym', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'HankPym@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(108, 'CharlesXavier', 'Charles Xavier', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'CharlesXavier@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1108, 'CharlesXavier', 'Charles Xavier', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'CharlesXavier@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(109, 'BruceBanner', 'Bruce Banner', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'BruceBanner@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
(1109, 'BruceBanner', 'Bruce Banner', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'BruceBanner@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||||
(110, 'JessicaJones', 'Jessica Jones', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'JessicaJones@mydomain.com', 'en', NULL),
|
(1110, 'JessicaJones', 'Jessica Jones', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'JessicaJones@mydomain.com', 'en', NULL),
|
||||||
(111, 'Missing', 'Missing', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL),
|
(1111, 'Missing', 'Missing', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL),
|
||||||
(112, 'Trash', 'Trash', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL);
|
(1112, 'Trash', 'Trash', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL);
|
||||||
|
|
||||||
INSERT INTO `account`.`mailAlias`(`id`, `alias`, `description`, `isPublic`)
|
INSERT INTO `account`.`mailAlias`(`id`, `alias`, `description`, `isPublic`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -86,11 +86,11 @@ INSERT INTO `account`.`mailForward`(`account`, `forwardTo`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`)
|
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`)
|
||||||
VALUES
|
VALUES
|
||||||
(106, 'LGN', 'David Charles', 'Haller', 106, 19, 432978106),
|
(1106, 'LGN', 'David Charles', 'Haller', 1106, 19, 432978106),
|
||||||
(107, 'ANT', 'Hank' , 'Pym' , 107, 19, 432978107),
|
(1107, 'ANT', 'Hank' , 'Pym' , 1107, 19, 432978107),
|
||||||
(108, 'DCX', 'Charles' , 'Xavier', 108, 19, 432978108),
|
(1108, 'DCX', 'Charles' , 'Xavier', 1108, 19, 432978108),
|
||||||
(109, 'HLK', 'Bruce' , 'Banner', 109, 19, 432978109),
|
(1109, 'HLK', 'Bruce' , 'Banner', 1109, 19, 432978109),
|
||||||
(110, 'JJJ', 'Jessica' , 'Jones' , 110, 19, 432978110);
|
(1110, 'JJJ', 'Jessica' , 'Jones' , 1110, 19, 432978110);
|
||||||
|
|
||||||
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
|
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -145,8 +145,8 @@ INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingO
|
||||||
|
|
||||||
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `parked`, `userFk`)
|
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `parked`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
('GVC', '1', '0', '1', '0', '106'),
|
('GVC', '1', '0', '1', '0', '1106'),
|
||||||
('HEJ', '2', '0', '1', '0', '106');
|
('HEJ', '2', '0', '1', '0', '1106');
|
||||||
|
|
||||||
INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`)
|
INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -269,18 +269,18 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`fax`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`cplusTerIdNifFk`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`)
|
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`fax`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`cplusTerIdNifFk`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`)
|
||||||
VALUES
|
VALUES
|
||||||
(101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
(1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
||||||
(102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
(1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
||||||
(103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 0, 19, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 0, 19, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
||||||
(104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
||||||
(105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 8, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1),
|
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 8, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1),
|
||||||
(106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1),
|
(1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1),
|
||||||
(107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1),
|
(1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1),
|
||||||
(108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1),
|
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1),
|
||||||
(109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1),
|
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1),
|
||||||
(110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1),
|
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1),
|
||||||
(111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1),
|
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1),
|
||||||
(112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1);
|
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
||||||
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'SILLA', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, CURDATE(), 1
|
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'SILLA', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, CURDATE(), 1
|
||||||
|
@ -289,10 +289,10 @@ INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`,
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
|
INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
|
||||||
VALUES
|
VALUES
|
||||||
(101, 50, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1101, 50, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(102, 100, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1102, 100, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(103, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1103, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(104, -30, DATE_ADD(CURDATE(), INTERVAL -1 MONTH));
|
(1104, -30, DATE_ADD(CURDATE(), INTERVAL -1 MONTH));
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientConfig`(`riskTolerance`)
|
INSERT INTO `vn`.`clientConfig`(`riskTolerance`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -300,64 +300,64 @@ INSERT INTO `vn`.`clientConfig`(`riskTolerance`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`, `isDefaultAddress`)
|
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`, `isDefaultAddress`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1, 1111111111, 222222222, 1, 101, 2, NULL, NULL, 0, 1),
|
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 1),
|
||||||
(2, 'Petter Parker', '20 Ingram Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 102, 2, NULL, NULL, 0, 1),
|
(2, 'Petter Parker', '20 Ingram Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 1),
|
||||||
(3, 'Clark Kent', '344 Clinton Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 103, 2, NULL, NULL, 0, 1),
|
(3, 'Clark Kent', '344 Clinton Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 1),
|
||||||
(4, 'Tony Stark', '10880 Malibu Point', 'Silla', 46460, 1, 1111111111, 222222222, 1, 104, 2, NULL, NULL, 0, 1),
|
(4, 'Tony Stark', '10880 Malibu Point', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 1),
|
||||||
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Silla', 46460, 1, 1111111111, 222222222, 1, 105, 2, NULL, NULL, 0, 1),
|
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 1),
|
||||||
(6, 'DavidCharlesHaller', 'Evil hideout', 'Silla', 46460, 1, 1111111111, 222222222, 1, 106, 2, NULL, NULL, 0, 1),
|
(6, 'DavidCharlesHaller', 'Evil hideout', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 1),
|
||||||
(7, 'Hank Pym', 'Anthill', 'Silla', 46460, 1, 1111111111, 222222222, 1, 107, 2, NULL, NULL, 0, 1),
|
(7, 'Hank Pym', 'Anthill', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 1),
|
||||||
(8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1, 1111111111, 222222222, 1, 108, 2, NULL, NULL, 0, 1),
|
(8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 1),
|
||||||
(9, 'Bruce Banner', 'Somewhere in New York', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 1),
|
(9, 'Bruce Banner', 'Somewhere in New York', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 1),
|
||||||
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Silla', 46460, 1, 1111111111, 222222222, 1, 110, 2, NULL, NULL, 0, 1),
|
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 1),
|
||||||
(11, 'Missing', 'The space', 'Silla', 46460, 1, 1111111111, 222222222, 1, 111, 10, NULL, NULL, 0, 1),
|
(11, 'Missing', 'The space', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1111, 10, NULL, NULL, 0, 1),
|
||||||
(12, 'Trash', 'New York city', 'Silla', 46460, 1, 1111111111, 222222222, 1, 112, 10, NULL, NULL, 0, 1),
|
(12, 'Trash', 'New York city', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1112, 10, NULL, NULL, 0, 1),
|
||||||
(101, 'Somewhere in Thailand', 'address 01', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(101, 'Somewhere in Thailand', 'address 01', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(102, 'Somewhere in Poland', 'address 02', 'Silla', 46460, 1, 3333333333, 444444444, 1, 109, 2, NULL, NULL, 0, 0),
|
(102, 'Somewhere in Poland', 'address 02', 'Silla', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(103, 'Somewhere in Japan', 'address 03', 'Silla', 46460, 1, 3333333333, 444444444, 1, 109, 2, NULL, NULL, 0, 0),
|
(103, 'Somewhere in Japan', 'address 03', 'Silla', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(104, 'Somewhere in Spain', 'address 04', 'Silla', 46460, 1, 3333333333, 444444444, 1, 109, 2, NULL, NULL, 0, 0),
|
(104, 'Somewhere in Spain', 'address 04', 'Silla', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(105, 'Somewhere in Potugal', 'address 05', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
(105, 'Somewhere in Potugal', 'address 05', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(106, 'Somewhere in UK', 'address 06', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
(106, 'Somewhere in UK', 'address 06', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(107, 'Somewhere in Valencia', 'address 07', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
(107, 'Somewhere in Valencia', 'address 07', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(108, 'Somewhere in Silla', 'address 08', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
(108, 'Somewhere in Silla', 'address 08', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(109, 'Somewhere in London', 'address 09', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(109, 'Somewhere in London', 'address 09', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(110, 'Somewhere in Algemesi', 'address 10', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(110, 'Somewhere in Algemesi', 'address 10', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(111, 'Somewhere in Carlet', 'address 11', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(111, 'Somewhere in Carlet', 'address 11', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(112, 'Somewhere in Campanar', 'address 12', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(112, 'Somewhere in Campanar', 'address 12', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(113, 'Somewhere in Malilla', 'address 13', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(113, 'Somewhere in Malilla', 'address 13', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(114, 'Somewhere in France', 'address 14', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(114, 'Somewhere in France', 'address 14', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(115, 'Somewhere in Birmingham', 'address 15', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(115, 'Somewhere in Birmingham', 'address 15', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(116, 'Somewhere in Scotland', 'address 16', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(116, 'Somewhere in Scotland', 'address 16', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(117, 'Somewhere in nowhere', 'address 17', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(117, 'Somewhere in nowhere', 'address 17', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(118, 'Somewhere over the rainbow', 'address 18', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(118, 'Somewhere over the rainbow', 'address 18', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(119, 'Somewhere in Alberic', 'address 19', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(119, 'Somewhere in Alberic', 'address 19', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(120, 'Somewhere in Montortal', 'address 20', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
(120, 'Somewhere in Montortal', 'address 20', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||||
(121, 'the bat cave', 'address 21', 'Silla', 46460, 1, 1111111111, 222222222, 1, 101, 2, NULL, NULL, 0, 0),
|
(121, 'the bat cave', 'address 21', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 0),
|
||||||
(122, 'NY roofs', 'address 22', 'Silla', 46460, 1, 1111111111, 222222222, 1, 102, 2, NULL, NULL, 0, 0),
|
(122, 'NY roofs', 'address 22', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 0),
|
||||||
(123, 'The phone box', 'address 23', 'Silla', 46460, 1, 1111111111, 222222222, 1, 103, 2, NULL, NULL, 0, 0),
|
(123, 'The phone box', 'address 23', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 0),
|
||||||
(124, 'Stark tower Silla', 'address 24', 'Silla', 46460, 1, 1111111111, 222222222, 1, 104, 2, NULL, NULL, 0, 0),
|
(124, 'Stark tower Silla', 'address 24', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 0),
|
||||||
(125, 'The plastic cell', 'address 25', 'Silla', 46460, 1, 1111111111, 222222222, 1, 105, 2, NULL, NULL, 0, 0),
|
(125, 'The plastic cell', 'address 25', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 0),
|
||||||
(126, 'Many places', 'address 26', 'Silla', 46460, 1, 1111111111, 222222222, 1, 106, 2, NULL, NULL, 0, 0),
|
(126, 'Many places', 'address 26', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 0),
|
||||||
(127, 'Your pocket', 'address 27', 'Silla', 46460, 1, 1111111111, 222222222, 1, 107, 2, NULL, NULL, 0, 0),
|
(127, 'Your pocket', 'address 27', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 0),
|
||||||
(128, 'Cerebro', 'address 28', 'Silla', 46460, 1, 1111111111, 222222222, 1, 108, 2, NULL, NULL, 0, 0),
|
(128, 'Cerebro', 'address 28', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 0),
|
||||||
(129, 'Luke Cages Bar', 'address 29', 'Silla', 46460, 1, 1111111111, 222222222, 1, 110, 2, NULL, NULL, 0, 0),
|
(129, 'Luke Cages Bar', 'address 29', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 0),
|
||||||
(130, 'Non valid address', 'address 30', 'Silla', 46460, 1, 1111111111, 222222222, 0, 101, 2, NULL, NULL, 0, 0);
|
(130, 'Non valid address', 'address 30', 'Silla', 46460, 1, 1111111111, 222222222, 0, 1101, 2, NULL, NULL, 0, 0);
|
||||||
|
|
||||||
INSERT INTO `vn`.`address`( `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `isActive`, `clientFk`, `agencyModeFk`, `isDefaultAddress`)
|
INSERT INTO `vn`.`address`( `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `isActive`, `clientFk`, `agencyModeFk`, `isDefaultAddress`)
|
||||||
SELECT name, CONCAT(name, 'Street'), 'SILLA', 46460, 1, 1, id, 2, 1
|
SELECT name, CONCAT(name, 'Street'), 'SILLA', 46460, 1, 1, id, 2, 1
|
||||||
FROM `account`.`role` `r`
|
FROM `account`.`role` `r`
|
||||||
WHERE `r`.`hasLogin` = 1;
|
WHERE `r`.`hasLogin` = 1;
|
||||||
|
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 1 WHERE id = 101;
|
UPDATE `vn`.`client` SET defaultAddressFk = 1 WHERE id = 1101;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 2 WHERE id = 102;
|
UPDATE `vn`.`client` SET defaultAddressFk = 2 WHERE id = 1102;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 3 WHERE id = 103;
|
UPDATE `vn`.`client` SET defaultAddressFk = 3 WHERE id = 1103;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 4 WHERE id = 104;
|
UPDATE `vn`.`client` SET defaultAddressFk = 4 WHERE id = 1104;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 5 WHERE id = 105;
|
UPDATE `vn`.`client` SET defaultAddressFk = 5 WHERE id = 1105;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 6 WHERE id = 106;
|
UPDATE `vn`.`client` SET defaultAddressFk = 6 WHERE id = 1106;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 7 WHERE id = 107;
|
UPDATE `vn`.`client` SET defaultAddressFk = 7 WHERE id = 1107;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 8 WHERE id = 108;
|
UPDATE `vn`.`client` SET defaultAddressFk = 8 WHERE id = 1108;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 9 WHERE id = 109;
|
UPDATE `vn`.`client` SET defaultAddressFk = 9 WHERE id = 1109;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 10 WHERE id = 110;
|
UPDATE `vn`.`client` SET defaultAddressFk = 10 WHERE id = 1110;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 11 WHERE id = 200;
|
UPDATE `vn`.`client` SET defaultAddressFk = 11 WHERE id = 200;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 12 WHERE id = 400;
|
UPDATE `vn`.`client` SET defaultAddressFk = 12 WHERE id = 400;
|
||||||
|
|
||||||
|
@ -374,20 +374,20 @@ DROP TEMPORARY TABLE tmp.address;
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
|
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1 , 1101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(2 , 101, 5, 900, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
(2 , 1101, 5, 900, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||||
(3 , 101, 5, 800, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
(3 , 1101, 5, 800, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
||||||
(4 , 101, 5, 700, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
(4 , 1101, 5, 700, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
||||||
(5 , 101, 5, 600, DATE_ADD(CURDATE(), INTERVAL -5 MONTH)),
|
(5 , 1101, 5, 600, DATE_ADD(CURDATE(), INTERVAL -5 MONTH)),
|
||||||
(6 , 101, 5, 500, DATE_ADD(CURDATE(), INTERVAL -6 MONTH)),
|
(6 , 1101, 5, 500, DATE_ADD(CURDATE(), INTERVAL -6 MONTH)),
|
||||||
(7 , 101, 5, 400, DATE_ADD(CURDATE(), INTERVAL -7 MONTH)),
|
(7 , 1101, 5, 400, DATE_ADD(CURDATE(), INTERVAL -7 MONTH)),
|
||||||
(8 , 101, 9, 300, DATE_ADD(CURDATE(), INTERVAL -8 MONTH)),
|
(8 , 1101, 9, 300, DATE_ADD(CURDATE(), INTERVAL -8 MONTH)),
|
||||||
(9 , 101, 9, 200, DATE_ADD(CURDATE(), INTERVAL -9 MONTH)),
|
(9 , 1101, 9, 200, DATE_ADD(CURDATE(), INTERVAL -9 MONTH)),
|
||||||
(10, 101, 9, 100, DATE_ADD(CURDATE(), INTERVAL -10 MONTH)),
|
(10, 1101, 9, 100, DATE_ADD(CURDATE(), INTERVAL -10 MONTH)),
|
||||||
(11, 101, 9, 50 , DATE_ADD(CURDATE(), INTERVAL -11 MONTH)),
|
(11, 1101, 9, 50 , DATE_ADD(CURDATE(), INTERVAL -11 MONTH)),
|
||||||
(12, 102, 9, 800, CURDATE()),
|
(12, 1102, 9, 800, CURDATE()),
|
||||||
(14, 104, 9, 90 , CURDATE()),
|
(14, 1104, 9, 90 , CURDATE()),
|
||||||
(15, 105, 9, 90 , CURDATE());
|
(15, 1105, 9, 90 , CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
|
INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -397,16 +397,16 @@ INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientObservation`(`id`, `clientFk`, `workerFk`, `text`, `created`)
|
INSERT INTO `vn`.`clientObservation`(`id`, `clientFk`, `workerFk`, `text`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 101, 1, 'Madness, as you know, is like gravity, all it takes is a little push', CURDATE()),
|
(1, 1101, 1, 'Madness, as you know, is like gravity, all it takes is a little push', CURDATE()),
|
||||||
(2, 102, 1, 'With great power, comes great responsibility', CURDATE()),
|
(2, 1102, 1, 'With great power, comes great responsibility', CURDATE()),
|
||||||
(3, 103, 3, 'this is a job for Super-Man!', CURDATE()),
|
(3, 1103, 3, 'this is a job for Super-Man!', CURDATE()),
|
||||||
(4, 104, 3, 'yes... I am Iron-Man', CURDATE()),
|
(4, 1104, 3, 'yes... I am Iron-Man', CURDATE()),
|
||||||
(5, 105, 5, 'They do understand. Our mutant powers make us superior', CURDATE()),
|
(5, 1105, 5, 'They do understand. Our mutant powers make us superior', CURDATE()),
|
||||||
(6, 106, 5, 'My name is Legion, for we are many!', CURDATE()),
|
(6, 1106, 5, 'My name is Legion, for we are many!', CURDATE()),
|
||||||
(7, 107, 9, 'I think our first move should be calling the Avengers..', CURDATE()),
|
(7, 1107, 9, 'I think our first move should be calling the Avengers..', CURDATE()),
|
||||||
(8, 108, 9, 'Just because someone stumbles and loses their path, does not mean they are lost forever.', CURDATE()),
|
(8, 1108, 9, 'Just because someone stumbles and loses their path, does not mean they are lost forever.', CURDATE()),
|
||||||
(9, 109, 18, 'HULK SMASH! ...', CURDATE()),
|
(9, 1109, 18, 'HULK SMASH! ...', CURDATE()),
|
||||||
(10, 110, 18, 'They say everyone is born a hero. But if you let it, life will push you over the line until you are the villain.', CURDATE());
|
(10, 1110, 18, 'They say everyone is born a hero. But if you let it, life will push you over the line until you are the villain.', CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`observationType`(`id`,`description`, `code`)
|
INSERT INTO `vn`.`observationType`(`id`,`description`, `code`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -426,11 +426,11 @@ INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`desc
|
||||||
|
|
||||||
INSERT INTO `vn`.`creditClassification`(`id`, `client`, `dateStart`, `dateEnd`)
|
INSERT INTO `vn`.`creditClassification`(`id`, `client`, `dateStart`, `dateEnd`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 101, CURDATE(), CURDATE()),
|
(1, 1101, CURDATE(), CURDATE()),
|
||||||
(2, 102, CURDATE(), CURDATE()),
|
(2, 1102, CURDATE(), CURDATE()),
|
||||||
(3, 103, CURDATE(), CURDATE()),
|
(3, 1103, CURDATE(), CURDATE()),
|
||||||
(4, 104, CURDATE(), CURDATE()),
|
(4, 1104, CURDATE(), CURDATE()),
|
||||||
(5, 105, CURDATE(), CURDATE());
|
(5, 1105, CURDATE(), CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`creditInsurance`(`id`, `creditClassification`, `credit`, `creationDate`, `grade`)
|
INSERT INTO `vn`.`creditInsurance`(`id`, `creditClassification`, `credit`, `creationDate`, `grade`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -474,11 +474,11 @@ INSERT INTO `vn`.`invoiceOutSerial` (`code`, `description`, `isTaxed`, `taxAreaF
|
||||||
|
|
||||||
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`)
|
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'T', 1014.24, CURDATE(), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
(1, 'T', 1014.24, CURDATE(), 1101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
(2, 'T', 121.36, CURDATE(), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
(2, 'T', 121.36, CURDATE(), 1102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
(3, 'T', 8.88, CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
(3, 'T', 8.88, CURDATE(), 1103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
(4, 'T', 8.88, CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
(4, 'T', 8.88, CURDATE(), 1103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
(5, 'A', 8.88, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 103, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1);
|
(5, 'A', 8.88, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1103, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1);
|
||||||
|
|
||||||
UPDATE `vn`.`invoiceOut` SET ref = 'T1111111' WHERE id = 1;
|
UPDATE `vn`.`invoiceOut` SET ref = 'T1111111' WHERE id = 1;
|
||||||
UPDATE `vn`.`invoiceOut` SET ref = 'T2222222' WHERE id = 2;
|
UPDATE `vn`.`invoiceOut` SET ref = 'T2222222' WHERE id = 2;
|
||||||
|
@ -579,30 +579,30 @@ INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agen
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`)
|
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 3, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 'Bat cave', 121, 'T1111111', 0, 1, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1 , 3, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 121, 'T1111111', 0, 1, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(2 , 1, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T1111111', 0, 1, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(2 , 1, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T1111111', 0, 1, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(3 , 1, 7, 1, 6, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T2222222', 0, 3, 5, 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
(3 , 1, 7, 1, 6, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T2222222', 0, 3, 5, 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||||
(4 , 3, 2, 1, 2, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T3333333', 0, 9, 5, 1, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
(4 , 3, 2, 1, 2, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T3333333', 0, 9, 5, 1, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
||||||
(5 , 3, 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 104, 'Stark tower', 124, 'T4444444', 0, 10, 5, 1, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
(5 , 3, 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T4444444', 0, 10, 5, 1, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
||||||
(6 , 1, 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 'Mountain Drive Gotham', 1, 'A1111111', 0, 10, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(6 , 1, 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Mountain Drive Gotham', 1, 'A1111111', 0, 10, 5, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(7 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, CURDATE()),
|
(7 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(8 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 'Bat cave', 121, NULL, 0, 3, 5, 1, CURDATE()),
|
(8 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(9 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 'Stark tower', 124, NULL, 0, 3, 5, 1, CURDATE()),
|
(9 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(10, 1, 1, 5, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, CURDATE()),
|
(10, 1, 1, 5, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, CURDATE()),
|
||||||
(11, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 'NY roofs', 122, NULL, 0, 3, 5, 1, CURDATE()),
|
(11, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(12, 1, 1, 1, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 'Phone Box', 123, NULL, 0, 1, 5, 1, CURDATE()),
|
(12, 1, 1, 1, 1, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, CURDATE()),
|
||||||
(13, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 'Phone Box', 123, NULL, 0, 3, 5, 1, CURDATE()),
|
(13, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(14, 1, 2, 1, NULL, CURDATE(), CURDATE(), 104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, CURDATE()),
|
(14, 1, 2, 1, NULL, CURDATE(), CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, CURDATE()),
|
||||||
(15, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, CURDATE()),
|
(15, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(16, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, 5, 1, CURDATE()),
|
(16, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(17, 1, 7, 2, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, 5, 1, CURDATE()),
|
(17, 1, 7, 2, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, CURDATE()),
|
||||||
(18, 1, 4, 4, 4, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 'Cerebro', 128, NULL, 0, 12, 5, 1, CURDATE()),
|
(18, 1, 4, 4, 4, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, CURDATE()),
|
||||||
(19, 1, 5, 5, NULL, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, CURDATE()),
|
(19, 1, 5, 5, NULL, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, CURDATE()),
|
||||||
(20, 1, 5, 5, 3, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(20, 1, 5, 5, 3, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(21, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(21, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(22, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(22, NULL, 5, 5, 5, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(23, NULL, 8, 1, 7, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 'address 21', 121, NULL, 0, 5, 5, 1, CURDATE()),
|
(23, NULL, 8, 1, 7, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1101, 'address 21', 121, NULL, 0, 5, 5, 1, CURDATE()),
|
||||||
(24 ,NULL, 8, 1, 7, CURDATE(), CURDATE(), 101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, CURDATE());
|
(24 ,NULL, 8, 1, 7, CURDATE(), CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
|
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -682,18 +682,18 @@ INSERT INTO `vn`.`greugeType`(`id`, `name`, `code`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`greuge`(`id`, `clientFk`, `description`, `amount`, `shipped`, `created`, `greugeTypeFk`, `ticketFk`)
|
INSERT INTO `vn`.`greuge`(`id`, `clientFk`, `description`, `amount`, `shipped`, `created`, `greugeTypeFk`, `ticketFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 101, 'some diff charges', -19.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
|
(1, 1101, 'some diff charges', -19.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
|
||||||
(2, 101, 'more diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
|
(2, 1101, 'more diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
|
||||||
(3, 101, 'even more! diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
|
(3, 1101, 'even more! diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
|
||||||
(4, 101, 'insane diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
|
(4, 1101, 'insane diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
|
||||||
(5, 101, 'gargantuous diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
|
(5, 1101, 'gargantuous diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
|
||||||
(6, 101, 'diff charges', 88.30, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1),
|
(6, 1101, 'diff charges', 88.30, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1),
|
||||||
(7, 101, 'unaffordable diff charges', -39.12, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
|
(7, 1101, 'unaffordable diff charges', -39.12, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
|
||||||
(8, 101, 'some recovery charges', 29.35, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
|
(8, 1101, 'some recovery charges', 29.35, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
|
||||||
(9, 101, 'some manna charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
|
(9, 1101, 'some manna charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
|
||||||
(10, 101, 'some claim charges', 13.13, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
|
(10, 1101, 'some claim charges', 13.13, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
|
||||||
(11, 101, 'some heritage charges', -15.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
|
(11, 1101, 'some heritage charges', -15.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
|
||||||
(12, 101, 'some miscellaneous charges', 58.00, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1);
|
(12, 1101, 'some miscellaneous charges', 58.00, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`mandateType`(`id`, `name`)
|
INSERT INTO `vn`.`mandateType`(`id`, `name`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -703,7 +703,7 @@ INSERT INTO `vn`.`mandateType`(`id`, `name`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`mandate`(`id`, `clientFk`, `companyFk`, `code`, `created`, `mandateTypeFk`)
|
INSERT INTO `vn`.`mandate`(`id`, `clientFk`, `companyFk`, `code`, `created`, `mandateTypeFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 102, 442, '1-1', CURDATE(), 2);
|
(1, 1102, 442, '1-1', CURDATE(), 2);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemCategory`(`id`, `name`, `display`, `color`, `icon`, `code`)
|
INSERT INTO `vn`.`itemCategory`(`id`, `name`, `display`, `color`, `icon`, `code`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -780,25 +780,29 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`)
|
||||||
('SER', 'Services'),
|
('SER', 'Services'),
|
||||||
('VT', 'Sales');
|
('VT', 'Sales');
|
||||||
|
|
||||||
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`, `stars`, `family`)
|
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `subName`, `minPrice`, `stars`, `family`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '1', 1, NULL, 0, 1, 'VT'),
|
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '1', NULL, 0, 1, 'VT'),
|
||||||
(2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '2', 1, NULL, 0, 2, 'VT'),
|
(2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '2', NULL, 0, 2, 'VT'),
|
||||||
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '3', 1, NULL, 0, 5, 'VT'),
|
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '3', NULL, 0, 5, 'VT'),
|
||||||
(4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, '4', 2, NULL, 0, 3, 'VT'),
|
(4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, '4', NULL, 0, 3, 'VT'),
|
||||||
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '5', 2, NULL, 0, 3, 'VT'),
|
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '5', NULL, 0, 3, 'VT'),
|
||||||
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '6', 2, NULL, 0, 4, 'VT'),
|
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '6', NULL, 0, 4, 'VT'),
|
||||||
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '7', 2, NULL, 0, 4, 'VT'),
|
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '7', NULL, 0, 4, 'VT'),
|
||||||
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '8', 1, NULL, 0, 5, 'VT'),
|
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '8', NULL, 0, 5, 'VT'),
|
||||||
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '9', 1, NULL, 0, 4, 'VT'),
|
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '9', NULL, 0, 4, 'VT'),
|
||||||
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '10', 1, NULL, 0, 4, 'VT'),
|
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '10', NULL, 0, 4, 'VT'),
|
||||||
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, '11', 2, NULL, 0, 4, 'VT'),
|
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, '11', NULL, 0, 4, 'VT'),
|
||||||
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '12', 2, NULL, 0, 3, 'VT'),
|
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '12', NULL, 0, 3, 'VT'),
|
||||||
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '13', 2, NULL, 0, 2, 'VT'),
|
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '13', NULL, 0, 2, 'VT'),
|
||||||
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 4, 'VT'),
|
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', NULL, 0, 4, 'VT'),
|
||||||
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, 'EMB'),
|
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', NULL, 0, 0, 'EMB'),
|
||||||
(16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, 'EMB'),
|
(16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', NULL, 0, 0, 'EMB'),
|
||||||
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, 'VT');
|
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, '', NULL, 0, 0, 'VT');
|
||||||
|
|
||||||
|
-- Update the taxClass after insert of the items
|
||||||
|
UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2
|
||||||
|
WHERE `itemFk` IN(4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 71);
|
||||||
|
|
||||||
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
|
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1017,15 +1021,15 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelving` (`id`, `itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
|
INSERT INTO `vn`.`itemShelving` (`id`, `itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
('1', '2', 'GVC', 'A', '0', '1', '1', '1', '1', '1', '1', '106'),
|
('1', '2', 'GVC', 'A', '0', '1', '1', '1', '1', '1', '1', '1106'),
|
||||||
('2', '4', 'HEJ', 'A', '0', '2', '1', '1', '1', '1', '1', '106');
|
('2', '4', 'HEJ', 'A', '0', '2', '1', '1', '1', '1', '1', '1106');
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
('1', '1', '1', '', '106'),
|
('1', '1', '1', '', '1106'),
|
||||||
('2', '2', '5', '', '106'),
|
('2', '2', '5', '', '1106'),
|
||||||
('1', '7', '1', '', '106'),
|
('1', '7', '1', '', '1106'),
|
||||||
('2', '8', '5', '', '106');
|
('2', '8', '5', '', '1106');
|
||||||
|
|
||||||
INSERT INTO `vncontrol`.`accion`(`accion_id`, `accion`)
|
INSERT INTO `vncontrol`.`accion`(`accion_id`, `accion`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1056,8 +1060,8 @@ INSERT INTO `vn`.`itemPlacement`(`id`, `itemFk`, `warehouseFk`, `code`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`)
|
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 106, 5),
|
(1, 1106, 5),
|
||||||
(2, 106, 14);
|
(2, 1106, 14);
|
||||||
|
|
||||||
INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1065,11 +1069,11 @@ INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `priority`, `userFk`)
|
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `priority`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
('UXN', 1, 1, 106);
|
('UXN', 1, 1, 1106);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
|
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'UXN', 'A', 2, 12, 12, 12, 12, 12, 1, 106);
|
(1, 'UXN', 'A', 2, 12, 12, 12, 12, 12, 1, 1106);
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `level`)
|
INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `level`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1093,7 +1097,7 @@ INSERT INTO `vn`.`itemBotanical`(`itemFk`, `genusFk`, `specieFk`)
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
(2, 2, 2),
|
(2, 2, 2),
|
||||||
(3, 2, NULL),
|
(3, 2, NULL),
|
||||||
(4, NULL, NULL);
|
(4, 2, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`tag`(`id`, `code`, `name`, `isFree`, `isQuantitatif`, `sourceTable`, `unit`, `ediTypeFk`, `overwrite`)
|
INSERT INTO `vn`.`tag`(`id`, `code`, `name`, `isFree`, `isQuantitatif`, `sourceTable`, `unit`, `ediTypeFk`, `overwrite`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1231,18 +1235,18 @@ INSERT INTO `vn`.`itemLog` (`id`, `originFk`, `userFk`, `action`, `description`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`recovery`(`id`, `clientFk`, `started`, `finished`, `amount`, `period`)
|
INSERT INTO `vn`.`recovery`(`id`, `clientFk`, `started`, `finished`, `amount`, `period`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 101, DATE_ADD(CURDATE(),INTERVAL -7 MONTH), DATE_ADD(CURDATE(),INTERVAL -3 MONTH), 50, 7),
|
(1, 1101, DATE_ADD(CURDATE(),INTERVAL -7 MONTH), DATE_ADD(CURDATE(),INTERVAL -3 MONTH), 50, 7),
|
||||||
(2, 102, DATE_ADD(CURDATE(),INTERVAL -5 MONTH), CURDATE(), 100, 1),
|
(2, 1102, DATE_ADD(CURDATE(),INTERVAL -5 MONTH), CURDATE(), 100, 1),
|
||||||
(3, 102, CURDATE(), DATE_ADD(CURDATE(),INTERVAL 1 MONTH), 50, 7),
|
(3, 1102, CURDATE(), DATE_ADD(CURDATE(),INTERVAL 1 MONTH), 50, 7),
|
||||||
(4, 103, CURDATE(), NULL, 50, 7);
|
(4, 1103, CURDATE(), NULL, 50, 7);
|
||||||
|
|
||||||
INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
|
INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
|
||||||
VALUES
|
VALUES
|
||||||
(101, 1500),
|
(1101, 1500),
|
||||||
(102, 100),
|
(1102, 100),
|
||||||
(103, 1000),
|
(1103, 1000),
|
||||||
(104, 500),
|
(1104, 500),
|
||||||
(105, 5000);
|
(1105, 5000);
|
||||||
|
|
||||||
INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1311,10 +1315,10 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed
|
||||||
|
|
||||||
INSERT INTO `vn`.`claimRatio`(`clientFk`, `yearSale`, `claimAmount`, `claimingRate`, `priceIncreasing`, `packingRate`)
|
INSERT INTO `vn`.`claimRatio`(`clientFk`, `yearSale`, `claimAmount`, `claimingRate`, `priceIncreasing`, `packingRate`)
|
||||||
VALUES
|
VALUES
|
||||||
(101, 500, NULL, 0.00, 0.00, 1.00),
|
(1101, 500, NULL, 0.00, 0.00, 1.00),
|
||||||
(102, 1000, 2.00, 0.01, 0.05, 1.00),
|
(1102, 1000, 2.00, 0.01, 0.05, 1.00),
|
||||||
(103, 2000, 0.00, 0.00, 0.02, 1.00),
|
(1103, 2000, 0.00, 0.00, 0.02, 1.00),
|
||||||
(104, 2500, 150.00, 0.02, 0.10, 1.00);
|
(1104, 2500, 150.00, 0.02, 0.10, 1.00);
|
||||||
|
|
||||||
INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWaste`, `rate`)
|
INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWaste`, `rate`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1354,28 +1358,28 @@ INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`package
|
||||||
|
|
||||||
INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
|
INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 3, 1, 121, 442, NULL, 'TPV', 1,'155.89', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 3, 1, 121, 442, NULL, 'TPV', 1,'155.89', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(2, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 104, 3, 1, 124, 442, NULL, 'WEB', 1,'100.10', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(2, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1104, 3, 1, 124, 442, NULL, 'WEB', 1,'100.10', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(3, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 104, 1, 2, 124, 442, NULL, 'ANDROID', 1,'107.25', DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
(3, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 1, 2, 124, 442, NULL, 'ANDROID', 1,'107.25', DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||||
(4, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 104, 1, 2, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
(4, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 1, 2, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
||||||
(5, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 104, 1, 3, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
(5, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 1, 3, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH), DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
||||||
(6, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 101, 1, 3, 1, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(6, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 1, 3, 1, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
(7, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 2, 7, 1, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
|
(7, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1101, 2, 7, 1, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(8, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 2, 7, 121, 442, NULL, 'SALIX', 0,'123.53', CURDATE(), CURDATE(), CURDATE()),
|
(8, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1101, 2, 7, 121, 442, NULL, 'SALIX', 0,'123.53', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(9, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 2, 7, 124, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
|
(9, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1104, 2, 7, 124, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(10, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 3, 1, 2, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
|
(10, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1102, 3, 1, 2, 442, NULL, 'SALIX', 0,'10.01', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(11, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 2, 7, 122, 442, NULL, 'SALIX', 0,'60.90', CURDATE(), CURDATE(), CURDATE()),
|
(11, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1102, 2, 7, 122, 442, NULL, 'SALIX', 0,'60.90', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(12, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 3, 1, 3, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
(12, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1103, 3, 1, 3, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(13, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 1, 2, 123, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
(13, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1103, 1, 2, 123, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(14, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 1, 2, 4, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
(14, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1104, 1, 2, 4, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(15, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 1, 3, 125, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
(15, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1105, 1, 3, 125, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(16, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 2, 7, 126, 442, NULL, 'SALIX', 0,'155.89', CURDATE(), CURDATE(), CURDATE()),
|
(16, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1106, 2, 7, 126, 442, NULL, 'SALIX', 0,'155.89', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(17, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 107, 1, 4, 127, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
(17, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1107, 1, 4, 127, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(18, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 1, 4, 128, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
(18, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1108, 1, 4, 128, 442, NULL, 'SALIX', 0,'72.60', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(19, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 1, 5, 129, 442, NULL, 'SALIX', 0,'16.50', CURDATE(), CURDATE(), CURDATE()),
|
(19, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1109, 1, 5, 129, 442, NULL, 'SALIX', 0,'16.50', CURDATE(), CURDATE(), CURDATE()),
|
||||||
(20, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 101, 442, NULL, 'SALIX', 0,'21.45', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(20, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 1, 5, 101, 442, NULL, 'SALIX', 0,'21.45', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(21, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 102, 442, NULL, 'SALIX', 0,'0.00', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
(21, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 1, 5, 102, 442, NULL, 'SALIX', 0,'0.00', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(22, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 1, 5, 103, 442, NULL, 'SALIX', 0,'148.50', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH));
|
(22, DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 1, 5, 103, 442, NULL, 'SALIX', 0,'148.50', DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH));
|
||||||
|
|
||||||
INSERT INTO `hedera`.`orderRow`(`id`, `orderFk`, `itemFk`, `warehouseFk`, `shipment`, `amount`, `price`, `rate`, `created`, `saleFk`)
|
INSERT INTO `hedera`.`orderRow`(`id`, `orderFk`, `itemFk`, `warehouseFk`, `shipment`, `amount`, `price`, `rate`, `created`, `saleFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1604,15 +1608,15 @@ INSERT INTO `hedera`.`visitAccess`(`id`, `agentFk`, `stamp`)
|
||||||
|
|
||||||
INSERT INTO `hedera`.`visitUser`(`id`, `accessFk`, `userFk`, `stamp`)
|
INSERT INTO `hedera`.`visitUser`(`id`, `accessFk`, `userFk`, `stamp`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 101, CURDATE()),
|
(1, 1, 1101, CURDATE()),
|
||||||
(2, 2, 101, CURDATE()),
|
(2, 2, 1101, CURDATE()),
|
||||||
(3, 3, 101, CURDATE()),
|
(3, 3, 1101, CURDATE()),
|
||||||
(4, 4, 102, CURDATE()),
|
(4, 4, 1102, CURDATE()),
|
||||||
(5, 5, 102, CURDATE()),
|
(5, 5, 1102, CURDATE()),
|
||||||
(6, 6, 102, CURDATE()),
|
(6, 6, 1102, CURDATE()),
|
||||||
(7, 7, 103, CURDATE()),
|
(7, 7, 1103, CURDATE()),
|
||||||
(8, 8, 103, CURDATE()),
|
(8, 8, 1103, CURDATE()),
|
||||||
(9, 9, 103, CURDATE());
|
(9, 9, 1103, CURDATE());
|
||||||
|
|
||||||
INSERT INTO `hedera`.`userSession`(`created`, `lastUpdate`, `ssid`, `data`, `userVisitFk`)
|
INSERT INTO `hedera`.`userSession`(`created`, `lastUpdate`, `ssid`, `data`, `userVisitFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1628,10 +1632,10 @@ INSERT INTO `hedera`.`userSession`(`created`, `lastUpdate`, `ssid`, `data`, `use
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientContact`(`id`, `clientFk`, `name`, `phone`)
|
INSERT INTO `vn`.`clientContact`(`id`, `clientFk`, `name`, `phone`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 101, 'contact 1', 666777888),
|
(1, 1101, 'contact 1', 666777888),
|
||||||
(2, 101, 'contact 2', 111222333),
|
(2, 1101, 'contact 2', 111222333),
|
||||||
(3, 101, 'contact 3', 222333444),
|
(3, 1101, 'contact 3', 222333444),
|
||||||
(4, 102, 'contact 1', 876543219);
|
(4, 1102, 'contact 1', 876543219);
|
||||||
|
|
||||||
INSERT INTO `vn`.`workerManaExcluded`(`workerFk`)
|
INSERT INTO `vn`.`workerManaExcluded`(`workerFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1648,11 +1652,11 @@ call vn.manaSpellersRequery(18);
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientSample`(`id`, `clientFk`, `typeFk`, `created`, `workerFk`, `userFk`, `companyFk`)
|
INSERT INTO `vn`.`clientSample`(`id`, `clientFk`, `typeFk`, `created`, `workerFk`, `userFk`, `companyFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 101, 1, CURDATE(), 18, 18, 442),
|
(1, 1101, 1, CURDATE(), 18, 18, 442),
|
||||||
(2, 101, 1, CURDATE(), 18, 18, 442),
|
(2, 1101, 1, CURDATE(), 18, 18, 442),
|
||||||
(3, 101, 2, CURDATE(), 18, 18, 442),
|
(3, 1101, 2, CURDATE(), 18, 18, 442),
|
||||||
(4, 102, 2, CURDATE(), 18, 18, 567),
|
(4, 1102, 2, CURDATE(), 18, 18, 567),
|
||||||
(5, 102, 3, CURDATE(), 19, 19, 567);
|
(5, 1102, 3, CURDATE(), 19, 19, 567);
|
||||||
|
|
||||||
INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`)
|
INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1666,10 +1670,10 @@ INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created` )
|
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created` )
|
||||||
VALUES
|
VALUES
|
||||||
(1, CURDATE(), 1, 'observation one', 101, 18, 3, 0, CURDATE()),
|
(1, CURDATE(), 1, 'observation one', 1101, 18, 3, 0, CURDATE()),
|
||||||
(2, CURDATE(), 2, 'observation two', 101, 18, 3, 0, CURDATE()),
|
(2, CURDATE(), 2, 'observation two', 1101, 18, 3, 0, CURDATE()),
|
||||||
(3, CURDATE(), 3, 'observation three', 101, 18, 1, 1, CURDATE()),
|
(3, CURDATE(), 3, 'observation three', 1101, 18, 1, 1, CURDATE()),
|
||||||
(4, CURDATE(), 3, 'observation four', 104, 18, 5, 0, CURDATE());
|
(4, CURDATE(), 3, 'observation four', 1104, 18, 5, 0, CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
|
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1706,12 +1710,12 @@ INSERT INTO `hedera`.`tpvMerchant`(`id`, `description`, `companyFk`, `bankFk`, `
|
||||||
|
|
||||||
INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`)
|
INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
(1, 1, 1101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
||||||
(2, 1, 101, NULL, 1000, NULL, 'SIS0051', 'started', CURDATE()),
|
(2, 1, 1101, NULL, 1000, NULL, 'SIS0051', 'started', CURDATE()),
|
||||||
(3, 2, 101, NULL, 7268, NULL, NULL, 'ok', CURDATE()),
|
(3, 2, 1101, NULL, 7268, NULL, NULL, 'ok', CURDATE()),
|
||||||
(4, 2, 101, NULL, 4698, NULL, NULL, 'started', CURDATE()),
|
(4, 2, 1101, NULL, 4698, NULL, NULL, 'started', CURDATE()),
|
||||||
(5, 1, 104, NULL, 2000, NULL, 'SIS0043', 'ok', CURDATE()),
|
(5, 1, 1104, NULL, 2000, NULL, 'SIS0043', 'ok', CURDATE()),
|
||||||
(6, 2, 104, NULL, 4000, NULL, 'SIS0044', 'started', CURDATE());
|
(6, 2, 1104, NULL, 4000, NULL, 'SIS0044', 'started', CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1747,20 +1751,20 @@ INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`receipt`(`id`, `invoiceFk`, `amountPaid`, `amountUnpaid`, `payed`, `workerFk`, `bankFk`, `clientFk`, `created`, `companyFk`, `isConciliate`)
|
INSERT INTO `vn`.`receipt`(`id`, `invoiceFk`, `amountPaid`, `amountUnpaid`, `payed`, `workerFk`, `bankFk`, `clientFk`, `created`, `companyFk`, `isConciliate`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Cobro web', 100.50, 0.00, CURDATE(), 9, 1, 101, CURDATE(), 442, 1),
|
(1, 'Cobro web', 100.50, 0.00, CURDATE(), 9, 1, 1101, CURDATE(), 442, 1),
|
||||||
(2, 'Cobro web', 200.50, 0.00, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 9, 1, 101, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 442, 1),
|
(2, 'Cobro web', 200.50, 0.00, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 9, 1, 1101, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 442, 1),
|
||||||
(3, 'Cobro en efectivo', 300.00, 100.00, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 9, 1, 102, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 442, 0),
|
(3, 'Cobro en efectivo', 300.00, 100.00, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 9, 1, 1102, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 442, 0),
|
||||||
(4, 'Cobro en efectivo', 400.00, -50.00, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 9, 1, 103, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 442, 0);
|
(4, 'Cobro en efectivo', 400.00, -50.00, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 9, 1, 1103, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 442, 0);
|
||||||
|
|
||||||
INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
|
INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 9),
|
(1, 1, 9),
|
||||||
(2, 2, 18),
|
(2, 2, 18),
|
||||||
(3, 2, 19),
|
(3, 2, 19),
|
||||||
(4, 3, 101),
|
(4, 3, 1101),
|
||||||
(5, 3, 102),
|
(5, 3, 1102),
|
||||||
(6, 4, 103),
|
(6, 4, 1103),
|
||||||
(7, 4, 104);
|
(7, 4, 1104);
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1819,7 +1823,7 @@ UPDATE `postgresql`.`business_labour` bl
|
||||||
JOIN `postgresql`.`profile` pr ON pr.profile_id = b.client_id
|
JOIN `postgresql`.`profile` pr ON pr.profile_id = b.client_id
|
||||||
JOIN `postgresql`.`person` p ON p.person_id = pr.person_id
|
JOIN `postgresql`.`person` p ON p.person_id = pr.person_id
|
||||||
SET bl.`professional_category_id` = 31
|
SET bl.`professional_category_id` = 31
|
||||||
WHERE p.`Id_trabajador` = 110;
|
WHERE p.`Id_trabajador` = 1110;
|
||||||
|
|
||||||
UPDATE `postgresql`.`business_labour` bl
|
UPDATE `postgresql`.`business_labour` bl
|
||||||
SET bl.`department_id` = 43
|
SET bl.`department_id` = 43
|
||||||
|
@ -1832,8 +1836,8 @@ INSERT INTO `postgresql`.`media`(`media_id`, `media_type_id`, `value`, `sort`)
|
||||||
|
|
||||||
INSERT INTO `postgresql`.`profile_media`(`profile_media_id`, `profile_id`, `media_id`)
|
INSERT INTO `postgresql`.`profile_media`(`profile_media_id`, `profile_id`, `media_id`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 106, 1),
|
(1, 1106, 1),
|
||||||
(2, 107, 2);
|
(2, 1107, 2);
|
||||||
|
|
||||||
INSERT INTO `vn`.`workCenter` (`id`, `name`, `warehouseFk`)
|
INSERT INTO `vn`.`workCenter` (`id`, `name`, `warehouseFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1857,20 +1861,20 @@ INSERT INTO `postgresql`.`calendar_state` (`calendar_state_id`, `type`, `rgb`, `
|
||||||
|
|
||||||
INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id`, `date`)
|
INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id`, `date`)
|
||||||
VALUES
|
VALUES
|
||||||
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
|
(1106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
|
||||||
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
|
(1106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
|
||||||
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))),
|
(1106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))),
|
||||||
(106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
|
(1106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
|
||||||
(106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
|
(1106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
|
||||||
(106, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
|
(1106, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
|
||||||
(106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY))),
|
(1106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY))),
|
||||||
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
|
(1107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
|
||||||
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
|
(1107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
|
||||||
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))),
|
(1107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -12 DAY), DATE_ADD(CURDATE(), INTERVAL 12 DAY))),
|
||||||
(107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
|
(1107, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
|
||||||
(107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
|
(1107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
|
||||||
(107, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
|
(1107, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
|
||||||
(107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY)));
|
(1107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY)));
|
||||||
|
|
||||||
INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`)
|
INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1878,8 +1882,8 @@ INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`sharingClient`(`id`, `workerFk`, `started`, `ended`, `clientFk`)
|
INSERT INTO `vn`.`sharingClient`(`id`, `workerFk`, `started`, `ended`, `clientFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 19, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 101),
|
(1, 19, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 1101),
|
||||||
(2, 18, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 106);
|
(2, 18, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 1106);
|
||||||
|
|
||||||
INSERT INTO `vn`.`sharingCart`(`id`, `workerFk`, `started`, `ended`, `workerSubstitute`, `created`)
|
INSERT INTO `vn`.`sharingCart`(`id`, `workerFk`, `started`, `ended`, `workerSubstitute`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2138,10 +2142,10 @@ INSERT INTO `vn`.`zoneEvent`(`zoneFk`, `type`, `weekDays`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`)
|
INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`)
|
||||||
VALUES
|
VALUES
|
||||||
(106, CONCAT(CURDATE(), ' 07:00'), TRUE, 'in'),
|
(1106, CONCAT(CURDATE(), ' 07:00'), TRUE, 'in'),
|
||||||
(106, CONCAT(CURDATE(), ' 10:00'), TRUE, 'middle'),
|
(1106, CONCAT(CURDATE(), ' 10:00'), TRUE, 'middle'),
|
||||||
(106, CONCAT(CURDATE(), ' 10:10'), TRUE, 'middle'),
|
(1106, CONCAT(CURDATE(), ' 10:10'), TRUE, 'middle'),
|
||||||
(106, CONCAT(CURDATE(), ' 15:00'), TRUE, 'out');
|
(1106, CONCAT(CURDATE(), ' 15:00'), TRUE, 'out');
|
||||||
|
|
||||||
INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`, `code`)
|
INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`, `code`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2182,13 +2186,13 @@ INSERT INTO `vn`.`ticketDms`(`ticketFk`, `dmsFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientDms`(`clientFk`, `dmsFk`)
|
INSERT INTO `vn`.`clientDms`(`clientFk`, `dmsFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(104, 2),
|
(1104, 2),
|
||||||
(104, 3);
|
(1104, 3);
|
||||||
|
|
||||||
INSERT INTO `vn`.`workerDocument`(`id`, `worker`, `document`,`isReadableByWorker`)
|
INSERT INTO `vn`.`workerDocument`(`id`, `worker`, `document`,`isReadableByWorker`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 106, 4, TRUE),
|
(1, 1106, 4, TRUE),
|
||||||
(2, 107, 3, FALSE);
|
(2, 1107, 3, FALSE);
|
||||||
|
|
||||||
INSERT INTO `vn`.`device` (`sn`, `model`, `userFk`)
|
INSERT INTO `vn`.`device` (`sn`, `model`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,6 +40,7 @@ TABLES=(
|
||||||
vn
|
vn
|
||||||
alertLevel
|
alertLevel
|
||||||
bookingPlanner
|
bookingPlanner
|
||||||
|
businessType
|
||||||
cplusInvoiceType472
|
cplusInvoiceType472
|
||||||
cplusInvoiceType477
|
cplusInvoiceType477
|
||||||
cplusRectificationType
|
cplusRectificationType
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
SCHEMAS=(
|
SCHEMAS=(
|
||||||
account
|
account
|
||||||
bs
|
bs
|
||||||
|
bi
|
||||||
cache
|
cache
|
||||||
edi
|
edi
|
||||||
hedera
|
hedera
|
||||||
|
|
|
@ -10,7 +10,7 @@ describe('ticket ticketCalculateClon()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
shipped: today,
|
shipped: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
@ -59,7 +59,7 @@ describe('ticket ticketCalculateClon()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
shipped: today,
|
shipped: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
|
|
@ -10,7 +10,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
shipped: today,
|
shipped: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
@ -59,7 +59,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
shipped: today,
|
shipped: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
@ -109,7 +109,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
shipped: today,
|
shipped: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
@ -156,7 +156,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
shipped: today,
|
shipped: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
|
|
|
@ -9,7 +9,7 @@ xdescribe('ticket_componentMakeUpdate()', () => {
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
ticketId: 11,
|
ticketId: 11,
|
||||||
clientId: 102,
|
clientId: 1102,
|
||||||
agencyModeId: 2,
|
agencyModeId: 2,
|
||||||
addressId: 122,
|
addressId: 122,
|
||||||
zoneId: 3,
|
zoneId: 3,
|
||||||
|
@ -68,7 +68,7 @@ xdescribe('ticket_componentMakeUpdate()', () => {
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
ticketId: 11,
|
ticketId: 11,
|
||||||
clientId: 102,
|
clientId: 1102,
|
||||||
agencyModeId: 2,
|
agencyModeId: 2,
|
||||||
addressId: 122,
|
addressId: 122,
|
||||||
zoneId: 3,
|
zoneId: 3,
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('timeBusiness_calculateByUser()', () => {
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
workerID: 106,
|
workerID: 1106,
|
||||||
start: start,
|
start: start,
|
||||||
end: end
|
end: end
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@ describe('timeControl_calculateByUser()', () => {
|
||||||
`);
|
`);
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
workerID: 106,
|
workerID: 1106,
|
||||||
start: start,
|
start: start,
|
||||||
end: end
|
end: end
|
||||||
};
|
};
|
||||||
|
@ -71,7 +71,7 @@ describe('timeControl_calculateByUser()', () => {
|
||||||
tmp.timeBusinessCalculate
|
tmp.timeBusinessCalculate
|
||||||
`);
|
`);
|
||||||
|
|
||||||
const workerID = 107;
|
const workerID = 1107;
|
||||||
|
|
||||||
stmt = new ParameterizedSQL(`
|
stmt = new ParameterizedSQL(`
|
||||||
INSERT INTO vn.workerTimeControl(userFk, timed, manual, direction)
|
INSERT INTO vn.workerTimeControl(userFk, timed, manual, direction)
|
||||||
|
|
|
@ -6,7 +6,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
it(`should throw an error if the worker can't sign on that tablet`, async() => {
|
it(`should throw an error if the worker can't sign on that tablet`, async() => {
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
const workerId = 110;
|
const workerId = 1110;
|
||||||
const tabletId = 2;
|
const tabletId = 2;
|
||||||
let err;
|
let err;
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
@ -31,7 +31,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
it('should check that the worker can sign on that tablet', async() => {
|
it('should check that the worker can sign on that tablet', async() => {
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
const workerId = 110;
|
const workerId = 1110;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let err;
|
let err;
|
||||||
stmts.push('START TRANSACTION');
|
stmts.push('START TRANSACTION');
|
||||||
|
@ -55,7 +55,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
|
|
||||||
it('should throw an error if the worker with a special category has not finished the 9h break', async() => {
|
it('should throw an error if the worker with a special category has not finished the 9h break', async() => {
|
||||||
// dayBreak to 9h in postgresql.professional_category
|
// dayBreak to 9h in postgresql.professional_category
|
||||||
const workerId = 110;
|
const workerId = 1110;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -92,7 +92,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
|
|
||||||
it('should check f the worker with a special category has finished the 9h break', async() => {
|
it('should check f the worker with a special category has finished the 9h break', async() => {
|
||||||
// dayBreak to 9h in postgresql.professional_category
|
// dayBreak to 9h in postgresql.professional_category
|
||||||
const workerId = 110;
|
const workerId = 1110;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -127,7 +127,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker has not finished the 12h break', async() => {
|
it('should throw an error if the worker has not finished the 12h break', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -163,7 +163,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker has finished the 12h break', async() => {
|
it('should throw an error if the worker has finished the 12h break', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -198,7 +198,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker has odd entry records', async() => {
|
it('should throw an error if the worker has odd entry records', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -231,7 +231,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker try to sign on a holiday day', async() => {
|
it('should throw an error if the worker try to sign on a holiday day', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -274,7 +274,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker try to sign with your contract ended', async() => {
|
it('should throw an error if the worker try to sign with your contract ended', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -316,7 +316,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker has not finished the 36h weekly break', async() => {
|
it('should throw an error if the worker has not finished the 36h weekly break', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -377,7 +377,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check if the worker has finished the 36h weekly break', async() => {
|
it('should check if the worker has finished the 36h weekly break', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -423,7 +423,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the worker has not finished the 72h biweekly break', async() => {
|
it('should throw an error if the worker has not finished the 72h biweekly break', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
@ -505,7 +505,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check if the worker has finished the 72h biweekly break', async() => {
|
it('should check if the worker has finished the 72h biweekly break', async() => {
|
||||||
const workerId = 109;
|
const workerId = 1109;
|
||||||
const tabletId = 1;
|
const tabletId = 1;
|
||||||
let stmts = [];
|
let stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
|
|
@ -481,7 +481,7 @@ export default {
|
||||||
thirdTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(3) > vn-td:nth-child(1) > vn-check',
|
thirdTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(3) > vn-td:nth-child(1) > vn-check',
|
||||||
sixthTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(6) > vn-td:nth-child(1) > vn-check',
|
sixthTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(6) > vn-td:nth-child(1) > vn-check',
|
||||||
payoutButton: 'vn-ticket-index vn-button[icon="icon-recovery"]',
|
payoutButton: 'vn-ticket-index vn-button[icon="icon-recovery"]',
|
||||||
payoutCompany: '.vn-dialog vn-autocomplete[ng-model="$ctrl.receipt.companyFk"]',
|
payoutCompany: '.vn-dialog vn-autocomplete[ng-model="$ctrl.companyFk"]',
|
||||||
payoutBank: '.vn-dialog vn-autocomplete[ng-model="$ctrl.bankFk"]',
|
payoutBank: '.vn-dialog vn-autocomplete[ng-model="$ctrl.bankFk"]',
|
||||||
payoutDescription: 'vn-textfield[ng-model="$ctrl.receipt.description"]',
|
payoutDescription: 'vn-textfield[ng-model="$ctrl.receipt.description"]',
|
||||||
submitPayout: '.vn-dialog button[response="accept"]',
|
submitPayout: '.vn-dialog button[response="accept"]',
|
||||||
|
@ -572,11 +572,11 @@ export default {
|
||||||
firstSaleZoomedImage: 'body > div > div > img',
|
firstSaleZoomedImage: 'body > div > div > img',
|
||||||
firstSaleQuantity: 'vn-ticket-sale [ng-model="sale.quantity"]',
|
firstSaleQuantity: 'vn-ticket-sale [ng-model="sale.quantity"]',
|
||||||
firstSaleQuantityCell: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td-editable:nth-child(6)',
|
firstSaleQuantityCell: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td-editable:nth-child(6)',
|
||||||
firstSalePrice: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(9) > span',
|
firstSalePrice: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(8) > span',
|
||||||
firstSalePriceInput: '.vn-popover.shown input[ng-model="$ctrl.field"]',
|
firstSalePriceInput: '.vn-popover.shown input[ng-model="$ctrl.field"]',
|
||||||
firstSaleDiscount: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(10) > span',
|
firstSaleDiscount: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(9) > span',
|
||||||
firstSaleDiscountInput: '.vn-popover.shown [ng-model="$ctrl.field"]',
|
firstSaleDiscountInput: '.vn-popover.shown [ng-model="$ctrl.field"]',
|
||||||
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(11)',
|
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(10)',
|
||||||
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
|
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
|
||||||
firstSaleColour: 'vn-ticket-sale vn-tr:nth-child(1) vn-fetched-tags section',
|
firstSaleColour: 'vn-ticket-sale vn-tr:nth-child(1) vn-fetched-tags section',
|
||||||
firstSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(1) vn-check[ng-model="sale.checked"]',
|
firstSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(1) vn-check[ng-model="sale.checked"]',
|
||||||
|
|
|
@ -31,8 +31,7 @@ describe('Client Edit billing data path', () => {
|
||||||
expect(message.text).toContain('That payment method requires an IBAN');
|
expect(message.text).toContain('That payment method requires an IBAN');
|
||||||
});
|
});
|
||||||
|
|
||||||
// 2256: Windows (hidden mode): Entity code doesn't get the focus, '9999' is written in entity name.
|
it(`should create a new BIC code`, async() => {
|
||||||
xit(`should create a new BIC code`, async() => {
|
|
||||||
await page.waitToClick(selectors.clientBillingData.newBankEntityButton);
|
await page.waitToClick(selectors.clientBillingData.newBankEntityButton);
|
||||||
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
|
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
|
||||||
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
||||||
|
@ -44,7 +43,7 @@ describe('Client Edit billing data path', () => {
|
||||||
expect(newcode).toEqual('GTHMCT Gotham City Bank');
|
expect(newcode).toEqual('GTHMCT Gotham City Bank');
|
||||||
});
|
});
|
||||||
|
|
||||||
xit(`should confirm the IBAN pay method was sucessfully saved`, async() => {
|
it(`should confirm the IBAN pay method was sucessfully saved`, async() => {
|
||||||
const payMethod = await page.waitToGetProperty(selectors.clientBillingData.payMethod, 'value');
|
const payMethod = await page.waitToGetProperty(selectors.clientBillingData.payMethod, 'value');
|
||||||
|
|
||||||
expect(payMethod).toEqual('PayMethod with IBAN');
|
expect(payMethod).toEqual('PayMethod with IBAN');
|
||||||
|
|
|
@ -26,7 +26,7 @@ describe('Ticket Summary path', () => {
|
||||||
const result = await page.waitToGetProperty(selectors.ticketSummary.header, 'innerText');
|
const result = await page.waitToGetProperty(selectors.ticketSummary.header, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain(`Ticket #${ticketId}`);
|
expect(result).toContain(`Ticket #${ticketId}`);
|
||||||
expect(result).toContain('Bruce Banner (109)');
|
expect(result).toContain('Bruce Banner (1109)');
|
||||||
expect(result).toContain('Somewhere in Thailand');
|
expect(result).toContain('Somewhere in Thailand');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe('Ticket index payout path', () => {
|
||||||
|
|
||||||
it('should search for tickets of the same client then open the payout form', async() => {
|
it('should search for tickets of the same client then open the payout form', async() => {
|
||||||
await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton);
|
||||||
await page.write(selectors.ticketsIndex.advancedSearchClient, '101');
|
await page.write(selectors.ticketsIndex.advancedSearchClient, '1101');
|
||||||
await page.keyboard.press('Enter');
|
await page.keyboard.press('Enter');
|
||||||
await page.waitForNumberOfElements(selectors.ticketsIndex.anySearchResult, 6);
|
await page.waitForNumberOfElements(selectors.ticketsIndex.anySearchResult, 6);
|
||||||
await page.waitToClick(selectors.ticketsIndex.firstTicketCheckbox);
|
await page.waitToClick(selectors.ticketsIndex.firstTicketCheckbox);
|
||||||
|
@ -56,7 +56,7 @@ describe('Ticket index payout path', () => {
|
||||||
it('should navigate to the client balance section and check a new balance line was entered', async() => {
|
it('should navigate to the client balance section and check a new balance line was entered', async() => {
|
||||||
await page.waitToClick(selectors.globalItems.homeButton);
|
await page.waitToClick(selectors.globalItems.homeButton);
|
||||||
await page.selectModule('client');
|
await page.selectModule('client');
|
||||||
await page.accessToSearchResult('101');
|
await page.accessToSearchResult('1101');
|
||||||
await page.accessToSection('client.card.balance.index');
|
await page.accessToSection('client.card.balance.index');
|
||||||
await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr');
|
await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr');
|
||||||
let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr');
|
let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr');
|
||||||
|
|
|
@ -89,7 +89,7 @@ describe('Order edit basic data path', () => {
|
||||||
const result = await page
|
const result = await page
|
||||||
.waitToGetProperty(selectors.orderBasicData.client, 'value');
|
.waitToGetProperty(selectors.orderBasicData.client, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('104: Tony Stark');
|
expect(result).toEqual('1104: Tony Stark');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now confirm the agency have been edited', async() => {
|
it('should now confirm the agency have been edited', async() => {
|
||||||
|
|
|
@ -97,7 +97,6 @@ vn-table {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
&[vn-fetched-tags] {
|
&[vn-fetched-tags] {
|
||||||
width: 235px;
|
|
||||||
min-width: 155px;
|
min-width: 155px;
|
||||||
& > vn-one {
|
& > vn-one {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -1,8 +1,157 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "salix-front",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@uirouter/angularjs": "^1.0.20",
|
||||||
|
"angular": "^1.7.5",
|
||||||
|
"angular-animate": "^1.7.8",
|
||||||
|
"angular-translate": "^2.18.1",
|
||||||
|
"angular-translate-loader-partial": "^2.18.1",
|
||||||
|
"js-yaml": "^3.13.1",
|
||||||
|
"mg-crud": "^1.1.2",
|
||||||
|
"oclazyload": "^0.6.3",
|
||||||
|
"require-yaml": "0.0.1",
|
||||||
|
"validator": "^6.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@uirouter/angularjs": {
|
||||||
|
"version": "1.0.29",
|
||||||
|
"resolved": "https://registry.npmjs.org/@uirouter/angularjs/-/angularjs-1.0.29.tgz",
|
||||||
|
"integrity": "sha512-RImWnBarNixkMto0o8stEaGwZmvhv5cnuOLXyMU2pY8MP2rgEF74ZNJTLeJCW14LR7XDUxVH8Mk8bPI6lxedmQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@uirouter/core": "6.0.7"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@uirouter/core": {
|
||||||
|
"version": "6.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@uirouter/core/-/core-6.0.7.tgz",
|
||||||
|
"integrity": "sha512-KUTJxL+6q0PiBnFx4/Z+Hsyg0pSGiaW5yZQeJmUxknecjpTbnXkLU8H2EqRn9N2B+qDRa7Jg8RcgeNDPY72O1w==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/angular": {
|
||||||
|
"version": "1.8.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular/-/angular-1.8.2.tgz",
|
||||||
|
"integrity": "sha512-IauMOej2xEe7/7Ennahkbb5qd/HFADiNuLSESz9Q27inmi32zB0lnAsFeLEWcox3Gd1F6YhNd1CP7/9IukJ0Gw=="
|
||||||
|
},
|
||||||
|
"node_modules/angular-animate": {
|
||||||
|
"version": "1.8.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.8.2.tgz",
|
||||||
|
"integrity": "sha512-Jbr9+grNMs9Kj57xuBU3Ju3NOPAjS1+g2UAwwDv7su1lt0/PLDy+9zEwDiu8C8xJceoTbmBNKiWGPJGBdCQLlA=="
|
||||||
|
},
|
||||||
|
"node_modules/angular-translate": {
|
||||||
|
"version": "2.18.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular-translate/-/angular-translate-2.18.4.tgz",
|
||||||
|
"integrity": "sha512-KohNrkH6J9PK+VW0L/nsRTcg5Fw70Ajwwe3Jbfm54Pf9u9Fd+wuingoKv+h45mKf38eT+Ouu51FPua8VmZNoCw==",
|
||||||
|
"dependencies": {
|
||||||
|
"angular": "^1.8.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/angular-translate-loader-partial": {
|
||||||
|
"version": "2.18.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular-translate-loader-partial/-/angular-translate-loader-partial-2.18.4.tgz",
|
||||||
|
"integrity": "sha512-bsjR+FbB0sdA2528E/ugwKdlPPQhA1looxLxI3otayBTFXBpED33besfSZhYAISLgNMSL038vSssfRUen9qD8w==",
|
||||||
|
"dependencies": {
|
||||||
|
"angular-translate": "~2.18.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"dependencies": {
|
||||||
|
"sprintf-js": "~1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||||
|
"bin": {
|
||||||
|
"esparse": "bin/esparse.js",
|
||||||
|
"esvalidate": "bin/esvalidate.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/js-yaml": {
|
||||||
|
"version": "3.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||||
|
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
||||||
|
"dependencies": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"js-yaml": "bin/js-yaml.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mg-crud": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/mg-crud/-/mg-crud-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-p6AWGzWSPK7/8ZpIBpS2V1vDggw=",
|
||||||
|
"dependencies": {
|
||||||
|
"angular": "^1.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/oclazyload": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/oclazyload/-/oclazyload-0.6.3.tgz",
|
||||||
|
"integrity": "sha1-Kjirv/QJDAihEBZxkZRbWfLoJ5w="
|
||||||
|
},
|
||||||
|
"node_modules/require-yaml": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/require-yaml/-/require-yaml-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-LhsY2RPDuqcqWk03O28Tjd0sMr0=",
|
||||||
|
"dependencies": {
|
||||||
|
"js-yaml": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/require-yaml/node_modules/argparse": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||||
|
},
|
||||||
|
"node_modules/require-yaml/node_modules/js-yaml": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"argparse": "^2.0.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"js-yaml": "bin/js-yaml.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||||
|
},
|
||||||
|
"node_modules/validator": {
|
||||||
|
"version": "6.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/validator/-/validator-6.3.0.tgz",
|
||||||
|
"integrity": "sha1-R84j7Y1Ord+p1LjvAHG2zxB418g=",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uirouter/angularjs": {
|
"@uirouter/angularjs": {
|
||||||
"version": "1.0.29",
|
"version": "1.0.29",
|
||||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('TicketDms removeFile()', () => {
|
describe('TicketDms removeFile()', () => {
|
||||||
const ticketDmsId = 1;
|
const ticketDmsId = 1;
|
||||||
it(`should return an error for a user without enough privileges`, async() => {
|
it(`should return an error for a user without enough privileges`, async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let ctx = {req: {accessToken: {userId: clientId}}};
|
let ctx = {req: {accessToken: {userId: clientId}}};
|
||||||
|
|
||||||
let error;
|
let error;
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('Update Claim', () => {
|
||||||
const newDate = new Date();
|
const newDate = new Date();
|
||||||
const originalData = {
|
const originalData = {
|
||||||
ticketFk: 3,
|
ticketFk: 3,
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
ticketCreated: newDate,
|
ticketCreated: newDate,
|
||||||
workerFk: 18,
|
workerFk: 18,
|
||||||
claimStateFk: 2,
|
claimStateFk: 2,
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('Update Claim', () => {
|
||||||
const newDate = new Date();
|
const newDate = new Date();
|
||||||
const original = {
|
const original = {
|
||||||
ticketFk: 3,
|
ticketFk: 3,
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
ticketCreated: newDate,
|
ticketCreated: newDate,
|
||||||
workerFk: 18,
|
workerFk: 18,
|
||||||
claimStateFk: 2,
|
claimStateFk: 2,
|
||||||
|
|
|
@ -148,7 +148,7 @@ describe('claim', () => {
|
||||||
return resolve(true);
|
return resolve(true);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
controller.claim.clientFk = 101;
|
controller.claim.clientFk = 1101;
|
||||||
controller.claim.id = 11;
|
controller.claim.id = 11;
|
||||||
|
|
||||||
controller.onUpdateGreugeAccept().then(() => {
|
controller.onUpdateGreugeAccept().then(() => {
|
||||||
|
@ -166,7 +166,7 @@ describe('claim', () => {
|
||||||
const freightPickUpPrice = 11;
|
const freightPickUpPrice = 11;
|
||||||
const greugeTypeId = 7;
|
const greugeTypeId = 7;
|
||||||
const expectedData = {
|
const expectedData = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
description: `claim: ${controller.claim.id}`,
|
description: `claim: ${controller.claim.id}`,
|
||||||
amount: freightPickUpPrice,
|
amount: freightPickUpPrice,
|
||||||
greugeTypeFk: greugeTypeId,
|
greugeTypeFk: greugeTypeId,
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe('Item Component vnClaimDescriptor', () => {
|
||||||
|
|
||||||
const claim = {
|
const claim = {
|
||||||
id: 2,
|
id: 2,
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
client: {email: 'client@email'}
|
client: {email: 'client@email'}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('Claim', () => {
|
||||||
controller.$.model = crudModel;
|
controller.$.model = crudModel;
|
||||||
controller.claim = {
|
controller.claim = {
|
||||||
id: 1,
|
id: 1,
|
||||||
client: {id: 101, name: 'Bruce Wayne'}
|
client: {id: 1101, name: 'Bruce Wayne'}
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('ClientDms removeFile()', () => {
|
describe('ClientDms removeFile()', () => {
|
||||||
const clientDmsFk = 3;
|
const clientDmsFk = 3;
|
||||||
it(`should return an error for a user without enough privileges`, async() => {
|
it(`should return an error for a user without enough privileges`, async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let ctx = {req: {accessToken: {userId: clientId}}};
|
let ctx = {req: {accessToken: {userId: clientId}}};
|
||||||
|
|
||||||
let error;
|
let error;
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
module.exports = function(Self) {
|
|
||||||
Self.remoteMethod('listWorkers', {
|
|
||||||
description: 'List workers',
|
|
||||||
accessType: 'READ',
|
|
||||||
returns: {
|
|
||||||
arg: 'data',
|
|
||||||
type: 'Worker',
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/listWorkers`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.listWorkers = function() {
|
|
||||||
let query =
|
|
||||||
`SELECT w.id,
|
|
||||||
CONCAT(w.firstName, IFNULL(CONCAT(" ", w.lastName), "")) \`name\`
|
|
||||||
FROM worker w
|
|
||||||
JOIN account.user u ON w.userFk = u.id
|
|
||||||
JOIN account.roleRole rr ON rr.role = u.role
|
|
||||||
JOIN account.role r ON r.id = rr.inheritsFrom
|
|
||||||
WHERE u.active
|
|
||||||
AND r.\`name\` = 'employee'
|
|
||||||
ORDER BY w.lastName ASC`;
|
|
||||||
|
|
||||||
return Self.rawSql(query);
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -3,20 +3,20 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('Client addressesPropagateRe', () => {
|
describe('Client addressesPropagateRe', () => {
|
||||||
let client;
|
let client;
|
||||||
beforeEach(async() => {
|
beforeEach(async() => {
|
||||||
client = await app.models.Client.findById(101);
|
client = await app.models.Client.findById(1101);
|
||||||
await app.models.Address.update({clientFk: 101}, {isEqualizated: false});
|
await app.models.Address.update({clientFk: 1101}, {isEqualizated: false});
|
||||||
await client.updateAttributes({hasToInvoiceByAddress: true});
|
await client.updateAttributes({hasToInvoiceByAddress: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async done => {
|
afterAll(async done => {
|
||||||
await app.models.Address.update({clientFk: 101}, {isEqualizated: false});
|
await app.models.Address.update({clientFk: 1101}, {isEqualizated: false});
|
||||||
await client.updateAttributes({hasToInvoiceByAddress: true});
|
await client.updateAttributes({hasToInvoiceByAddress: true});
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should propagate the isEqualizated on both addresses of Mr Wayne and set hasToInvoiceByAddress to false', async() => {
|
it('should propagate the isEqualizated on both addresses of Mr Wayne and set hasToInvoiceByAddress to false', async() => {
|
||||||
let id = 101;
|
let id = 1101;
|
||||||
let data = {
|
let data = {
|
||||||
isEqualizated: true
|
isEqualizated: true
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,14 +2,14 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client canCreateTicket', () => {
|
describe('Client canCreateTicket', () => {
|
||||||
it('should receive true if the client is active', async() => {
|
it('should receive true if the client is active', async() => {
|
||||||
let id = 105;
|
let id = 1105;
|
||||||
let canCreateTicket = await app.models.Client.canCreateTicket(id);
|
let canCreateTicket = await app.models.Client.canCreateTicket(id);
|
||||||
|
|
||||||
expect(canCreateTicket).toBeTruthy();
|
expect(canCreateTicket).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should receive false if the client isn't active`, async() => {
|
it(`should receive false if the client isn't active`, async() => {
|
||||||
let id = 106;
|
let id = 1106;
|
||||||
let canCreateTicket = await app.models.Client.canCreateTicket(id);
|
let canCreateTicket = await app.models.Client.canCreateTicket(id);
|
||||||
|
|
||||||
expect(canCreateTicket).toBe(false);
|
expect(canCreateTicket).toBe(false);
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe('client consumption() filter', () => {
|
||||||
const ctx = {req: {accessToken: {userId: 9}}, args: {}};
|
const ctx = {req: {accessToken: {userId: 9}}, args: {}};
|
||||||
const filter = {
|
const filter = {
|
||||||
where: {
|
where: {
|
||||||
clientFk: 101
|
clientFk: 1101
|
||||||
},
|
},
|
||||||
order: 'itemTypeFk, itemName, itemSize'
|
order: 'itemTypeFk, itemName, itemSize'
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@ describe('client consumption() filter', () => {
|
||||||
};
|
};
|
||||||
const filter = {
|
const filter = {
|
||||||
where: {
|
where: {
|
||||||
clientFk: 101
|
clientFk: 1101
|
||||||
},
|
},
|
||||||
order: 'itemFk'
|
order: 'itemFk'
|
||||||
};
|
};
|
||||||
|
@ -46,7 +46,7 @@ describe('client consumption() filter', () => {
|
||||||
};
|
};
|
||||||
const filter = {
|
const filter = {
|
||||||
where: {
|
where: {
|
||||||
clientFk: 101
|
clientFk: 1101
|
||||||
},
|
},
|
||||||
order: 'itemTypeFk, itemName, itemSize'
|
order: 'itemTypeFk, itemName, itemSize'
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Address createAddress', () => {
|
describe('Address createAddress', () => {
|
||||||
const clientFk = 101;
|
const clientFk = 1101;
|
||||||
const provinceFk = 5;
|
const provinceFk = 5;
|
||||||
const incotermsFk = 'FAS';
|
const incotermsFk = 'FAS';
|
||||||
const customAgentOneId = 1;
|
const customAgentOneId = 1;
|
||||||
|
@ -59,7 +59,7 @@ describe('Address createAddress', () => {
|
||||||
it('should create a new address and set as a client default address', async() => {
|
it('should create a new address and set as a client default address', async() => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
provinceFk: 1,
|
provinceFk: 1,
|
||||||
nickname: 'My address',
|
nickname: 'My address',
|
||||||
street: 'Wall Street',
|
street: 'Wall Street',
|
||||||
|
@ -87,7 +87,7 @@ describe('Address createAddress', () => {
|
||||||
it('should create a new address and set all properties', async() => {
|
it('should create a new address and set all properties', async() => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
provinceFk: 1,
|
provinceFk: 1,
|
||||||
nickname: 'My address',
|
nickname: 'My address',
|
||||||
street: 'Wall Street',
|
street: 'Wall Street',
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
const LoopBackContext = require('loopback-context');
|
const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
describe('Client createReceipt', () => {
|
describe('Client createReceipt', () => {
|
||||||
const clientFk = 108;
|
const clientFk = 1108;
|
||||||
const payed = Date();
|
const payed = Date();
|
||||||
const companyFk = 442;
|
const companyFk = 442;
|
||||||
const amountPaid = 12.50;
|
const amountPaid = 12.50;
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('client getAverageInvoiced()', () => {
|
describe('client getAverageInvoiced()', () => {
|
||||||
it('should call the getAverageInvoiced method', async() => {
|
it('should call the getAverageInvoiced method', async() => {
|
||||||
const {invoiced} = await app.models.Client.getAverageInvoiced(101);
|
const {invoiced} = await app.models.Client.getAverageInvoiced(1101);
|
||||||
|
|
||||||
expect(invoiced).toEqual(1500);
|
expect(invoiced).toEqual(1500);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client get', () => {
|
describe('Client getCard()', () => {
|
||||||
it('should receive a formated card of Bruce Wayne', async() => {
|
it('should receive a formated card of Bruce Wayne', async() => {
|
||||||
let id = 101;
|
let id = 1101;
|
||||||
let result = await app.models.Client.getCard(id);
|
let result = await app.models.Client.getCard(id);
|
||||||
|
|
||||||
expect(result.id).toEqual(101);
|
expect(result.id).toEqual(id);
|
||||||
expect(result.name).toEqual('Bruce Wayne');
|
expect(result.name).toEqual('Bruce Wayne');
|
||||||
expect(result.debt).toEqual(887.38);
|
expect(result.debt).toEqual(jasmine.any(Number));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,9 +2,9 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('client getDebt()', () => {
|
describe('client getDebt()', () => {
|
||||||
it('should return the client debt', async() => {
|
it('should return the client debt', async() => {
|
||||||
let result = await app.models.Client.getDebt(101);
|
let result = await app.models.Client.getDebt(1101);
|
||||||
|
|
||||||
expect(result.debt).toEqual(887.38);
|
expect(result.debt).toEqual(jasmine.any(Number));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('client getMana()', () => {
|
describe('client getMana()', () => {
|
||||||
it('should call the getMana method', async() => {
|
it('should call the getMana method', async() => {
|
||||||
let result = await app.models.Client.getMana(105);
|
let result = await app.models.Client.getMana(1105);
|
||||||
|
|
||||||
expect(result.mana).toEqual(0.34);
|
expect(result.mana).toEqual(0.34);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client getTransations', () => {
|
describe('Client getTransations', () => {
|
||||||
it('should call getTransations() method to receive a list of Web Payments from Bruce Wayne', async() => {
|
it('should call getTransations() method to receive a list of Web Payments from Bruce Wayne', async() => {
|
||||||
let filter = {where: {clientFk: 101}};
|
let filter = {where: {clientFk: 1101}};
|
||||||
let result = await app.models.Client.getTransactions(filter);
|
let result = await app.models.Client.getTransactions(filter);
|
||||||
|
|
||||||
expect(result[1].id).toBeTruthy();
|
expect(result[1].id).toBeTruthy();
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client hasCustomerRole', () => {
|
describe('Client hasCustomerRole', () => {
|
||||||
it('should call the hasCustomerRole() method with a customer id', done => {
|
it('should call the hasCustomerRole() method with a customer id', done => {
|
||||||
let id = 101;
|
let id = 1101;
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
let callback = (error, result) => {
|
let callback = (error, result) => {
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client isValidClient', () => {
|
describe('Client isValidClient', () => {
|
||||||
it('should call the isValidClient() method with a client id and receive true', async() => {
|
it('should call the isValidClient() method with a client id and receive true', async() => {
|
||||||
let id = 101;
|
let id = 1101;
|
||||||
let result = await app.models.Client.isValidClient(id);
|
let result = await app.models.Client.isValidClient(id);
|
||||||
|
|
||||||
expect(result).toBeTruthy();
|
expect(result).toBeTruthy();
|
||||||
|
@ -30,7 +30,7 @@ describe('Client isValidClient', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call the isValidClient() method with a customer id which isnt active and return false', async() => {
|
it('should call the isValidClient() method with a customer id which isnt active and return false', async() => {
|
||||||
let id = '106';
|
let id = '1106';
|
||||||
let result = await app.models.Client.isValidClient(id);
|
let result = await app.models.Client.isValidClient(id);
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('Client last active tickets', () => {
|
describe('Client last active tickets', () => {
|
||||||
it('should receive an array of last active tickets of Bruce Wayne', async() => {
|
it('should receive an array of last active tickets of Bruce Wayne', async() => {
|
||||||
const ticketId = 22;
|
const ticketId = 22;
|
||||||
const clientId = 109;
|
const clientId = 1109;
|
||||||
const warehouseId = 5;
|
const warehouseId = 5;
|
||||||
const result = await app.models.Client.lastActiveTickets(clientId, ticketId, warehouseId);
|
const result = await app.models.Client.lastActiveTickets(clientId, ticketId, warehouseId);
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
const app = require('vn-loopback/server/server');
|
|
||||||
|
|
||||||
describe('Client listWorkers', () => {
|
|
||||||
it('should call the listWorkers()', done => {
|
|
||||||
app.models.Client.listWorkers()
|
|
||||||
.then(result => {
|
|
||||||
let amountOfEmployees = Object.keys(result).length;
|
|
||||||
|
|
||||||
expect(amountOfEmployees).toEqual(54);
|
|
||||||
done();
|
|
||||||
})
|
|
||||||
.catch(done.fail);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -13,7 +13,7 @@ describe('client sendSms()', () => {
|
||||||
it('should now send a message and log it', async() => {
|
it('should now send a message and log it', async() => {
|
||||||
spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
|
spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
|
||||||
let ctx = {req: {accessToken: {userId: 9}}};
|
let ctx = {req: {accessToken: {userId: 9}}};
|
||||||
let id = 101;
|
let id = 1101;
|
||||||
let destination = 222222222;
|
let destination = 222222222;
|
||||||
let message = 'this is the message created in a test';
|
let message = 'this is the message created in a test';
|
||||||
|
|
||||||
|
|
|
@ -2,44 +2,44 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('client summary()', () => {
|
describe('client summary()', () => {
|
||||||
it('should return a summary object containing data', async() => {
|
it('should return a summary object containing data', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(1101);
|
||||||
|
|
||||||
expect(result.id).toEqual(101);
|
expect(result.id).toEqual(1101);
|
||||||
expect(result.name).toEqual('Bruce Wayne');
|
expect(result.name).toEqual('Bruce Wayne');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing mana', async() => {
|
it('should return a summary object containing mana', async() => {
|
||||||
let result = await app.models.Client.summary(105);
|
let result = await app.models.Client.summary(1105);
|
||||||
|
|
||||||
expect(result.mana.mana).toEqual(0.34);
|
expect(result.mana.mana).toEqual(0.34);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing debt', async() => {
|
it('should return a summary object containing debt', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(1101);
|
||||||
|
|
||||||
expect(result.debt.debt).toEqual(887.38);
|
expect(result.debt.debt).toEqual(jasmine.any(Number));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing averageInvoiced', async() => {
|
it('should return a summary object containing averageInvoiced', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(1101);
|
||||||
|
|
||||||
expect(result.averageInvoiced.invoiced).toEqual(1500);
|
expect(result.averageInvoiced.invoiced).toEqual(1500);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing totalGreuge', async() => {
|
it('should return a summary object containing totalGreuge', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(1101);
|
||||||
|
|
||||||
expect(result.totalGreuge).toEqual(203.71);
|
expect(result.totalGreuge).toEqual(203.71);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object without containing active recoveries', async() => {
|
it('should return a summary object without containing active recoveries', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(1101);
|
||||||
|
|
||||||
expect(result.recovery).toEqual(null);
|
expect(result.recovery).toEqual(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing active recoveries', async() => {
|
it('should return a summary object containing active recoveries', async() => {
|
||||||
let result = await app.models.Client.summary(102);
|
let result = await app.models.Client.summary(1102);
|
||||||
|
|
||||||
expect(result.recovery.id).toEqual(3);
|
expect(result.recovery.id).toEqual(3);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('client lastActiveTickets()', () => {
|
describe('client lastActiveTickets()', () => {
|
||||||
it('should return the last three active tickets', async() => {
|
it('should return the last three active tickets', async() => {
|
||||||
const clientId = 109;
|
const clientId = 1109;
|
||||||
const ticketId = 19;
|
const ticketId = 19;
|
||||||
|
|
||||||
let result = await app.models.Client.lastActiveTickets(clientId, ticketId);
|
let result = await app.models.Client.lastActiveTickets(clientId, ticketId);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Address updateAddress', () => {
|
describe('Address updateAddress', () => {
|
||||||
const clientId = 101;
|
const clientId = 1101;
|
||||||
const addressId = 1;
|
const addressId = 1;
|
||||||
const provinceId = 5;
|
const provinceId = 5;
|
||||||
const incotermsId = 'FAS';
|
const incotermsId = 'FAS';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client updateFiscalData', () => {
|
describe('Client updateFiscalData', () => {
|
||||||
const clientId = 101;
|
const clientId = 1101;
|
||||||
const employeeId = 1;
|
const employeeId = 1;
|
||||||
const salesAssistantId = 21;
|
const salesAssistantId = 21;
|
||||||
const administrativeId = 5;
|
const administrativeId = 5;
|
||||||
|
|
|
@ -2,8 +2,8 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client uploadFile()', () => {
|
describe('Client uploadFile()', () => {
|
||||||
it(`should return an error for a user without enough privileges`, async() => {
|
it(`should return an error for a user without enough privileges`, async() => {
|
||||||
let clientId = 101;
|
let clientId = 1101;
|
||||||
let currentUserId = 102;
|
let currentUserId = 1102;
|
||||||
let paymentLawTypeId = 12;
|
let paymentLawTypeId = 12;
|
||||||
let ctx = {req: {accessToken: {userId: currentUserId}}, args: {dmsTypeId: paymentLawTypeId}};
|
let ctx = {req: {accessToken: {userId: currentUserId}}, args: {dmsTypeId: paymentLawTypeId}};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
describe('Client createWithInsurance', () => {
|
describe('Client createWithInsurance', () => {
|
||||||
const activeCtx = {
|
const activeCtx = {
|
||||||
accessToken: {userId: 101},
|
accessToken: {userId: 1101},
|
||||||
http: {
|
http: {
|
||||||
req: {
|
req: {
|
||||||
headers: {origin: 'http://localhost'}
|
headers: {origin: 'http://localhost'}
|
||||||
|
@ -44,13 +44,13 @@ describe('Client createWithInsurance', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new client credit classification with insurance', async() => {
|
it('should create a new client credit classification with insurance', async() => {
|
||||||
let data = {clientFk: 101, started: Date.now(), credit: 999, grade: 255};
|
let data = {clientFk: 1101, started: Date.now(), credit: 999, grade: 255};
|
||||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||||
active: activeCtx
|
active: activeCtx
|
||||||
});
|
});
|
||||||
let result = await app.models.CreditClassification.createWithInsurance(data, ctx);
|
let result = await app.models.CreditClassification.createWithInsurance(data, ctx);
|
||||||
|
|
||||||
expect(result.client).toEqual(101);
|
expect(result.client).toEqual(1101);
|
||||||
|
|
||||||
let classifications = await app.models.CreditClassification.find();
|
let classifications = await app.models.CreditClassification.find();
|
||||||
let insurances = await app.models.CreditInsurance.find();
|
let insurances = await app.models.CreditInsurance.find();
|
||||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
||||||
describe('receipt filter()', () => {
|
describe('receipt filter()', () => {
|
||||||
it('should return the receipts', async() => {
|
it('should return the receipts', async() => {
|
||||||
const filter = {limit: 20};
|
const filter = {limit: 20};
|
||||||
const clientId = 101;
|
const clientId = 1101;
|
||||||
const companyId = 442;
|
const companyId = 442;
|
||||||
let result = await app.models.Receipt.filter(filter, clientId, companyId);
|
let result = await app.models.Receipt.filter(filter, clientId, companyId);
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('client hasActiveRecovery', () => {
|
describe('client hasActiveRecovery', () => {
|
||||||
it(`should return false if the client doesn't owes`, async() => {
|
it(`should return false if the client doesn't owes`, async() => {
|
||||||
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(101);
|
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(1101);
|
||||||
|
|
||||||
expect(hasActiveRecovery).toBeFalsy();
|
expect(hasActiveRecovery).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return true if the client owes', async() => {
|
it('should return true if the client owes', async() => {
|
||||||
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(102);
|
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(1102);
|
||||||
|
|
||||||
expect(hasActiveRecovery).toBeTruthy();
|
expect(hasActiveRecovery).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe('sms send()', () => {
|
||||||
const code = 200;
|
const code = 200;
|
||||||
spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
|
spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
|
||||||
let ctx = {req: {accessToken: {userId: 1}}};
|
let ctx = {req: {accessToken: {userId: 1}}};
|
||||||
let result = await app.models.Sms.send(ctx, 105, 'destination', 'My SMS Body');
|
let result = await app.models.Sms.send(ctx, 1105, 'destination', 'My SMS Body');
|
||||||
|
|
||||||
expect(result.statusCode).toEqual(code);
|
expect(result.statusCode).toEqual(code);
|
||||||
expect(result.status).toContain('Fake response');
|
expect(result.status).toContain('Fake response');
|
||||||
|
|
|
@ -10,7 +10,6 @@ module.exports = Self => {
|
||||||
// Methods
|
// Methods
|
||||||
require('../methods/client/getCard')(Self);
|
require('../methods/client/getCard')(Self);
|
||||||
require('../methods/client/createWithUser')(Self);
|
require('../methods/client/createWithUser')(Self);
|
||||||
require('../methods/client/listWorkers')(Self);
|
|
||||||
require('../methods/client/hasCustomerRole')(Self);
|
require('../methods/client/hasCustomerRole')(Self);
|
||||||
require('../methods/client/canCreateTicket')(Self);
|
require('../methods/client/canCreateTicket')(Self);
|
||||||
require('../methods/client/isValidClient')(Self);
|
require('../methods/client/isValidClient')(Self);
|
||||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('loopback model address', () => {
|
describe('loopback model address', () => {
|
||||||
let createdAddressId;
|
let createdAddressId;
|
||||||
const clientId = 101;
|
const clientId = 1101;
|
||||||
|
|
||||||
afterAll(async done => {
|
afterAll(async done => {
|
||||||
let client = await app.models.Client.findById(clientId);
|
let client = await app.models.Client.findById(clientId);
|
||||||
|
|
|
@ -15,9 +15,9 @@ describe('Client Model', () => {
|
||||||
};
|
};
|
||||||
const ctx = {req: activeCtx};
|
const ctx = {req: activeCtx};
|
||||||
const chatModel = app.models.Chat;
|
const chatModel = app.models.Chat;
|
||||||
const client = {id: 101, name: 'Bruce Banner'};
|
const client = {id: 1101, name: 'Bruce Banner'};
|
||||||
const previousWorkerId = 106; // DavidCharlesHaller
|
const previousWorkerId = 1106; // DavidCharlesHaller
|
||||||
const currentWorkerId = 107; // HankPym
|
const currentWorkerId = 1107; // HankPym
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||||
|
|
|
@ -26,7 +26,7 @@ describe('Client', () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
controller.client = {id: 101, defaultAddressFk: 121};
|
controller.client = {id: 1101, defaultAddressFk: 121};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should define and set address property', () => {
|
it('should define and set address property', () => {
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('Client', () => {
|
||||||
$scope = $rootScope.$new();
|
$scope = $rootScope.$new();
|
||||||
const $element = angular.element('<vn-client-address-index></vn-client-address-index>');
|
const $element = angular.element('<vn-client-address-index></vn-client-address-index>');
|
||||||
controller = $componentController('vnClientAddressIndex', {$element, $scope});
|
controller = $componentController('vnClientAddressIndex', {$element, $scope});
|
||||||
controller.client = {id: 101, defaultAddressFk: 121};
|
controller.client = {id: 1101, defaultAddressFk: 121};
|
||||||
controller.$.model = crudModel;
|
controller.$.model = crudModel;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe('Client', () => {
|
||||||
};
|
};
|
||||||
controller = $componentController('vnClientBalanceCreate', {$element, $scope, $transclude});
|
controller = $componentController('vnClientBalanceCreate', {$element, $scope, $transclude});
|
||||||
controller.receipt = {
|
controller.receipt = {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
companyFk: 442
|
companyFk: 442
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
@ -50,11 +50,11 @@ describe('Client', () => {
|
||||||
|
|
||||||
describe('getAmountPaid()', () => {
|
describe('getAmountPaid()', () => {
|
||||||
it('should make an http GET query and then set the receipt amountPaid property', () => {
|
it('should make an http GET query and then set the receipt amountPaid property', () => {
|
||||||
controller.$params = {id: 101};
|
controller.$params = {id: 1101};
|
||||||
const receipt = controller.receipt;
|
const receipt = controller.receipt;
|
||||||
const filter = {
|
const filter = {
|
||||||
where: {
|
where: {
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
companyFk: 442
|
companyFk: 442
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -72,9 +72,9 @@ describe('Client', () => {
|
||||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
jest.spyOn(controller.vnApp, 'showSuccess');
|
||||||
jest.spyOn(controller.vnReport, 'show');
|
jest.spyOn(controller.vnReport, 'show');
|
||||||
|
|
||||||
controller.$params = {id: 101};
|
controller.$params = {id: 1101};
|
||||||
|
|
||||||
$httpBackend.expect('POST', `Clients/101/createReceipt`).respond({id: 1});
|
$httpBackend.expect('POST', `Clients/1101/createReceipt`).respond({id: 1});
|
||||||
controller.responseHandler('accept');
|
controller.responseHandler('accept');
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
@ -87,10 +87,10 @@ describe('Client', () => {
|
||||||
jest.spyOn(controller.vnReport, 'show');
|
jest.spyOn(controller.vnReport, 'show');
|
||||||
window.open = jest.fn();
|
window.open = jest.fn();
|
||||||
|
|
||||||
controller.$params = {id: 101};
|
controller.$params = {id: 1101};
|
||||||
controller.viewReceipt = true;
|
controller.viewReceipt = true;
|
||||||
|
|
||||||
$httpBackend.expect('POST', `Clients/101/createReceipt`).respond({id: 1});
|
$httpBackend.expect('POST', `Clients/1101/createReceipt`).respond({id: 1});
|
||||||
controller.responseHandler('accept');
|
controller.responseHandler('accept');
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('Client', () => {
|
||||||
applyFilter: () => {},
|
applyFilter: () => {},
|
||||||
data:
|
data:
|
||||||
[{
|
[{
|
||||||
clientFk: 101,
|
clientFk: 1101,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
amount: 713.24,
|
amount: 713.24,
|
||||||
company: {
|
company: {
|
||||||
|
@ -31,14 +31,14 @@ describe('Client', () => {
|
||||||
describe('getData()', () => {
|
describe('getData()', () => {
|
||||||
it('should apply the filters on he models and get the client balance', () => {
|
it('should apply the filters on he models and get the client balance', () => {
|
||||||
controller._companyId = 442;
|
controller._companyId = 442;
|
||||||
controller.$params.id = 101;
|
controller.$params.id = 1101;
|
||||||
jest.spyOn(controller, 'getBalances').mockReturnThis();
|
jest.spyOn(controller, 'getBalances').mockReturnThis();
|
||||||
jest.spyOn(controller.$.model, 'applyFilter').mockReturnValue(Promise.resolve());
|
jest.spyOn(controller.$.model, 'applyFilter').mockReturnValue(Promise.resolve());
|
||||||
jest.spyOn(controller.$.riskModel, 'applyFilter').mockReturnValue(Promise.resolve());
|
jest.spyOn(controller.$.riskModel, 'applyFilter').mockReturnValue(Promise.resolve());
|
||||||
|
|
||||||
controller.getData().then(() => {
|
controller.getData().then(() => {
|
||||||
expect(controller.$.model.applyFilter).toHaveBeenCalledWith(null, {'clientId': 101, 'companyId': 442});
|
expect(controller.$.model.applyFilter).toHaveBeenCalledWith(null, {'clientId': 1101, 'companyId': 442});
|
||||||
expect(controller.$.riskModel.applyFilter).toHaveBeenCalledWith({'where': {'clientFk': 101, 'companyFk': 442}});
|
expect(controller.$.riskModel.applyFilter).toHaveBeenCalledWith({'where': {'clientFk': 1101, 'companyFk': 442}});
|
||||||
expect(controller.getBalances).toHaveBeenCalledWith();
|
expect(controller.getBalances).toHaveBeenCalledWith();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,8 +17,8 @@ describe('Client', () => {
|
||||||
$scope.watcher = {};
|
$scope.watcher = {};
|
||||||
jest.spyOn(vnApp, 'showError');
|
jest.spyOn(vnApp, 'showError');
|
||||||
controller = $componentController('vnClientBillingData', {$element, $scope});
|
controller = $componentController('vnClientBillingData', {$element, $scope});
|
||||||
controller.client = {id: 101, name: 'Client name', payMethodFk: 4};
|
controller.client = {id: 1101, name: 'Client name', payMethodFk: 4};
|
||||||
$scope.watcher.orgData = {id: 101, name: 'Client name', payMethodFk: 4};
|
$scope.watcher.orgData = {id: 1101, name: 'Client name', payMethodFk: 4};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('hasPaymethodChanges()', () => {
|
describe('hasPaymethodChanges()', () => {
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
controller = $componentController('vnClientConsumption', {$element, $scope});
|
controller = $componentController('vnClientConsumption', {$element, $scope});
|
||||||
controller.$.model = crudModel;
|
controller.$.model = crudModel;
|
||||||
controller.client = {
|
controller.client = {
|
||||||
id: 101
|
id: 1101
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ describe('Client', () => {
|
||||||
controller.showReport();
|
controller.showReport();
|
||||||
|
|
||||||
const expectedParams = {
|
const expectedParams = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
from: now,
|
from: now,
|
||||||
to: now
|
to: now
|
||||||
};
|
};
|
||||||
|
@ -54,7 +54,7 @@ describe('Client', () => {
|
||||||
to: now
|
to: now
|
||||||
};
|
};
|
||||||
const expectedParams = {
|
const expectedParams = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
from: now,
|
from: now,
|
||||||
to: now
|
to: now
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('Client', () => {
|
||||||
};
|
};
|
||||||
const $element = angular.element('<vn-client-credit-insurance-create></vn-client-credit-insurance-create>');
|
const $element = angular.element('<vn-client-credit-insurance-create></vn-client-credit-insurance-create>');
|
||||||
controller = $componentController('vnClientCreditInsuranceCreate', {$element, $scope});
|
controller = $componentController('vnClientCreditInsuranceCreate', {$element, $scope});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
controller.card = {
|
controller.card = {
|
||||||
reload: () => {}
|
reload: () => {}
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,7 @@ describe('Client', () => {
|
||||||
started: started,
|
started: started,
|
||||||
credit: 300,
|
credit: 300,
|
||||||
grade: 1,
|
grade: 1,
|
||||||
clientFk: 101
|
clientFk: 1101
|
||||||
};
|
};
|
||||||
|
|
||||||
$httpBackend.whenPOST(`creditClassifications/createWithInsurance`, newData).respond(200, true);
|
$httpBackend.whenPOST(`creditClassifications/createWithInsurance`, newData).respond(200, true);
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Client', () => {
|
||||||
$scope = $rootScope.$new();
|
$scope = $rootScope.$new();
|
||||||
const $element = angular.element('<vn-client-credit-insurance-index></vn-client-credit-insurance-index>');
|
const $element = angular.element('<vn-client-credit-insurance-index></vn-client-credit-insurance-index>');
|
||||||
controller = $componentController('vnClientCreditInsuranceIndex', {$element, $scope});
|
controller = $componentController('vnClientCreditInsuranceIndex', {$element, $scope});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('_getClassifications()', () => {
|
describe('_getClassifications()', () => {
|
||||||
|
@ -81,7 +81,7 @@ describe('Client', () => {
|
||||||
controller.returnDialog();
|
controller.returnDialog();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller._getClassifications).toHaveBeenCalledWith(101);
|
expect(controller._getClassifications).toHaveBeenCalledWith(1101);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,7 +28,7 @@ describe('Client', () => {
|
||||||
};
|
};
|
||||||
client = {credit: 0};
|
client = {credit: 0};
|
||||||
$state = _$state_;
|
$state = _$state_;
|
||||||
$state.params.id = 101;
|
$state.params.id = 1101;
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
const $element = angular.element('<vn-client-credit-create></vn-client-credit-create>');
|
const $element = angular.element('<vn-client-credit-create></vn-client-credit-create>');
|
||||||
controller = $componentController('vnClientCreditCreate', {$element, $scope});
|
controller = $componentController('vnClientCreditCreate', {$element, $scope});
|
||||||
|
@ -36,16 +36,16 @@ describe('Client', () => {
|
||||||
|
|
||||||
describe('onSubmit()', () => {
|
describe('onSubmit()', () => {
|
||||||
it('should perform a query to check (GET) if the client has an active recovery', () => {
|
it('should perform a query to check (GET) if the client has an active recovery', () => {
|
||||||
$httpBackend.whenGET(`Recoveries/101/hasActiveRecovery`).respond(true);
|
$httpBackend.whenGET(`Recoveries/1101/hasActiveRecovery`).respond(true);
|
||||||
$httpBackend.expectGET(`Recoveries/101/hasActiveRecovery`);
|
$httpBackend.expectGET(`Recoveries/1101/hasActiveRecovery`);
|
||||||
controller.onSubmit();
|
controller.onSubmit();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call show() method when the client have a recovery', () => {
|
it('should call show() method when the client have a recovery', () => {
|
||||||
jest.spyOn(controller.$.confirmation, 'show');
|
jest.spyOn(controller.$.confirmation, 'show');
|
||||||
$httpBackend.whenGET(`Recoveries/101/hasActiveRecovery`).respond(true);
|
$httpBackend.whenGET(`Recoveries/1101/hasActiveRecovery`).respond(true);
|
||||||
$httpBackend.expectGET(`Recoveries/101/hasActiveRecovery`);
|
$httpBackend.expectGET(`Recoveries/1101/hasActiveRecovery`);
|
||||||
controller.onSubmit();
|
controller.onSubmit();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ describe('Client', () => {
|
||||||
|
|
||||||
it('should call addCredit() method when the client doesnt have a recovery', () => {
|
it('should call addCredit() method when the client doesnt have a recovery', () => {
|
||||||
jest.spyOn(controller, 'addCredit');
|
jest.spyOn(controller, 'addCredit');
|
||||||
$httpBackend.whenGET(`Recoveries/101/hasActiveRecovery`).respond(false);
|
$httpBackend.whenGET(`Recoveries/1101/hasActiveRecovery`).respond(false);
|
||||||
$httpBackend.expectGET(`Recoveries/101/hasActiveRecovery`);
|
$httpBackend.expectGET(`Recoveries/1101/hasActiveRecovery`);
|
||||||
controller.onSubmit();
|
controller.onSubmit();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe('Client', () => {
|
||||||
$httpParamSerializer = _$httpParamSerializer_;
|
$httpParamSerializer = _$httpParamSerializer_;
|
||||||
const $element = angular.element('<vn-client-create></vn-client-create>');
|
const $element = angular.element('<vn-client-create></vn-client-create>');
|
||||||
controller = $componentController('vnClientDmsCreate', {$element, $scope});
|
controller = $componentController('vnClientDmsCreate', {$element, $scope});
|
||||||
controller._client = {id: 101, name: 'Bruce wayne'};
|
controller._client = {id: 1101, name: 'Bruce wayne'};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('client() setter', () => {
|
describe('client() setter', () => {
|
||||||
|
@ -44,7 +44,7 @@ describe('Client', () => {
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.dms).toBeDefined();
|
expect(controller.dms).toBeDefined();
|
||||||
expect(controller.dms.reference).toEqual(101);
|
expect(controller.dms.reference).toEqual(1101);
|
||||||
expect(controller.dms.dmsTypeId).toEqual(12);
|
expect(controller.dms.dmsTypeId).toEqual(12);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe('Client', () => {
|
||||||
it('should perform a GET query and define the dms property on controller', () => {
|
it('should perform a GET query and define the dms property on controller', () => {
|
||||||
const dmsId = 1;
|
const dmsId = 1;
|
||||||
const expectedResponse = {
|
const expectedResponse = {
|
||||||
reference: 101,
|
reference: 1101,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
companyFk: 442,
|
companyFk: 442,
|
||||||
dmsTypeFk: 12,
|
dmsTypeFk: 12,
|
||||||
|
@ -50,7 +50,7 @@ describe('Client', () => {
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.dms).toBeDefined();
|
expect(controller.dms).toBeDefined();
|
||||||
expect(controller.dms.reference).toEqual(101);
|
expect(controller.dms.reference).toEqual(1101);
|
||||||
expect(controller.dms.dmsTypeId).toEqual(12);
|
expect(controller.dms.dmsTypeId).toEqual(12);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,12 +14,12 @@ describe('Client', () => {
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
$scope = $rootScope.$new();
|
$scope = $rootScope.$new();
|
||||||
$scope.watcher = watcher;
|
$scope.watcher = watcher;
|
||||||
$scope.watcher.orgData = {id: 101, isEqualizated: false, isTaxDataChecked: false};
|
$scope.watcher.orgData = {id: 1101, isEqualizated: false, isTaxDataChecked: false};
|
||||||
$element = angular.element('<vn-client-fiscal-data></client-fiscal-data>');
|
$element = angular.element('<vn-client-fiscal-data></client-fiscal-data>');
|
||||||
controller = $componentController('vnClientFiscalData', {$element, $scope});
|
controller = $componentController('vnClientFiscalData', {$element, $scope});
|
||||||
controller.card = {reload: () => {}};
|
controller.card = {reload: () => {}};
|
||||||
controller.client = {
|
controller.client = {
|
||||||
id: 101,
|
id: 1101,
|
||||||
email: 'batman@gothamcity.com',
|
email: 'batman@gothamcity.com',
|
||||||
phone: '1111111111',
|
phone: '1111111111',
|
||||||
isEqualizated: false,
|
isEqualizated: false,
|
||||||
|
@ -95,14 +95,14 @@ describe('Client', () => {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const expectedClient = {id: 102};
|
const expectedClient = {id: 1102};
|
||||||
const filter = encodeURIComponent(JSON.stringify(filterObj));
|
const filter = encodeURIComponent(JSON.stringify(filterObj));
|
||||||
$httpBackend.expect('GET', `Clients/findOne?filter=${filter}`).respond(expectedClient);
|
$httpBackend.expect('GET', `Clients/findOne?filter=${filter}`).respond(expectedClient);
|
||||||
controller.checkExistingClient();
|
controller.checkExistingClient();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.$.confirmDuplicatedClient.show).toHaveBeenCalledWith();
|
expect(controller.$.confirmDuplicatedClient.show).toHaveBeenCalledWith();
|
||||||
expect(controller.client.despiteOfClient).toEqual(102);
|
expect(controller.client.despiteOfClient).toEqual(1102);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('Client index', () => {
|
||||||
|
|
||||||
describe('filterTickets()', () => {
|
describe('filterTickets()', () => {
|
||||||
it('should navigate to the ticket index using params as filter', () => {
|
it('should navigate to the ticket index using params as filter', () => {
|
||||||
const client = {id: 101};
|
const client = {id: 1101};
|
||||||
const event = new MouseEvent('click', {cancelable: true});
|
const event = new MouseEvent('click', {cancelable: true});
|
||||||
jest.spyOn($state, 'go');
|
jest.spyOn($state, 'go');
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Client', () => {
|
||||||
$scope = $rootScope.$new();
|
$scope = $rootScope.$new();
|
||||||
const $element = angular.element('<vn-dialog></vn-dialog>');
|
const $element = angular.element('<vn-dialog></vn-dialog>');
|
||||||
controller = $componentController('vnGeoCity', {$element, $scope});
|
controller = $componentController('vnGeoCity', {$element, $scope});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('onAccept()', () => {
|
describe('onAccept()', () => {
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Client', () => {
|
||||||
$scope = $rootScope.$new();
|
$scope = $rootScope.$new();
|
||||||
const $element = angular.element('<vn-dialog></vn-dialog>');
|
const $element = angular.element('<vn-dialog></vn-dialog>');
|
||||||
controller = $componentController('vnGeoPostcode', {$element, $scope});
|
controller = $componentController('vnGeoPostcode', {$element, $scope});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('onAccept()', () => {
|
describe('onAccept()', () => {
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Client', () => {
|
||||||
$scope = $rootScope.$new();
|
$scope = $rootScope.$new();
|
||||||
const $element = angular.element('<vn-dialog></vn-dialog>');
|
const $element = angular.element('<vn-dialog></vn-dialog>');
|
||||||
controller = $componentController('vnGeoProvince', {$element, $scope});
|
controller = $componentController('vnGeoProvince', {$element, $scope});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('onAccept()', () => {
|
describe('onAccept()', () => {
|
||||||
|
|
|
@ -35,7 +35,7 @@ describe('Client', () => {
|
||||||
show: () => {}
|
show: () => {}
|
||||||
};
|
};
|
||||||
$state = _$state_;
|
$state = _$state_;
|
||||||
$state.params.id = 101;
|
$state.params.id = 1101;
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
$httpParamSerializer = _$httpParamSerializer_;
|
$httpParamSerializer = _$httpParamSerializer_;
|
||||||
$element = angular.element('<vn-client-sample-create></vn-client-sample-create>');
|
$element = angular.element('<vn-client-sample-create></vn-client-sample-create>');
|
||||||
|
@ -68,7 +68,7 @@ describe('Client', () => {
|
||||||
code: 'MyReport'
|
code: 'MyReport'
|
||||||
};
|
};
|
||||||
controller.clientSample = {
|
controller.clientSample = {
|
||||||
recipientId: 101
|
recipientId: 1101
|
||||||
};
|
};
|
||||||
|
|
||||||
controller.send(false, () => {});
|
controller.send(false, () => {});
|
||||||
|
@ -81,7 +81,7 @@ describe('Client', () => {
|
||||||
|
|
||||||
controller.$.sampleType.selection = null;
|
controller.$.sampleType.selection = null;
|
||||||
controller.clientSample = {
|
controller.clientSample = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
recipient: 'client@email.com'
|
recipient: 'client@email.com'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ describe('Client', () => {
|
||||||
code: 'MyReport'
|
code: 'MyReport'
|
||||||
};
|
};
|
||||||
controller.clientSample = {
|
controller.clientSample = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
recipient: 'client@email.com'
|
recipient: 'client@email.com'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -113,11 +113,11 @@ describe('Client', () => {
|
||||||
code: 'MyReport'
|
code: 'MyReport'
|
||||||
};
|
};
|
||||||
controller.clientSample = {
|
controller.clientSample = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
recipient: 'client@email.com'
|
recipient: 'client@email.com'
|
||||||
};
|
};
|
||||||
const expectedParams = {
|
const expectedParams = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
recipient: 'client@email.com'
|
recipient: 'client@email.com'
|
||||||
};
|
};
|
||||||
const serializedParams = $httpParamSerializer(expectedParams);
|
const serializedParams = $httpParamSerializer(expectedParams);
|
||||||
|
@ -133,12 +133,12 @@ describe('Client', () => {
|
||||||
code: 'MyReport'
|
code: 'MyReport'
|
||||||
};
|
};
|
||||||
controller.clientSample = {
|
controller.clientSample = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
recipient: 'client@email.com',
|
recipient: 'client@email.com',
|
||||||
companyFk: 442
|
companyFk: 442
|
||||||
};
|
};
|
||||||
const expectedParams = {
|
const expectedParams = {
|
||||||
recipientId: 101,
|
recipientId: 1101,
|
||||||
recipient: 'client@email.com',
|
recipient: 'client@email.com',
|
||||||
companyId: 442
|
companyId: 442
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,8 +13,8 @@ describe('Client', () => {
|
||||||
let $scope = $rootScope.$new();
|
let $scope = $rootScope.$new();
|
||||||
$element = angular.element('<vn-dialog></vn-dialog>');
|
$element = angular.element('<vn-dialog></vn-dialog>');
|
||||||
controller = $componentController('vnClientSms', {$element, $scope});
|
controller = $componentController('vnClientSms', {$element, $scope});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
controller.$params = {id: 101};
|
controller.$params = {id: 1101};
|
||||||
controller.$.message = {
|
controller.$.message = {
|
||||||
input: {
|
input: {
|
||||||
value: 'My SMS'
|
value: 'My SMS'
|
||||||
|
@ -24,11 +24,11 @@ describe('Client', () => {
|
||||||
|
|
||||||
describe('onResponse()', () => {
|
describe('onResponse()', () => {
|
||||||
it('should perform a POST query and show a success snackbar', () => {
|
it('should perform a POST query and show a success snackbar', () => {
|
||||||
let params = {destinationFk: 101, destination: 111111111, message: 'My SMS'};
|
let params = {destinationFk: 1101, destination: 111111111, message: 'My SMS'};
|
||||||
controller.sms = {destinationFk: 101, destination: 111111111, message: 'My SMS'};
|
controller.sms = {destinationFk: 1101, destination: 111111111, message: 'My SMS'};
|
||||||
|
|
||||||
jest.spyOn(controller.vnApp, 'showMessage');
|
jest.spyOn(controller.vnApp, 'showMessage');
|
||||||
$httpBackend.expect('POST', `Clients/101/sendSms`, params).respond(200, params);
|
$httpBackend.expect('POST', `Clients/1101/sendSms`, params).respond(200, params);
|
||||||
|
|
||||||
controller.onResponse();
|
controller.onResponse();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
@ -37,7 +37,7 @@ describe('Client', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call onResponse without the destination and show an error snackbar', () => {
|
it('should call onResponse without the destination and show an error snackbar', () => {
|
||||||
controller.sms = {destinationFk: 101, message: 'My SMS'};
|
controller.sms = {destinationFk: 1101, message: 'My SMS'};
|
||||||
|
|
||||||
jest.spyOn(controller.vnApp, 'showError');
|
jest.spyOn(controller.vnApp, 'showError');
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ describe('Client', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call onResponse without the message and show an error snackbar', () => {
|
it('should call onResponse without the message and show an error snackbar', () => {
|
||||||
controller.sms = {destinationFk: 101, destination: 222222222};
|
controller.sms = {destinationFk: 1101, destination: 222222222};
|
||||||
|
|
||||||
jest.spyOn(controller.vnApp, 'showError');
|
jest.spyOn(controller.vnApp, 'showError');
|
||||||
|
|
||||||
|
|
|
@ -292,7 +292,7 @@
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th field="id" number>Id</vn-th>
|
<vn-th field="id" number>Id</vn-th>
|
||||||
<vn-th field="nickname" expand>Client</vn-th>
|
<vn-th field="nickname" expand>Nickname</vn-th>
|
||||||
<vn-th field="packages" shrink>Packages</vn-th>
|
<vn-th field="packages" shrink>Packages</vn-th>
|
||||||
<vn-th field="shipped" shrink-date>Date</vn-th>
|
<vn-th field="shipped" shrink-date>Date</vn-th>
|
||||||
<vn-th>State</vn-th>
|
<vn-th>State</vn-th>
|
||||||
|
@ -325,7 +325,7 @@
|
||||||
<span
|
<span
|
||||||
ng-show="::ticket.refFk"
|
ng-show="::ticket.refFk"
|
||||||
title="{{::ticket.refFk}}"
|
title="{{::ticket.refFk}}"
|
||||||
vn-click-stop="invoiceOutDescriptor.show($event, ticket.invoiceOutId)"
|
vn-click-stop="invoiceOutDescriptor.show($event, ticket.invoiceOut.id)"
|
||||||
class="link">
|
class="link">
|
||||||
{{::ticket.refFk}}
|
{{::ticket.refFk}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -7,17 +7,26 @@ class Controller extends Summary {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
|
|
||||||
this.ticketFilter = {
|
this.ticketFilter = {
|
||||||
include: {
|
include: [
|
||||||
relation: 'ticketState',
|
{
|
||||||
scope: {
|
relation: 'ticketState',
|
||||||
fields: ['stateFk', 'code', 'alertLevel'],
|
scope: {
|
||||||
include: {
|
fields: ['stateFk', 'code', 'alertLevel'],
|
||||||
relation: 'state'
|
include: {
|
||||||
|
relation: 'state'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'invoiceOut',
|
||||||
|
scope: {
|
||||||
|
fields: ['id']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$onChanges() {
|
$onChanges() {
|
||||||
if (!this.client)
|
if (!this.client)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('Client', () => {
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
const $element = angular.element('<vn-client-summary></vn-client-summary>');
|
const $element = angular.element('<vn-client-summary></vn-client-summary>');
|
||||||
controller = $componentController('vnClientSummary', {$element});
|
controller = $componentController('vnClientSummary', {$element});
|
||||||
controller.client = {id: 101};
|
controller.client = {id: 1101};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('$onChanges()', () => {
|
describe('$onChanges()', () => {
|
||||||
|
@ -21,7 +21,7 @@ describe('Client', () => {
|
||||||
let res = {name: 'Superman', classifications: []};
|
let res = {name: 'Superman', classifications: []};
|
||||||
|
|
||||||
jest.spyOn(controller, 'sumRisk').mockReturnThis();
|
jest.spyOn(controller, 'sumRisk').mockReturnThis();
|
||||||
$httpBackend.expect('GET', `Clients/101/summary`).respond(200, res);
|
$httpBackend.expect('GET', `Clients/1101/summary`).respond(200, res);
|
||||||
|
|
||||||
controller.$onChanges();
|
controller.$onChanges();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
@ -113,7 +113,7 @@ describe('Client', () => {
|
||||||
controller.$.summary = {show: () => {}};
|
controller.$.summary = {show: () => {}};
|
||||||
jest.spyOn(controller.$.summary, 'show');
|
jest.spyOn(controller.$.summary, 'show');
|
||||||
|
|
||||||
const ticket = {id: 1, clientFk: 101};
|
const ticket = {id: 1, clientFk: 1101};
|
||||||
|
|
||||||
const event = new MouseEvent('click', {
|
const event = new MouseEvent('click', {
|
||||||
view: $window,
|
view: $window,
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe('invoiceOut delete()', () => {
|
||||||
const invoiceOutId = 2;
|
const invoiceOutId = 2;
|
||||||
let originalInvoiceOut;
|
let originalInvoiceOut;
|
||||||
let originalTicket;
|
let originalTicket;
|
||||||
const userId = 106;
|
const userId = 1106;
|
||||||
const activeCtx = {
|
const activeCtx = {
|
||||||
accessToken: {userId: userId},
|
accessToken: {userId: userId},
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe('InvoiceOut filter()', () => {
|
||||||
it('should return the invoice out matching clientFk', async() => {
|
it('should return the invoice out matching clientFk', async() => {
|
||||||
let ctx = {
|
let ctx = {
|
||||||
args: {
|
args: {
|
||||||
clientFk: 102,
|
clientFk: 1102,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue