Merge branch 'dev' into 2940-invoiceInTax-section
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
9054aa0885
|
@ -6,7 +6,7 @@ describe('Chat sendCheckingPresence()', () => {
|
|||
const ctx = {req: {accessToken: {userId: 1}}};
|
||||
const chatModel = app.models.Chat;
|
||||
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() => {
|
||||
spyOn(chatModel, 'send').and.callThrough();
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('getCollection()', () => {
|
||||
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);
|
||||
|
||||
expect(response.length).toBeGreaterThan(0);
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('newCollection()', () => {
|
||||
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);
|
||||
|
||||
expect(response.length).toBeGreaterThan(0);
|
||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
|||
describe('updateCollectionSale()', () => {
|
||||
it('should return a new collection', async() => {
|
||||
const sectorOneWarehouseID = 1;
|
||||
let ctx = {req: {accessToken: {userId: 106}}};
|
||||
let ctx = {req: {accessToken: {userId: 1106}}};
|
||||
ctx.args = {
|
||||
sale: 1,
|
||||
originalQuantity: 5,
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('dms downloadFile()', () => {
|
|||
let dmsId = 1;
|
||||
|
||||
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}}};
|
||||
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() => {
|
||||
let clientId = 101;
|
||||
let clientId = 1101;
|
||||
let ctx = {req: {accessToken: {userId: clientId}}};
|
||||
|
||||
let error;
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('dms removeFile()', () => {
|
|||
let dmsId = 1;
|
||||
|
||||
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 error;
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('dms updateFile()', () => {
|
||||
it(`should return an error for a user without enough privileges`, async() => {
|
||||
let clientId = 101;
|
||||
let clientId = 1101;
|
||||
let companyId = 442;
|
||||
let warehouseId = 1;
|
||||
let dmsTypeId = 14;
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('dms uploadFile()', () => {
|
||||
it(`should return an error for a user without enough privileges`, async() => {
|
||||
let clientId = 101;
|
||||
let clientId = 1101;
|
||||
let ticketDmsTypeId = 14;
|
||||
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() => {
|
||||
const userId = 110;
|
||||
const userId = 1110;
|
||||
const image = await app.models.Image.download(ctx, collection, size, userId);
|
||||
|
||||
expect(image).toBeFalse();
|
||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
|||
describe('image upload()', () => {
|
||||
describe('as buyer', () => {
|
||||
const buyerId = 35;
|
||||
const workerId = 106;
|
||||
const workerId = 1106;
|
||||
const itemId = 4;
|
||||
|
||||
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', () => {
|
||||
const marketingId = 51;
|
||||
const workerId = 106;
|
||||
const workerId = 1106;
|
||||
const itemId = 4;
|
||||
|
||||
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', () => {
|
||||
const hhrrId = 37;
|
||||
const workerId = 106;
|
||||
const workerId = 1106;
|
||||
const itemId = 4;
|
||||
|
||||
it('should upload a file for the collection "user" and call to the TempContainer upload method', async() => {
|
||||
|
|
|
@ -80,13 +80,15 @@
|
|||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"property": "logout",
|
||||
"accessType": "EXECUTE",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$authenticated",
|
||||
"permission": "ALLOW"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"property": "validateToken",
|
||||
"accessType": "EXECUTE",
|
||||
"principalType": "ROLE",
|
||||
|
|
|
@ -36,14 +36,14 @@ describe('Dms', () => {
|
|||
describe('checkRole()', () => {
|
||||
const dmsId = 1;
|
||||
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);
|
||||
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
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,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,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;
|
|
@ -86,7 +86,7 @@ BEGIN
|
|||
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
|
||||
WHERE r.risk > c.credit + 10
|
||||
AND a.isRiskFree = FALSE
|
||||
ON DUPLICATE KEY UPDATE
|
||||
risk = r.risk;
|
||||
|
@ -190,4 +190,3 @@ BEGIN
|
|||
tmp.ticket_list;
|
||||
END;;$$
|
||||
DELIMITER ;
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
DROP PROCEDURE `vn`.`ticket_componentMakeUpdate`;
|
||||
DROP PROCEDURE IF EXISTS `vn`.`ticket_componentMakeUpdate`;
|
||||
|
||||
DELIMITER $$
|
||||
$$
|
||||
|
||||
CREATE
|
||||
DEFINER = root@`%` PROCEDURE `vn`.`ticket_componentMakeUpdate`(IN vTicketFk INT, IN vClientFk INT, IN vAgencyModeFk INT,
|
||||
DEFINER = root@`%` PROCEDURE `vn`.`ticket_componentMakeUpdate`(IN vTicketFk INT, IN vClientFk INT,
|
||||
IN vNickname VARCHAR(50), 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),
|
||||
|
@ -11,11 +13,11 @@ CREATE
|
|||
BEGIN
|
||||
/**
|
||||
* Modifica en el ticket los campos que se le pasan por parámetro
|
||||
* y cambia sus componentes.
|
||||
* Este procedimiento es transacionado en Salix
|
||||
* y cambia sus componentes
|
||||
*
|
||||
* @param vTicketFk Id del ticket a modificar
|
||||
* @param vClientFk nuevo cliente
|
||||
* @param vNickname nuevo alias
|
||||
* @param vAgencyModeFk nueva agencia
|
||||
* @param vAddressFk nuevo consignatario
|
||||
* @param vZoneFk nueva zona
|
||||
|
@ -50,6 +52,7 @@ BEGIN
|
|||
UPDATE ticket t
|
||||
SET
|
||||
t.clientFk = vClientFk,
|
||||
t.nickname = vNickname,
|
||||
t.agencyModeFk = vAgencyModeFk,
|
||||
t.addressFk = vAddressFk,
|
||||
t.zoneFk = vZoneFk,
|
||||
|
@ -87,6 +90,6 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.zoneGetShipped, tmp.ticketComponentPreview;
|
||||
END;;$$
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
DELETE FROM `salix`.`ACL` WHERE id = 189;
|
||||
DELETE FROM `salix`.`ACL` WHERE id = 188;
|
||||
UPDATE `salix`.`ACL` tdms SET tdms.accessType = '*'
|
||||
WHERE tdms.id = 165;
|
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`)
|
||||
VALUES
|
||||
(101, 'BruceWayne', 'Bruce Wayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(102, 'PetterParker', 'Petter Parker', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'PetterParker@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(103, 'ClarkKent', 'Clark Kent', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'ClarkKent@mydomain.com', 'fr', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(104, 'TonyStark', 'Tony Stark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(105, 'MaxEisenhardt', 'Max Eisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(106, 'DavidCharlesHaller', 'David Charles Haller', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'DavidCharlesHaller@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(107, 'HankPym', 'Hank Pym', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'HankPym@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(108, 'CharlesXavier', 'Charles Xavier', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'CharlesXavier@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(109, 'BruceBanner', 'Bruce Banner', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'BruceBanner@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(110, 'JessicaJones', 'Jessica Jones', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'JessicaJones@mydomain.com', 'en', NULL),
|
||||
(111, 'Missing', 'Missing', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL),
|
||||
(112, 'Trash', 'Trash', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL);
|
||||
(1101, 'BruceWayne', 'Bruce Wayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1102, 'PetterParker', 'Petter Parker', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'PetterParker@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1103, 'ClarkKent', 'Clark Kent', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'ClarkKent@mydomain.com', 'fr', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1104, 'TonyStark', 'Tony Stark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1105, 'MaxEisenhardt', 'Max Eisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1106, 'DavidCharlesHaller', 'David Charles Haller', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'DavidCharlesHaller@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1107, 'HankPym', 'Hank Pym', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'HankPym@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1108, 'CharlesXavier', 'Charles Xavier', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'CharlesXavier@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1109, 'BruceBanner', 'Bruce Banner', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'BruceBanner@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'),
|
||||
(1110, 'JessicaJones', 'Jessica Jones', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'JessicaJones@mydomain.com', 'en', NULL),
|
||||
(1111, 'Missing', 'Missing', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL),
|
||||
(1112, 'Trash', 'Trash', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'en', NULL);
|
||||
|
||||
INSERT INTO `account`.`mailAlias`(`id`, `alias`, `description`, `isPublic`)
|
||||
VALUES
|
||||
|
@ -86,11 +86,11 @@ INSERT INTO `account`.`mailForward`(`account`, `forwardTo`)
|
|||
|
||||
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`)
|
||||
VALUES
|
||||
(106, 'LGN', 'David Charles', 'Haller', 106, 19, 432978106),
|
||||
(107, 'ANT', 'Hank' , 'Pym' , 107, 19, 432978107),
|
||||
(108, 'DCX', 'Charles' , 'Xavier', 108, 19, 432978108),
|
||||
(109, 'HLK', 'Bruce' , 'Banner', 109, 19, 432978109),
|
||||
(110, 'JJJ', 'Jessica' , 'Jones' , 110, 19, 432978110);
|
||||
(1106, 'LGN', 'David Charles', 'Haller', 1106, 19, 432978106),
|
||||
(1107, 'ANT', 'Hank' , 'Pym' , 1107, 19, 432978107),
|
||||
(1108, 'DCX', 'Charles' , 'Xavier', 1108, 19, 432978108),
|
||||
(1109, 'HLK', 'Bruce' , 'Banner', 1109, 19, 432978109),
|
||||
(1110, 'JJJ', 'Jessica' , 'Jones' , 1110, 19, 432978110);
|
||||
|
||||
INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
|
||||
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`)
|
||||
VALUES
|
||||
('GVC', '1', '0', '1', '0', '106'),
|
||||
('HEJ', '2', '0', '1', '0', '106');
|
||||
('GVC', '1', '0', '1', '0', '1106'),
|
||||
('HEJ', '2', '0', '1', '0', '1106');
|
||||
|
||||
INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`)
|
||||
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`)
|
||||
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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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);
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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),
|
||||
(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`)
|
||||
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`)
|
||||
VALUES
|
||||
(101, 50, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(102, 100, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(103, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(104, -30, DATE_ADD(CURDATE(), INTERVAL -1 MONTH));
|
||||
(1101, 50, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(1102, 100, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(1103, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(1104, -30, DATE_ADD(CURDATE(), INTERVAL -1 MONTH));
|
||||
|
||||
INSERT INTO `vn`.`clientConfig`(`riskTolerance`)
|
||||
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`)
|
||||
VALUES
|
||||
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1, 1111111111, 222222222, 1, 101, 2, NULL, NULL, 0, 1),
|
||||
(2, 'Petter Parker', '20 Ingram Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 102, 2, NULL, NULL, 0, 1),
|
||||
(3, 'Clark Kent', '344 Clinton Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 103, 2, NULL, NULL, 0, 1),
|
||||
(4, 'Tony Stark', '10880 Malibu Point', 'Silla', 46460, 1, 1111111111, 222222222, 1, 104, 2, NULL, NULL, 0, 1),
|
||||
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Silla', 46460, 1, 1111111111, 222222222, 1, 105, 2, NULL, NULL, 0, 1),
|
||||
(6, 'DavidCharlesHaller', 'Evil hideout', 'Silla', 46460, 1, 1111111111, 222222222, 1, 106, 2, NULL, NULL, 0, 1),
|
||||
(7, 'Hank Pym', 'Anthill', 'Silla', 46460, 1, 1111111111, 222222222, 1, 107, 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),
|
||||
(9, 'Bruce Banner', 'Somewhere in New York', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 1),
|
||||
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Silla', 46460, 1, 1111111111, 222222222, 1, 110, 2, NULL, NULL, 0, 1),
|
||||
(11, 'Missing', 'The space', 'Silla', 46460, 1, 1111111111, 222222222, 1, 111, 10, NULL, NULL, 0, 1),
|
||||
(12, 'Trash', 'New York city', 'Silla', 46460, 1, 1111111111, 222222222, 1, 112, 10, NULL, NULL, 0, 1),
|
||||
(101, 'Somewhere in Thailand', 'address 01', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(102, 'Somewhere in Poland', 'address 02', 'Silla', 46460, 1, 3333333333, 444444444, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(103, 'Somewhere in Japan', 'address 03', 'Silla', 46460, 1, 3333333333, 444444444, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(104, 'Somewhere in Spain', 'address 04', 'Silla', 46460, 1, 3333333333, 444444444, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(105, 'Somewhere in Potugal', 'address 05', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(106, 'Somewhere in UK', 'address 06', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(107, 'Somewhere in Valencia', 'address 07', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(108, 'Somewhere in Silla', 'address 08', 'Silla', 46460, 1, 5555555555, 666666666, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(109, 'Somewhere in London', 'address 09', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(110, 'Somewhere in Algemesi', 'address 10', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(111, 'Somewhere in Carlet', 'address 11', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(112, 'Somewhere in Campanar', 'address 12', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(113, 'Somewhere in Malilla', 'address 13', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(114, 'Somewhere in France', 'address 14', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(115, 'Somewhere in Birmingham', 'address 15', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(116, 'Somewhere in Scotland', 'address 16', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(117, 'Somewhere in nowhere', 'address 17', '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, 109, 2, NULL, NULL, 0, 0),
|
||||
(119, 'Somewhere in Alberic', 'address 19', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(120, 'Somewhere in Montortal', 'address 20', 'Silla', 46460, 1, 1111111111, 222222222, 1, 109, 2, NULL, NULL, 0, 0),
|
||||
(121, 'the bat cave', 'address 21', 'Silla', 46460, 1, 1111111111, 222222222, 1, 101, 2, NULL, NULL, 0, 0),
|
||||
(122, 'NY roofs', 'address 22', 'Silla', 46460, 1, 1111111111, 222222222, 1, 102, 2, NULL, NULL, 0, 0),
|
||||
(123, 'The phone box', 'address 23', 'Silla', 46460, 1, 1111111111, 222222222, 1, 103, 2, NULL, NULL, 0, 0),
|
||||
(124, 'Stark tower Silla', 'address 24', 'Silla', 46460, 1, 1111111111, 222222222, 1, 104, 2, NULL, NULL, 0, 0),
|
||||
(125, 'The plastic cell', 'address 25', 'Silla', 46460, 1, 1111111111, 222222222, 1, 105, 2, NULL, NULL, 0, 0),
|
||||
(126, 'Many places', 'address 26', 'Silla', 46460, 1, 1111111111, 222222222, 1, 106, 2, NULL, NULL, 0, 0),
|
||||
(127, 'Your pocket', 'address 27', 'Silla', 46460, 1, 1111111111, 222222222, 1, 107, 2, NULL, NULL, 0, 0),
|
||||
(128, 'Cerebro', 'address 28', 'Silla', 46460, 1, 1111111111, 222222222, 1, 108, 2, NULL, NULL, 0, 0),
|
||||
(129, 'Luke Cages Bar', 'address 29', 'Silla', 46460, 1, 1111111111, 222222222, 1, 110, 2, NULL, NULL, 0, 0),
|
||||
(130, 'Non valid address', 'address 30', 'Silla', 46460, 1, 1111111111, 222222222, 0, 101, 2, NULL, NULL, 0, 0);
|
||||
(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, 1102, 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, 1104, 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, 1106, 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, 1108, 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, 1110, 2, 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, 1112, 10, NULL, NULL, 0, 1),
|
||||
(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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1109, 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, 1102, 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, 1104, 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, 1106, 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, 1108, 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, 1101, 2, NULL, NULL, 0, 0);
|
||||
|
||||
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
|
||||
FROM `account`.`role` `r`
|
||||
WHERE `r`.`hasLogin` = 1;
|
||||
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 1 WHERE id = 101;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 2 WHERE id = 102;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 3 WHERE id = 103;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 4 WHERE id = 104;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 5 WHERE id = 105;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 6 WHERE id = 106;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 7 WHERE id = 107;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 8 WHERE id = 108;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 9 WHERE id = 109;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 10 WHERE id = 110;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 1 WHERE id = 1101;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 2 WHERE id = 1102;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 3 WHERE id = 1103;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 4 WHERE id = 1104;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 5 WHERE id = 1105;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 6 WHERE id = 1106;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 7 WHERE id = 1107;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 8 WHERE id = 1108;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 9 WHERE id = 1109;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 10 WHERE id = 1110;
|
||||
UPDATE `vn`.`client` SET defaultAddressFk = 11 WHERE id = 200;
|
||||
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`)
|
||||
VALUES
|
||||
(1 , 101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(2 , 101, 5, 900, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||
(3 , 101, 5, 800, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
||||
(4 , 101, 5, 700, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
||||
(5 , 101, 5, 600, DATE_ADD(CURDATE(), INTERVAL -5 MONTH)),
|
||||
(6 , 101, 5, 500, DATE_ADD(CURDATE(), INTERVAL -6 MONTH)),
|
||||
(7 , 101, 5, 400, DATE_ADD(CURDATE(), INTERVAL -7 MONTH)),
|
||||
(8 , 101, 9, 300, DATE_ADD(CURDATE(), INTERVAL -8 MONTH)),
|
||||
(9 , 101, 9, 200, DATE_ADD(CURDATE(), INTERVAL -9 MONTH)),
|
||||
(10, 101, 9, 100, DATE_ADD(CURDATE(), INTERVAL -10 MONTH)),
|
||||
(11, 101, 9, 50 , DATE_ADD(CURDATE(), INTERVAL -11 MONTH)),
|
||||
(12, 102, 9, 800, CURDATE()),
|
||||
(14, 104, 9, 90 , CURDATE()),
|
||||
(15, 105, 9, 90 , CURDATE());
|
||||
(1 , 1101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||
(2 , 1101, 5, 900, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||
(3 , 1101, 5, 800, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
|
||||
(4 , 1101, 5, 700, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
|
||||
(5 , 1101, 5, 600, DATE_ADD(CURDATE(), INTERVAL -5 MONTH)),
|
||||
(6 , 1101, 5, 500, DATE_ADD(CURDATE(), INTERVAL -6 MONTH)),
|
||||
(7 , 1101, 5, 400, DATE_ADD(CURDATE(), INTERVAL -7 MONTH)),
|
||||
(8 , 1101, 9, 300, DATE_ADD(CURDATE(), INTERVAL -8 MONTH)),
|
||||
(9 , 1101, 9, 200, DATE_ADD(CURDATE(), INTERVAL -9 MONTH)),
|
||||
(10, 1101, 9, 100, DATE_ADD(CURDATE(), INTERVAL -10 MONTH)),
|
||||
(11, 1101, 9, 50 , DATE_ADD(CURDATE(), INTERVAL -11 MONTH)),
|
||||
(12, 1102, 9, 800, CURDATE()),
|
||||
(14, 1104, 9, 90 , CURDATE()),
|
||||
(15, 1105, 9, 90 , CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
|
||||
VALUES
|
||||
|
@ -397,16 +397,16 @@ INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
|
|||
|
||||
INSERT INTO `vn`.`clientObservation`(`id`, `clientFk`, `workerFk`, `text`, `created`)
|
||||
VALUES
|
||||
(1, 101, 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()),
|
||||
(3, 103, 3, 'this is a job for Super-Man!', CURDATE()),
|
||||
(4, 104, 3, 'yes... I am Iron-Man', CURDATE()),
|
||||
(5, 105, 5, 'They do understand. Our mutant powers make us superior', CURDATE()),
|
||||
(6, 106, 5, 'My name is Legion, for we are many!', CURDATE()),
|
||||
(7, 107, 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()),
|
||||
(9, 109, 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());
|
||||
(1, 1101, 1, 'Madness, as you know, is like gravity, all it takes is a little push', CURDATE()),
|
||||
(2, 1102, 1, 'With great power, comes great responsibility', CURDATE()),
|
||||
(3, 1103, 3, 'this is a job for Super-Man!', CURDATE()),
|
||||
(4, 1104, 3, 'yes... I am Iron-Man', CURDATE()),
|
||||
(5, 1105, 5, 'They do understand. Our mutant powers make us superior', CURDATE()),
|
||||
(6, 1106, 5, 'My name is Legion, for we are many!', CURDATE()),
|
||||
(7, 1107, 9, 'I think our first move should be calling the Avengers..', CURDATE()),
|
||||
(8, 1108, 9, 'Just because someone stumbles and loses their path, does not mean they are lost forever.', CURDATE()),
|
||||
(9, 1109, 18, 'HULK SMASH! ...', 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`)
|
||||
VALUES
|
||||
|
@ -426,11 +426,11 @@ INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`desc
|
|||
|
||||
INSERT INTO `vn`.`creditClassification`(`id`, `client`, `dateStart`, `dateEnd`)
|
||||
VALUES
|
||||
(1, 101, CURDATE(), CURDATE()),
|
||||
(2, 102, CURDATE(), CURDATE()),
|
||||
(3, 103, CURDATE(), CURDATE()),
|
||||
(4, 104, CURDATE(), CURDATE()),
|
||||
(5, 105, CURDATE(), CURDATE());
|
||||
(1, 1101, CURDATE(), CURDATE()),
|
||||
(2, 1102, CURDATE(), CURDATE()),
|
||||
(3, 1103, CURDATE(), CURDATE()),
|
||||
(4, 1104, CURDATE(), CURDATE()),
|
||||
(5, 1105, CURDATE(), CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`creditInsurance`(`id`, `creditClassification`, `credit`, `creationDate`, `grade`)
|
||||
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`)
|
||||
VALUES
|
||||
(1, 'T', 1014.24, CURDATE(), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
(2, 'T', 121.36, CURDATE(), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
(3, 'T', 8.88, CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
(4, 'T', 8.88, CURDATE(), 103, 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);
|
||||
(1, 'T', 1014.24, CURDATE(), 1101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
(2, 'T', 121.36, CURDATE(), 1102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
(3, 'T', 8.88, CURDATE(), 1103, 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), 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 = '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`)
|
||||
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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(7 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, '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()),
|
||||
(9 , NULL, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, '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()),
|
||||
(11, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, '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()),
|
||||
(13, 1, 7, 1, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, '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()),
|
||||
(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()),
|
||||
(16, 1, 7, 1, 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), 106, '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()),
|
||||
(19, 1, 5, 5, NULL, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, '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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(23, NULL, 8, 1, 7, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, '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());
|
||||
(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), 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), 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), 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), 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), 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), 1101, 'Mountain Drive Gotham', 1, 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), 1104, 'Stark tower', 124, NULL, 0, 3, 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), 1102, 'NY roofs', 122, NULL, 0, 3, 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), 1103, 'Phone Box', 123, NULL, 0, 3, 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), 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), 1106, '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), 1108, 'Cerebro', 128, NULL, 0, 12, 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), 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), 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), 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), 1101, 'address 21', 121, 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`)
|
||||
VALUES
|
||||
|
@ -682,18 +682,18 @@ INSERT INTO `vn`.`greugeType`(`id`, `name`, `code`)
|
|||
|
||||
INSERT INTO `vn`.`greuge`(`id`, `clientFk`, `description`, `amount`, `shipped`, `created`, `greugeTypeFk`, `ticketFk`)
|
||||
VALUES
|
||||
(1, 101, '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),
|
||||
(3, 101, '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),
|
||||
(5, 101, '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),
|
||||
(7, 101, '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),
|
||||
(9, 101, '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),
|
||||
(11, 101, '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);
|
||||
(1, 1101, 'some diff charges', -19.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
|
||||
(2, 1101, 'more diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
|
||||
(3, 1101, 'even more! diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
|
||||
(4, 1101, 'insane diff charges', 60, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
|
||||
(5, 1101, 'gargantuous diff charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
|
||||
(6, 1101, 'diff charges', 88.30, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1),
|
||||
(7, 1101, 'unaffordable diff charges', -39.12, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 1, 1),
|
||||
(8, 1101, 'some recovery charges', 29.35, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 2, 1),
|
||||
(9, 1101, 'some manna charges', -9.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 3, 1),
|
||||
(10, 1101, 'some claim charges', 13.13, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 4, 1),
|
||||
(11, 1101, 'some heritage charges', -15.99, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 5, 1),
|
||||
(12, 1101, 'some miscellaneous charges', 58.00, DATE_ADD(CURDATE(), INTERVAL 1 MONTH), CURDATE(), 6, 1);
|
||||
|
||||
INSERT INTO `vn`.`mandateType`(`id`, `name`)
|
||||
VALUES
|
||||
|
@ -703,7 +703,7 @@ INSERT INTO `vn`.`mandateType`(`id`, `name`)
|
|||
|
||||
INSERT INTO `vn`.`mandate`(`id`, `clientFk`, `companyFk`, `code`, `created`, `mandateTypeFk`)
|
||||
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`)
|
||||
VALUES
|
||||
|
@ -780,25 +780,29 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`)
|
|||
('SER', 'Services'),
|
||||
('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
|
||||
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '1', 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'),
|
||||
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '3', 1, 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'),
|
||||
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '5', 2, NULL, 0, 3, 'VT'),
|
||||
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '6', 2, NULL, 0, 4, 'VT'),
|
||||
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '7', 2, NULL, 0, 4, 'VT'),
|
||||
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '8', 1, NULL, 0, 5, 'VT'),
|
||||
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '9', 1, NULL, 0, 4, 'VT'),
|
||||
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '10', 1, NULL, 0, 4, 'VT'),
|
||||
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, '11', 2, NULL, 0, 4, 'VT'),
|
||||
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '12', 2, NULL, 0, 3, 'VT'),
|
||||
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '13', 2, NULL, 0, 2, 'VT'),
|
||||
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 4, 'VT'),
|
||||
(15, 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, '', 2, NULL, 0, 0, 'EMB'),
|
||||
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, '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', NULL, 0, 2, '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', 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', 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', NULL, 0, 5, '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', 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', NULL, 0, 3, '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, '', NULL, 0, 4, 'VT'),
|
||||
(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, '', NULL, 0, 0, 'EMB'),
|
||||
(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`)
|
||||
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`)
|
||||
VALUES
|
||||
('1', '2', 'GVC', 'A', '0', '1', '1', '1', '1', '1', '1', '106'),
|
||||
('2', '4', 'HEJ', 'A', '0', '2', '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', '1106');
|
||||
|
||||
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
||||
VALUES
|
||||
('1', '1', '1', '', '106'),
|
||||
('2', '2', '5', '', '106'),
|
||||
('1', '7', '1', '', '106'),
|
||||
('2', '8', '5', '', '106');
|
||||
('1', '1', '1', '', '1106'),
|
||||
('2', '2', '5', '', '1106'),
|
||||
('1', '7', '1', '', '1106'),
|
||||
('2', '8', '5', '', '1106');
|
||||
|
||||
INSERT INTO `vncontrol`.`accion`(`accion_id`, `accion`)
|
||||
VALUES
|
||||
|
@ -1056,8 +1060,8 @@ INSERT INTO `vn`.`itemPlacement`(`id`, `itemFk`, `warehouseFk`, `code`)
|
|||
|
||||
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`)
|
||||
VALUES
|
||||
(1, 106, 5),
|
||||
(2, 106, 14);
|
||||
(1, 1106, 5),
|
||||
(2, 1106, 14);
|
||||
|
||||
INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
||||
VALUES
|
||||
|
@ -1065,11 +1069,11 @@ INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
|||
|
||||
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `priority`, `userFk`)
|
||||
VALUES
|
||||
('UXN', 1, 1, 106);
|
||||
('UXN', 1, 1, 1106);
|
||||
|
||||
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `shelve`, `deep`, `quantity`, `visible`, `available`, `grouping`, `packing`, `level`, `userFk`)
|
||||
VALUES
|
||||
(1, 'UXN', 'A', 2, 12, 12, 12, 12, 12, 1, 106);
|
||||
(1, 'UXN', 'A', 2, 12, 12, 12, 12, 12, 1, 1106);
|
||||
|
||||
INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `level`)
|
||||
VALUES
|
||||
|
@ -1093,7 +1097,7 @@ INSERT INTO `vn`.`itemBotanical`(`itemFk`, `genusFk`, `specieFk`)
|
|||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 2, NULL),
|
||||
(4, NULL, NULL);
|
||||
(4, 2, 1);
|
||||
|
||||
INSERT INTO `vn`.`tag`(`id`, `code`, `name`, `isFree`, `isQuantitatif`, `sourceTable`, `unit`, `ediTypeFk`, `overwrite`)
|
||||
VALUES
|
||||
|
@ -1231,18 +1235,18 @@ INSERT INTO `vn`.`itemLog` (`id`, `originFk`, `userFk`, `action`, `description`)
|
|||
|
||||
INSERT INTO `vn`.`recovery`(`id`, `clientFk`, `started`, `finished`, `amount`, `period`)
|
||||
VALUES
|
||||
(1, 101, 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),
|
||||
(3, 102, CURDATE(), DATE_ADD(CURDATE(),INTERVAL 1 MONTH), 50, 7),
|
||||
(4, 103, CURDATE(), NULL, 50, 7);
|
||||
(1, 1101, DATE_ADD(CURDATE(),INTERVAL -7 MONTH), DATE_ADD(CURDATE(),INTERVAL -3 MONTH), 50, 7),
|
||||
(2, 1102, DATE_ADD(CURDATE(),INTERVAL -5 MONTH), CURDATE(), 100, 1),
|
||||
(3, 1102, CURDATE(), DATE_ADD(CURDATE(),INTERVAL 1 MONTH), 50, 7),
|
||||
(4, 1103, CURDATE(), NULL, 50, 7);
|
||||
|
||||
INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
|
||||
VALUES
|
||||
(101, 1500),
|
||||
(102, 100),
|
||||
(103, 1000),
|
||||
(104, 500),
|
||||
(105, 5000);
|
||||
(1101, 1500),
|
||||
(1102, 100),
|
||||
(1103, 1000),
|
||||
(1104, 500),
|
||||
(1105, 5000);
|
||||
|
||||
INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
||||
VALUES
|
||||
|
@ -1311,10 +1315,10 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed
|
|||
|
||||
INSERT INTO `vn`.`claimRatio`(`clientFk`, `yearSale`, `claimAmount`, `claimingRate`, `priceIncreasing`, `packingRate`)
|
||||
VALUES
|
||||
(101, 500, NULL, 0.00, 0.00, 1.00),
|
||||
(102, 1000, 2.00, 0.01, 0.05, 1.00),
|
||||
(103, 2000, 0.00, 0.00, 0.02, 1.00),
|
||||
(104, 2500, 150.00, 0.02, 0.10, 1.00);
|
||||
(1101, 500, NULL, 0.00, 0.00, 1.00),
|
||||
(1102, 1000, 2.00, 0.01, 0.05, 1.00),
|
||||
(1103, 2000, 0.00, 0.00, 0.02, 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`)
|
||||
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`)
|
||||
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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(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)),
|
||||
(7, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 101, 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()),
|
||||
(9, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 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()),
|
||||
(11, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 102, 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()),
|
||||
(13, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 103, 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()),
|
||||
(15, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 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()),
|
||||
(17, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 107, 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()),
|
||||
(19, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 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)),
|
||||
(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)),
|
||||
(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));
|
||||
(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), 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), 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), 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), 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), 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), 1101, 2, 7, 1, 442, NULL, 'SALIX', 0,'10.01', 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), 1104, 2, 7, 124, 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), 1102, 2, 7, 122, 442, NULL, 'SALIX', 0,'60.90', 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), 1103, 1, 2, 123, 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), 1105, 1, 3, 125, 442, NULL, 'SALIX', 0,'72.60', 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), 1107, 1, 4, 127, 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), 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), 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), 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), 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`)
|
||||
VALUES
|
||||
|
@ -1604,15 +1608,15 @@ INSERT INTO `hedera`.`visitAccess`(`id`, `agentFk`, `stamp`)
|
|||
|
||||
INSERT INTO `hedera`.`visitUser`(`id`, `accessFk`, `userFk`, `stamp`)
|
||||
VALUES
|
||||
(1, 1, 101, CURDATE()),
|
||||
(2, 2, 101, CURDATE()),
|
||||
(3, 3, 101, CURDATE()),
|
||||
(4, 4, 102, CURDATE()),
|
||||
(5, 5, 102, CURDATE()),
|
||||
(6, 6, 102, CURDATE()),
|
||||
(7, 7, 103, CURDATE()),
|
||||
(8, 8, 103, CURDATE()),
|
||||
(9, 9, 103, CURDATE());
|
||||
(1, 1, 1101, CURDATE()),
|
||||
(2, 2, 1101, CURDATE()),
|
||||
(3, 3, 1101, CURDATE()),
|
||||
(4, 4, 1102, CURDATE()),
|
||||
(5, 5, 1102, CURDATE()),
|
||||
(6, 6, 1102, CURDATE()),
|
||||
(7, 7, 1103, CURDATE()),
|
||||
(8, 8, 1103, CURDATE()),
|
||||
(9, 9, 1103, CURDATE());
|
||||
|
||||
INSERT INTO `hedera`.`userSession`(`created`, `lastUpdate`, `ssid`, `data`, `userVisitFk`)
|
||||
VALUES
|
||||
|
@ -1628,10 +1632,10 @@ INSERT INTO `hedera`.`userSession`(`created`, `lastUpdate`, `ssid`, `data`, `use
|
|||
|
||||
INSERT INTO `vn`.`clientContact`(`id`, `clientFk`, `name`, `phone`)
|
||||
VALUES
|
||||
(1, 101, 'contact 1', 666777888),
|
||||
(2, 101, 'contact 2', 111222333),
|
||||
(3, 101, 'contact 3', 222333444),
|
||||
(4, 102, 'contact 1', 876543219);
|
||||
(1, 1101, 'contact 1', 666777888),
|
||||
(2, 1101, 'contact 2', 111222333),
|
||||
(3, 1101, 'contact 3', 222333444),
|
||||
(4, 1102, 'contact 1', 876543219);
|
||||
|
||||
INSERT INTO `vn`.`workerManaExcluded`(`workerFk`)
|
||||
VALUES
|
||||
|
@ -1648,11 +1652,11 @@ call vn.manaSpellersRequery(18);
|
|||
|
||||
INSERT INTO `vn`.`clientSample`(`id`, `clientFk`, `typeFk`, `created`, `workerFk`, `userFk`, `companyFk`)
|
||||
VALUES
|
||||
(1, 101, 1, CURDATE(), 18, 18, 442),
|
||||
(2, 101, 1, CURDATE(), 18, 18, 442),
|
||||
(3, 101, 2, CURDATE(), 18, 18, 442),
|
||||
(4, 102, 2, CURDATE(), 18, 18, 567),
|
||||
(5, 102, 3, CURDATE(), 19, 19, 567);
|
||||
(1, 1101, 1, CURDATE(), 18, 18, 442),
|
||||
(2, 1101, 1, CURDATE(), 18, 18, 442),
|
||||
(3, 1101, 2, CURDATE(), 18, 18, 442),
|
||||
(4, 1102, 2, CURDATE(), 18, 18, 567),
|
||||
(5, 1102, 3, CURDATE(), 19, 19, 567);
|
||||
|
||||
INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`)
|
||||
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` )
|
||||
VALUES
|
||||
(1, CURDATE(), 1, 'observation one', 101, 18, 3, 0, CURDATE()),
|
||||
(2, CURDATE(), 2, 'observation two', 101, 18, 3, 0, CURDATE()),
|
||||
(3, CURDATE(), 3, 'observation three', 101, 18, 1, 1, CURDATE()),
|
||||
(4, CURDATE(), 3, 'observation four', 104, 18, 5, 0, CURDATE());
|
||||
(1, CURDATE(), 1, 'observation one', 1101, 18, 3, 0, CURDATE()),
|
||||
(2, CURDATE(), 2, 'observation two', 1101, 18, 3, 0, CURDATE()),
|
||||
(3, CURDATE(), 3, 'observation three', 1101, 18, 1, 1, CURDATE()),
|
||||
(4, CURDATE(), 3, 'observation four', 1104, 18, 5, 0, CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
|
||||
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`)
|
||||
VALUES
|
||||
(1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
||||
(2, 1, 101, NULL, 1000, NULL, 'SIS0051', 'started', CURDATE()),
|
||||
(3, 2, 101, NULL, 7268, NULL, NULL, 'ok', CURDATE()),
|
||||
(4, 2, 101, NULL, 4698, NULL, NULL, 'started', CURDATE()),
|
||||
(5, 1, 104, NULL, 2000, NULL, 'SIS0043', 'ok', CURDATE()),
|
||||
(6, 2, 104, NULL, 4000, NULL, 'SIS0044', 'started', CURDATE());
|
||||
(1, 1, 1101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
||||
(2, 1, 1101, NULL, 1000, NULL, 'SIS0051', 'started', CURDATE()),
|
||||
(3, 2, 1101, NULL, 7268, NULL, NULL, 'ok', CURDATE()),
|
||||
(4, 2, 1101, NULL, 4698, NULL, NULL, 'started', CURDATE()),
|
||||
(5, 1, 1104, NULL, 2000, NULL, 'SIS0043', 'ok', CURDATE()),
|
||||
(6, 2, 1104, NULL, 4000, NULL, 'SIS0044', 'started', CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
||||
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`)
|
||||
VALUES
|
||||
(1, 'Cobro web', 100.50, 0.00, CURDATE(), 9, 1, 101, 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),
|
||||
(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),
|
||||
(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);
|
||||
(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, 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, 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, 1103, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 442, 0);
|
||||
|
||||
INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
|
||||
VALUES
|
||||
(1, 1, 9),
|
||||
(2, 2, 18),
|
||||
(3, 2, 19),
|
||||
(4, 3, 101),
|
||||
(5, 3, 102),
|
||||
(6, 4, 103),
|
||||
(7, 4, 104);
|
||||
(4, 3, 1101),
|
||||
(5, 3, 1102),
|
||||
(6, 4, 1103),
|
||||
(7, 4, 1104);
|
||||
|
||||
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
||||
VALUES
|
||||
|
@ -1819,7 +1823,7 @@ UPDATE `postgresql`.`business_labour` bl
|
|||
JOIN `postgresql`.`profile` pr ON pr.profile_id = b.client_id
|
||||
JOIN `postgresql`.`person` p ON p.person_id = pr.person_id
|
||||
SET bl.`professional_category_id` = 31
|
||||
WHERE p.`Id_trabajador` = 110;
|
||||
WHERE p.`Id_trabajador` = 1110;
|
||||
|
||||
UPDATE `postgresql`.`business_labour` bl
|
||||
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`)
|
||||
VALUES
|
||||
(1, 106, 1),
|
||||
(2, 107, 2);
|
||||
(1, 1106, 1),
|
||||
(2, 1107, 2);
|
||||
|
||||
INSERT INTO `vn`.`workCenter` (`id`, `name`, `warehouseFk`)
|
||||
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`)
|
||||
VALUES
|
||||
(106, 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))),
|
||||
(106, 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))),
|
||||
(106, 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))),
|
||||
(106, 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))),
|
||||
(107, 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))),
|
||||
(107, 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))),
|
||||
(107, 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)));
|
||||
(1106, 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 -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
|
||||
(1106, 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 -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
|
||||
(1106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
|
||||
(1106, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 DAY))),
|
||||
(1106, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -15 DAY), DATE_ADD(CURDATE(), INTERVAL 7 DAY))),
|
||||
(1107, 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 -11 DAY), DATE_ADD(CURDATE(), INTERVAL 11 DAY))),
|
||||
(1107, 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 -20 DAY), DATE_ADD(CURDATE(), INTERVAL 20 DAY))),
|
||||
(1107, 2, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -13 DAY), DATE_ADD(CURDATE(), INTERVAL 8 DAY))),
|
||||
(1107, 1, IF(MONTH(CURDATE()) >= 1 AND DAY(CURDATE()) > 20, DATE_ADD(CURDATE(), INTERVAL -14 DAY), DATE_ADD(CURDATE(), INTERVAL 9 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`)
|
||||
VALUES
|
||||
|
@ -1878,8 +1882,8 @@ INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`)
|
|||
|
||||
INSERT INTO `vn`.`sharingClient`(`id`, `workerFk`, `started`, `ended`, `clientFk`)
|
||||
VALUES
|
||||
(1, 19, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 101),
|
||||
(2, 18, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 106);
|
||||
(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), 1106);
|
||||
|
||||
INSERT INTO `vn`.`sharingCart`(`id`, `workerFk`, `started`, `ended`, `workerSubstitute`, `created`)
|
||||
VALUES
|
||||
|
@ -2138,10 +2142,10 @@ INSERT INTO `vn`.`zoneEvent`(`zoneFk`, `type`, `weekDays`)
|
|||
|
||||
INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`)
|
||||
VALUES
|
||||
(106, CONCAT(CURDATE(), ' 07:00'), TRUE, 'in'),
|
||||
(106, CONCAT(CURDATE(), ' 10:00'), TRUE, 'middle'),
|
||||
(106, CONCAT(CURDATE(), ' 10:10'), TRUE, 'middle'),
|
||||
(106, CONCAT(CURDATE(), ' 15:00'), TRUE, 'out');
|
||||
(1106, CONCAT(CURDATE(), ' 07:00'), TRUE, 'in'),
|
||||
(1106, CONCAT(CURDATE(), ' 10:00'), TRUE, 'middle'),
|
||||
(1106, CONCAT(CURDATE(), ' 10:10'), TRUE, 'middle'),
|
||||
(1106, CONCAT(CURDATE(), ' 15:00'), TRUE, 'out');
|
||||
|
||||
INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`, `code`)
|
||||
VALUES
|
||||
|
@ -2182,13 +2186,13 @@ INSERT INTO `vn`.`ticketDms`(`ticketFk`, `dmsFk`)
|
|||
|
||||
INSERT INTO `vn`.`clientDms`(`clientFk`, `dmsFk`)
|
||||
VALUES
|
||||
(104, 2),
|
||||
(104, 3);
|
||||
(1104, 2),
|
||||
(1104, 3);
|
||||
|
||||
INSERT INTO `vn`.`workerDocument`(`id`, `worker`, `document`,`isReadableByWorker`)
|
||||
VALUES
|
||||
(1, 106, 4, TRUE),
|
||||
(2, 107, 3, FALSE);
|
||||
(1, 1106, 4, TRUE),
|
||||
(2, 1107, 3, FALSE);
|
||||
|
||||
INSERT INTO `vn`.`device` (`sn`, `model`, `userFk`)
|
||||
VALUES
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,6 +40,7 @@ TABLES=(
|
|||
vn
|
||||
alertLevel
|
||||
bookingPlanner
|
||||
businessType
|
||||
cplusInvoiceType472
|
||||
cplusInvoiceType477
|
||||
cplusRectificationType
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
SCHEMAS=(
|
||||
account
|
||||
bs
|
||||
bi
|
||||
cache
|
||||
edi
|
||||
hedera
|
||||
|
|
|
@ -10,7 +10,7 @@ describe('ticket ticketCalculateClon()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
shipped: today,
|
||||
warehouseFk: 1,
|
||||
companyFk: 442,
|
||||
|
@ -59,7 +59,7 @@ describe('ticket ticketCalculateClon()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
shipped: today,
|
||||
warehouseFk: 1,
|
||||
companyFk: 442,
|
||||
|
|
|
@ -10,7 +10,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
shipped: today,
|
||||
warehouseFk: 1,
|
||||
companyFk: 442,
|
||||
|
@ -59,7 +59,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
shipped: today,
|
||||
warehouseFk: 1,
|
||||
companyFk: 442,
|
||||
|
@ -109,7 +109,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
shipped: today,
|
||||
warehouseFk: 1,
|
||||
companyFk: 442,
|
||||
|
@ -156,7 +156,7 @@ describe('ticket ticketCreateWithUser()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
shipped: today,
|
||||
warehouseFk: 1,
|
||||
companyFk: 442,
|
||||
|
|
|
@ -9,7 +9,7 @@ xdescribe('ticket_componentMakeUpdate()', () => {
|
|||
|
||||
let params = {
|
||||
ticketId: 11,
|
||||
clientId: 102,
|
||||
clientId: 1102,
|
||||
agencyModeId: 2,
|
||||
addressId: 122,
|
||||
zoneId: 3,
|
||||
|
@ -68,7 +68,7 @@ xdescribe('ticket_componentMakeUpdate()', () => {
|
|||
|
||||
let params = {
|
||||
ticketId: 11,
|
||||
clientId: 102,
|
||||
clientId: 1102,
|
||||
agencyModeId: 2,
|
||||
addressId: 122,
|
||||
zoneId: 3,
|
||||
|
|
|
@ -14,7 +14,7 @@ describe('timeBusiness_calculateByUser()', () => {
|
|||
stmts.push('START TRANSACTION');
|
||||
|
||||
let params = {
|
||||
workerID: 106,
|
||||
workerID: 1106,
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ describe('timeControl_calculateByUser()', () => {
|
|||
`);
|
||||
|
||||
let params = {
|
||||
workerID: 106,
|
||||
workerID: 1106,
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
|
@ -71,7 +71,7 @@ describe('timeControl_calculateByUser()', () => {
|
|||
tmp.timeBusinessCalculate
|
||||
`);
|
||||
|
||||
const workerID = 107;
|
||||
const workerID = 1107;
|
||||
|
||||
stmt = new ParameterizedSQL(`
|
||||
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() => {
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
const workerId = 110;
|
||||
const workerId = 1110;
|
||||
const tabletId = 2;
|
||||
let err;
|
||||
stmts.push('START TRANSACTION');
|
||||
|
@ -31,7 +31,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
|||
it('should check that the worker can sign on that tablet', async() => {
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
const workerId = 110;
|
||||
const workerId = 1110;
|
||||
const tabletId = 1;
|
||||
let err;
|
||||
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() => {
|
||||
// dayBreak to 9h in postgresql.professional_category
|
||||
const workerId = 110;
|
||||
const workerId = 1110;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
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() => {
|
||||
// dayBreak to 9h in postgresql.professional_category
|
||||
const workerId = 110;
|
||||
const workerId = 1110;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
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() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
|
@ -163,7 +163,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
|||
});
|
||||
|
||||
it('should throw an error if the worker has finished the 12h break', async() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
|
@ -198,7 +198,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
|||
});
|
||||
|
||||
it('should throw an error if the worker has odd entry records', async() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
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() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
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() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
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() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
|
@ -377,7 +377,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
|||
});
|
||||
|
||||
it('should check if the worker has finished the 36h weekly break', async() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
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() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
|
@ -505,7 +505,7 @@ xdescribe('worker workerTimeControl_check()', () => {
|
|||
});
|
||||
|
||||
it('should check if the worker has finished the 72h biweekly break', async() => {
|
||||
const workerId = 109;
|
||||
const workerId = 1109;
|
||||
const tabletId = 1;
|
||||
let stmts = [];
|
||||
let stmt;
|
||||
|
|
|
@ -152,6 +152,7 @@ export default {
|
|||
salesPerson: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
|
||||
channel: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.contactChannelFk"]',
|
||||
transferor: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.transferorFk"]',
|
||||
businessType: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.businessTypeFk"]',
|
||||
saveButton: 'vn-client-basic-data button[type=submit]'
|
||||
},
|
||||
clientFiscalData: {
|
||||
|
@ -481,7 +482,7 @@ export default {
|
|||
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',
|
||||
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"]',
|
||||
payoutDescription: 'vn-textfield[ng-model="$ctrl.receipt.description"]',
|
||||
submitPayout: '.vn-dialog button[response="accept"]',
|
||||
|
@ -646,6 +647,12 @@ export default {
|
|||
saveServiceButton: 'button[type=submit]',
|
||||
saveServiceTypeButton: '.vn-dialog.shown tpl-buttons > button'
|
||||
},
|
||||
ticketDms: {
|
||||
import: 'vn-ticket-dms-index vn-button[icon="file_copy"]',
|
||||
document: 'vn-autocomplete[ng-model="$ctrl.dmsId"]',
|
||||
saveImport: 'button[response="accept"]',
|
||||
anyDocument: 'vn-ticket-dms-index > vn-data-viewer vn-tbody vn-tr'
|
||||
},
|
||||
createStateView: {
|
||||
state: 'vn-autocomplete[ng-model="$ctrl.stateFk"]',
|
||||
worker: 'vn-autocomplete[ng-model="$ctrl.workerFk"]',
|
||||
|
@ -837,7 +844,8 @@ export default {
|
|||
saveButton: 'vn-worker-pbx button[type=submit]'
|
||||
},
|
||||
workerTimeControl: {
|
||||
timeDialog: '.vn-dialog.shown vn-input-time[ng-model="$ctrl.newTime"]',
|
||||
dialogTimeInput: '.vn-dialog.shown vn-input-time[ng-model="$ctrl.newTimeEntry.timed"]',
|
||||
dialogTimeDirection: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.newTimeEntry.direction"]',
|
||||
mondayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(1) > vn-icon-button',
|
||||
tuesdayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(2) > vn-icon-button',
|
||||
wednesdayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(3) > vn-icon-button',
|
||||
|
@ -845,35 +853,35 @@ export default {
|
|||
fridayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(5) > vn-icon-button',
|
||||
saturdayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(6) > vn-icon-button',
|
||||
sundayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(7) > vn-icon-button',
|
||||
firstEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(1) > vn-chip > div',
|
||||
firstEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(1) > vn-chip > div',
|
||||
firstEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(1) > vn-chip > div',
|
||||
firstEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(1) > vn-chip > div',
|
||||
firstEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(1) > vn-chip > div',
|
||||
firstEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(1) > vn-chip > div',
|
||||
firstEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(1) > vn-chip > div',
|
||||
secondEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(2) > vn-chip > div',
|
||||
secondEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(2) > vn-chip > div',
|
||||
secondEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(2) > vn-chip > div',
|
||||
secondEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(2) > vn-chip > div',
|
||||
secondEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(2) > vn-chip > div',
|
||||
secondEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(2) > vn-chip > div',
|
||||
secondEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(2) > vn-chip > div',
|
||||
thirdEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(3) > vn-chip > div',
|
||||
firstEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
firstEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
firstEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
firstEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
firstEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
firstEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
firstEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(1) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
secondEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(2) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfMondayDelete: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(3) > vn-chip > vn-icon[icon="cancel"]',
|
||||
thirdEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(3) > vn-chip > div',
|
||||
thirdEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(3) > vn-chip > div',
|
||||
thirdEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(3) > vn-chip > div',
|
||||
thirdEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(3) > vn-chip > div',
|
||||
thirdEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(3) > vn-chip > div',
|
||||
thirdEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(3) > vn-chip > div',
|
||||
fourthEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(4) > vn-chip > div',
|
||||
fourthEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(4) > vn-chip > div',
|
||||
fourthEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(4) > vn-chip > div',
|
||||
fourthEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(4) > vn-chip > div',
|
||||
fourthEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(4) > vn-chip > div',
|
||||
fourthEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(4) > vn-chip > div',
|
||||
fourthEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(4) > vn-chip > div',
|
||||
thirdEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
thirdEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(3) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfMonday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfTuesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfWednesday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfThursday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfFriday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(5) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfSaturday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
fourthEntryOfSunday: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7) > section:nth-child(4) > vn-chip > div:nth-child(2)',
|
||||
mondayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(1)',
|
||||
tuesdayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(2)',
|
||||
wednesdayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(3)',
|
||||
|
|
|
@ -35,6 +35,7 @@ describe('Client Edit basicData path', () => {
|
|||
await page.write(selectors.clientBasicData.email, 'PWallace@verdnatura.es');
|
||||
await page.autocompleteSearch(selectors.clientBasicData.channel, 'Rumors on the streets');
|
||||
await page.autocompleteSearch(selectors.clientBasicData.transferor, 'Max Eisenhardt');
|
||||
await page.autocompleteSearch(selectors.clientBasicData.businessType, 'Eventos');
|
||||
await page.waitToClick(selectors.clientBasicData.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
|
@ -55,6 +56,13 @@ describe('Client Edit basicData path', () => {
|
|||
expect(result).toEqual('David Haller');
|
||||
});
|
||||
|
||||
it('should confirm the business type have been edited', async() => {
|
||||
const result = await page
|
||||
.waitToGetProperty(selectors.clientBasicData.businessType, 'value');
|
||||
|
||||
expect(result).toEqual('Eventos');
|
||||
});
|
||||
|
||||
it('should confirm the email have been edited', async() => {
|
||||
const result = await page
|
||||
.waitToGetProperty(selectors.clientBasicData.email, 'value');
|
||||
|
|
|
@ -31,8 +31,7 @@ describe('Client Edit billing data path', () => {
|
|||
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.
|
||||
xit(`should create a new BIC code`, async() => {
|
||||
it(`should create a new BIC code`, async() => {
|
||||
await page.waitToClick(selectors.clientBillingData.newBankEntityButton);
|
||||
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
|
||||
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
||||
|
@ -44,7 +43,7 @@ describe('Client Edit billing data path', () => {
|
|||
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');
|
||||
|
||||
expect(payMethod).toEqual('PayMethod with IBAN');
|
||||
|
|
|
@ -22,7 +22,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '07:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfMonday, 'innerText');
|
||||
|
||||
|
@ -33,7 +34,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '10:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfMonday, 'innerText');
|
||||
|
||||
|
@ -44,7 +46,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '18:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfMonday, 'innerText');
|
||||
|
||||
|
@ -66,7 +69,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '14:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfMonday, 'innerText');
|
||||
|
||||
|
@ -77,7 +81,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '10:20';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfMonday, 'innerText');
|
||||
|
||||
|
@ -103,7 +108,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '08:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfTuesday, 'innerText');
|
||||
|
||||
|
@ -114,7 +120,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '10:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfTuesday, 'innerText');
|
||||
|
||||
|
@ -125,7 +132,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '10:20';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfTuesday, 'innerText');
|
||||
|
||||
|
@ -136,7 +144,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '16:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfTuesday, 'innerText');
|
||||
|
||||
|
@ -153,7 +162,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '09:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfWednesday, 'innerText');
|
||||
|
||||
|
@ -164,7 +174,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '10:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfWednesday, 'innerText');
|
||||
|
||||
|
@ -175,7 +186,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '10:20';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfWednesday, 'innerText');
|
||||
|
||||
|
@ -186,7 +198,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '17:00';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfWednesday, 'innerText');
|
||||
|
||||
|
@ -203,7 +216,8 @@ describe('Worker time control path', () => {
|
|||
const scanTime = '09:59';
|
||||
|
||||
await page.waitToClick(selectors.workerTimeControl.thursdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfThursday, 'innerText');
|
||||
|
||||
|
@ -213,7 +227,8 @@ describe('Worker time control path', () => {
|
|||
it(`should joyfully scan out Hank Pym for break`, async() => {
|
||||
const scanTime = '10:00';
|
||||
await page.waitToClick(selectors.workerTimeControl.thursdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfThursday, 'innerText');
|
||||
|
||||
|
@ -223,7 +238,8 @@ describe('Worker time control path', () => {
|
|||
it(`should joyfully scan in Hank Pym from the break`, async() => {
|
||||
const scanTime = '10:20';
|
||||
await page.waitToClick(selectors.workerTimeControl.thursdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfThursday, 'innerText');
|
||||
|
||||
|
@ -233,7 +249,8 @@ describe('Worker time control path', () => {
|
|||
it(`should joyfully scan out Hank Pym for the day`, async() => {
|
||||
const scanTime = '17:59';
|
||||
await page.waitToClick(selectors.workerTimeControl.thursdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfThursday, 'innerText');
|
||||
|
||||
|
@ -249,7 +266,8 @@ describe('Worker time control path', () => {
|
|||
it('should smilingly scan in Hank Pym', async() => {
|
||||
const scanTime = '07:30';
|
||||
await page.waitToClick(selectors.workerTimeControl.fridayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfFriday, 'innerText');
|
||||
|
||||
|
@ -259,7 +277,8 @@ describe('Worker time control path', () => {
|
|||
it(`should smilingly scan out Hank Pym for break`, async() => {
|
||||
const scanTime = '10:00';
|
||||
await page.waitToClick(selectors.workerTimeControl.fridayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfFriday, 'innerText');
|
||||
|
||||
|
@ -269,7 +288,8 @@ describe('Worker time control path', () => {
|
|||
it(`should smilingly scan in Hank Pym from the break`, async() => {
|
||||
const scanTime = '10:20';
|
||||
await page.waitToClick(selectors.workerTimeControl.fridayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfFriday, 'innerText');
|
||||
|
||||
|
@ -279,7 +299,8 @@ describe('Worker time control path', () => {
|
|||
it(`should smilingly scan out Hank Pym for the day`, async() => {
|
||||
const scanTime = '15:30';
|
||||
await page.waitToClick(selectors.workerTimeControl.fridayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfFriday, 'innerText');
|
||||
|
||||
|
@ -310,8 +331,10 @@ describe('Worker time control path', () => {
|
|||
|
||||
it('should lovingly scan in Hank Pym', async() => {
|
||||
const scanTime = '06:00';
|
||||
await page.waitForTimeout(1000); // without this timeout the dialog doesn't pop up
|
||||
await page.waitToClick(selectors.workerTimeControl.saturdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfSaturday, 'innerText');
|
||||
|
||||
|
@ -321,7 +344,8 @@ describe('Worker time control path', () => {
|
|||
it(`should lovingly scan out Hank Pym for the day with no break to leave a bit early`, async() => {
|
||||
const scanTime = '13:40';
|
||||
await page.waitToClick(selectors.workerTimeControl.saturdayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfSaturday, 'innerText');
|
||||
|
||||
|
@ -337,7 +361,8 @@ describe('Worker time control path', () => {
|
|||
it('should gladly scan in Hank Pym', async() => {
|
||||
const scanTime = '05:00';
|
||||
await page.waitToClick(selectors.workerTimeControl.sundayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfSunday, 'innerText');
|
||||
|
||||
|
@ -347,7 +372,8 @@ describe('Worker time control path', () => {
|
|||
it(`should gladly scan out Hank Pym for the day with no break to leave a bit early`, async() => {
|
||||
const scanTime = '12:40';
|
||||
await page.waitToClick(selectors.workerTimeControl.sundayAddTimeButton);
|
||||
await page.pickTime(selectors.workerTimeControl.timeDialog, scanTime);
|
||||
await page.pickTime(selectors.workerTimeControl.dialogTimeInput, scanTime);
|
||||
await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
|
||||
await page.respondToDialog('accept');
|
||||
const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfSunday, 'innerText');
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ describe('Ticket Summary path', () => {
|
|||
const result = await page.waitToGetProperty(selectors.ticketSummary.header, 'innerText');
|
||||
|
||||
expect(result).toContain(`Ticket #${ticketId}`);
|
||||
expect(result).toContain('Bruce Banner (109)');
|
||||
expect(result).toContain('Bruce Banner (1109)');
|
||||
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() => {
|
||||
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.waitForNumberOfElements(selectors.ticketsIndex.anySearchResult, 6);
|
||||
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() => {
|
||||
await page.waitToClick(selectors.globalItems.homeButton);
|
||||
await page.selectModule('client');
|
||||
await page.accessToSearchResult('101');
|
||||
await page.accessToSearchResult('1101');
|
||||
await page.accessToSection('client.card.balance.index');
|
||||
await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr');
|
||||
let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr');
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Ticket DMS path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'ticket');
|
||||
await page.accessToSearchResult('1');
|
||||
await page.accessToSection('ticket.card.dms.index');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should import a document', async() => {
|
||||
await page.waitToClick(selectors.ticketDms.import);
|
||||
await page.autocompleteSearch(selectors.ticketDms.document, '1');
|
||||
await page.waitToClick(selectors.ticketDms.saveImport);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it(`should check there's a listed document now`, async() => {
|
||||
const result = await page.countElement(selectors.ticketDms.anyDocument);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it('should attempt to import an existing document on this ticket', async() => {
|
||||
await page.waitToClick(selectors.ticketDms.import);
|
||||
await page.autocompleteSearch(selectors.ticketDms.document, '1');
|
||||
await page.waitToClick(selectors.ticketDms.saveImport);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('This document already exists on this ticket');
|
||||
});
|
||||
|
||||
it(`should check there's still one document`, async() => {
|
||||
const result = await page.countElement(selectors.ticketDms.anyDocument);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
});
|
|
@ -89,7 +89,7 @@ describe('Order edit basic data path', () => {
|
|||
const result = await page
|
||||
.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() => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
// Tarea #2972
|
||||
xdescribe('Travel descriptor path', () => {
|
||||
|
||||
describe('Travel descriptor path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
|
@ -136,6 +136,7 @@ xdescribe('Travel descriptor path', () => {
|
|||
it('should navigate to the summary and then clone the travel and its entries using the descriptor menu to get redirected to the cloned travel basic data', async() => {
|
||||
await page.waitToClick('vn-icon[icon="preview"]'); // summary icon
|
||||
await page.waitForState('travel.card.summary');
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitToClick(selectors.travelDescriptor.dotMenu);
|
||||
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
|
||||
await page.waitToClick(selectors.travelDescriptor.acceptClonation);
|
||||
|
|
|
@ -65,6 +65,7 @@ describe('Account create and basic data path', () => {
|
|||
describe('Descriptor option', () => {
|
||||
describe('Edit role', () => {
|
||||
it('should edit the role using the descriptor menu', async() => {
|
||||
await page.waitForTimeout(1000); // sometimes descriptor fails to load it's functionalities without this timeout
|
||||
await page.waitToClick(selectors.accountDescriptor.menuButton);
|
||||
await page.waitToClick(selectors.accountDescriptor.changeRole);
|
||||
await page.autocompleteSearch(selectors.accountDescriptor.newRole, 'adminBoss');
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<div
|
||||
ng-transclude="prepend"
|
||||
class="prepend"></div>
|
||||
<div ng-transclude></div>
|
||||
<div
|
||||
ng-transclude="append"
|
||||
class="append"></div>
|
||||
<vn-icon
|
||||
ng-click="$ctrl.onRemove()"
|
||||
ng-click="$ctrl.onRemove($event)"
|
||||
ng-if="$ctrl.removable"
|
||||
icon="cancel"
|
||||
tabindex="0">
|
||||
|
|
|
@ -3,16 +3,19 @@ import Component from '../../lib/component';
|
|||
import './style.scss';
|
||||
|
||||
export default class Chip extends Component {
|
||||
onRemove() {
|
||||
if (!this.disabled) this.emit('remove');
|
||||
onRemove($event) {
|
||||
if (!this.disabled) this.emit('remove', {$event});
|
||||
}
|
||||
}
|
||||
Chip.$inject = ['$element', '$scope', '$transclude'];
|
||||
|
||||
ngModule.vnComponent('vnChip', {
|
||||
template: require('./index.html'),
|
||||
transclude: {
|
||||
prepend: '?prepend',
|
||||
append: '?append'
|
||||
},
|
||||
controller: Chip,
|
||||
transclude: true,
|
||||
bindings: {
|
||||
disabled: '<?',
|
||||
removable: '<?'
|
||||
|
|
|
@ -18,9 +18,14 @@ describe('Component vnChip', () => {
|
|||
it(`should emit remove event`, () => {
|
||||
controller.emit = () => {};
|
||||
jest.spyOn(controller, 'emit');
|
||||
controller.onRemove();
|
||||
|
||||
expect(controller.emit).toHaveBeenCalledWith('remove');
|
||||
const $event = new Event('click');
|
||||
const target = document.createElement('div');
|
||||
target.dispatchEvent($event);
|
||||
|
||||
controller.onRemove($event);
|
||||
|
||||
expect(controller.emit).toHaveBeenCalledWith('remove', {$event});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import "variables";
|
||||
@import "effects";
|
||||
|
||||
vn-chip {
|
||||
border-radius: 16px;
|
||||
|
@ -24,25 +25,47 @@ vn-chip {
|
|||
&.transparent {
|
||||
background-color: transparent;
|
||||
}
|
||||
&.colored {
|
||||
&.colored,
|
||||
&.colored.clickable:hover,
|
||||
&.colored.clickable:focus {
|
||||
background-color: $color-main;
|
||||
color: $color-font-bg;
|
||||
}
|
||||
&.notice {
|
||||
background-color: $color-notice-medium
|
||||
|
||||
&.notice,
|
||||
&.notice.clickable:hover,
|
||||
&.notice.clickable:focus {
|
||||
background-color: $color-notice-medium;
|
||||
}
|
||||
&.success {
|
||||
&.success,
|
||||
&.success.clickable:hover,
|
||||
&.success.clickable:focus {
|
||||
background-color: $color-success-medium;
|
||||
}
|
||||
&.warning {
|
||||
&.warning,
|
||||
&.warning.clickable:hover,
|
||||
&.warning.clickable:focus {
|
||||
background-color: $color-main-medium;
|
||||
}
|
||||
&.alert {
|
||||
&.alert,
|
||||
&.alert.clickable:hover,
|
||||
&.alert.clickable:focus {
|
||||
background-color: $color-alert-medium;
|
||||
}
|
||||
&.message {
|
||||
&.message,
|
||||
&.message.clickable:hover,
|
||||
&.message.clickable:focus {
|
||||
color: $color-font-dark;
|
||||
background-color: $color-bg-dark
|
||||
background-color: $color-bg-dark;
|
||||
}
|
||||
&.clickable {
|
||||
@extend %clickable;
|
||||
opacity: 0.8;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
|
@ -75,6 +98,20 @@ vn-chip {
|
|||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
& > .prepend {
|
||||
padding: 0 5px;
|
||||
padding-right: 0;
|
||||
|
||||
&:empty {display:none;}
|
||||
}
|
||||
& > .append {
|
||||
padding: 0 5px;
|
||||
padding-left: 0;
|
||||
|
||||
&:empty {display:none;}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
vn-avatar {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<div ng-if="$ctrl.model.moreRows">
|
||||
<vn-icon-button
|
||||
<vn-button
|
||||
ng-if="!$ctrl.model.isPaging"
|
||||
icon="more_horiz"
|
||||
vn-tooltip="Load more"
|
||||
label="Load more results"
|
||||
ng-click="$ctrl.onLoadClick()">
|
||||
</vn-icon-button>
|
||||
</vn-button>
|
||||
<vn-spinner
|
||||
ng-if="$ctrl.model.isPaging"
|
||||
enable="::true">
|
||||
|
|
|
@ -97,7 +97,6 @@ vn-table {
|
|||
min-width: 0;
|
||||
}
|
||||
&[vn-fetched-tags] {
|
||||
width: 235px;
|
||||
min-width: 155px;
|
||||
& > vn-one {
|
||||
overflow: hidden;
|
||||
|
|
|
@ -62,5 +62,5 @@ Go up: Ir arriba
|
|||
Loading...: Cargando...
|
||||
No results found: Sin resultados
|
||||
No data: Sin datos
|
||||
Load more: Cargar más
|
||||
Undo changes: Deshacer cambios
|
||||
Load more results: Cargar más resultados
|
|
@ -1,8 +1,157 @@
|
|||
{
|
||||
"name": "salix-front",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"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": {
|
||||
"@uirouter/angularjs": {
|
||||
"version": "1.0.29",
|
||||
|
|
|
@ -97,5 +97,7 @@
|
|||
"Role name must be written in camelCase": "Role name must be written in camelCase",
|
||||
"Client assignment has changed": "I did change the salesperson ~*\"<{{previousWorkerName}}>\"*~ by *\"<{{currentWorkerName}}>\"* from the client [{{clientName}} ({{clientId}})]({{{url}}})",
|
||||
"None": "None",
|
||||
"error densidad = 0": "error densidad = 0"
|
||||
"error densidad = 0": "error densidad = 0",
|
||||
"nickname": "nickname",
|
||||
"This document already exists on this ticket": "This document already exists on this ticket"
|
||||
}
|
|
@ -181,5 +181,6 @@
|
|||
"This specie already exist": "Esta especie ya existe",
|
||||
"Client assignment has changed": "He cambiado el comercial ~*\"<{{previousWorkerName}}>\"*~ por *\"<{{currentWorkerName}}>\"* del cliente [{{clientName}} ({{clientId}})]({{{url}}})",
|
||||
"None": "Ninguno",
|
||||
"The contract was not active during the selected date": "El contrato no estaba activo durante la fecha seleccionada"
|
||||
"The contract was not active during the selected date": "El contrato no estaba activo durante la fecha seleccionada",
|
||||
"This document already exists on this ticket": "Este documento ya existe en el ticket"
|
||||
}
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
|||
describe('TicketDms removeFile()', () => {
|
||||
const ticketDmsId = 1;
|
||||
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 error;
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('Update Claim', () => {
|
|||
const newDate = new Date();
|
||||
const originalData = {
|
||||
ticketFk: 3,
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
ticketCreated: newDate,
|
||||
workerFk: 18,
|
||||
claimStateFk: 2,
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('Update Claim', () => {
|
|||
const newDate = new Date();
|
||||
const original = {
|
||||
ticketFk: 3,
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
ticketCreated: newDate,
|
||||
workerFk: 18,
|
||||
claimStateFk: 2,
|
||||
|
|
|
@ -148,7 +148,7 @@ describe('claim', () => {
|
|||
return resolve(true);
|
||||
}));
|
||||
|
||||
controller.claim.clientFk = 101;
|
||||
controller.claim.clientFk = 1101;
|
||||
controller.claim.id = 11;
|
||||
|
||||
controller.onUpdateGreugeAccept().then(() => {
|
||||
|
@ -166,7 +166,7 @@ describe('claim', () => {
|
|||
const freightPickUpPrice = 11;
|
||||
const greugeTypeId = 7;
|
||||
const expectedData = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
description: `claim: ${controller.claim.id}`,
|
||||
amount: freightPickUpPrice,
|
||||
greugeTypeFk: greugeTypeId,
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('Item Component vnClaimDescriptor', () => {
|
|||
|
||||
const claim = {
|
||||
id: 2,
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
client: {email: 'client@email'}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('Claim', () => {
|
|||
controller.$.model = crudModel;
|
||||
controller.claim = {
|
||||
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()', () => {
|
||||
const clientDmsFk = 3;
|
||||
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 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', () => {
|
||||
let client;
|
||||
beforeEach(async() => {
|
||||
client = await app.models.Client.findById(101);
|
||||
await app.models.Address.update({clientFk: 101}, {isEqualizated: false});
|
||||
client = await app.models.Client.findById(1101);
|
||||
await app.models.Address.update({clientFk: 1101}, {isEqualizated: false});
|
||||
await client.updateAttributes({hasToInvoiceByAddress: true});
|
||||
});
|
||||
|
||||
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});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
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 = {
|
||||
isEqualizated: true
|
||||
};
|
||||
|
|
|
@ -2,14 +2,14 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('Client canCreateTicket', () => {
|
||||
it('should receive true if the client is active', async() => {
|
||||
let id = 105;
|
||||
let id = 1105;
|
||||
let canCreateTicket = await app.models.Client.canCreateTicket(id);
|
||||
|
||||
expect(canCreateTicket).toBeTruthy();
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
expect(canCreateTicket).toBe(false);
|
||||
|
|
|
@ -5,7 +5,7 @@ describe('client consumption() filter', () => {
|
|||
const ctx = {req: {accessToken: {userId: 9}}, args: {}};
|
||||
const filter = {
|
||||
where: {
|
||||
clientFk: 101
|
||||
clientFk: 1101
|
||||
},
|
||||
order: 'itemTypeFk, itemName, itemSize'
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ describe('client consumption() filter', () => {
|
|||
};
|
||||
const filter = {
|
||||
where: {
|
||||
clientFk: 101
|
||||
clientFk: 1101
|
||||
},
|
||||
order: 'itemFk'
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ describe('client consumption() filter', () => {
|
|||
};
|
||||
const filter = {
|
||||
where: {
|
||||
clientFk: 101
|
||||
clientFk: 1101
|
||||
},
|
||||
order: 'itemTypeFk, itemName, itemSize'
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Address createAddress', () => {
|
||||
const clientFk = 101;
|
||||
const clientFk = 1101;
|
||||
const provinceFk = 5;
|
||||
const incotermsFk = 'FAS';
|
||||
const customAgentOneId = 1;
|
||||
|
@ -59,7 +59,7 @@ describe('Address createAddress', () => {
|
|||
it('should create a new address and set as a client default address', async() => {
|
||||
const ctx = {
|
||||
args: {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
provinceFk: 1,
|
||||
nickname: 'My address',
|
||||
street: 'Wall Street',
|
||||
|
@ -87,7 +87,7 @@ describe('Address createAddress', () => {
|
|||
it('should create a new address and set all properties', async() => {
|
||||
const ctx = {
|
||||
args: {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
provinceFk: 1,
|
||||
nickname: 'My address',
|
||||
street: 'Wall Street',
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
const LoopBackContext = require('loopback-context');
|
||||
|
||||
describe('Client createReceipt', () => {
|
||||
const clientFk = 108;
|
||||
const clientFk = 1108;
|
||||
const payed = Date();
|
||||
const companyFk = 442;
|
||||
const amountPaid = 12.50;
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('client getAverageInvoiced()', () => {
|
||||
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);
|
||||
});
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client get', () => {
|
||||
describe('Client getCard()', () => {
|
||||
it('should receive a formated card of Bruce Wayne', async() => {
|
||||
let id = 101;
|
||||
let id = 1101;
|
||||
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.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()', () => {
|
||||
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()', () => {
|
||||
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);
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('Client getTransations', () => {
|
||||
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);
|
||||
|
||||
expect(result[1].id).toBeTruthy();
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('Client hasCustomerRole', () => {
|
||||
it('should call the hasCustomerRole() method with a customer id', done => {
|
||||
let id = 101;
|
||||
let id = 1101;
|
||||
let params = {};
|
||||
|
||||
let callback = (error, result) => {
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('Client isValidClient', () => {
|
||||
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);
|
||||
|
||||
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() => {
|
||||
let id = '106';
|
||||
let id = '1106';
|
||||
let result = await app.models.Client.isValidClient(id);
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
|||
describe('Client last active tickets', () => {
|
||||
it('should receive an array of last active tickets of Bruce Wayne', async() => {
|
||||
const ticketId = 22;
|
||||
const clientId = 109;
|
||||
const clientId = 1109;
|
||||
const warehouseId = 5;
|
||||
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() => {
|
||||
spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
|
||||
let ctx = {req: {accessToken: {userId: 9}}};
|
||||
let id = 101;
|
||||
let id = 1101;
|
||||
let destination = 222222222;
|
||||
let message = 'this is the message created in a test';
|
||||
|
||||
|
|
|
@ -2,44 +2,44 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('client summary()', () => {
|
||||
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');
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
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() => {
|
||||
let result = await app.models.Client.summary(101);
|
||||
let result = await app.models.Client.summary(1101);
|
||||
|
||||
expect(result.averageInvoiced.invoiced).toEqual(1500);
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('client lastActiveTickets()', () => {
|
||||
it('should return the last three active tickets', async() => {
|
||||
const clientId = 109;
|
||||
const clientId = 1109;
|
||||
const ticketId = 19;
|
||||
|
||||
let result = await app.models.Client.lastActiveTickets(clientId, ticketId);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Address updateAddress', () => {
|
||||
const clientId = 101;
|
||||
const clientId = 1101;
|
||||
const addressId = 1;
|
||||
const provinceId = 5;
|
||||
const incotermsId = 'FAS';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('Client updateFiscalData', () => {
|
||||
const clientId = 101;
|
||||
const clientId = 1101;
|
||||
const employeeId = 1;
|
||||
const salesAssistantId = 21;
|
||||
const administrativeId = 5;
|
||||
|
|
|
@ -2,8 +2,8 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('Client uploadFile()', () => {
|
||||
it(`should return an error for a user without enough privileges`, async() => {
|
||||
let clientId = 101;
|
||||
let currentUserId = 102;
|
||||
let clientId = 1101;
|
||||
let currentUserId = 1102;
|
||||
let paymentLawTypeId = 12;
|
||||
let ctx = {req: {accessToken: {userId: currentUserId}}, args: {dmsTypeId: paymentLawTypeId}};
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ const LoopBackContext = require('loopback-context');
|
|||
|
||||
describe('Client createWithInsurance', () => {
|
||||
const activeCtx = {
|
||||
accessToken: {userId: 101},
|
||||
accessToken: {userId: 1101},
|
||||
http: {
|
||||
req: {
|
||||
headers: {origin: 'http://localhost'}
|
||||
|
@ -44,13 +44,13 @@ describe('Client createWithInsurance', () => {
|
|||
});
|
||||
|
||||
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({
|
||||
active: activeCtx
|
||||
});
|
||||
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 insurances = await app.models.CreditInsurance.find();
|
||||
|
|
|
@ -3,7 +3,7 @@ const app = require('vn-loopback/server/server');
|
|||
describe('receipt filter()', () => {
|
||||
it('should return the receipts', async() => {
|
||||
const filter = {limit: 20};
|
||||
const clientId = 101;
|
||||
const clientId = 1101;
|
||||
const companyId = 442;
|
||||
let result = await app.models.Receipt.filter(filter, clientId, companyId);
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('client hasActiveRecovery', () => {
|
||||
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();
|
||||
});
|
||||
|
||||
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();
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('sms send()', () => {
|
|||
const code = 200;
|
||||
spyOn(soap, 'createClientAsync').and.returnValue('a so fake client');
|
||||
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.status).toContain('Fake response');
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
"BankEntity": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"BusinessType": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Client": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "BusinessType",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "businessType"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"id": true
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acls": [{
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}]
|
||||
}
|
|
@ -10,7 +10,6 @@ module.exports = Self => {
|
|||
// Methods
|
||||
require('../methods/client/getCard')(Self);
|
||||
require('../methods/client/createWithUser')(Self);
|
||||
require('../methods/client/listWorkers')(Self);
|
||||
require('../methods/client/hasCustomerRole')(Self);
|
||||
require('../methods/client/canCreateTicket')(Self);
|
||||
require('../methods/client/isValidClient')(Self);
|
||||
|
|
|
@ -168,6 +168,11 @@
|
|||
"model": "ClientType",
|
||||
"foreignKey": "clientTypeFk"
|
||||
},
|
||||
"businessType": {
|
||||
"type": "belongsTo",
|
||||
"model": "BusinessType",
|
||||
"foreignKey": "businessTypeFk"
|
||||
},
|
||||
"addresses": {
|
||||
"type": "hasMany",
|
||||
"model": "Address",
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
"type": "number",
|
||||
"required": true
|
||||
},
|
||||
"amountUnpaid": {
|
||||
"type": "number"
|
||||
},
|
||||
"payed": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
|
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('loopback model address', () => {
|
||||
let createdAddressId;
|
||||
const clientId = 101;
|
||||
const clientId = 1101;
|
||||
|
||||
afterAll(async done => {
|
||||
let client = await app.models.Client.findById(clientId);
|
||||
|
|
|
@ -15,9 +15,9 @@ describe('Client Model', () => {
|
|||
};
|
||||
const ctx = {req: activeCtx};
|
||||
const chatModel = app.models.Chat;
|
||||
const client = {id: 101, name: 'Bruce Banner'};
|
||||
const previousWorkerId = 106; // DavidCharlesHaller
|
||||
const currentWorkerId = 107; // HankPym
|
||||
const client = {id: 1101, name: 'Bruce Banner'};
|
||||
const previousWorkerId = 1106; // DavidCharlesHaller
|
||||
const currentWorkerId = 1107; // HankPym
|
||||
|
||||
beforeEach(() => {
|
||||
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', () => {
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('Client', () => {
|
|||
$scope = $rootScope.$new();
|
||||
const $element = angular.element('<vn-client-address-index></vn-client-address-index>');
|
||||
controller = $componentController('vnClientAddressIndex', {$element, $scope});
|
||||
controller.client = {id: 101, defaultAddressFk: 121};
|
||||
controller.client = {id: 1101, defaultAddressFk: 121};
|
||||
controller.$.model = crudModel;
|
||||
}));
|
||||
|
||||
|
|
|
@ -20,9 +20,8 @@
|
|||
label="Company"
|
||||
show-field="code"
|
||||
value-field="id"
|
||||
ng-model="$ctrl.receipt.companyFk"
|
||||
required="true"
|
||||
rule>
|
||||
ng-model="$ctrl.companyFk"
|
||||
required="true">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
@ -78,6 +77,12 @@
|
|||
on-change="$ctrl.accountShortToStandard(value)">
|
||||
</vn-textfield>
|
||||
</vn-vertical>
|
||||
<vn-horizontal ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
|
||||
<vn-check
|
||||
label="View receipt"
|
||||
ng-model="$ctrl.viewReceipt">
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
</tpl-body>
|
||||
<tpl-buttons>
|
||||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
||||
|
|
|
@ -2,9 +2,10 @@ import ngModule from '../../module';
|
|||
import Dialog from 'core/components/dialog';
|
||||
|
||||
class Controller extends Dialog {
|
||||
constructor($element, $, $transclude) {
|
||||
constructor($element, $, $transclude, vnReport) {
|
||||
super($element, $, $transclude);
|
||||
|
||||
this.vnReport = vnReport;
|
||||
this.receipt = {
|
||||
payed: new Date()
|
||||
};
|
||||
|
@ -31,6 +32,12 @@ class Controller extends Dialog {
|
|||
return this.receipt.clientFk;
|
||||
}
|
||||
|
||||
get companyFk() {
|
||||
if (!this.receipt.companyFk)
|
||||
this.receipt.companyFk = this.vnConfig.companyFk;
|
||||
return this.receipt.companyFk;
|
||||
}
|
||||
|
||||
set companyFk(value) {
|
||||
this.receipt.companyFk = value;
|
||||
this.getAmountPaid();
|
||||
|
@ -62,6 +69,22 @@ class Controller extends Dialog {
|
|||
this.amountToReturn = value - this.receipt.amountPaid;
|
||||
}
|
||||
|
||||
get amountToReturn() {
|
||||
return this._amountToReturn;
|
||||
}
|
||||
|
||||
set amountToReturn(value) {
|
||||
if (!value) return;
|
||||
|
||||
value = value.toFixed(2);
|
||||
|
||||
if (Number.isInteger(value))
|
||||
value = parseInt(value);
|
||||
else value = parseFloat(value);
|
||||
|
||||
this._amountToReturn = value;
|
||||
}
|
||||
|
||||
get deliveredAmount() {
|
||||
return this._deliveredAmount;
|
||||
}
|
||||
|
@ -98,12 +121,26 @@ class Controller extends Dialog {
|
|||
if (response !== 'accept')
|
||||
return super.responseHandler(response);
|
||||
|
||||
let receiptId;
|
||||
return this.$http.post(`Clients/${this.clientFk}/createReceipt`, this.receipt)
|
||||
.then(() => super.responseHandler(response))
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
||||
.then(res => {
|
||||
receiptId = res.data.id;
|
||||
super.responseHandler(response);
|
||||
})
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')))
|
||||
.then(() => {
|
||||
if (this.viewReceipt) {
|
||||
this.vnReport.show('receipt', {
|
||||
receiptId: receiptId,
|
||||
companyId: this.companyFk
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope', '$transclude', 'vnReport'];
|
||||
|
||||
ngModule.vnComponent('vnClientBalanceCreate', {
|
||||
slotTemplate: require('./index.html'),
|
||||
controller: Controller,
|
||||
|
|
|
@ -20,7 +20,7 @@ describe('Client', () => {
|
|||
};
|
||||
controller = $componentController('vnClientBalanceCreate', {$element, $scope, $transclude});
|
||||
controller.receipt = {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
companyFk: 442
|
||||
};
|
||||
}));
|
||||
|
@ -40,13 +40,21 @@ describe('Client', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('amountToReturn() setter', () => {
|
||||
it('should set the amount to return with a maximum of two decimals', () => {
|
||||
controller.amountToReturn = 200.1451789;
|
||||
|
||||
expect(controller.amountToReturn).toEqual(200.15);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getAmountPaid()', () => {
|
||||
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 filter = {
|
||||
where: {
|
||||
clientFk: 101,
|
||||
clientFk: 1101,
|
||||
companyFk: 442
|
||||
}
|
||||
};
|
||||
|
@ -62,14 +70,34 @@ describe('Client', () => {
|
|||
describe('responseHandler()', () => {
|
||||
it('should make an http POST query and then call to the parent responseHandler() method', () => {
|
||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
||||
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');
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.vnApp.showSuccess).toHaveBeenCalled();
|
||||
expect(controller.vnReport.show).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should make an http POST query and then call to the report show() method', () => {
|
||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
||||
jest.spyOn(controller.vnReport, 'show');
|
||||
window.open = jest.fn();
|
||||
|
||||
controller.$params = {id: 1101};
|
||||
controller.viewReceipt = true;
|
||||
|
||||
$httpBackend.expect('POST', `Clients/1101/createReceipt`).respond({id: 1});
|
||||
controller.responseHandler('accept');
|
||||
$httpBackend.flush();
|
||||
|
||||
const expectedParams = {receiptId: 1, companyId: 442};
|
||||
|
||||
expect(controller.vnApp.showSuccess).toHaveBeenCalled();
|
||||
expect(controller.vnReport.show).toHaveBeenCalledWith('receipt', expectedParams);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue