diff --git a/back/helpers.spec.js b/back/helpers.spec.js
new file mode 100644
index 000000000..ba8936d41
--- /dev/null
+++ b/back/helpers.spec.js
@@ -0,0 +1,5 @@
+const baseTime = null; // new Date(2022, 0, 19, 8, 0, 0, 0);
+if (baseTime) {
+ jasmine.clock().install();
+ jasmine.clock().mockDate(baseTime);
+}
diff --git a/back/methods/account/set-password.js b/back/methods/account/set-password.js
index fc54b5abe..ab4d3b3fe 100644
--- a/back/methods/account/set-password.js
+++ b/back/methods/account/set-password.js
@@ -1,16 +1,15 @@
-
module.exports = Self => {
Self.remoteMethod('setPassword', {
description: 'Sets the user password',
accepts: [
{
arg: 'id',
- type: 'Number',
+ type: 'number',
description: 'The user id',
http: {source: 'path'}
}, {
arg: 'newPassword',
- type: 'String',
+ type: 'string',
description: 'The new password',
required: true
}
diff --git a/back/methods/dms/deleteTrashFiles.js b/back/methods/dms/deleteTrashFiles.js
index 716e03311..7cfb9f8d1 100644
--- a/back/methods/dms/deleteTrashFiles.js
+++ b/back/methods/dms/deleteTrashFiles.js
@@ -1,3 +1,4 @@
+const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra');
const path = require('path');
@@ -26,6 +27,9 @@ module.exports = Self => {
myOptions.transaction = tx;
try {
+ if (process.env.NODE_ENV == 'test')
+ throw new UserError(`Action not allowed on the test environment`);
+
const models = Self.app.models;
const DmsContainer = models.DmsContainer;
@@ -33,9 +37,15 @@ module.exports = Self => {
where: {code: 'trash'}
}, myOptions);
+ const date = new Date();
+ date.setMonth(date.getMonth() - 4);
+
const dmsToDelete = await models.Dms.find({
where: {
- dmsTypeFk: trashDmsType.id
+ and: [
+ {dmsTypeFk: trashDmsType.id},
+ {created: {lt: date}}
+ ]
}
}, myOptions);
@@ -43,8 +53,14 @@ module.exports = Self => {
const pathHash = DmsContainer.getHash(dms.id);
const dmsContainer = await DmsContainer.container(pathHash);
const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file);
+ const dstFolder = path.join(dmsContainer.client.root, pathHash);
await fs.unlink(dstFile);
- await dms.destroy(myOptions);
+ try {
+ await fs.rmdir(dstFolder);
+ await dms.destroy(myOptions);
+ } catch (err) {
+ await dms.destroy(myOptions);
+ }
}
if (tx) await tx.commit();
} catch (e) {
diff --git a/back/models/warehouse.json b/back/models/warehouse.json
index eb86e2114..dcbf7f2d2 100644
--- a/back/models/warehouse.json
+++ b/back/models/warehouse.json
@@ -24,9 +24,6 @@
},
"isManaged":{
"type": "boolean"
- },
- "hasStowaway":{
- "type": "boolean"
}
},
"acls": [
diff --git a/back/nodemonConfig.json b/back/nodemonConfig.json
index a1c9ca84f..5138bc30e 100644
--- a/back/nodemonConfig.json
+++ b/back/nodemonConfig.json
@@ -18,6 +18,7 @@
"modules/supplier/front/**/*",
"modules/ticket/front/**/*",
"modules/travel/front/**/*",
+ "modules/shelving/front/**/*",
"modules/worker/front/**/*",
"modules/zone/front/**/*"
]
diff --git a/db/Dockerfile b/db/Dockerfile
index 8980c34f4..cb3aa741c 100644
--- a/db/Dockerfile
+++ b/db/Dockerfile
@@ -1,4 +1,4 @@
-FROM mariadb:10.4.13
+FROM mariadb:10.7.3
ENV MYSQL_ROOT_PASSWORD root
ENV TZ Europe/Madrid
@@ -31,11 +31,13 @@ COPY \
import-changes.sh \
config.ini \
dump/mysqlPlugins.sql \
+ dump/mockDate.sql \
dump/structure.sql \
dump/dumpedFixtures.sql \
./
RUN gosu mysql docker-init.sh \
&& docker-dump.sh mysqlPlugins \
+ && docker-dump.sh mockDate \
&& docker-dump.sh structure \
&& docker-dump.sh dumpedFixtures \
&& gosu mysql docker-temp-stop.sh
diff --git a/db/changes/10480-june/00-ACL.sql b/db/changes/10480-june/00-ACL.sql
new file mode 100644
index 000000000..b13e56e21
--- /dev/null
+++ b/db/changes/10480-june/00-ACL.sql
@@ -0,0 +1,21 @@
+INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
+ VALUES
+ ('InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing'),
+ ('InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant'),
+ ('InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager'),
+ ('Ticket','refund','WRITE','ALLOW','ROLE','invoicing'),
+ ('Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant'),
+ ('Ticket','refund','WRITE','ALLOW','ROLE','claimManager'),
+ ('Sale','refund','WRITE','ALLOW','ROLE','salesAssistant'),
+ ('Sale','refund','WRITE','ALLOW','ROLE','claimManager'),
+ ('TicketRefund','*','WRITE','ALLOW','ROLE','invoicing'),
+ ('ClaimObservation','*','WRITE','ALLOW','ROLE','salesPerson'),
+ ('ClaimObservation','*','READ','ALLOW','ROLE','salesPerson'),
+ ('Client','setPassword','WRITE','ALLOW','ROLE','salesPerson'),
+ ('Client','updateUser','WRITE','ALLOW','ROLE','salesPerson');
+
+DELETE FROM `salix`.`ACL` WHERE id=313;
+
+UPDATE `salix`.`ACL`
+ SET principalId='invoicing'
+ WHERE id=297;
\ No newline at end of file
diff --git a/db/changes/10480-june/00-aclShelvingLog.sql b/db/changes/10480-june/00-aclShelvingLog.sql
new file mode 100644
index 000000000..dc75142d1
--- /dev/null
+++ b/db/changes/10480-june/00-aclShelvingLog.sql
@@ -0,0 +1,3 @@
+INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
+ VALUES
+ ('ShelvingLog','*','READ','ALLOW','ROLE','employee');
\ No newline at end of file
diff --git a/db/changes/10480-june/00-aclZoneExclusionGeos.sql b/db/changes/10480-june/00-aclZoneExclusionGeos.sql
new file mode 100644
index 000000000..4c0f6c991
--- /dev/null
+++ b/db/changes/10480-june/00-aclZoneExclusionGeos.sql
@@ -0,0 +1,4 @@
+INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
+ VALUES
+ ('ZoneExclusionGeo', '*', 'READ', 'ALLOW', 'ROLE', 'employee'),
+ ('ZoneExclusionGeo', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
\ No newline at end of file
diff --git a/db/changes/10480-june/00-albaran_gestdoc.sql b/db/changes/10480-june/00-albaran_gestdoc.sql
new file mode 100644
index 000000000..a0ba93bd3
--- /dev/null
+++ b/db/changes/10480-june/00-albaran_gestdoc.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `vn2008`.`albaran_gestdoc` DROP FOREIGN KEY fk_albaran_gestdoc_gestdoc1;
+ALTER TABLE `vn2008`.`albaran_gestdoc` ADD CONSTRAINT albaran_gestdoc_FK FOREIGN KEY (gestdoc_id) REFERENCES `vn`.`dms`(id) ON DELETE CASCADE ON UPDATE CASCADE;
\ No newline at end of file
diff --git a/db/changes/10480-june/00-client.sql b/db/changes/10480-june/00-client.sql
new file mode 100644
index 000000000..4a39bbdf9
--- /dev/null
+++ b/db/changes/10480-june/00-client.sql
@@ -0,0 +1,3 @@
+alter table `vn`.`client`
+ add hasIncoterms tinyint(1) default 0 not null comment 'Received incoterms authorization from client';
+
diff --git a/db/changes/10480-june/00-deprecations.sql b/db/changes/10480-june/00-deprecations.sql
new file mode 100644
index 000000000..68becd13e
--- /dev/null
+++ b/db/changes/10480-june/00-deprecations.sql
@@ -0,0 +1,13 @@
+DROP FUNCTION `account`.`userGetId`;
+DROP FUNCTION `account`.`myUserGetName`;
+DROP FUNCTION `account`.`myUserGetId`;
+DROP FUNCTION `account`.`myUserHasRole`;
+DROP FUNCTION `account`.`myUserHasRoleId`;
+DROP FUNCTION `account`.`userGetName`;
+DROP FUNCTION `account`.`userHasRole`;
+DROP FUNCTION `account`.`userHasRoleId`;
+DROP PROCEDURE `account`.`myUserLogout`;
+DROP PROCEDURE `account`.`userLogin`;
+DROP PROCEDURE `account`.`userLoginWithKey`;
+DROP PROCEDURE `account`.`userLoginWithName`;
+DROP PROCEDURE `account`.`userSetPassword`;
\ No newline at end of file
diff --git a/db/changes/10480-june/00-item.sql b/db/changes/10480-june/00-item.sql
new file mode 100644
index 000000000..a08d3f4c1
--- /dev/null
+++ b/db/changes/10480-june/00-item.sql
@@ -0,0 +1 @@
+ALTER TABLE `vn`.`item` MODIFY COLUMN description TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL;
diff --git a/db/changes/10480-june/00-route.sql b/db/changes/10480-june/00-route.sql
new file mode 100644
index 000000000..beb7d5e41
--- /dev/null
+++ b/db/changes/10480-june/00-route.sql
@@ -0,0 +1,10 @@
+UPDATE `vn`.`route` r
+ JOIN(SELECT r.id, wl.workcenterFk
+ FROM `vn`.`route` r
+ JOIN `vn`.`routeLog` rl ON rl.originFk = r.id
+ JOIN `vn`.`workerLabour` wl ON wl.workerFk = rl.userFk
+ AND r.created BETWEEN wl.started AND IFNULL(wl.ended, r.created)
+ WHERE r.created BETWEEN '2021-12-01' AND CURDATE()
+ AND rl.action = 'insert'
+ )sub ON sub.id = r.id
+ SET r.commissionWorkCenterFk = sub.workcenterFk;
\ No newline at end of file
diff --git a/db/changes/10480-june/00-sample.sql b/db/changes/10480-june/00-sample.sql
new file mode 100644
index 000000000..18beb736d
--- /dev/null
+++ b/db/changes/10480-june/00-sample.sql
@@ -0,0 +1,2 @@
+INSERT INTO `vn`.`sample` (code, description, isVisible, hasCompany, hasPreview, datepickerEnabled)
+VALUES ('incoterms-authorization', 'Autorización de incoterms', 1, 1, 1, 0);
\ No newline at end of file
diff --git a/db/changes/10480-june/00-shelving.sql b/db/changes/10480-june/00-shelving.sql
new file mode 100644
index 000000000..c66d164c4
--- /dev/null
+++ b/db/changes/10480-june/00-shelving.sql
@@ -0,0 +1,18 @@
+ALTER TABLE `vn`.`itemShelving` DROP FOREIGN KEY itemShelving_fk2;
+ALTER TABLE `vn`.`shelvingLog` DROP FOREIGN KEY shelvingLog_FK_ibfk_1;
+ALTER TABLE `vn`.`smartTag` DROP FOREIGN KEY smartTag_shelving_fk;
+ALTER TABLE `vn`.`workerShelving` DROP FOREIGN KEY workerShelving_shelving_fk;
+
+ALTER TABLE `vn`.`shelving` DROP PRIMARY KEY;
+ALTER TABLE `vn`.`shelving` ADD id INT auto_increment PRIMARY KEY NULL;
+ALTER TABLE `vn`.`shelving` CHANGE id id int(11) auto_increment NOT NULL FIRST;
+ALTER TABLE `vn`.`shelving` ADD CONSTRAINT shelving_UN UNIQUE KEY (code);
+
+ALTER TABLE `vn`.`itemShelving` ADD CONSTRAINT itemShelving_fk2 FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE CASCADE ON UPDATE CASCADE;
+ALTER TABLE `vn`.`shelvingLog` ADD CONSTRAINT shelvingLog_FK_ibfk_1 FOREIGN KEY (originFk) REFERENCES `vn`.`shelving`(code) ON DELETE CASCADE ON UPDATE CASCADE;
+ALTER TABLE `vn`.`smartTag` ADD CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE RESTRICT ON UPDATE CASCADE;
+ALTER TABLE `vn`.`workerShelving` ADD CONSTRAINT workerShelving_FK_1 FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE RESTRICT ON UPDATE CASCADE;
+
+ALTER TABLE vn.shelvingLog DROP FOREIGN KEY shelvingLog_FK_ibfk_1;
+ALTER TABLE vn.shelvingLog MODIFY COLUMN originFk INT NOT NULL;
+ALTER TABLE vn.shelvingLog ADD CONSTRAINT shelvingLog_FK FOREIGN KEY (originFk) REFERENCES vn.shelving(id) ON DELETE CASCADE ON UPDATE CASCADE;
\ No newline at end of file
diff --git a/db/changes/10480-june/00-ticketRefund_beforeUpsert.sql b/db/changes/10480-june/00-ticketRefund_beforeUpsert.sql
new file mode 100644
index 000000000..e6506c5d7
--- /dev/null
+++ b/db/changes/10480-june/00-ticketRefund_beforeUpsert.sql
@@ -0,0 +1,21 @@
+DROP PROCEDURE IF EXISTS `vn`.`ticketRefund_beforeUpsert`;
+
+DELIMITER $$
+$$
+CREATE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketRefund_beforeUpsert`(vRefundTicketFk INT, vOriginalTicketFk INT)
+BEGIN
+ DECLARE vAlreadyExists BOOLEAN DEFAULT FALSE;
+
+ IF vRefundTicketFk = vOriginalTicketFk THEN
+ CALL util.throw('Original ticket and refund ticket has same id');
+ END IF;
+
+ SELECT COUNT(*) INTO vAlreadyExists
+ FROM ticketRefund
+ WHERE originalTicketFk = vOriginalTicketFk;
+
+ IF vAlreadyExists > 0 THEN
+ CALL util.throw('This ticket is already a refund');
+ END IF;
+END$$
+DELIMITER ;
diff --git a/db/changes/10480-june/01-claimObservation.sql b/db/changes/10480-june/01-claimObservation.sql
new file mode 100644
index 000000000..8dc126a9e
--- /dev/null
+++ b/db/changes/10480-june/01-claimObservation.sql
@@ -0,0 +1,13 @@
+CREATE TABLE `vn`.`claimObservation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `claimFk` int(10) unsigned NOT NULL,
+ `workerFk` int(10) unsigned DEFAULT NULL,
+ `text` text COLLATE utf8_unicode_ci NOT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `worker_key` (`workerFk`),
+ KEY `claim_key` (`claimFk`),
+ KEY `claimObservation_created_IDX` (`created`) USING BTREE,
+ CONSTRAINT `claimObservation_ibfk_1` FOREIGN KEY (`claimFk`) REFERENCES `vn`.`claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `claimObservation_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
+) COMMENT='Todas las observaciones referentes a una reclamación'
\ No newline at end of file
diff --git a/db/changes/10480-june/02-claimTextMigration.sql b/db/changes/10480-june/02-claimTextMigration.sql
new file mode 100644
index 000000000..fa5f6fe83
--- /dev/null
+++ b/db/changes/10480-june/02-claimTextMigration.sql
@@ -0,0 +1,2 @@
+INSERT INTO `vn`.`claimObservation` (`claimFk`, `text`, `created`)
+SELECT `id`, `observation`, `created` FROM `vn`.`claim`
\ No newline at end of file
diff --git a/db/changes/10480-june/04-aclParking.sql b/db/changes/10480-june/04-aclParking.sql
new file mode 100644
index 000000000..05acd68b1
--- /dev/null
+++ b/db/changes/10480-june/04-aclParking.sql
@@ -0,0 +1,2 @@
+INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
+ VALUES ('Parking','*','*','ALLOW','ROLE','employee')
\ No newline at end of file
diff --git a/db/changes/10480-june/04-aclShelving.sql b/db/changes/10480-june/04-aclShelving.sql
new file mode 100644
index 000000000..b237dfe0d
--- /dev/null
+++ b/db/changes/10480-june/04-aclShelving.sql
@@ -0,0 +1,2 @@
+INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
+ VALUES ('Shelving','*','*','ALLOW','ROLE','employee')
\ No newline at end of file
diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql
index 100a68ffb..78899b82d 100644
--- a/db/dump/fixtures.sql
+++ b/db/dump/fixtures.sql
@@ -1,6 +1,9 @@
CREATE SCHEMA IF NOT EXISTS `vn2008`;
CREATE SCHEMA IF NOT EXISTS `tmp`;
+UPDATE `util`.`config`
+ SET `environment`= 'test';
+
ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1;
ALTER TABLE `vn`.`address` AUTO_INCREMENT = 1;
ALTER TABLE `vn`.`zoneGeo` AUTO_INCREMENT = 1;
@@ -8,8 +11,7 @@ ALTER TABLE `vn`.`ticket` AUTO_INCREMENT = 1;
INSERT INTO `salix`.`AccessToken` (`id`, `ttl`, `created`, `userId`)
VALUES
- ('DEFAULT_TOKEN', '1209600', CURDATE(), 66);
-
+ ('DEFAULT_TOKEN', '1209600', util.VN_CURDATE(), 66);
INSERT INTO `vn`.`ticketConfig` (`id`, `scopeDays`)
VALUES
@@ -135,16 +137,16 @@ INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`,
INSERT INTO `vn`.`warehouseAlias`(`id`, `name`)
VALUES
(1, 'Main Warehouse'),
- (2, 'Silla');
+ (2, 'Gotham');
-INSERT INTO `vn`.`warehouse`(`id`, `name`, `code`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`, `hasStowaway`, `hasDms`, `hasComission`, `aliasFk`, `countryFk`, `hasProduction`)
+INSERT INTO `vn`.`warehouse`(`id`, `name`, `code`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`, `hasDms`, `hasComission`, `aliasFk`, `countryFk`, `hasProduction`)
VALUES
- (1, 'Warehouse One', 'ALG', 1, 1, 1, 1, 1, 1, 1, 2, 1, 1),
- (2, 'Warehouse Two', NULL, 1, 1, 1, 1, 0, 0, 1, 2, 13, 1),
- (3, 'Warehouse Three', NULL, 1, 1, 1, 1, 0, 0, 0, 2, 1, 1),
- (4, 'Warehouse Four', NULL, 1, 1, 1, 1, 0, 0, 0, 2, 1, 1),
- (5, 'Warehouse Five', NULL, 1, 1, 1, 1, 0, 0, 0, 2, 1, 1),
- (13, 'Inventory', NULL, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0);
+ (1, 'Warehouse One', 'ALG', 1, 1, 1, 1, 1, 1, 2, 1, 1),
+ (2, 'Warehouse Two', NULL, 1, 1, 1, 1, 0, 1, 2, 13, 1),
+ (3, 'Warehouse Three', NULL, 1, 1, 1, 1, 0, 0, 2, 1, 1),
+ (4, 'Warehouse Four', NULL, 1, 1, 1, 1, 0, 0, 2, 1, 1),
+ (5, 'Warehouse Five', NULL, 1, 1, 1, 1, 0, 0, 2, 1, 1),
+ (13, 'Inventory', NULL, 1, 1, 1, 0, 0, 0, 2, 1, 0);
INSERT INTO `vn`.`sector`(`id`, `description`, `warehouseFk`, `isPreviousPreparedByPacking`, `code`)
VALUES
@@ -153,14 +155,29 @@ INSERT INTO `vn`.`sector`(`id`, `description`, `warehouseFk`, `isPreviousPrepare
INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingOrder`)
VALUES
- ('1', '700', '01', '1', '700-01', '70001'),
- ('2', '700', '02', '2', '700-02', '70002');
+ ('1', 700, '01', 1, '700-01', 70001),
+ ('2', 700, '02', 2, '700-02', 70002),
+ ('3', 100, '01', 1, '100-01', 1),
+ (32397, 100, '02', 1, 'A-47-1', 1165),
+ (34831, 200, '01', 1, 'K-26-2', 20220),
+ (34965, 200, '02', 2, 'L-08-4', 21800),
+ (39096, 200, '03', 2, 'LR-02-3', 99999);
-INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `parked`, `userFk`)
+INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `userFk`, `isRecyclable`)
VALUES
- ('GVC', 1, 0, 1, 0, 1106),
- ('HEJ', 2, 0, 1, 0, 1106),
- ('UXN', 1, 0, 1, 0, 1106);
+ ('AA6', 34965, 1, 0, NULL, 0),
+ ('AA7', 34965, 1, 0, NULL, 0),
+ ('AA8', 34965, 1, 0, NULL, 0),
+ ('AA9', NULL, 1, 0, NULL, 0),
+ ('AAA', NULL, 0, 0, 1109, 1),
+ ('AAB', NULL, 0, 0, 1109, 1),
+ ('AAC', NULL, 1, 99, 1109, 1),
+ ('AAD', NULL, 0, 0, 1109, 1),
+ ('AAE', 39096, 1, 0, 1109, 1),
+ ('AAF', 34831, 1, 0, 1109, 1),
+ ('GVC', 1, 0, 1, 1106, 1),
+ ('HEJ', 2, 0, 1, 1106, 1),
+ ('UXN', 1, 0, 1, 1106, 1);
INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`, `maxAmount`, `daysInFuture`)
VALUES
@@ -173,21 +190,18 @@ INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`cod
(7, 'Leasing', NULL, NULL, NULL, 0),
(8, 'Compensations', 'Compensations', 'compensation', NULL, 0);
-INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
+INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
VALUES
- (1, 1, 'The Worst Bank', 'BBKKESMMMMMM'),
- (128, 1, 'The Best Bank', 'TBKKESMMMMMM'),
- (3117, 1, 'Another Bank', 'ANOKESMMMMMM'),
- (2100, 1, 'Caixa Bank', 'CAIXESBB');
-
-INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
- VALUES
- (1, 'Pay on receipt', '5720000001', 3, 1, 1, 1),
- (2, 'Cash', '5700000001', 2, 1, 1, 1),
- (3, 'Compensation', '4000000000', 8, 1, 1, 1),
- (4, 'Transfers', '4000000001', 1, 1, 1, 1),
- (3117, 'Caixa Rural d''Algemesi', '5720000000', 8, 3117, 1, 1);
+ (128, 1, 'The Best Bank', 'BBKKESMMMMMM'),
+ (2100, 1, 'Caixa Bank', 'CAIXESBB');
+INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
+ VALUES
+ (1, 'Pay on receipt', '5720000001', 3, 128, 1, 1),
+ (2, 'Cash', '5700000001', 2, 128, 1, 1),
+ (3, 'Compensation', '4000000000', 8, 128, 1, 1),
+ (4, 'Transfers', '4000000001', 1, 128, 1, 1),
+ (3117, 'Caixa Rural d''Algemesi', '5720000000', 8, 2100, 1, 1);
INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
VALUES
@@ -198,16 +212,16 @@ INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
INSERT INTO `vn`.`agency`(`id`, `name`, `warehouseFk`, `bankFk__`, `warehouseAliasFk`)
VALUES
- (1, 'inhouse pickup' , 1, 1, 1),
- (2, 'Super-Man delivery' , 1, 1, 1),
- (3, 'Teleportation device' , 1, 1, 1),
- (4, 'Entanglement' , 1, 1, 1),
- (5, 'Quantum break device' , 1, 1, 1),
- (6, 'Walking' , 1, 1, 1),
- (7, 'Silla247' , 1, 1, 1),
- (8, 'Silla247Expensive' , 1, 1, 1),
- (9, 'Refund' , 1, 1, 1),
- (10, 'Other agency' , 1, 1, 1);
+ (1, 'inhouse pickup' , 1, 1, 1),
+ (2, 'Super-Man delivery' , 1, 1, 1),
+ (3, 'Teleportation device' , 1, 1, 1),
+ (4, 'Entanglement' , 1, 1, 1),
+ (5, 'Quantum break device' , 1, 1, 1),
+ (6, 'Walking' , 1, 1, 1),
+ (7, 'Gotham247' , 1, 1, 1),
+ (8, 'Gotham247Expensive' , 1, 1, 1),
+ (9, 'Refund' , 1, 1, 1),
+ (10, 'Other agency' , 1, 1, 1);
UPDATE `vn`.`agencyMode` SET `id` = 1 WHERE `name` = 'inhouse pickup';
UPDATE `vn`.`agencyMode` SET `id` = 2 WHERE `name` = 'Super-Man delivery';
@@ -215,8 +229,8 @@ UPDATE `vn`.`agencyMode` SET `id` = 3 WHERE `name` = 'Teleportation device';
UPDATE `vn`.`agencyMode` SET `id` = 4 WHERE `name` = 'Entanglement';
UPDATE `vn`.`agencyMode` SET `id` = 5 WHERE `name` = 'Quantum break device';
UPDATE `vn`.`agencyMode` SET `id` = 6 WHERE `name` = 'Walking';
-UPDATE `vn`.`agencyMode` SET `id` = 7 WHERE `name` = 'Silla247';
-UPDATE `vn`.`agencyMode` SET `id` = 8 WHERE `name` = 'Silla247Expensive';
+UPDATE `vn`.`agencyMode` SET `id` = 7 WHERE `name` = 'Gotham247';
+UPDATE `vn`.`agencyMode` SET `id` = 8 WHERE `name` = 'Gotham247Expensive';
UPDATE `vn`.`agencyMode` SET `id` = 23 WHERE `name` = 'Refund';
UPDATE `vn`.`agencyMode` SET `id` = 10 WHERE `name` = 'Other agency';
@@ -268,7 +282,7 @@ INSERT INTO `vn`.`province`(`id`, `name`, `countryFk`, `autonomyFk`, `warehouseF
INSERT INTO `vn`.`town`(`id`, `name`, `provinceFk`)
VALUES
(1, 'Valencia', 1),
- (2, 'Silla', 1),
+ (2, 'Gotham', 1),
(3, 'Algemesi', 1),
(4, 'Alzira', 1),
(5, 'Quito', 5);
@@ -302,30 +316,30 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`)
VALUES
- (1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1111111111, 222222222, 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, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
- (1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Silla', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
- (1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Silla', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
- (1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Silla', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
- (1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Silla', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
- (1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Silla', 46460, 1111111111, 222222222, 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, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
- (1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Silla', 46460, 1111111111, 222222222, 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, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
- (1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1111111111, 222222222, 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, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
- (1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 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, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
- (1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 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, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
- (1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Silla', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL),
- (1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Silla', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL);
+ (1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
+ (1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
+ (1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
+ (1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
+ (1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
+ (1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
+ (1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
+ (1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
+ (1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
+ (1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
+ (1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL),
+ (1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL);
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
- SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'SILLA', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, CURDATE(), 1
+ SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1
FROM `account`.`role` `r`
WHERE `r`.`hasLogin` = 1;
INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
VALUES
- (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));
+ (1101, 50, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (1102, 100, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (1103, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (1104, -30, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH));
INSERT INTO `vn`.`clientConfig`(`riskTolerance`, `maxCreditRows`)
VALUES
@@ -333,51 +347,51 @@ INSERT INTO `vn`.`clientConfig`(`riskTolerance`, `maxCreditRows`)
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, 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);
+ (1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 1),
+ (2, 'Petter Parker', '20 Ingram Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 1),
+ (3, 'Clark Kent', '344 Clinton Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 1),
+ (4, 'Tony Stark', '10880 Malibu Point', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 1),
+ (5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 1),
+ (6, 'DavidCharlesHaller', 'Evil hideout', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 1),
+ (7, 'Hank Pym', 'Anthill', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 1),
+ (8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 1),
+ (9, 'Bruce Banner', 'Somewhere in New York', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 1),
+ (10, 'Jessica Jones', 'NYCC 2015 Poster', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 1),
+ (11, 'Missing', 'The space', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1111, 10, NULL, NULL, 0, 1),
+ (12, 'Trash', 'New York city', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1112, 10, NULL, NULL, 0, 1),
+ (101, 'Somewhere in Thailand', 'address 01', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (102, 'Somewhere in Poland', 'address 02', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
+ (103, 'Somewhere in Japan', 'address 03', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
+ (104, 'Somewhere in Spain', 'address 04', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
+ (105, 'Somewhere in Potugal', 'address 05', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
+ (106, 'Somewhere in UK', 'address 06', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
+ (107, 'Somewhere in Valencia', 'address 07', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
+ (108, 'Somewhere in Gotham', 'address 08', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
+ (109, 'Somewhere in London', 'address 09', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (110, 'Somewhere in Algemesi', 'address 10', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (111, 'Somewhere in Carlet', 'address 11', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (112, 'Somewhere in Campanar', 'address 12', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (113, 'Somewhere in Malilla', 'address 13', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (114, 'Somewhere in France', 'address 14', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (115, 'Somewhere in Birmingham', 'address 15', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (116, 'Somewhere in Scotland', 'address 16', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (117, 'Somewhere in nowhere', 'address 17', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (118, 'Somewhere over the rainbow', 'address 18', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (119, 'Somewhere in Alberic', 'address 19', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (120, 'Somewhere in Montortal', 'address 20', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
+ (121, 'the bat cave', 'address 21', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 0),
+ (122, 'NY roofs', 'address 22', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 0),
+ (123, 'The phone box', 'address 23', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 0),
+ (124, 'Stark tower Gotham', 'address 24', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 0),
+ (125, 'The plastic cell', 'address 25', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 0),
+ (126, 'Many places', 'address 26', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 0),
+ (127, 'Your pocket', 'address 27', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 0),
+ (128, 'Cerebro', 'address 28', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 0),
+ (129, 'Luke Cages Bar', 'address 29', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 0),
+ (130, 'Non valid address', 'address 30', 'Gotham', 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
+ SELECT name, CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, 1, id, 2, 1
FROM `account`.`role` `r`
WHERE `r`.`hasLogin` = 1;
@@ -407,20 +421,20 @@ DROP TEMPORARY TABLE tmp.address;
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
VALUES
- (1 , 1101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -11 MONTH)),
- (2 , 1101, 5, 900, DATE_ADD(CURDATE(), INTERVAL -10 MONTH)),
- (3 , 1101, 5, 800, DATE_ADD(CURDATE(), INTERVAL -9 MONTH)),
- (4 , 1101, 5, 700, DATE_ADD(CURDATE(), INTERVAL -8 MONTH)),
- (5 , 1101, 5, 600, DATE_ADD(CURDATE(), INTERVAL -7 MONTH)),
- (6 , 1101, 5, 500, DATE_ADD(CURDATE(), INTERVAL -6 MONTH)),
- (7 , 1101, 5, 400, DATE_ADD(CURDATE(), INTERVAL -5 MONTH)),
- (8 , 1101, 9, 300, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
- (9 , 1101, 9, 200, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
- (10, 1101, 9, 100, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
- (11, 1101, 9, 50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (12, 1102, 9, 800, CURDATE()),
- (14, 1104, 9, 90 , CURDATE()),
- (15, 1105, 9, 90 , CURDATE());
+ (1 , 1101, 5, 300, DATE_ADD(util.VN_CURDATE(), INTERVAL -11 MONTH)),
+ (2 , 1101, 5, 900, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 MONTH)),
+ (3 , 1101, 5, 800, DATE_ADD(util.VN_CURDATE(), INTERVAL -9 MONTH)),
+ (4 , 1101, 5, 700, DATE_ADD(util.VN_CURDATE(), INTERVAL -8 MONTH)),
+ (5 , 1101, 5, 600, DATE_ADD(util.VN_CURDATE(), INTERVAL -7 MONTH)),
+ (6 , 1101, 5, 500, DATE_ADD(util.VN_CURDATE(), INTERVAL -6 MONTH)),
+ (7 , 1101, 5, 400, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 MONTH)),
+ (8 , 1101, 9, 300, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
+ (9 , 1101, 9, 200, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
+ (10, 1101, 9, 100, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
+ (11, 1101, 9, 50 , DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (12, 1102, 9, 800, util.VN_CURDATE()),
+ (14, 1104, 9, 90 , util.VN_CURDATE()),
+ (15, 1105, 9, 90 , util.VN_CURDATE());
INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
VALUES
@@ -430,16 +444,16 @@ INSERT INTO `vn`.`clientCreditLimit`(`id`, `maxAmount`, `roleFk`)
INSERT INTO `vn`.`clientObservation`(`id`, `clientFk`, `workerFk`, `text`, `created`)
VALUES
- (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());
+ (1, 1101, 1, 'Madness, as you know, is like gravity, all it takes is a little push', util.VN_CURDATE()),
+ (2, 1102, 1, 'With great power, comes great responsibility', util.VN_CURDATE()),
+ (3, 1103, 3, 'this is a job for Super-Man!', util.VN_CURDATE()),
+ (4, 1104, 3, 'yes... I am Iron-Man', util.VN_CURDATE()),
+ (5, 1105, 5, 'They do understand. Our mutant powers make us superior', util.VN_CURDATE()),
+ (6, 1106, 5, 'My name is Legion, for we are many!', util.VN_CURDATE()),
+ (7, 1107, 9, 'I think our first move should be calling the Avengers..', util.VN_CURDATE()),
+ (8, 1108, 9, 'Just because someone stumbles and loses their path, does not mean they are lost forever.', util.VN_CURDATE()),
+ (9, 1109, 18, 'HULK SMASH! ...', util.VN_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.', util.VN_CURDATE());
INSERT INTO `vn`.`observationType`(`id`,`description`, `code`)
VALUES
@@ -459,17 +473,17 @@ INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`desc
INSERT INTO `vn`.`creditClassification`(`id`, `client`, `dateStart`, `dateEnd`)
VALUES
- (1, 1101, CURDATE(), CURDATE()),
- (2, 1102, CURDATE(), CURDATE()),
- (3, 1103, CURDATE(), CURDATE()),
- (4, 1104, CURDATE(), CURDATE()),
- (5, 1105, CURDATE(), CURDATE());
+ (1, 1101, util.VN_CURDATE(), util.VN_CURDATE()),
+ (2, 1102, util.VN_CURDATE(), util.VN_CURDATE()),
+ (3, 1103, util.VN_CURDATE(), util.VN_CURDATE()),
+ (4, 1104, util.VN_CURDATE(), util.VN_CURDATE()),
+ (5, 1105, util.VN_CURDATE(), util.VN_CURDATE());
INSERT INTO `vn`.`creditInsurance`(`id`, `creditClassificationFk`, `credit`, `creationDate`, `grade`)
VALUES
- (1, 1, 3000, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), NULL),
- (2, 2, 6000, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), NULL),
- (3, 3, 10000, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), NULL);
+ (1, 1, 3000, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL),
+ (2, 2, 6000, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL),
+ (3, 3, 10000, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL);
INSERT INTO `vn`.`companyGroup`(`id`, `code`)
VALUES
@@ -494,9 +508,9 @@ INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `pr
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`)
VALUES
- (1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
- (2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, CURDATE(), 1, 'supplier address 2', 'SILLA', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
- (442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, CURDATE(), 1, 'supplier address 3', 'SILLA', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
+ (1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
+ (2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
+ (442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email`, `observation`, `name`)
VALUES
@@ -535,11 +549,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(), 1101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 0),
- (2, 'T', 121.36, CURDATE(), 1102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 0),
- (3, 'T', 8.88, CURDATE(), 1103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 0),
- (4, 'T', 8.88, CURDATE(), 1103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 0),
- (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, 0);
+ (1, 'T', 1014.24, util.VN_CURDATE(), 1101, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
+ (2, 'T', 121.36, util.VN_CURDATE(), 1102, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
+ (3, 'T', 8.88, util.VN_CURDATE(), 1103, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
+ (4, 'T', 8.88, util.VN_CURDATE(), 1103, util.VN_CURDATE(), 442, util.VN_CURDATE(), util.VN_CURDATE(), 1, 0),
+ (5, 'A', 8.88, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1103, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 0);
UPDATE `vn`.`invoiceOut` SET ref = 'T1111111' WHERE id = 1;
UPDATE `vn`.`invoiceOut` SET ref = 'T2222222' WHERE id = 2;
@@ -570,29 +584,29 @@ INSERT INTO `vn`.`expence`(`id`, `name`, `isWithheld`)
INSERT INTO `vn`.`invoiceOutExpence`(`id`, `invoiceOutFk`, `amount`, `expenceFk`, `created`)
VALUES
- (1, 1, 813.06, 2000000000, CURDATE()),
- (2, 1, 33.80, 4751000000, CURDATE()),
- (3, 1, 70.70, 6210000567, CURDATE()),
- (4, 2, 110.33, 2000000000, CURDATE()),
- (5, 3, 8.07, 2000000000, CURDATE()),
- (6, 4, 8.07, 2000000000, CURDATE()),
- (7, 5, 8.07, 2000000000, CURDATE());
+ (1, 1, 813.06, 2000000000, util.VN_CURDATE()),
+ (2, 1, 33.80, 4751000000, util.VN_CURDATE()),
+ (3, 1, 70.70, 6210000567, util.VN_CURDATE()),
+ (4, 2, 110.33, 2000000000, util.VN_CURDATE()),
+ (5, 3, 8.07, 2000000000, util.VN_CURDATE()),
+ (6, 4, 8.07, 2000000000, util.VN_CURDATE()),
+ (7, 5, 8.07, 2000000000, util.VN_CURDATE());
INSERT INTO `vn`.`zone` (`id`, `name`, `hour`, `agencyModeFk`, `travelingDays`, `price`, `bonus`, `itemMaxSize`)
VALUES
- (1, 'Zone pickup A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100),
- (2, 'Zone pickup B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100),
- (3, 'Zone 247 A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 100),
- (4, 'Zone 247 B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 100),
- (5, 'Zone expensive A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 100),
- (6, 'Zone expensive B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 100),
- (7, 'Zone refund', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 23, 0, 0, 0, 100),
- (8, 'Zone others', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 10, 0, 0, 0, 100),
- (9, 'Zone superMan', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 2, 0, 0, 0, 100),
- (10, 'Zone teleportation', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 3, 0, 0, 0, 100),
- (11, 'Zone pickup C', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100),
- (12, 'Zone entanglement', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 4, 0, 0, 0, 100),
- (13, 'Zone quantum break', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 5, 0, 0, 0, 100);
+ (1, 'Zone pickup A', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100),
+ (2, 'Zone pickup B', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100),
+ (3, 'Zone 247 A', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 100),
+ (4, 'Zone 247 B', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 100),
+ (5, 'Zone expensive A', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 100),
+ (6, 'Zone expensive B', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 100),
+ (7, 'Zone refund', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 23, 0, 0, 0, 100),
+ (8, 'Zone others', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 10, 0, 0, 0, 100),
+ (9, 'Zone superMan', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 2, 0, 0, 0, 100),
+ (10, 'Zone teleportation', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 3, 0, 0, 0, 100),
+ (11, 'Zone pickup C', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100),
+ (12, 'Zone entanglement', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 4, 0, 0, 0, 100),
+ (13, 'Zone quantum break', CONCAT(util.VN_CURDATE(), ' ', TIME('23:59')), 5, 0, 0, 0, 100);
INSERT INTO `vn`.`zoneWarehouse` (`id`, `zoneFk`, `warehouseFk`)
VALUES
@@ -612,61 +626,61 @@ INSERT INTO `vn`.`zoneWarehouse` (`id`, `zoneFk`, `warehouseFk`)
INSERT INTO `vn`.`zoneClosure` (`zoneFk`, `dated`, `hour`)
VALUES
- (1, CURDATE(), '23:59'),
- (2, CURDATE(), '23:59'),
- (3, CURDATE(), '23:59'),
- (4, CURDATE(), '23:59'),
- (5, CURDATE(), '23:59'),
- (6, CURDATE(), '23:59'),
- (7, CURDATE(), '23:59'),
- (8, CURDATE(), '23:59'),
- (9, CURDATE(), '23:59'),
- (10, CURDATE(), '23:59'),
- (11, CURDATE(), '23:59'),
- (12, CURDATE(), '23:59'),
- (13, CURDATE(), '23:59');
+ (1, util.VN_CURDATE(), '23:59'),
+ (2, util.VN_CURDATE(), '23:59'),
+ (3, util.VN_CURDATE(), '23:59'),
+ (4, util.VN_CURDATE(), '23:59'),
+ (5, util.VN_CURDATE(), '23:59'),
+ (6, util.VN_CURDATE(), '23:59'),
+ (7, util.VN_CURDATE(), '23:59'),
+ (8, util.VN_CURDATE(), '23:59'),
+ (9, util.VN_CURDATE(), '23:59'),
+ (10, util.VN_CURDATE(), '23:59'),
+ (11, util.VN_CURDATE(), '23:59'),
+ (12, util.VN_CURDATE(), '23:59'),
+ (13, util.VN_CURDATE(), '23:59');
INSERT INTO `vn`.`zoneConfig` (`scope`) VALUES ('1');
INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agencyModeFk`, `description`, `m3`, `cost`, `started`, `finished`, `zoneFk`)
VALUES
- (1, '1899-12-30 12:15:00', 56, CURDATE(), 1, 1, 'first route', 1.8, 10, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 1),
- (2, '1899-12-30 13:20:00', 56, CURDATE(), 1, 2, 'second route', 0.2, 20, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 9),
- (3, '1899-12-30 14:30:00', 56, CURDATE(), 2, 3, 'third route', 0.5, 30, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 10),
- (4, '1899-12-30 15:45:00', 56, CURDATE(), 3, 4, 'fourth route', 0, 40, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 12),
- (5, '1899-12-30 16:00:00', 56, CURDATE(), 4, 5, 'fifth route', 0.1, 50, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 13),
- (6, NULL, 57, CURDATE(), 5, 7, 'sixth route', 1.7, 60, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 3),
- (7, NULL, 57, CURDATE(), 6, 8, 'seventh route', 0, 70, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 5);
+ (1, '1899-12-30 12:15:00', 56, util.VN_CURDATE(), 1, 1, 'first route', 1.8, 10, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1),
+ (2, '1899-12-30 13:20:00', 56, util.VN_CURDATE(), 1, 2, 'second route', 0.2, 20, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 9),
+ (3, '1899-12-30 14:30:00', 56, util.VN_CURDATE(), 2, 3, 'third route', 0.5, 30, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 10),
+ (4, '1899-12-30 15:45:00', 56, util.VN_CURDATE(), 3, 4, 'fourth route', 0, 40, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 12),
+ (5, '1899-12-30 16:00:00', 56, util.VN_CURDATE(), 4, 5, 'fifth route', 0.1, 50, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 13),
+ (6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3),
+ (7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5);
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), 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, 8, 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()),
- (25 ,NULL, 8, 1, NULL, CURDATE(), CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, CURDATE()),
- (26 ,NULL, 8, 1, NULL, CURDATE(), CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, CURDATE()),
- (27 ,NULL, 8, 1, NULL, CURDATE(), CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, CURDATE());
+ (1 , 3, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 121, 'T1111111', 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (2 , 1, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T1111111', 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (3 , 1, 7, 1, 6, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T2222222', 0, 3, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
+ (4 , 3, 2, 1, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T3333333', 0, 9, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
+ (5 , 3, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, 'T4444444', 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
+ (6 , 1, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Mountain Drive Gotham', 1, 'A1111111', 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (7 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (8 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (9 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (10, 1, 1, 5, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, util.VN_CURDATE()),
+ (11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (12, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE()),
+ (13, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (14, 1, 2, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, util.VN_CURDATE()),
+ (15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE()),
+ (18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, util.VN_CURDATE()),
+ (19, 1, 5, 5, NULL, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, util.VN_CURDATE()),
+ (20, 1, 5, 5, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (21, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (22, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (23, NULL, 8, 1, 7, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'address 21', 121, NULL, 0, 5, 5, 1, util.VN_CURDATE()),
+ (24 ,NULL, 8, 1, 7, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, util.VN_CURDATE()),
+ (25 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE()),
+ (26 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE()),
+ (27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE());
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
VALUES
@@ -684,42 +698,38 @@ INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `des
(12, 11, 3, 'Delivery after 10am');
-- FIX for state hours on local, inter_afterInsert
-UPDATE vncontrol.inter SET odbc_date = DATE_ADD(CURDATE(), INTERVAL -10 SECOND);
+UPDATE vncontrol.inter SET odbc_date = DATE_ADD(util.VN_CURDATE(), INTERVAL -10 SECOND);
INSERT INTO `vn`.`ticketTracking`(`ticketFk`, `stateFk`, `workerFk`, `created`)
VALUES
- (1, 16, 5 , DATE_ADD(NOW(), INTERVAL -1 MONTH)),
- (2, 16, 5 , DATE_ADD(NOW(), INTERVAL -1 MONTH)),
- (3, 16, 5 , DATE_ADD(NOW(), INTERVAL -2 MONTH)),
- (4, 16, 5 , DATE_ADD(NOW(), INTERVAL -3 MONTH)),
- (5, 16, 18, DATE_ADD(NOW(), INTERVAL -4 MONTH)),
- (6, 16, 18, DATE_ADD(NOW(), INTERVAL -1 MONTH)),
- (7, 10, 18, NOW()),
- (8, 5, 19, NOW()),
- (9, 5, 19, NOW()),
- (10, 5, 19, NOW()),
- (11, 3, 19, NOW()),
- (12, 3, 19, NOW()),
- (13, 3, 19, NOW()),
- (14, 3, 19, NOW()),
- (15, 2, 19, NOW()),
- (16, 3, 19, NOW()),
- (17, 2, 19, NOW()),
- (18, 2, 19, NOW()),
- (19, 2, 19, NOW()),
- (20, 1, 19, DATE_ADD(NOW(), INTERVAL +1 MONTH)),
- (21, 1, 19, DATE_ADD(NOW(), INTERVAL +1 MONTH)),
- (22, 1, 19, DATE_ADD(NOW(), INTERVAL +1 MONTH)),
- (23, 16, 21, NOW()),
- (24, 16, 21, NOW());
-
-INSERT INTO `vn`.`stowaway`(`id`, `shipFk`, `created`)
- VALUES
- (12, 13, CURDATE());
+ (1, 16, 5 , DATE_ADD(util.VN_NOW(), INTERVAL -1 MONTH)),
+ (2, 16, 5 , DATE_ADD(util.VN_NOW(), INTERVAL -1 MONTH)),
+ (3, 16, 5 , DATE_ADD(util.VN_NOW(), INTERVAL -2 MONTH)),
+ (4, 16, 5 , DATE_ADD(util.VN_NOW(), INTERVAL -3 MONTH)),
+ (5, 16, 18, DATE_ADD(util.VN_NOW(), INTERVAL -4 MONTH)),
+ (6, 16, 18, DATE_ADD(util.VN_NOW(), INTERVAL -1 MONTH)),
+ (7, 10, 18, util.VN_NOW()),
+ (8, 5, 19, util.VN_NOW()),
+ (9, 5, 19, util.VN_NOW()),
+ (10, 5, 19, util.VN_NOW()),
+ (11, 3, 19, util.VN_NOW()),
+ (12, 3, 19, util.VN_NOW()),
+ (13, 3, 19, util.VN_NOW()),
+ (14, 3, 19, util.VN_NOW()),
+ (15, 2, 19, util.VN_NOW()),
+ (16, 3, 19, util.VN_NOW()),
+ (17, 2, 19, util.VN_NOW()),
+ (18, 2, 19, util.VN_NOW()),
+ (19, 2, 19, util.VN_NOW()),
+ (20, 1, 19, DATE_ADD(util.VN_NOW(), INTERVAL +1 MONTH)),
+ (21, 1, 19, DATE_ADD(util.VN_NOW(), INTERVAL +1 MONTH)),
+ (22, 1, 19, DATE_ADD(util.VN_NOW(), INTERVAL +1 MONTH)),
+ (23, 16, 21, util.VN_NOW()),
+ (24, 16, 21, util.VN_NOW());
INSERT INTO `vn`.`deliveryPoint` (`id`, `name`, `ubication`)
VALUES
- (1, 'Silla','46460 Av Espioca 100-Silla');
+ (1, 'Gotham','1007 Mountain Drive, Gotham');
INSERT INTO `vn`.`vehicle`(`id`, `numberPlate`, `tradeMark`, `model`, `companyFk`, `warehouseFk`, `description`, `m3`, `isActive`, `deliveryPointFk`)
VALUES
@@ -732,7 +742,7 @@ INSERT INTO `vn`.`vehicle`(`id`, `numberPlate`, `tradeMark`, `model`, `companyFk
INSERT INTO `vn`.`config`(`id`, `mdbServer`, `fakeEmail`, `defaultersMaxAmount`, `inventoried`)
VALUES
- (1, 'beta-server', 'nightmare@mydomain.com', '200', DATE_ADD(CURDATE(),INTERVAL -1 MONTH));
+ (1, 'beta-server', 'nightmare@mydomain.com', '200', DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH));
INSERT INTO `vn`.`greugeType`(`id`, `name`, `code`)
VALUES
@@ -746,18 +756,18 @@ INSERT INTO `vn`.`greugeType`(`id`, `name`, `code`)
INSERT INTO `vn`.`greuge`(`id`, `clientFk`, `description`, `amount`, `shipped`, `created`, `greugeTypeFk`, `ticketFk`)
VALUES
- (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);
+ (1, 1101, 'some diff charges', -19.99, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 1, 1),
+ (2, 1101, 'more diff charges', 60, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 2, 1),
+ (3, 1101, 'even more! diff charges', -9.99, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 3, 1),
+ (4, 1101, 'insane diff charges', 60, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 4, 1),
+ (5, 1101, 'gargantuous diff charges', -9.99, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 5, 1),
+ (6, 1101, 'diff charges', 88.30, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 6, 1),
+ (7, 1101, 'unaffordable diff charges', -39.12, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 1, 1),
+ (8, 1101, 'some recovery charges', 29.35, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 2, 1),
+ (9, 1101, 'some manna charges', -9.99, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 3, 1),
+ (10, 1101, 'some claim charges', 13.13, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 4, 1),
+ (11, 1101, 'some heritage charges', -15.99, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 5, 1),
+ (12, 1101, 'some miscellaneous charges', 58.00, DATE_ADD(util.VN_CURDATE(), INTERVAL 1 MONTH), util.VN_CURDATE(), 6, 1);
INSERT INTO `vn`.`mandateType`(`id`, `name`)
VALUES
@@ -767,7 +777,7 @@ INSERT INTO `vn`.`mandateType`(`id`, `name`)
INSERT INTO `vn`.`mandate`(`id`, `clientFk`, `companyFk`, `code`, `created`, `mandateTypeFk`)
VALUES
- (1, 1102, 442, '1-1', CURDATE(), 2);
+ (1, 1102, 442, '1-1', util.VN_CURDATE(), 2);
INSERT INTO `vn`.`itemCategory`(`id`, `name`, `display`, `color`, `icon`, `code`)
VALUES
@@ -822,10 +832,10 @@ INSERT INTO `vn`.`taxType`(`id`, `nickname`, `isAccrued`, `serial`, `TIPOOPE`, `
INSERT INTO `vn`.`taxCode`(`id`, `dated`, `code`, `taxTypeFk`, `rate`, `equalizationTax`, `type`, `link`, `isActive`, `updated`, `transactionCode`)
VALUES
- (1 , CURDATE(), '1111111111', 1, 7.0 , 0.0, 'R', 1, 1, CURDATE(), 1),
- (2 , CURDATE(), '2222222222', 2, 16.0, 0.0, 'G', 2, 1, CURDATE(), 1),
- (21 , CURDATE(), '3333333333', 1, 7.0, 0.0, 'R', 3, 1, CURDATE(), 1),
- (108, CURDATE(), '4444444444', 2, 8.0 , 0.0, 'R', 4, 1, CURDATE(), 1);
+ (1 , util.VN_CURDATE(), '1111111111', 1, 7.0 , 0.0, 'R', 1, 1, util.VN_CURDATE(), 1),
+ (2 , util.VN_CURDATE(), '2222222222', 2, 16.0, 0.0, 'G', 2, 1, util.VN_CURDATE(), 1),
+ (21 , util.VN_CURDATE(), '3333333333', 1, 7.0, 0.0, 'R', 3, 1, util.VN_CURDATE(), 1),
+ (108, util.VN_CURDATE(), '4444444444', 2, 8.0 , 0.0, 'R', 4, 1, util.VN_CURDATE(), 1);
INSERT INTO `vn`.`taxClass`(`id`, `description`, `code`)
VALUES
@@ -834,9 +844,9 @@ INSERT INTO `vn`.`taxClass`(`id`, `description`, `code`)
INSERT INTO `vn`.`taxClassCode`(`taxClassFk`, `effectived`, `taxCodeFk`)
VALUES
- (1, CURDATE(), 1),
- (1, CURDATE(), 21),
- (2, CURDATE(), 2);
+ (1, util.VN_CURDATE(), 1),
+ (1, util.VN_CURDATE(), 21),
+ (2, util.VN_CURDATE(), 2);
INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
VALUES
@@ -876,9 +886,9 @@ UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
VALUES
- (1, 1, 0, 0, 2.5, 2, CURDATE(), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 0, 1, CURDATE()),
- (2, 3, 10, 10, 10, 10, CURDATE(), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 0, 1, CURDATE()),
- (3, 13, 8.5, 10, 7.5, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 1, 2, CURDATE());
+ (1, 1, 0, 0, 2.5, 2, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 0, 1, util.VN_CURDATE()),
+ (2, 3, 10, 10, 10, 10, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 0, 1, util.VN_CURDATE()),
+ (3, 13, 8.5, 10, 7.5, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 1, 2, util.VN_CURDATE());
INSERT INTO `vn`.`expeditionBoxVol`(`boxFk`, `m3`, `ratio`)
VALUES
@@ -886,15 +896,14 @@ INSERT INTO `vn`.`expeditionBoxVol`(`boxFk`, `m3`, `ratio`)
INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`)
VALUES
- (1, 0.00, 10, 10, 0, 1, CURDATE(), 6, 1.50),
- (2, 100.00, 20, 20, 0, 1, CURDATE(), 7, 1.00),
- (3, 14000.00, 0, 0, 0, 1, CURDATE(), NULL, 0),
- (4, 218000.00, 0, 0, 0, 0, CURDATE(), NULL, 0),
- (5, 292000.00, 0, 0, 0, 0, CURDATE(), NULL, 0),
- (94, 140875.00, 49.00, 115.00, 25.00, 0, CURDATE(), 71, 0.00),
- ('cc', 1640038.00, 56.00, 220.00, 128.00, 1, CURDATE(), 15, 90.00),
- ('pallet 100', 2745600.00, 100.00, 220.00, 120.00, 1, CURDATE(), 16, 0.00);
-
+ (1, 0.00, 10, 10, 0, 1, util.VN_CURDATE(), 6, 1.50),
+ (2, 100.00, 20, 20, 0, 1, util.VN_CURDATE(), 7, 1.00),
+ (3, 14000.00, 0, 0, 0, 1, util.VN_CURDATE(), NULL, 0),
+ (4, 218000.00, 0, 0, 0, 0, util.VN_CURDATE(), NULL, 0),
+ (5, 292000.00, 0, 0, 0, 0, util.VN_CURDATE(), NULL, 0),
+ (94, 140875.00, 49.00, 115.00, 25.00, 0, util.VN_CURDATE(), 71, 0.00),
+ ('cc', 1640038.00, 56.00, 220.00, 128.00, 1, util.VN_CURDATE(), 15, 90.00),
+ ('pallet 100', 2745600.00, 100.00, 220.00, 120.00, 1, util.VN_CURDATE(), 16, 0.00);
INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
VALUES
@@ -905,68 +914,68 @@ INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`)
VALUES
- (1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 15, 1, 18, 'UR9000006041', 94, 1),
- (2, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 16, 2, 18, 'UR9000006041', 94, 1),
- (3, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), NULL, 3, 18, 'UR9000006041', 94, 2),
- (4, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), NULL, 4, 18, 'UR9000006041', 94, 2),
- (5, 1, 2, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), NULL, 1, 18, NULL, 94, 3),
- (6, 7, 3, 71, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), NULL, 1, 18, NULL, 94, 3),
- (7, 2, 4, 71, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), NULL, 1, 18, NULL, 94, NULL),
- (8, 3, 5, 71, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), NULL, 1, 18, NULL, 94, 1),
- (9, 3, 6, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), NULL, 1, 18, NULL, 94, 2),
- (10, 7, 7, 71, NOW(), NULL, 1, 18, NULL, 94, 3);
+ (1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 15, 1, 18, 'UR9000006041', 94, 1),
+ (2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 16, 2, 18, 'UR9000006041', 94, 1),
+ (3, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 3, 18, 'UR9000006041', 94, 2),
+ (4, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 4, 18, 'UR9000006041', 94, 2),
+ (5, 1, 2, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 1, 18, NULL, 94, 3),
+ (6, 7, 3, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 1, 18, NULL, 94, 3),
+ (7, 2, 4, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, 1, 18, NULL, 94, NULL),
+ (8, 3, 5, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, 1, 18, NULL, 94, 1),
+ (9, 3, 6, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 1, 18, NULL, 94, 2),
+ (10, 7, 7, 71, NOW(), NULL, 1, 18, NULL, 94, 3);
INSERT INTO `vn`.`expeditionState`(`id`, `created`, `expeditionFk`, `typeFk`, `userFk`)
VALUES
- (1, CURDATE(), 1, 1, 1),
- (2, CURDATE(), 2, 1, 1),
- (3, CURDATE(), 3, 1, 1),
- (4, CURDATE(), 3, 2, 1106),
- (5, CURDATE(), 5, 1, 1106),
- (6, CURDATE(), 5, 3, 1106);
+ (1, util.VN_CURDATE(), 1, 1, 1),
+ (2, util.VN_CURDATE(), 2, 1, 1),
+ (3, util.VN_CURDATE(), 3, 1, 1),
+ (4, util.VN_CURDATE(), 3, 2, 1106),
+ (5, util.VN_CURDATE(), 5, 1, 1106),
+ (6, util.VN_CURDATE(), 5, 3, 1106);
INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, `created`, `pvp`)
VALUES
- (1, 1, 2, 2, CURDATE(), NULL),
- (2, 2, 2, 1, CURDATE(), NULL),
- (3, 3, 2, 4, CURDATE(), NULL);
+ (1, 1, 2, 2, util.VN_CURDATE(), NULL),
+ (2, 2, 2, 1, util.VN_CURDATE(), NULL),
+ (3, 3, 2, 4, util.VN_CURDATE(), NULL);
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
VALUES
- (1, 1, 1, 'Ranged weapon longbow 2m', 5, 100.39, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (3, 1, 1, 'Ranged weapon longbow 2m', 2, 100.39, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (4, 4, 1, 'Melee weapon heavy shield 1x0.5m', 20, 1.69, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (5, 1, 2, 'Ranged weapon longbow 2m', 1, 110.33, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (6, 1, 3, 'Ranged weapon longbow 2m', 1, 110.33, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
- (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.44, 0, 0, 0, CURDATE()),
- (8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 1.79, 0, 0, 0, CURDATE()),
- (9, 1, 16, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, CURDATE()),
- (10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, CURDATE()),
- (11, 1, 16, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, CURDATE()),
- (12, 4, 16, 'Melee weapon heavy shield 1x0.5m', 20, 1.71, 0, 0, 0, CURDATE()),
- (13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, CURDATE()),
- (14, 1, 8, 'Ranged weapon longbow 2m', 2, 103.49, 0, 0, 0, CURDATE()),
- (15, 1, 19, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, CURDATE()),
- (16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, CURDATE()),
- (17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (18, 4, 22, 'Melee weapon heavy shield 1x0.5m', 20, 1.69, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (19, 1, 4, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
- (20, 1, 5, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
- (21, 1, 6, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (22, 1, 7, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, CURDATE()),
- (23, 1, 9, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, CURDATE()),
- (24, 1, 10, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, CURDATE()),
- (25, 4, 12, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, CURDATE()),
- (26, 4, 13, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, CURDATE()),
- (27, 4, 14, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, CURDATE()),
- (28, 4, 15, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, CURDATE()),
- (29, 4, 17, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, CURDATE()),
- (30, 4, 18, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, CURDATE()),
- (31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, CURDATE()),
- (32, 1, 24, 'Ranged weapon longbow 2m', -1, 8.07, 0, 0, 0, CURDATE()),
- (33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, CURDATE());
+ (1, 1, 1, 'Ranged weapon longbow 2m', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (3, 1, 1, 'Ranged weapon longbow 2m', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (4, 4, 1, 'Melee weapon heavy shield 1x0.5m', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (5, 1, 2, 'Ranged weapon longbow 2m', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (6, 1, 3, 'Ranged weapon longbow 2m', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
+ (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.44, 0, 0, 0, util.VN_CURDATE()),
+ (8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 1.79, 0, 0, 0, util.VN_CURDATE()),
+ (9, 1, 16, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE()),
+ (11, 1, 16, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (12, 4, 16, 'Melee weapon heavy shield 1x0.5m', 20, 1.71, 0, 0, 0, util.VN_CURDATE()),
+ (13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, util.VN_CURDATE()),
+ (14, 1, 8, 'Ranged weapon longbow 2m', 2, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (15, 1, 19, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, util.VN_CURDATE()),
+ (17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (18, 4, 22, 'Melee weapon heavy shield 1x0.5m', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (19, 1, 4, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
+ (20, 1, 5, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
+ (21, 1, 6, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (22, 1, 7, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (23, 1, 9, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (24, 1, 10, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (25, 4, 12, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (26, 4, 13, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (27, 4, 14, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (28, 4, 15, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (29, 4, 17, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (30, 4, 18, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE()),
+ (32, 1, 24, 'Ranged weapon longbow 2m', -1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE());
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
VALUES
@@ -1128,10 +1137,10 @@ INSERT INTO `vncontrol`.`accion`(`accion_id`, `accion`)
INSERT INTO `vn`.`saleTracking`(`saleFk`, `isChecked`, `created`, `originalQuantity`, `workerFk`, `actionFk`, `id`, `stateFk`)
VALUES
- (1, 0, CURDATE(), 5, 55, 3, 1, 14),
- (1, 1, CURDATE(), 5, 54, 3, 2, 8),
- (2, 1, CURDATE(), 10, 40, 4, 3, 8),
- (3, 1, CURDATE(), 2, 40, 4, 4, 8);
+ (1, 0, util.VN_CURDATE(), 5, 55, 3, 1, 14),
+ (1, 1, util.VN_CURDATE(), 5, 54, 3, 2, 8),
+ (2, 1, util.VN_CURDATE(), 10, 40, 4, 3, 8),
+ (3, 1, util.VN_CURDATE(), 2, 40, 4, 4, 8);
INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`)
VALUES
@@ -1147,21 +1156,15 @@ INSERT INTO `vn`.`train`(`id`, `name`)
INSERT INTO `vn`.`collection`(`id`, `workerFk`, `stateFk`, `created`, `trainFk`)
VALUES
- (1, 1106, 5, DATE_ADD(CURDATE(),INTERVAL +1 DAY), 1),
- (2, 1106, 14, CURDATE(), 1);
+ (1, 1106, 5, DATE_ADD(util.VN_CURDATE(),INTERVAL +1 DAY), 1),
+ (2, 1106, 14, util.VN_CURDATE(), 1);
-INSERT INTO `vn`.`ticketCollection`(`id`, `ticketFk`, `collectionFk`)
+INSERT INTO `vn`.`ticketCollection`(`ticketFk`, `collectionFk`, `level`)
VALUES
- (2, 2, 1),
- (3, 3, 2);
-
-INSERT INTO `vn`.`parking` (`column`, `row`, `sectorFk`, `code`, `pickingOrder`)
- VALUES
- ('100', '01', 1, '100-01', 1);
-
-INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `level`)
- VALUES
- (1, 1, 1);
+ (1, 1, 1),
+ (2, 1, NULL),
+ (3, 2, NULL),
+ (23, 1, NULL);
INSERT INTO `vn`.`genus`(`id`, `name`)
VALUES
@@ -1307,9 +1310,9 @@ INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
VALUES
(1, 1, 1, 0),
(2, 2, 2, 0),
- (3, 3, 3, 1),
- (4, 1, 4, 1),
- (5, 1, 5, 3);
+ (3, 3, 3, 0),
+ (4, 1, 4, 4),
+ (5, 1, 5, 5);
CALL `vn`.`itemRefreshTags`(NULL);
@@ -1319,10 +1322,10 @@ INSERT INTO `vn`.`itemLog` (`id`, `originFk`, `userFk`, `action`, `description`)
INSERT INTO `vn`.`recovery`(`id`, `clientFk`, `started`, `finished`, `amount`, `period`)
VALUES
- (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);
+ (1, 1101, DATE_ADD(util.VN_CURDATE(),INTERVAL -7 MONTH), DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), 50, 7),
+ (2, 1102, DATE_ADD(util.VN_CURDATE(),INTERVAL -5 MONTH), util.VN_CURDATE(), 100, 1),
+ (3, 1102, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(),INTERVAL 1 MONTH), 50, 7),
+ (4, 1103, util.VN_CURDATE(), NULL, 50, 7);
INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
VALUES
@@ -1334,9 +1337,9 @@ INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
INSERT INTO `cache`.`cache_calc`(`id`, `cache_id`, `cacheName`, `params`, `last_refresh`, `expires`, `created`, `connection_id`)
VALUES
- (1, 2, 'available', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL),
- (2, 4, 'last_buy', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL),
- (3, 8, 'visible', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL);
+ (1, 2, 'available', CONCAT_WS('/',1,util.VN_CURDATE()), util.VN_NOW(), DATE_ADD(util.VN_NOW(),INTERVAL 15 MINUTE), util.VN_CURDATE(), NULL),
+ (2, 4, 'last_buy', CONCAT_WS('/',1,util.VN_CURDATE()), util.VN_NOW(), DATE_ADD(util.VN_NOW(),INTERVAL 15 MINUTE), util.VN_CURDATE(), NULL),
+ (3, 8, 'visible', CONCAT_WS('/',1,util.VN_CURDATE()), util.VN_NOW(), DATE_ADD(util.VN_NOW(),INTERVAL 15 MINUTE), util.VN_CURDATE(), NULL);
INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
VALUES
@@ -1346,27 +1349,27 @@ INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
(4, 4),
(5, 6);
-INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`)
+INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyModeFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`)
VALUES
- (1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1),
- (2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150, 2000, 'second travel', 2, 2),
- (3, CURDATE(), CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1, 1),
- (4, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 3, 1, 50.00, 500, 'fourth travel', 0, 2),
- (5, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3, 3, 1, 50.00, 500, 'fifth travel', 1, 1),
- (6, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 50.00, 500, 'sixth travel', 1, 2),
- (7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1),
- (8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2);
+ (1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1),
+ (2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150, 2000, 'second travel', 2, 2),
+ (3, util.VN_CURDATE(), util.VN_CURDATE(), 1, 2, 1, 0.00, 0.00, 'third travel', 1, 1),
+ (4, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 3, 1, 50.00, 500, 'fourth travel', 0, 2),
+ (5, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 3, 1, 50.00, 500, 'fifth travel', 1, 1),
+ (6, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 4, 4, 1, 50.00, 500, 'sixth travel', 1, 2),
+ (7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1),
+ (8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2);
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `ref`,`isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`)
VALUES
- (1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'Movement 1', 0, 0, '', ''),
- (2, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'Movement 2', 0, 0, 'this is the note two', 'observation two'),
- (3, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'Movement 3', 0, 0, 'this is the note three', 'observation three'),
- (4, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'Movement 4', 0, 0, 'this is the note four', 'observation four'),
- (5, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'Movement 5', 0, 0, 'this is the note five', 'observation five'),
- (6, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'Movement 6', 0, 0, 'this is the note six', 'observation six'),
- (7, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'Movement 7', 0, 0, 'this is the note seven', 'observation seven'),
- (8, 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'Movement 8', 1, 1, '', '');
+ (1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'Movement 1', 0, 0, '', ''),
+ (2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'Movement 2', 0, 0, 'this is the note two', 'observation two'),
+ (3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'Movement 3', 0, 0, 'this is the note three', 'observation three'),
+ (4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'Movement 4', 0, 0, 'this is the note four', 'observation four'),
+ (5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'Movement 5', 0, 0, 'this is the note five', 'observation five'),
+ (6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'Movement 6', 0, 0, 'this is the note six', 'observation six'),
+ (7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'Movement 7', 0, 0, 'this is the note seven', 'observation seven'),
+ (8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'Movement 8', 1, 1, '', '');
INSERT INTO `vn`.`claimRatio`(`clientFk`, `yearSale`, `claimAmount`, `claimingRate`, `priceIncreasing`, `packingRate`)
VALUES
@@ -1377,97 +1380,97 @@ INSERT INTO `vn`.`claimRatio`(`clientFk`, `yearSale`, `claimAmount`, `claimingRa
INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWaste`, `rate`)
VALUES
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation', 1, 1, '1062', '51', '4.8'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation Colombia', 2, 1, '35074', '687', '2.0'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation Mini', 3, 1, '1777', '13', '0.7'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation Short', 4, 1, '3182', '59', '0.6'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Crisantemo', 5, 1, '1747', '13', '0.7'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Lilium Oriental', 6, 1, '7182', '59', '0.6'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Alstroemeria', 7, 1, '1777', '13', '0.7'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Cymbidium', 1, 1, '4181', '59', '0.6'),
- ('CharlesXavier', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Cymbidium', 2, 1, '7268', '59', '0.6'),
- ('DavidCharlesHaller', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Containers', 2, 1, '-74', '0', '0.0'),
- ('DavidCharlesHaller', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Packagings', 3, 1, '-7', '0', '0.0'),
- ('DavidCharlesHaller', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Freight', 4, 1, '1100', '0', '0.0'),
- ('HankPym', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Funeral Accessories', 5, 1, '848', '-187', '-22.1'),
- ('HankPym', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Miscellaneous Accessories', 6, 1, '186', '0', '0.0'),
- ('HankPym', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(CURDATE(), INTERVAL -1 WEEK), 1), 'Adhesives', 7, 1, '277', '0', '0.0');
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation', 1, 1, '1062', '51', '4.8'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation Colombia', 2, 1, '35074', '687', '2.0'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation Mini', 3, 1, '1777', '13', '0.7'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Carnation Short', 4, 1, '3182', '59', '0.6'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Crisantemo', 5, 1, '1747', '13', '0.7'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Lilium Oriental', 6, 1, '7182', '59', '0.6'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Alstroemeria', 7, 1, '1777', '13', '0.7'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Cymbidium', 1, 1, '4181', '59', '0.6'),
+ ('CharlesXavier', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Cymbidium', 2, 1, '7268', '59', '0.6'),
+ ('DavidCharlesHaller', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Containers', 2, 1, '-74', '0', '0.0'),
+ ('DavidCharlesHaller', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Packagings', 3, 1, '-7', '0', '0.0'),
+ ('DavidCharlesHaller', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Freight', 4, 1, '1100', '0', '0.0'),
+ ('HankPym', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Funeral Accessories', 5, 1, '848', '-187', '-22.1'),
+ ('HankPym', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Miscellaneous Accessories', 6, 1, '186', '0', '0.0'),
+ ('HankPym', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 'Adhesives', 7, 1, '277', '0', '0.0');
INSERT INTO `vn`.`buy`(`id`,`entryFk`,`itemFk`,`buyingValue`,`quantity`,`packageFk`,`stickers`,`freightValue`,`packageValue`,`comissionValue`,`packing`,`grouping`,`groupingMode`,`location`,`price1`,`price2`,`price3`,`producer`,`printedStickers`,`isChecked`,`isIgnored`,`weight`, `created`)
VALUES
- (1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
- (2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 0, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, CURDATE()),
- (4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, 0, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, 0, NULL, 0.00, 78.3, 75.6, NULL, 0, 1, 0, 2.5, CURDATE()),
- (6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 2.5, CURDATE()),
- (7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 30.50, 29.00, NULL, 0, 1, 0, 2.5, CURDATE()),
- (8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 2.5, CURDATE()),
- (9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE()),
- (10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, CURDATE()),
- (11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE()),
- (12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE()),
- (13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, CURDATE()),
- (14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 4, CURDATE()),
- (15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, CURDATE());
+ (1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
+ (2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 0, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 1, util.VN_CURDATE()),
+ (4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, 0, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
+ (5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, 0, NULL, 0.00, 78.3, 75.6, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
+ (6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
+ (7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 30.50, 29.00, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
+ (8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 2.5, util.VN_CURDATE()),
+ (9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
+ (10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
+ (11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
+ (12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
+ (13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 1, NULL, 0.00, 99.6, 99.4, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
+ (14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 7.30, 7.00, NULL, 0, 1, 0, 4, util.VN_CURDATE()),
+ (15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 1, NULL, 0.00, 1.75, 1.67, NULL, 0, 1, 0, 4, util.VN_CURDATE());
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), 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));
+ (1, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 3, 1, 121, 442, NULL, 'TPV', 1,'155.89', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (2, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1104, 3, 1, 124, 442, NULL, 'WEB', 1,'100.10', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (3, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 1, 2, 124, 442, NULL, 'ANDROID', 1,'107.25', DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
+ (4, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 1, 2, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
+ (5, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 1, 3, 124, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
+ (6, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 1, 3, 1, 442, NULL, 'SALIX', 1,'10.01', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (7, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 2, 7, 1, 442, NULL, 'SALIX', 0,'10.01', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (8, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 2, 7, 121, 442, NULL, 'SALIX', 0,'123.53', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (9, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 2, 7, 124, 442, NULL, 'SALIX', 0,'10.01', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (10, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 3, 1, 2, 442, NULL, 'SALIX', 0,'10.01', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (11, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 2, 7, 122, 442, NULL, 'SALIX', 0,'60.90', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (12, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 3, 1, 3, 442, NULL, 'SALIX', 0,'72.60', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (13, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 1, 2, 123, 442, NULL, 'SALIX', 0,'72.60', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (14, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 1, 2, 4, 442, NULL, 'SALIX', 0,'72.60', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (15, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 1, 3, 125, 442, NULL, 'SALIX', 0,'72.60', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (16, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 2, 7, 126, 442, NULL, 'SALIX', 0,'155.89', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (17, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1107, 1, 4, 127, 442, NULL, 'SALIX', 0,'72.60', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (18, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 1, 4, 128, 442, NULL, 'SALIX', 0,'72.60', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (19, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 1, 5, 129, 442, NULL, 'SALIX', 0,'16.50', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE()),
+ (20, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 1, 5, 101, 442, NULL, 'SALIX', 0,'21.45', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (21, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 1, 5, 102, 442, NULL, 'SALIX', 0,'0.00', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (22, DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 1, 5, 103, 442, NULL, 'SALIX', 0,'148.50', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH));
INSERT INTO `hedera`.`orderRow`(`id`, `orderFk`, `itemFk`, `warehouseFk`, `shipment`, `amount`, `price`, `rate`, `created`, `saleFk`)
VALUES
- (1, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5, 9.10, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1),
- (2, 1, 2, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 10, 1.07, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2),
- (3, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 9.10, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 3),
- (4, 1, 4, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 20, 3.06, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 4),
- (5, 2, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 10, 9.10, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 5),
- (6, 3, 1, 2, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 15, 6.50, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 6),
- (7, 11, 2, 1, CURDATE(), 15, 1.30, 0, CURDATE(), 7),
- (8, 11, 4, 1, CURDATE(), 10, 3.26, 0, CURDATE(), 8),
- (9, 16, 1, 1, CURDATE(), 5, 9.10, 0, CURDATE(), 9),
- (10, 16, 2, 1, CURDATE(), 10, 1.07, 0, CURDATE(), 10),
- (11, 16, 1, 1, CURDATE(), 2, 9.10, 0, CURDATE(), 11),
- (12, 16, 4, 1, CURDATE(), 20, 3.06, 0, CURDATE(), 12),
- (13, 8, 2, 1, CURDATE(), 15, 1.30, 0, CURDATE(), 13),
- (14, 8, 1, 1, CURDATE(), 10, 9.28, 0, CURDATE(), 14),
- (15, 19, 1, 1, CURDATE(), 10, 1.50, 0, CURDATE(), 15),
- (16, 20, 2, 1, CURDATE(), 15, 1.30, 0, CURDATE(), 16),
- (17, 22, 2, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 30, 2.30, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 17),
- (18, 22, 4, 1, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 20, 3.00, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 18),
- (19, 4, 1, 1, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 1, 9.10, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 19),
- (20, 5, 1, 1, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), 1, 9.10, 0, DATE_ADD(CURDATE(), INTERVAL -4 MONTH), 20),
- (21, 6, 1, 1, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 9.10, 0, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 21),
- (22, 7, 1, 1, CURDATE(), 1, 9.10, 0, CURDATE(), 22),
- (23, 9, 1, 1, CURDATE(), 1, 9.10, 0, CURDATE(), 23),
- (24, 10, 1, 1, CURDATE(), 1, 9.10, 0, CURDATE(), 24),
- (25, 12, 4, 1, CURDATE(), 20, 3.00, 0, CURDATE(), 25),
- (26, 13, 4, 1, CURDATE(), 20, 3.00, 0, CURDATE(), 26),
- (27, 14, 4, 1, CURDATE(), 20, 3.00, 0, CURDATE(), 27),
- (28, 15, 4, 1, CURDATE(), 20, 3.00, 0, CURDATE(), 28),
- (29, 17, 4, 1, CURDATE(), 20, 3.00, 0, CURDATE(), 29),
- (30, 18, 4, 1, CURDATE(), 20, 3.00, 0, CURDATE(), 30);
+ (1, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 9.10, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1),
+ (2, 1, 2, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 10, 1.07, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2),
+ (3, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 9.10, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3),
+ (4, 1, 4, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 20, 3.06, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 4),
+ (5, 2, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 10, 9.10, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5),
+ (6, 3, 1, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 15, 6.50, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 6),
+ (7, 11, 2, 1, util.VN_CURDATE(), 15, 1.30, 0, util.VN_CURDATE(), 7),
+ (8, 11, 4, 1, util.VN_CURDATE(), 10, 3.26, 0, util.VN_CURDATE(), 8),
+ (9, 16, 1, 1, util.VN_CURDATE(), 5, 9.10, 0, util.VN_CURDATE(), 9),
+ (10, 16, 2, 1, util.VN_CURDATE(), 10, 1.07, 0, util.VN_CURDATE(), 10),
+ (11, 16, 1, 1, util.VN_CURDATE(), 2, 9.10, 0, util.VN_CURDATE(), 11),
+ (12, 16, 4, 1, util.VN_CURDATE(), 20, 3.06, 0, util.VN_CURDATE(), 12),
+ (13, 8, 2, 1, util.VN_CURDATE(), 15, 1.30, 0, util.VN_CURDATE(), 13),
+ (14, 8, 1, 1, util.VN_CURDATE(), 10, 9.28, 0, util.VN_CURDATE(), 14),
+ (15, 19, 1, 1, util.VN_CURDATE(), 10, 1.50, 0, util.VN_CURDATE(), 15),
+ (16, 20, 2, 1, util.VN_CURDATE(), 15, 1.30, 0, util.VN_CURDATE(), 16),
+ (17, 22, 2, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 30, 2.30, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 17),
+ (18, 22, 4, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 20, 3.00, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 18),
+ (19, 4, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), 1, 9.10, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), 19),
+ (20, 5, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), 1, 9.10, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), 20),
+ (21, 6, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 9.10, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 21),
+ (22, 7, 1, 1, util.VN_CURDATE(), 1, 9.10, 0, util.VN_CURDATE(), 22),
+ (23, 9, 1, 1, util.VN_CURDATE(), 1, 9.10, 0, util.VN_CURDATE(), 23),
+ (24, 10, 1, 1, util.VN_CURDATE(), 1, 9.10, 0, util.VN_CURDATE(), 24),
+ (25, 12, 4, 1, util.VN_CURDATE(), 20, 3.00, 0, util.VN_CURDATE(), 25),
+ (26, 13, 4, 1, util.VN_CURDATE(), 20, 3.00, 0, util.VN_CURDATE(), 26),
+ (27, 14, 4, 1, util.VN_CURDATE(), 20, 3.00, 0, util.VN_CURDATE(), 27),
+ (28, 15, 4, 1, util.VN_CURDATE(), 20, 3.00, 0, util.VN_CURDATE(), 28),
+ (29, 17, 4, 1, util.VN_CURDATE(), 20, 3.00, 0, util.VN_CURDATE(), 29),
+ (30, 18, 4, 1, util.VN_CURDATE(), 20, 3.00, 0, util.VN_CURDATE(), 30);
INSERT INTO `hedera`.`orderRowComponent`(`rowFk`, `componentFk`, `price`)
VALUES
@@ -1655,43 +1658,43 @@ INSERT INTO `hedera`.`visitAgent`(`id`, `visitFk`)
INSERT INTO `hedera`.`visitAccess`(`id`, `agentFk`, `stamp`)
VALUES
- (1, 1, CURDATE()),
- (2, 2, CURDATE()),
- (3, 3, CURDATE()),
- (4, 4, CURDATE()),
- (5, 5, CURDATE()),
- (6, 6, CURDATE()),
- (7, 7, CURDATE()),
- (8, 8, CURDATE()),
- (9, 9, CURDATE()),
- (10, 10, CURDATE()),
- (11, 11, CURDATE());
+ (1, 1, util.VN_CURDATE()),
+ (2, 2, util.VN_CURDATE()),
+ (3, 3, util.VN_CURDATE()),
+ (4, 4, util.VN_CURDATE()),
+ (5, 5, util.VN_CURDATE()),
+ (6, 6, util.VN_CURDATE()),
+ (7, 7, util.VN_CURDATE()),
+ (8, 8, util.VN_CURDATE()),
+ (9, 9, util.VN_CURDATE()),
+ (10, 10, util.VN_CURDATE()),
+ (11, 11, util.VN_CURDATE());
INSERT INTO `hedera`.`visitUser`(`id`, `accessFk`, `userFk`, `stamp`)
VALUES
- (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()),
- (10, 10, 1102, DATE_SUB(CURDATE(), INTERVAL 1 DAY)),
- (11, 11, 1103, DATE_SUB(CURDATE(), INTERVAL 1 DAY));
+ (1, 1, 1101, util.VN_CURDATE()),
+ (2, 2, 1101, util.VN_CURDATE()),
+ (3, 3, 1101, util.VN_CURDATE()),
+ (4, 4, 1102, util.VN_CURDATE()),
+ (5, 5, 1102, util.VN_CURDATE()),
+ (6, 6, 1102, util.VN_CURDATE()),
+ (7, 7, 1103, util.VN_CURDATE()),
+ (8, 8, 1103, util.VN_CURDATE()),
+ (9, 9, 1103, util.VN_CURDATE()),
+ (10, 10, 1102, DATE_SUB(util.VN_CURDATE(), INTERVAL 1 DAY)),
+ (11, 11, 1103, DATE_SUB(util.VN_CURDATE(), INTERVAL 1 DAY));
INSERT INTO `hedera`.`userSession`(`created`, `lastUpdate`, `ssid`, `data`, `userVisitFk`)
VALUES
- (CURDATE(), CURDATE(), '121', 'data', 1),
- (CURDATE(), CURDATE(), '122', 'data', 2),
- (CURDATE(), CURDATE(), '123', 'data', 3),
- (CURDATE(), CURDATE(), '124', 'data', 4),
- (CURDATE(), CURDATE(), '125', 'data', 5),
- (CURDATE(), CURDATE(), '126', 'data', 6),
- (CURDATE(), CURDATE(), '127', 'data', 7),
- (CURDATE(), CURDATE(), '128', 'data', 8),
- (CURDATE(), CURDATE(), '129', 'data', 9);
+ (util.VN_CURDATE(), util.VN_CURDATE(), '121', 'data', 1),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '122', 'data', 2),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '123', 'data', 3),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '124', 'data', 4),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '125', 'data', 5),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '126', 'data', 6),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '127', 'data', 7),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '128', 'data', 8),
+ (util.VN_CURDATE(), util.VN_CURDATE(), '129', 'data', 9);
INSERT INTO `vn`.`clientContact`(`id`, `clientFk`, `name`, `phone`)
VALUES
@@ -1715,11 +1718,11 @@ call vn.manaSpellersRequery(18);
INSERT INTO `vn`.`clientSample`(`id`, `clientFk`, `typeFk`, `created`, `workerFk`, `userFk`, `companyFk`)
VALUES
- (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);
+ (1, 1101, 1, util.VN_CURDATE(), 18, 18, 442),
+ (2, 1101, 1, util.VN_CURDATE(), 18, 18, 442),
+ (3, 1101, 2, util.VN_CURDATE(), 18, 18, 442),
+ (4, 1102, 2, util.VN_CURDATE(), 18, 18, 567),
+ (5, 1102, 3, util.VN_CURDATE(), 19, 19, 567);
INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`, `hasToNotify`)
VALUES
@@ -1731,12 +1734,19 @@ INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`,
( 6, 'mana', 'Mana', 1, 4, 0),
( 7, 'lack', 'Faltas', 1, 2, 0);
-INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created`, `packages`)
+INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created`, `packages`)
VALUES
- (1, CURDATE(), 1, 'Cu nam labores lobortis definiebas, ei aliquyam salutatus persequeris quo, cum eu nemore fierent dissentiunt. Per vero dolor id, vide democritum scribentur eu vim, pri erroribus temporibus ex.', 1101, 18, 3, 0, CURDATE(), 0),
- (2, CURDATE(), 2, 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.', 1101, 18, 3, 0, CURDATE(), 1),
- (3, CURDATE(), 3, 'An vim commodo dolorem volutpat, cu expetendis voluptatum usu, et mutat consul adversarium his. His natum numquam legimus an, diam fabulas mei ut. Melius fabellas sadipscing vel id. Partem diceret mandamus mea ne, has te tempor nostrud. Aeque nostro eum no.', 1101, 18, 1, 1, CURDATE(), 5),
- (4, CURDATE(), 3, 'Wisi forensibus mnesarchum in cum. Per id impetus abhorreant, his no magna definiebas, inani rationibus in quo. Ut vidisse dolores est, ut quis nominavi mel. Ad pri quod apeirian concludaturque.', 1104, 18, 5, 0, CURDATE(), 10);
+ (1, util.VN_CURDATE(), 1, 1101, 18, 3, 0, util.VN_CURDATE(), 0),
+ (2, util.VN_CURDATE(), 2, 1101, 18, 3, 0, util.VN_CURDATE(), 1),
+ (3, util.VN_CURDATE(), 3, 1101, 18, 1, 1, util.VN_CURDATE(), 5),
+ (4, util.VN_CURDATE(), 3, 1104, 18, 5, 0, util.VN_CURDATE(), 10);
+
+INSERT INTO `vn`.`claimObservation` (`claimFk`, `workerFk`, `text`, `created`)
+ VALUES
+ (1, 18, 'Cu nam labores lobortis definiebas, ei aliquyam salutatus persequeris quo, cum eu nemore fierent dissentiunt. Per vero dolor id, vide democritum scribentur eu vim, pri erroribus temporibus ex.', util.VN_CURDATE()),
+ (2, 18, 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.', util.VN_CURDATE()),
+ (3, 18, 'An vim commodo dolorem volutpat, cu expetendis voluptatum usu, et mutat consul adversarium his. His natum numquam legimus an, diam fabulas mei ut. Melius fabellas sadipscing vel id. Partem diceret mandamus mea ne, has te tempor nostrud. Aeque nostro eum no.', util.VN_CURDATE()),
+ (4, 18, 'Wisi forensibus mnesarchum in cum. Per id impetus abhorreant, his no magna definiebas, inani rationibus in quo. Ut vidisse dolores est, ut quis nominavi mel. Ad pri quod apeirian concludaturque.', util.VN_CURDATE());
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
VALUES
@@ -1753,6 +1763,11 @@ INSERT INTO `vn`.`claimDestination`(`id`, `description`, `addressFk`)
(4, 'Reclam.PRAG', 12),
(5, 'Corregido', 11);
+INSERT INTO `vn`.`claimResponsible`(`id`, `description`, `responsability`)
+ VALUES
+ (1, 'Buyers', 0),
+ (7, 'Quality', 0);
+
INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `workerFk`, `claimReasonFk`, `claimResultFk`, `claimRedeliveryFk`, `claimDestinationFk`)
VALUES
(1, 1, 1, 21, 1, 1, 2, 5),
@@ -1773,12 +1788,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, 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());
+ (1, 1, 1101, NULL, 2000, NULL, 'SIS0042', 'ok', util.VN_CURDATE()),
+ (2, 1, 1101, NULL, 1000, NULL, 'SIS0051', 'started', util.VN_CURDATE()),
+ (3, 2, 1101, NULL, 7268, NULL, NULL, 'ok', util.VN_CURDATE()),
+ (4, 2, 1101, NULL, 4698, NULL, NULL, 'started', util.VN_CURDATE()),
+ (5, 1, 1104, NULL, 2000, NULL, 'SIS0043', 'ok', util.VN_CURDATE()),
+ (6, 2, 1104, NULL, 4000, NULL, 'SIS0044', 'started', util.VN_CURDATE());
INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
VALUES
@@ -1814,10 +1829,10 @@ INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
INSERT INTO `vn`.`receipt`(`id`, `invoiceFk`, `amountPaid`, `payed`, `workerFk`, `bankFk`, `clientFk`, `created`, `companyFk`, `isConciliate`)
VALUES
- (1, 'Cobro web', 100.50, CURDATE(), 9, 1, 1101, CURDATE(), 442, 1),
- (2, 'Cobro web', 200.50, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 9, 1, 1101, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 442, 1),
- (3, 'Cobro en efectivo', 300.00, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 9, 1, 1102, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 442, 0),
- (4, 'Cobro en efectivo', 400.00, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 9, 1, 1103, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 442, 0);
+ (1, 'Cobro web', 100.50, util.VN_CURDATE(), 9, 1, 1101, util.VN_CURDATE(), 442, 1),
+ (2, 'Cobro web', 200.50, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 DAY), 9, 1, 1101, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 DAY), 442, 1),
+ (3, 'Cobro en efectivo', 300.00, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), 9, 1, 1102, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), 442, 0),
+ (4, 'Cobro en efectivo', 400.00, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY), 9, 1, 1103, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY), 442, 0);
INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
VALUES
@@ -1831,11 +1846,11 @@ INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
VALUES
- (1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
- (2, 'Melee weapon combat first 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
- (3, 'Melee weapon heavy shield 1x0.5m', 18, 35, 20, NULL, 3.06, NULL, NULL, 23, CURDATE()),
- (4, 'Melee weapon combat first 15cm', 18, 35, 15, NULL, 1.30, NULL, NULL, 11, CURDATE()),
- (5, 'Melee weapon combat first 15cm', 18, 35, 15, 4, 1.30, 0, NULL, 18, CURDATE());
+ (1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY)),
+ (2, 'Melee weapon combat first 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY)),
+ (3, 'Melee weapon heavy shield 1x0.5m', 18, 35, 20, NULL, 3.06, NULL, NULL, 23, util.VN_CURDATE()),
+ (4, 'Melee weapon combat first 15cm', 18, 35, 15, NULL, 1.30, NULL, NULL, 11, util.VN_CURDATE()),
+ (5, 'Melee weapon combat first 15cm', 18, 35, 15, 4, 1.30, 0, NULL, 18, util.VN_CURDATE());
INSERT INTO `vn`.`ticketServiceType`(`id`, `name`, `expenceFk`)
VALUES
@@ -1860,7 +1875,6 @@ INSERT INTO `pbx`.`sip`(`user_id`, `extension`)
(5, 1102),
(9, 1201);
-
INSERT INTO `postgresql`.`profile`(`profile_id`, `workerFk`, `profile_type_id`)
SELECT w.id, w.id, 1
FROM `vn`.`worker` `w`;
@@ -1878,16 +1892,20 @@ INSERT INTO `postgresql`.`business` (`client_id`, `companyCodeFk`, `date_start`,
FROM `postgresql`.`profile` `p`
WHERE `p`.`profile_id` = 1109;
+UPDATE `postgresql`.`business`
+ SET `payedHolidays`= 8
+ WHERE `business_id`= 1106;
+
INSERT INTO `postgresql`.`business_labour` (`business_id`, `notes`, `department_id`, `professional_category_id`, `incentivo`, `calendar_labour_type_id`, `porhoras`, `labour_agreement_id`, `workcenter_id`)
VALUES
(1111, NULL, 23, 1, 0.0, 1, 1, 1, 1);
-
+
UPDATE `postgresql`.`business_labour` bl
JOIN `postgresql`.`business` b ON b.business_id = bl.business_id
JOIN `postgresql`.`profile` pr ON pr.profile_id = b.client_id
SET bl.`professional_category_id` = 31
WHERE pr.`workerFk` = 1110;
-
+
UPDATE `postgresql`.`business_labour` bl
SET bl.`department_id` = 43
WHERE business_id IN(18, 19);
@@ -1904,10 +1922,10 @@ INSERT INTO `postgresql`.`profile_media`(`profile_media_id`, `profile_id`, `medi
INSERT INTO `vn`.`workCenterHoliday` (`workCenterFk`, `days`, `year`)
VALUES
- ('1', '27.5', YEAR(CURDATE())),
- ('5', '22', YEAR(CURDATE())),
- ('1', '24.5', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR))),
- ('5', '23', YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)));
+ ('1', '27.5', YEAR(util.VN_CURDATE())),
+ ('5', '22', YEAR(util.VN_CURDATE())),
+ ('1', '24.5', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR))),
+ ('5', '23', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)));
ALTER TABLE `postgresql`.`business_labour_payroll` DROP FOREIGN KEY `business_labour_payroll_cod_categoria`;
@@ -1935,21 +1953,22 @@ INSERT INTO `vn`.`absenceType` (`id`, `name`, `rgb`, `code`, `holidayEntitlement
INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id`, `date`)
VALUES
- (1, 6, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
- (1106, 1, IF(MONTH(CURDATE()) = 12 AND DAY(CURDATE()) > 10, DATE_ADD(CURDATE(), INTERVAL -10 DAY), DATE_ADD(CURDATE(), INTERVAL 10 DAY))),
- (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)));
+ (1, 6, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 10 DAY))),
+ (1106, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 10 DAY))),
+ (1106, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -11 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 11 DAY))),
+ (1106, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -12 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 12 DAY))),
+ (1106, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -20 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 20 DAY))),
+ (1106, 2, IF(MONTH(util.VN_CURDATE()) >= 1 AND DAY(util.VN_CURDATE()) > 20, DATE_ADD(util.VN_CURDATE(), INTERVAL -13 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 8 DAY))),
+ (1106, 1, IF(MONTH(util.VN_CURDATE()) >= 1 AND DAY(util.VN_CURDATE()) > 20, DATE_ADD(util.VN_CURDATE(), INTERVAL -14 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 9 DAY))),
+ (1106, 2, IF(MONTH(util.VN_CURDATE()) >= 1 AND DAY(util.VN_CURDATE()) > 20, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 7 DAY))),
+ (1107, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 10 DAY))),
+ (1107, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -11 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 11 DAY))),
+ (1107, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -12 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 12 DAY))),
+ (1107, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -20 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 20 DAY))),
+ (1107, 2, IF(MONTH(util.VN_CURDATE()) >= 1 AND DAY(util.VN_CURDATE()) > 20, DATE_ADD(util.VN_CURDATE(), INTERVAL -13 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 8 DAY))),
+ (1107, 1, IF(MONTH(util.VN_CURDATE()) >= 1 AND DAY(util.VN_CURDATE()) > 20, DATE_ADD(util.VN_CURDATE(), INTERVAL -14 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 9 DAY))),
+ (1107, 2, IF(MONTH(util.VN_CURDATE()) >= 1 AND DAY(util.VN_CURDATE()) > 20, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 7 DAY))),
+ (1107, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL - 16 DAY));
INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`, `apiKey`)
VALUES
@@ -1957,12 +1976,12 @@ INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `title`, `apiKey`)
INSERT INTO `vn`.`sharingClient`(`id`, `workerFk`, `started`, `ended`, `clientFk`)
VALUES
- (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);
+ (1, 19, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY), 1101),
+ (2, 18, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY), 1106);
INSERT INTO `vn`.`sharingCart`(`id`, `workerFk`, `started`, `ended`, `workerSubstitute`, `created`)
VALUES
- (1, 18, DATE_ADD(CURDATE(), INTERVAL -5 DAY), DATE_ADD(CURDATE(), INTERVAL +15 DAY), 19, DATE_ADD(CURDATE(), INTERVAL -5 DAY));
+ (1, 18, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY), 19, DATE_ADD(util.VN_CURDATE(), INTERVAL -5 DAY));
CALL `vn`.zoneGeo_calcTree(); -- this is an auto calculate for table vn.zoneGeo, columns: path,lft,rgt,depth,sons
@@ -2004,223 +2023,227 @@ INSERT INTO `vn`.`zoneIncluded` (`zoneFk`, `geoFk`, `isIncluded`)
INSERT INTO `vn`.`zoneEvent`(`zoneFk`, `type`, `dated`)
VALUES
- (1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9) - DAYOFWEEK(CURDATE())) DAY)),
- (1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
- (1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
- (1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
- (1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
- (2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9) - DAYOFWEEK(CURDATE())) DAY)),
- (2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
- (2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
- (2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
- (2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
- (3, 'day', CURDATE()),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +7 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +8 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +9 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +10 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +11 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +12 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +13 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +14 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +15 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +16 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +17 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +18 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +19 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +20 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +21 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +22 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +23 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +24 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +25 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +26 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +27 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +28 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +29 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +30 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +31 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +32 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +33 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +34 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +35 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +36 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +37 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +38 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +39 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +40 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +41 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +42 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +43 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +44 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +45 DAY)),
- (3, 'day', DATE_ADD(CURDATE(), INTERVAL +46 DAY)),
- (4, 'day', CURDATE()),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +7 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +8 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +9 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +10 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +11 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +12 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +13 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +14 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +15 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +16 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +17 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +18 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +19 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +20 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +21 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +22 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +23 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +24 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +25 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +26 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +27 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +28 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +29 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +30 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +31 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +32 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +33 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +34 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +35 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +36 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +37 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +38 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +39 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +40 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +41 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +42 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +43 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +44 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +45 DAY)),
- (4, 'day', DATE_ADD(CURDATE(), INTERVAL +46 DAY)),
- (5, 'day', CURDATE()),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +7 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +8 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +9 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +10 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +11 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +12 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +13 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +14 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +15 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +16 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +17 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +18 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +19 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +20 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +21 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +22 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +23 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +24 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +25 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +26 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +27 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +28 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +29 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +30 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +31 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +32 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +33 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +34 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +35 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +36 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +37 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +38 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +39 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +40 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +41 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +42 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +43 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +44 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +45 DAY)),
- (5, 'day', DATE_ADD(CURDATE(), INTERVAL +46 DAY)),
- (6, 'day', CURDATE()),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +7 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +8 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +9 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +10 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +11 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +12 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +13 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +14 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +15 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +16 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +17 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +18 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +19 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +20 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +21 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +22 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +23 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +24 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +25 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +26 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +27 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +28 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +29 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +30 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +31 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +32 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +33 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +34 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +35 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +36 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +37 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +38 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +39 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +40 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +41 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +42 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +43 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +44 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +45 DAY)),
- (6, 'day', DATE_ADD(CURDATE(), INTERVAL +46 DAY)),
- (7, 'day', CURDATE()),
- (7, 'day', DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
- (7, 'day', DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
- (7, 'day', DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
- (7, 'day', DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
- (7, 'day', DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
- (7, 'day', DATE_ADD(CURDATE(), INTERVAL +6 DAY));
+ (1, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=2, 2, 9) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (1, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=3, 3, 10) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (1, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=4, 4, 11) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (1, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=5, 5, 12) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (1, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=6, 6, 13) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (2, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=2, 2, 9) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (2, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=3, 3, 10) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (2, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=4, 4, 11) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (2, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=5, 5, 12) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (2, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=6, 6, 13) - DAYOFWEEK(util.VN_CURDATE())) DAY)),
+ (3, 'day', util.VN_CURDATE()),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +3 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +4 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +6 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +7 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +8 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +9 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +10 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +11 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +12 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +13 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +14 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +16 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +17 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +18 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +19 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +20 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +21 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +22 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +23 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +24 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +25 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +26 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +27 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +28 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +29 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +30 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +31 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +32 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +33 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +34 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +35 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +36 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +37 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +38 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +39 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +40 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +41 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +42 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +43 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +44 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +45 DAY)),
+ (3, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +46 DAY)),
+ (4, 'day', util.VN_CURDATE()),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +3 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +4 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +6 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +7 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +8 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +9 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +10 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +11 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +12 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +13 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +14 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +16 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +17 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +18 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +19 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +20 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +21 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +22 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +23 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +24 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +25 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +26 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +27 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +28 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +29 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +30 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +31 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +32 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +33 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +34 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +35 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +36 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +37 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +38 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +39 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +40 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +41 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +42 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +43 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +44 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +45 DAY)),
+ (4, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +46 DAY)),
+ (5, 'day', util.VN_CURDATE()),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +3 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +4 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +6 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +7 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +8 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +9 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +10 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +11 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +12 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +13 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +14 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +16 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +17 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +18 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +19 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +20 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +21 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +22 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +23 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +24 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +25 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +26 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +27 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +28 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +29 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +30 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +31 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +32 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +33 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +34 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +35 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +36 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +37 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +38 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +39 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +40 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +41 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +42 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +43 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +44 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +45 DAY)),
+ (5, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +46 DAY)),
+ (6, 'day', util.VN_CURDATE()),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +3 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +4 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +6 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +7 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +8 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +9 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +10 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +11 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +12 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +13 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +14 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +15 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +16 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +17 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +18 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +19 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +20 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +21 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +22 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +23 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +24 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +25 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +26 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +27 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +28 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +29 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +30 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +31 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +32 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +33 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +34 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +35 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +36 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +37 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +38 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +39 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +40 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +41 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +42 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +43 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +44 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +45 DAY)),
+ (6, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +46 DAY)),
+ (7, 'day', util.VN_CURDATE()),
+ (7, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
+ (7, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY)),
+ (7, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +3 DAY)),
+ (7, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +4 DAY)),
+ (7, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY)),
+ (7, 'day', DATE_ADD(util.VN_CURDATE(), INTERVAL +6 DAY));
INSERT INTO `vn`.`zoneEvent`(`zoneFk`, `type`, `weekDays`)
VALUES
(8, 'indefinitely', 'mon,tue,wed,thu,fri,sat,sun'),
(10, 'indefinitely', 'mon,tue,wed,thu,fri,sat,sun');
+INSERT INTO `vn`.`zoneEvent`(`zoneFk`, `type`, `started`, `ended`)
+ VALUES
+ (9, 'range', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 YEAR));
+
INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`)
VALUES
- (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');
+ (1106, CONCAT(util.VN_CURDATE(), ' 07:00'), TRUE, 'in'),
+ (1106, CONCAT(util.VN_CURDATE(), ' 10:00'), TRUE, 'middle'),
+ (1106, CONCAT(util.VN_CURDATE(), ' 10:20'), TRUE, 'middle'),
+ (1106, CONCAT(util.VN_CURDATE(), ' 14:50'), TRUE, 'out');
INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`, `code`)
VALUES
@@ -2247,14 +2270,14 @@ INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`, `c
INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `contentType`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`)
VALUES
- (1, 14, '1.txt', 'text/plain', 5, 1, 442, NULL, FALSE, 'Ticket:11', 'Ticket:11 dms for the ticket', CURDATE()),
- (2, 5, '2.txt', 'text/plain', 5, 1, 442, 1, TRUE, 'Client:104', 'Client:104 dms for the client', CURDATE()),
- (3, 5, '3.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'Client: 104', 'Client:104 readme', CURDATE()),
- (4, 3, '4.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'Worker: 106', 'Worker:106 readme', CURDATE()),
- (5, 5, '5.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'travel: 1', 'dmsForThermograph', CURDATE()),
- (6, 5, '6.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'NotExists', 'DoesNotExists', CURDATE()),
- (7, 20, '7.jpg', 'image/jpeg', 9, 1, 442, NULL, FALSE, '1', 'TICKET ID DEL CLIENTE BRUCE WAYNE ID 1101', CURDATE()),
- (8, 20, '8.mp4', 'video/mp4', 9, 1, 442, NULL, FALSE, '1', 'TICKET ID DEL CLIENTE BRUCE WAYNE ID 1101', CURDATE());
+ (1, 14, '1.txt', 'text/plain', 5, 1, 442, NULL, FALSE, 'Ticket:11', 'Ticket:11 dms for the ticket', util.VN_CURDATE()),
+ (2, 5, '2.txt', 'text/plain', 5, 1, 442, 1, TRUE, 'Client:104', 'Client:104 dms for the client', util.VN_CURDATE()),
+ (3, 5, '3.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'Client: 104', 'Client:104 readme', util.VN_CURDATE()),
+ (4, 3, '4.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'Worker: 106', 'Worker:106 readme', util.VN_CURDATE()),
+ (5, 5, '5.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'travel: 1', 'dmsForThermograph', util.VN_CURDATE()),
+ (6, 5, '6.txt', 'text/plain', 5, 1, 442, NULL, TRUE, 'NotExists', 'DoesNotExists', util.VN_CURDATE()),
+ (7, 20, '7.jpg', 'image/jpeg', 9, 1, 442, NULL, FALSE, '1', 'TICKET ID DEL CLIENTE BRUCE WAYNE ID 1101', util.VN_CURDATE()),
+ (8, 20, '8.mp4', 'video/mp4', 9, 1, 442, NULL, FALSE, '1', 'TICKET ID DEL CLIENTE BRUCE WAYNE ID 1101', util.VN_CURDATE());
INSERT INTO `vn`.`claimDms`(`claimFk`, `dmsFk`)
VALUES
@@ -2301,12 +2324,12 @@ INSERT INTO `vn`.`thermograph`(`id`, `model`)
INSERT INTO `vn`.`travelThermograph`(`thermographFk`, `created`, `warehouseFk`, `travelFk`, `temperatureFk`, `result`, `dmsFk`)
VALUES
- ('TMM190901395', CURDATE(), 1, 1, 'WARM', 'Ok', NULL),
- ('TL.BBA85422', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 2, 2, 'COOL', 'Ok', NULL),
- ('TL.BBA85422', CURDATE(), 2, 1, 'COOL', 'can not read the temperature', NULL),
- ('TZ1905012010', CURDATE(), 1, 1, 'WARM', 'Temperature in range', 5),
- ('138350-0', DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 'WARM', NULL, 5),
- ('138350-0', CURDATE(), 1, NULL, 'COOL', NULL, NULL);
+ ('TMM190901395', util.VN_CURDATE(), 1, 1, 'WARM', 'Ok', NULL),
+ ('TL.BBA85422', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2, 'COOL', 'Ok', NULL),
+ ('TL.BBA85422', util.VN_CURDATE(), 2, 1, 'COOL', 'can not read the temperature', NULL),
+ ('TZ1905012010', util.VN_CURDATE(), 1, 1, 'WARM', 'Temperature in range', 5),
+ ('138350-0', DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 'WARM', NULL, 5),
+ ('138350-0', util.VN_CURDATE(), 1, NULL, 'COOL', NULL, NULL);
REPLACE INTO `vn`.`incoterms`(`code`, `name`)
VALUES
@@ -2329,18 +2352,18 @@ INSERT INTO `vn`.`tabletDepartment`(`tabletFk`, `departmentFk`)
INSERT INTO `vn`.`campaign`(`code`, `dated`)
VALUES
- ('valentinesDay', CONCAT(YEAR(CURDATE()), '-02-14')),
- ('valentinesDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-02-14')),
- ('valentinesDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -2 YEAR)), '-02-14')),
- ('valentinesDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -3 YEAR)), '-02-14')),
- ('mothersDay', CONCAT(YEAR(CURDATE()), '-05-05')),
- ('mothersDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-05-05')),
- ('mothersDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -2 YEAR)), '-05-05')),
- ('mothersDay', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -3 YEAR)), '-05-05')),
- ('allSaints', CONCAT(YEAR(CURDATE()), '-11-01')),
- ('allSaints', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-11-01')),
- ('allSaints', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -2 YEAR)), '-11-01')),
- ('allSaints', CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -3 YEAR)), '-11-01'));
+ ('valentinesDay', CONCAT(YEAR(util.VN_CURDATE()), '-02-14')),
+ ('valentinesDay', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)), '-02-14')),
+ ('valentinesDay', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -2 YEAR)), '-02-14')),
+ ('valentinesDay', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -3 YEAR)), '-02-14')),
+ ('mothersDay', CONCAT(YEAR(util.VN_CURDATE()), '-05-05')),
+ ('mothersDay', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)), '-05-05')),
+ ('mothersDay', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -2 YEAR)), '-05-05')),
+ ('mothersDay', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -3 YEAR)), '-05-05')),
+ ('allSaints', CONCAT(YEAR(util.VN_CURDATE()), '-11-01')),
+ ('allSaints', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)), '-11-01')),
+ ('allSaints', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -2 YEAR)), '-11-01')),
+ ('allSaints', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -3 YEAR)), '-11-01'));
INSERT INTO `hedera`.`imageCollectionSize`(`id`, `collectionFk`,`width`, `height`)
VALUES
@@ -2352,61 +2375,61 @@ INSERT INTO `vn`.`rateConfig`(`rate0`, `rate1`, `rate2`, `rate3`)
INSERT INTO `vn`.`rate`(`dated`, `warehouseFk`, `rate0`, `rate1`, `rate2`, `rate3`)
VALUES
- (DATE_ADD(CURDATE(), INTERVAL -1 YEAR), 1, 10, 15, 20, 25),
- (CURDATE(), 1, 12, 17, 22, 27);
+ (DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR), 1, 10, 15, 20, 25),
+ (util.VN_CURDATE(), 1, 12, 17, 22, 27);
INSERT INTO `vn`.`awb` (id, code, package, weight, created, amount, transitoryFk, taxFk)
VALUES
- (1, '07546501420', 67, 671, CURDATE(), 1761, 1, 1),
- (2, '07546491421', 252, 2769, CURDATE(), 5231, 1, 1),
- (3, '07546500823', 102, 1495, CURDATE(), 3221, 1, 1),
- (4, '99610288821', 252, 2777, CURDATE(), 3641, 1, 1),
- (5, '07546500834', 229, 3292, CURDATE(), 6601, 2, 1),
- (6, '22101929561', 37, 458, CURDATE(), 441, 2, 1),
- (7, '07546491432', 258, 3034, CURDATE(), 6441, 2, 1),
- (8, '99610288644', 476, 4461, CURDATE(), 5751, 442, 1),
- (9, '99610289193', 302, 2972, CURDATE(), 3871, 442, 1),
- (10, '07546500856', 185, 2364, CURDATE(), 5321, 442, 1);
+ (1, '07546501420', 67, 671, util.VN_CURDATE(), 1761, 1, 1),
+ (2, '07546491421', 252, 2769, util.VN_CURDATE(), 5231, 1, 1),
+ (3, '07546500823', 102, 1495, util.VN_CURDATE(), 3221, 1, 1),
+ (4, '99610288821', 252, 2777, util.VN_CURDATE(), 3641, 1, 1),
+ (5, '07546500834', 229, 3292, util.VN_CURDATE(), 6601, 2, 1),
+ (6, '22101929561', 37, 458, util.VN_CURDATE(), 441, 2, 1),
+ (7, '07546491432', 258, 3034, util.VN_CURDATE(), 6441, 2, 1),
+ (8, '99610288644', 476, 4461, util.VN_CURDATE(), 5751, 442, 1),
+ (9, '99610289193', 302, 2972, util.VN_CURDATE(), 3871, 442, 1),
+ (10, '07546500856', 185, 2364, util.VN_CURDATE(), 5321, 442, 1);
INSERT INTO `vn`.`dua` (id, code, awbFk, issued, operated, booked, bookEntried, gestdocFk, customsValue, companyFk)
VALUES
- (1, '19ES0028013A481523', 1, CURDATE(), CURDATE(), CURDATE(), CURDATE(), 1, 11276.95, 442),
- (2, '21ES00280136115760', 2, CURDATE(), CURDATE(), CURDATE(), CURDATE(), 2, 1376.20, 442),
- (3, '19ES00280131956004', 3, CURDATE(), CURDATE(), CURDATE(), CURDATE(), 3, 14268.50, 442),
- (4, '19ES00280131955995', 4, CURDATE(), CURDATE(), CURDATE(), CURDATE(), 1, 8242.50, 442),
- (5, '19ES00280132022070', 5, CURDATE(), CURDATE(), CURDATE(), CURDATE(), 2, 10012.49, 442),
- (6, '19ES00280132032308', 6, CURDATE(), CURDATE(), CURDATE(), CURDATE(), 2, 19914.25, 442),
- (7, '19ES00280132025489', 7, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), CURDATE(), CURDATE(), CURDATE(), 2, 1934.06, 442),
- (8, '19ES00280132025490', 8, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), CURDATE(), CURDATE(), CURDATE(), 2, 3618.52, 442),
- (9, '19ES00280132025491', 9, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), CURDATE(), CURDATE(), CURDATE(), 2, 7126.23, 442),
- (10, '19ES00280132025492', 10, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), CURDATE(), CURDATE(), CURDATE(), 2, 4631.45, 442);
+ (1, '19ES0028013A481523', 1, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 11276.95, 442),
+ (2, '21ES00280136115760', 2, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1376.20, 442),
+ (3, '19ES00280131956004', 3, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 3, 14268.50, 442),
+ (4, '19ES00280131955995', 4, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 8242.50, 442),
+ (5, '19ES00280132022070', 5, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 10012.49, 442),
+ (6, '19ES00280132032308', 6, util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 19914.25, 442),
+ (7, '19ES00280132025489', 7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 1934.06, 442),
+ (8, '19ES00280132025490', 8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 3618.52, 442),
+ (9, '19ES00280132025491', 9, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 7126.23, 442),
+ (10, '19ES00280132025492', 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 2, 4631.45, 442);
REPLACE INTO `vn`.`invoiceIn`(`id`, `serialNumber`,`serial`, `supplierFk`, `issued`, `created`, `supplierRef`, `isBooked`, `companyFk`, `docFk`)
VALUES
- (1, 1001, 'R', 1, CURDATE(), CURDATE(), 1234, 0, 442, 1),
- (2, 1002, 'R', 1, CURDATE(), CURDATE(), 1235, 1, 442, 1),
- (3, 1003, 'R', 1, CURDATE(), CURDATE(), 1236, 0, 442, 1),
- (4, 1004, 'R', 1, CURDATE(), CURDATE(), 1237, 0, 442, 1),
- (5, 1005, 'R', 1, CURDATE(), CURDATE(), 1238, 1, 442, 1),
- (6, 1006, 'R', 2, CURDATE(), CURDATE(), 1239, 0, 442, 1),
- (7, 1007, 'R', 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1240, 1, 442, 1),
- (8, 1008, 'R', 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1241, 1, 442, 1),
- (9, 1009, 'R', 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1242, 1, 442, 1),
- (10, 1010, 'R', 2, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1243, 1, 442, 1);
+ (1, 1001, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1234, 0, 442, 1),
+ (2, 1002, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1235, 1, 442, 1),
+ (3, 1003, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1236, 0, 442, 1),
+ (4, 1004, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1237, 0, 442, 1),
+ (5, 1005, 'R', 1, util.VN_CURDATE(), util.VN_CURDATE(), 1238, 1, 442, 1),
+ (6, 1006, 'R', 2, util.VN_CURDATE(), util.VN_CURDATE(), 1239, 0, 442, 1),
+ (7, 1007, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1240, 1, 442, 1),
+ (8, 1008, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1241, 1, 442, 1),
+ (9, 1009, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1242, 1, 442, 1),
+ (10, 1010, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1243, 1, 442, 1);
INSERT INTO `vn`.`invoiceInDueDay`(`invoiceInFk`, `dueDated`, `bankFk`, `amount`)
VALUES
- (1, CURDATE(), 1, 336.99),
- (1, CURDATE(), 1, 15.25),
- (2, CURDATE(), 1, 168),
- (2, CURDATE(), 1, 55.17),
- (3, CURDATE(), 1, 87.95),
- (3, CURDATE(), 1, 7.65),
- (4, CURDATE(), 1, 373.27),
- (4, CURDATE(), 1, 73.36),
- (5, CURDATE(), 1, 64.23),
- (6, CURDATE(), 1, 32.95),
- (7, CURDATE(), 1, 58.64);
+ (1, util.VN_CURDATE(), 1, 336.99),
+ (1, util.VN_CURDATE(), 1, 15.25),
+ (2, util.VN_CURDATE(), 1, 168),
+ (2, util.VN_CURDATE(), 1, 55.17),
+ (3, util.VN_CURDATE(), 1, 87.95),
+ (3, util.VN_CURDATE(), 1, 7.65),
+ (4, util.VN_CURDATE(), 1, 373.27),
+ (4, util.VN_CURDATE(), 1, 73.36),
+ (5, util.VN_CURDATE(), 1, 64.23),
+ (6, util.VN_CURDATE(), 1, 32.95),
+ (7, util.VN_CURDATE(), 1, 58.64);
INSERT INTO `vn`.`duaInvoiceIn`(`id`, `duaFk`, `invoiceInFk`)
VALUES
@@ -2460,24 +2483,24 @@ INSERT INTO `vn`.`zoneAgencyMode`(`id`, `agencyModeFk`, `zoneFk`)
INSERT INTO `vn`.`expeditionTruck` (`id`, `ETD`, `description`)
VALUES
- (1, CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL +3 YEAR))), 'Best truck in fleet');
+ (1, CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL +3 YEAR))), 'Best truck in fleet');
INSERT INTO `vn`.`expeditionPallet` (`id`, `truckFk`, `built`, `position`, `isPrint`)
VALUES
- (1, 1, CURDATE(), 1, 1);
+ (1, 1, util.VN_CURDATE(), 1, 1);
INSERT INTO `vn`.`expeditionScan` (`id`, `expeditionFk`, `scanned`, `palletFk`)
VALUES
- (1, 1, CURDATE(), 1),
- (2, 2, CURDATE(), 1),
- (3, 3, CURDATE(), 1),
- (4, 4, CURDATE(), 1),
- (5, 5, CURDATE(), 1),
- (6, 6, CURDATE(), 1),
- (7, 7, CURDATE(), 1),
- (8, 8, CURDATE(), 1),
- (9, 9, CURDATE(), 1),
- (10, 10, CURDATE(), 1);
+ (1, 1, util.VN_CURDATE(), 1),
+ (2, 2, util.VN_CURDATE(), 1),
+ (3, 3, util.VN_CURDATE(), 1),
+ (4, 4, util.VN_CURDATE(), 1),
+ (5, 5, util.VN_CURDATE(), 1),
+ (6, 6, util.VN_CURDATE(), 1),
+ (7, 7, util.VN_CURDATE(), 1),
+ (8, 8, util.VN_CURDATE(), 1),
+ (9, 9, util.VN_CURDATE(), 1),
+ (10, 10, util.VN_CURDATE(), 1);
CALL `cache`.`last_buy_refresh`(FALSE);
@@ -2486,11 +2509,11 @@ UPDATE `vn`.`item` SET `genericFk` = 9
INSERT INTO `bs`.`defaulter` (`clientFk`, `amount`, `created`, `defaulterSinced`)
VALUES
- (1101, 500, CURDATE(), CURDATE()),
- (1102, 500, CURDATE(), CURDATE()),
- (1103, 500, CURDATE(), CURDATE()),
- (1107, 500, CURDATE(), CURDATE()),
- (1109, 500, CURDATE(), CURDATE());
+ (1101, 500, util.VN_CURDATE(), util.VN_CURDATE()),
+ (1102, 500, util.VN_CURDATE(), util.VN_CURDATE()),
+ (1103, 500, util.VN_CURDATE(), util.VN_CURDATE()),
+ (1107, 500, util.VN_CURDATE(), util.VN_CURDATE()),
+ (1109, 500, util.VN_CURDATE(), util.VN_CURDATE());
UPDATE `vn`.`route`
SET `invoiceInFk`=1
@@ -2501,16 +2524,16 @@ UPDATE `vn`.`route`
WHERE `id`=2;
INSERT INTO `bs`.`salesPerson` (`workerFk`, `year`, `month`, `portfolioWeight`)
VALUES
- (18, YEAR(CURDATE()), MONTH(CURDATE()), 807.23),
- (19, YEAR(CURDATE()), MONTH(CURDATE()), 34.40);
+ (18, YEAR(util.VN_CURDATE()), MONTH(util.VN_CURDATE()), 807.23),
+ (19, YEAR(util.VN_CURDATE()), MONTH(util.VN_CURDATE()), 34.40);
INSERT INTO `bs`.`sale` (`saleFk`, `amount`, `dated`, `typeFk`, `clientFk`)
VALUES
- (1, 501.95, CURDATE(), 2, 1101),
- (2, 70.7, CURDATE(), 2, 1101),
- (3, 200.78, CURDATE(), 2, 1101),
- (4, 33.8, CURDATE(), 1, 1101),
- (30, 34.4, CURDATE(), 1, 1108);
+ (1, 501.95, util.VN_CURDATE(), 2, 1101),
+ (2, 70.7, util.VN_CURDATE(), 2, 1101),
+ (3, 200.78, util.VN_CURDATE(), 2, 1101),
+ (4, 33.8, util.VN_CURDATE(), 1, 1101),
+ (30, 34.4, util.VN_CURDATE(), 1, 1108);
INSERT INTO `vn`.`docuware` (`code`, `fileCabinetName`, `dialogName` , `find`)
VALUES
@@ -2530,7 +2553,7 @@ INSERT INTO `vn`.`calendarHolidaysType` (`id`, `name`, `hexColour`)
INSERT INTO `vn`.`calendarHolidays` (`id`, `calendarHolidaysTypeFk`, `dated`, `calendarHolidaysNameFk`, `workCenterFk`)
VALUES
- (1, 1, CONCAT(YEAR(CURDATE()), '-12-09'), 1, 1);
+ (1, 1, CONCAT(YEAR(util.VN_CURDATE()), '-12-09'), 1, 1);
INSERT INTO `vn`.`supplierAgencyTerm` (`agencyFk`, `supplierFk`, `minimumPackages`, `kmPrice`, `packagePrice`, `routePrice`, `minimumKm`, `minimumM3`, `m3Price`)
VALUES
@@ -2542,8 +2565,8 @@ INSERT INTO `vn`.`supplierAgencyTerm` (`agencyFk`, `supplierFk`, `minimumPackage
INSERT INTO `vn`.`chat` (`senderFk`, `recipient`, `dated`, `checkUserStatus`, `message`, `status`, `attempts`)
VALUES
- (1101, '@PetterParker', CURDATE(), 1, 'First test message', 0, 0),
- (1101, '@PetterParker', CURDATE(), 0, 'Second test message', 0, 0);
+ (1101, '@PetterParker', util.VN_CURDATE(), 1, 'First test message', 0, 0),
+ (1101, '@PetterParker', util.VN_CURDATE(), 0, 'Second test message', 0, 0);
INSERT INTO `vn`.`mobileAppVersionControl` (`appName`, `version`, `isVersionCritical`)
@@ -2558,10 +2581,19 @@ INSERT INTO `vn`.`machine` (`plate`, `maker`, `model`, `warehouseFk`, `departmen
INSERT INTO `vn`.`machineWorker` (`workerFk`, `machineFk`, `inTimed`, `outTimed`)
VALUES
- (1106, 1, CURDATE(), CURDATE()),
- (1106, 1, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
- (1106, 2, CURDATE(), NULL),
- (1106, 2, DATE_ADD(CURDATE(), INTERVAL + 1 DAY), DATE_ADD(CURDATE(), INTERVAL +1 DAY));
+ (1106, 1, util.VN_CURDATE(), util.VN_CURDATE()),
+ (1106, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY)),
+ (1106, 2, util.VN_CURDATE(), NULL),
+ (1106, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +1 DAY));
+
+INSERT INTO `vn`.`zoneExclusion` (`id`, `zoneFk`, `dated`, `created`, `userFk`)
+VALUES
+ (1, 1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=7, 7, 14) - DAYOFWEEK(util.VN_CURDATE())) DAY), util.VN_CURDATE(), 100),
+ (2, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL (IF(DAYOFWEEK(util.VN_CURDATE())<=8, 8, 15) - DAYOFWEEK(util.VN_CURDATE())) DAY), util.VN_CURDATE(), 100);
+
+INSERT INTO `vn`.`zoneExclusionGeo` (`zoneExclusionFk`, `geoFk`)
+ VALUES
+ (2, 1);
INSERT INTO `vn`.`mdbBranch` (`name`)
VALUES
@@ -2576,3 +2608,28 @@ INSERT INTO `vn`.`mdbVersion` (`app`, `branchFk`, `version`)
INSERT INTO `vn`.`accountingConfig` (`id`, `minDate`, `maxDate`)
VALUES
(1, '2022-01-01', '2023-01-01');
+
+
+INSERT INTO `vn`.`saleGroup` (`userFk`, `parkingFk`, `sectorFk`)
+ VALUES
+ (1, 1, 1);
+
+INSERT INTO `vn`.`saleGroupDetail` (`saleFk`, `saleGroupFk`)
+ VALUES
+ (31, 1);
+
+INSERT INTO `vn`.`sectorCollection` (`userFk`, `sectorFk`)
+ VALUES
+ (1, 1);
+
+INSERT INTO `vn`.`sectorCollectionSaleGroup` (`sectorCollectionFk`, `saleGroupFk`)
+ VALUES
+ (1, 1);
+
+INSERT INTO `vn`.`workerTimeControlConfig` (`id`, `dayBreak`, `dayBreakDriver`, `shortWeekBreak`, `longWeekBreak`, `weekScope`, `mailPass`, `mailHost`, `mailSuccessFolder`, `mailErrorFolder`, `mailUser`, `minHoursToBreak`, `breakHours`, `hoursCompleteWeek`, `startNightlyHours`, `endNightlyHours`, `maxTimePerDay`, `breakTime`, `timeToBreakTime`, `dayMaxTime`, `shortWeekDays`, `longWeekDays`)
+ VALUES
+ (1, 43200, 32400, 129600, 259200, 604800, '', '', 'Leidos.exito', 'Leidos.error', 'timeControl', 5.33, 0.33, 40, '22:00:00', '06:00:00', 57600, 1200, 18000, 57600, 6, 13);
+
+INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
+ VALUES
+ (1, 9);
diff --git a/db/dump/mockDate.sql b/db/dump/mockDate.sql
new file mode 100644
index 000000000..c63c2d76c
--- /dev/null
+++ b/db/dump/mockDate.sql
@@ -0,0 +1,43 @@
+CREATE SCHEMA IF NOT EXISTS `util`;
+USE `util`;
+
+DELIMITER ;;
+DROP FUNCTION IF EXISTS `util`.`mockedDate`;
+CREATE FUNCTION `util`.`mockedDate`()
+RETURNS DATETIME
+DETERMINISTIC
+BEGIN
+ RETURN NOW();
+ -- '2022-01-19 08:00:00'
+END ;;
+DELIMITER ;
+
+DELIMITER ;;
+DROP FUNCTION IF EXISTS `util`.`VN_CURDATE`;
+CREATE FUNCTION `util`.`VN_CURDATE`()
+RETURNS DATE
+DETERMINISTIC
+BEGIN
+ RETURN DATE(mockedDate());
+END ;;
+DELIMITER ;
+
+DELIMITER ;;
+DROP FUNCTION IF EXISTS `util`.`VN_CURTIME`;
+CREATE FUNCTION `util`.`VN_CURTIME`()
+RETURNS TIME
+DETERMINISTIC
+BEGIN
+ RETURN TIME(mockedDate());
+END ;;
+DELIMITER ;
+
+DELIMITER ;;
+DROP FUNCTION IF EXISTS `util`.`VN_NOW`;
+CREATE FUNCTION `util`.`VN_NOW`()
+RETURNS DATETIME
+DETERMINISTIC
+BEGIN
+ RETURN mockedDate();
+END ;;
+DELIMITER ;
\ No newline at end of file
diff --git a/db/export-data.sh b/db/export-data.sh
index 101d0d8b0..bbbeb7152 100755
--- a/db/export-data.sh
+++ b/db/export-data.sh
@@ -111,4 +111,4 @@ TABLES=(
TiposTransacciones
TiposRetencion
)
-dump_tables ${TABLES[@]}
\ No newline at end of file
+dump_tables ${TABLES[@]}
diff --git a/db/export-structure.sh b/db/export-structure.sh
index 9b23f43ac..88508f098 100755
--- a/db/export-structure.sh
+++ b/db/export-structure.sh
@@ -96,5 +96,12 @@ mysqldump \
--databases \
${SCHEMAS[@]} \
${IGNORETABLES[@]} \
+ | sed 's/\bCURDATE\b/util.VN_CURDATE/ig'\
+ | sed 's/\bCURTIME\b/util.VN_CURTIME/ig' \
+ | sed 's/\bNOW\b/util.VN_NOW/ig' \
+ | sed 's/\bCURRENT_DATE\b/util.VN_CURDATE/ig' \
+ | sed 's/\bCURRENT_TIME\b/util.VN_CURTIME/ig' \
+ | sed 's/\bLOCALTIME\b/util.VN_NOW/ig' \
+ | sed 's/\bLOCALTIMESTAMP\b/util.VN_NOW/ig' \
| sed 's/ AUTO_INCREMENT=[0-9]* //g' \
- > dump/structure.sql
+ > dump/structure.sql
\ No newline at end of file
diff --git a/db/tests/vn/zone_getLanded.spec.js b/db/tests/vn/zone_getLanded.spec.js
index 6673879e4..5f82156d3 100644
--- a/db/tests/vn/zone_getLanded.spec.js
+++ b/db/tests/vn/zone_getLanded.spec.js
@@ -5,8 +5,9 @@ describe('zone zone_getLanded()', () => {
it(`should return data for a shipped in the past`, async() => {
let stmts = [];
let stmt;
-
stmts.push('START TRANSACTION');
+ const date = new Date();
+ date.setHours(0, 0, 0, 0);
let params = {
addressFk: 121,
@@ -14,7 +15,8 @@ describe('zone zone_getLanded()', () => {
warehouseFk: 1,
showExpiredZones: true};
- stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(CURDATE(), INTERVAL -1 DAY), ?, ?, ?, ?)', [
+ stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(?, INTERVAL -1 DAY), ?, ?, ?, ?)', [
+ date,
params.addressFk,
params.agencyModeFk,
params.warehouseFk,
@@ -38,6 +40,8 @@ describe('zone zone_getLanded()', () => {
it(`should return data for a shipped tomorrow`, async() => {
let stmts = [];
let stmt;
+ const date = new Date();
+ date.setHours(0, 0, 0, 0);
stmts.push('START TRANSACTION');
@@ -47,7 +51,8 @@ describe('zone zone_getLanded()', () => {
warehouseFk: 1,
showExpiredZones: false};
- stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(CURDATE(), INTERVAL +2 DAY), ?, ?, ?, ?)', [
+ stmt = new ParameterizedSQL('CALL zone_getLanded(DATE_ADD(?, INTERVAL +2 DAY), ?, ?, ?, ?)', [
+ date,
params.addressFk,
params.agencyModeFk,
params.warehouseFk,
diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index 88494bce5..37f7308a5 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -55,6 +55,7 @@ export default {
setPassword: '.vn-menu [name="setPassword"]',
activateAccount: '.vn-menu [name="enableAccount"]',
activateUser: '.vn-menu [name="activateUser"]',
+ deactivateUser: '.vn-menu [name="deactivateUser"]',
newPassword: 'vn-textfield[ng-model="$ctrl.newPassword"]',
repeatPassword: 'vn-textfield[ng-model="$ctrl.repeatPassword"]',
newRole: 'vn-autocomplete[ng-model="$ctrl.newRole"]',
@@ -275,6 +276,7 @@ export default {
clientWebAccess: {
enableWebAccessCheckbox: 'vn-check[label="Enable web access"]',
userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]',
+ email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]',
saveButton: 'button[type=submit]'
},
clientNotes: {
@@ -542,9 +544,8 @@ export default {
searchResultDate: 'vn-ticket-summary [label=Landed] span',
topbarSearch: 'vn-searchbar',
moreMenu: 'vn-ticket-index vn-icon-button[icon=more_vert]',
- fourthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(4)',
- fifthhWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(5)',
- sixthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(6)',
+ fourthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tbody vn-tr:nth-child(4)',
+ fiveWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tbody vn-tr:nth-child(5)',
weeklyTicket: 'vn-ticket-weekly-index vn-table > div > vn-tbody > vn-tr',
firstWeeklyTicketDeleteIcon: 'vn-ticket-weekly-index vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
firstWeeklyTicketAgency: 'vn-ticket-weekly-index vn-tr:nth-child(1) [ng-model="weekly.agencyModeFk"]',
@@ -564,8 +565,6 @@ export default {
isDeletedIcon: 'vn-ticket-descriptor vn-icon[icon="icon-deletedTicket"]',
goBackToModuleIndexButton: 'vn-ticket-descriptor a[ui-sref="ticket.index"]',
moreMenu: 'vn-ticket-descriptor vn-ticket-descriptor-menu > vn-icon-button[icon=more_vert]',
- moreMenuAddStowaway: '.vn-menu [name="addStowaway"]',
- moreMenuDeleteStowawayButton: '.vn-menu [name="deleteStowaway"]',
moreMenuAddToTurn: '.vn-menu [name="addTurn"]',
moreMenuDeleteTicket: '.vn-menu [name="deleteTicket"]',
moreMenuRestoreTicket: '.vn-menu [name="restoreTicket"]',
@@ -578,8 +577,6 @@ export default {
sendSMSbutton: 'button[response="accept"]',
changeShippedHourDialog: '.vn-dialog.shown',
changeShippedHour: '.vn-dialog.shown vn-input-time[ng-model="$ctrl.newShipped"]',
- addStowawayDialogFirstTicket: '.vn-dialog.shown vn-table vn-tbody vn-tr',
- shipButton: 'vn-ticket-descriptor vn-icon[icon="icon-stowaway"]',
thursdayButton: '.vn-popup.shown vn-tool-bar > vn-button:nth-child(4)',
saturdayButton: '.vn-popup.shown vn-tool-bar > vn-button:nth-child(6)',
acceptDialog: '.vn-dialog.shown button[response="accept"]',
@@ -587,7 +584,6 @@ export default {
descriptorDeliveryDate: 'vn-ticket-descriptor slot-body > .attributes > vn-label-value:nth-child(4) > section > span',
descriptorDeliveryAgency: 'vn-ticket-descriptor slot-body > .attributes > vn-label-value:nth-child(5) > section > span',
acceptInvoiceOutButton: '.vn-confirm.shown button[response="accept"]',
- acceptDeleteStowawayButton: '.vn-dialog.shown button[response="accept"]'
},
ticketNotes: {
firstNoteRemoveButton: 'vn-icon[icon="delete"]',
@@ -597,7 +593,7 @@ export default {
submitNotesButton: 'button[type=submit]'
},
ticketExpedition: {
- secondExpeditionRemoveButton: 'vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]',
+ thirdExpeditionRemoveButton: 'vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(3) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]',
expeditionRow: 'vn-ticket-expedition vn-table vn-tbody > vn-tr'
},
ticketPackages: {
@@ -729,7 +725,7 @@ export default {
claimSummary: {
header: 'vn-claim-summary > vn-card > h5',
state: 'vn-claim-summary vn-label-value[label="State"] > section > span',
- observation: 'vn-claim-summary vn-textarea[ng-model="$ctrl.summary.claim.observation"]',
+ observation: 'vn-claim-summary vn-horizontal.text',
firstSaleItemId: 'vn-claim-summary vn-horizontal > vn-auto:nth-child(5) vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(1) > span',
firstSaleDescriptorImage: '.vn-popover.shown vn-item-descriptor img',
itemDescriptorPopover: '.vn-popover.shown vn-item-descriptor',
@@ -741,7 +737,6 @@ export default {
},
claimBasicData: {
claimState: 'vn-claim-basic-data vn-autocomplete[ng-model="$ctrl.claim.claimStateFk"]',
- observation: 'vn-textarea[ng-model="$ctrl.claim.observation"]',
packages: 'vn-input-number[ng-model="$ctrl.claim.packages"]',
hasToPickUpCheckbox: 'vn-claim-basic-data vn-check[ng-model="$ctrl.claim.hasToPickUp"]',
saveButton: `button[type=submit]`
@@ -771,6 +766,12 @@ export default {
secondClaimRedelivery: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimRedeliveryFk"]',
saveDevelopmentButton: 'button[type=submit]'
},
+ claimNote: {
+ addNoteFloatButton: 'vn-float-button',
+ note: 'vn-textarea[ng-model="$ctrl.note.text"]',
+ saveButton: 'button[type=submit]',
+ firstNoteText: 'vn-claim-note .text'
+ },
claimAction: {
importClaimButton: 'vn-claim-action vn-button[label="Import claim"]',
anyLine: 'vn-claim-action vn-tbody > vn-tr',
@@ -905,52 +906,16 @@ export default {
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',
- thursdayAddTimeButton: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(2) > vn-td:nth-child(4) > vn-icon-button',
- 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: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)',
+ firstEntryOfMondayDelete: 'vn-worker-time-control vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > section:nth-child(1) > vn-chip > vn-icon[icon="cancel"]',
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: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)',
- thursdayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(4)',
- fridayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(5)',
- saturdayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(6)',
- sundayWorkedHours: 'vn-worker-time-control vn-table > div > vn-tfoot > vn-tr:nth-child(1) > vn-td:nth-child(7)',
weekWorkedHours: 'vn-worker-time-control vn-side-menu vn-label-value > section > span',
nextMonthButton: 'vn-worker-time-control vn-side-menu vn-calendar vn-button[icon=keyboard_arrow_right]',
previousMonthButton: 'vn-worker-time-control vn-side-menu vn-calendar vn-button[icon=keyboard_arrow_left]',
+ monthName: 'vn-worker-time-control vn-side-menu vn-calendar div > .title',
secondWeekDay: 'vn-worker-time-control vn-side-menu vn-calendar .day:nth-child(8) > .day-number',
+ thrirdWeekDay: 'vn-worker-time-control vn-side-menu vn-calendar .day:nth-child(15) > .day-number',
navigateBackToIndex: 'vn-worker-descriptor [name="goToModuleIndex"]'
},
workerCalendar: {
diff --git a/e2e/paths/02-client/03_edit_fiscal_data.spec.js b/e2e/paths/02-client/03_edit_fiscal_data.spec.js
index 4ae1d4eca..2a56cb535 100644
--- a/e2e/paths/02-client/03_edit_fiscal_data.spec.js
+++ b/e2e/paths/02-client/03_edit_fiscal_data.spec.js
@@ -276,7 +276,7 @@ describe('Client Edit fiscalData path', () => {
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => {
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
- await page.waitForTextInField(selectors.clientAddresses.city, 'Silla');
+ await page.waitForTextInField(selectors.clientAddresses.city, 'Gotham');
await page.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox);
await page.waitToClick(selectors.clientAddresses.saveButton);
const message = await page.waitForSnackbar();
diff --git a/e2e/paths/02-client/05_add_address.spec.js b/e2e/paths/02-client/05_add_address.spec.js
index c35237ab4..0581635d0 100644
--- a/e2e/paths/02-client/05_add_address.spec.js
+++ b/e2e/paths/02-client/05_add_address.spec.js
@@ -45,7 +45,7 @@ describe('Client Add address path', () => {
expect(province).toContain('Province five');
});
- it(`should receive an error after clicking save button as consignee, incoterms and customsAgent are empty`, async() => {
+ it(`should throw after clicking save button as consignee, incoterms and customsAgent are empty`, async() => {
await page.write(selectors.clientAddresses.consignee, 'Bruce Bunner');
await page.write(selectors.clientAddresses.streetAddress, '320 Park Avenue New York');
await page.waitToClick(selectors.clientAddresses.saveButton);
diff --git a/e2e/paths/02-client/07_edit_web_access.spec.js b/e2e/paths/02-client/07_edit_web_access.spec.js
index f75c7afad..8d8036373 100644
--- a/e2e/paths/02-client/07_edit_web_access.spec.js
+++ b/e2e/paths/02-client/07_edit_web_access.spec.js
@@ -1,3 +1,4 @@
+/* eslint max-len: ["error", { "code": 150 }]*/
import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer';
@@ -8,7 +9,7 @@ describe('Client Edit web access path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'client');
- await page.accessToSearchResult('Bruce Banner');
+ await page.accessToSearchResult('max');
await page.accessToSection('client.card.webAccess');
});
@@ -17,8 +18,6 @@ describe('Client Edit web access path', () => {
});
it('should uncheck the Enable web access checkbox', async() => {
- await page.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox);
- await page.waitToClick(selectors.clientWebAccess.saveButton);
await page.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox);
await page.waitToClick(selectors.clientWebAccess.saveButton);
const message = await page.waitForSnackbar();
@@ -28,7 +27,16 @@ describe('Client Edit web access path', () => {
it(`should update the name`, async() => {
await page.clearInput(selectors.clientWebAccess.userName);
- await page.write(selectors.clientWebAccess.userName, 'Hulk');
+ await page.write(selectors.clientWebAccess.userName, 'Legion');
+ await page.waitToClick(selectors.clientWebAccess.saveButton);
+ const message = await page.waitForSnackbar();
+
+ expect(message.text).toContain('Data saved!');
+ });
+
+ it(`should update the email`, async() => {
+ await page.clearInput(selectors.clientWebAccess.email);
+ await page.write(selectors.clientWebAccess.email, 'legion@marvel.com');
await page.waitToClick(selectors.clientWebAccess.saveButton);
const message = await page.waitForSnackbar();
@@ -45,30 +53,36 @@ describe('Client Edit web access path', () => {
it('should confirm web access name have been updated', async() => {
const result = await page.waitToGetProperty(selectors.clientWebAccess.userName, 'value');
- expect(result).toEqual('Hulk');
+ expect(result).toEqual('Legion');
+ });
+
+ it('should confirm web access email have been updated', async() => {
+ const result = await page.waitToGetProperty(selectors.clientWebAccess.email, 'value');
+
+ expect(result).toEqual('legion@marvel.com');
});
it(`should navigate to the log section`, async() => {
await page.accessToSection('client.card.log');
});
- it(`should confirm the last log is showing the updated client name and no modifications on the active checkbox`, async() => {
+ it(`should confirm the last log shows the updated client name and no modifications on active checkbox`, async() => {
let lastModificationPreviousValue = await page
.waitToGetProperty(selectors.clientLog.lastModificationPreviousValue, 'innerText');
let lastModificationCurrentValue = await page
.waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText');
- expect(lastModificationPreviousValue).toEqual('name BruceBanner active false');
- expect(lastModificationCurrentValue).toEqual('name Hulk active false');
+ expect(lastModificationPreviousValue).toEqual('name MaxEisenhardt active false');
+ expect(lastModificationCurrentValue).toEqual('name Legion active false');
});
- it(`should confirm the penultimate log is showing the updated avtive field and no modifications on the client name`, async() => {
+ it(`should confirm the penultimate log shows the updated active and no modifications on client name`, async() => {
let penultimateModificationPreviousValue = await page
.waitToGetProperty(selectors.clientLog.penultimateModificationPreviousValue, 'innerText');
let penultimateModificationCurrentValue = await page
.waitToGetProperty(selectors.clientLog.penultimateModificationCurrentValue, 'innerText');
- expect(penultimateModificationPreviousValue).toEqual('name BruceBanner active true');
- expect(penultimateModificationCurrentValue).toEqual('name BruceBanner active false');
+ expect(penultimateModificationPreviousValue).toEqual('name MaxEisenhardt active true');
+ expect(penultimateModificationCurrentValue).toEqual('name MaxEisenhardt active false');
});
});
diff --git a/e2e/paths/02-client/21_defaulter.spec.js b/e2e/paths/02-client/21_defaulter.spec.js
index c7640d028..0eb16441f 100644
--- a/e2e/paths/02-client/21_defaulter.spec.js
+++ b/e2e/paths/02-client/21_defaulter.spec.js
@@ -28,12 +28,12 @@ describe('Client defaulter path', () => {
const salesPersonName =
await page.waitToGetProperty(selectors.clientDefaulter.firstSalesPersonName, 'innerText');
- expect(clientName).toEqual('Ororo Munroe');
- expect(salesPersonName).toEqual('salesPersonNick');
+ expect(clientName).toEqual('Bruce Banner');
+ expect(salesPersonName).toEqual('developer');
});
it('should first observation not changed', async() => {
- const expectedObservation = 'Madness, as you know, is like gravity, all it takes is a little push';
+ const expectedObservation = 'Meeting with Black Widow 21st 9am';
const result = await page.waitToGetProperty(selectors.clientDefaulter.firstObservation, 'value');
expect(result).toContain(expectedObservation);
diff --git a/e2e/paths/03-worker/04_time_control.spec.js b/e2e/paths/03-worker/04_time_control.spec.js
index 5709e6207..be8df3cf0 100644
--- a/e2e/paths/03-worker/04_time_control.spec.js
+++ b/e2e/paths/03-worker/04_time_control.spec.js
@@ -1,3 +1,4 @@
+/* eslint max-len: ["error", { "code": 150 }]*/
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
@@ -10,414 +11,105 @@ describe('Worker time control path', () => {
await page.loginAndModule('salesBoss', 'worker');
await page.accessToSearchResult('HankPym');
await page.accessToSection('worker.card.timeControl');
- await page.waitToClick(selectors.workerTimeControl.previousMonthButton);
- await page.waitToClick(selectors.workerTimeControl.secondWeekDay);
});
afterAll(async() => {
await browser.close();
});
- describe('as salesBoss', () => {
- describe('on Monday', () => {
- it('should scan in Hank Pym', async() => {
- const scanTime = '07:00';
+ const eightAm = '08:00';
+ const fourPm = '16:00';
+ const hankPymId = 1107;
- await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
- 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');
+ it('should go to the next month', async() => {
+ const date = new Date();
+ date.setMonth(date.getMonth() + 1);
+ const month = date.toLocaleString('default', {month: 'long'});
- expect(result).toEqual(scanTime);
- });
+ await page.waitToClick(selectors.workerTimeControl.nextMonthButton);
+ const result = await page.waitToGetProperty(selectors.workerTimeControl.monthName, 'innerText');
- it(`should scan out Hank Pym for break`, async() => {
- const scanTime = '10:00';
-
- await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should scan in Hank Pym for a wrong hour and forget to scan in from the break`, async() => {
- const scanTime = '18:00';
-
- await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should delete the wrong entry for Hank Pym`, async() => {
- const wrongScanTime = '18:00';
-
- await page.waitForTextInElement(selectors.workerTimeControl.thirdEntryOfMonday, wrongScanTime);
- await page.waitToClick(selectors.workerTimeControl.thirdEntryOfMondayDelete);
- await page.respondToDialog('accept');
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Entry removed');
- });
-
- it(`should scan out Hank Pym to leave early`, async() => {
- const scanTime = '14:00';
-
- await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should add the break's scan in for Hank Pym and be in the right order`, async() => {
- const scanTime = '10:20';
-
- await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
- 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');
-
- expect(result).toEqual('14:00');
- });
-
- it(`should the third entry be the scan in from break`, async() => {
- const scanTime = '10:20';
-
- const result = await page
- .waitToGetProperty(selectors.workerTimeControl.thirdEntryOfMonday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 6:40 hours`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.mondayWorkedHours, '06:40 h.');
- });
- });
-
- describe('on Tuesday', () => {
- it('should happily scan in Hank Pym', async() => {
- const scanTime = '08:00';
-
- await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should happily scan out Hank Pym for break`, async() => {
- const scanTime = '10:00';
-
- await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should happily scan in Hank Pym from the break`, async() => {
- const scanTime = '10:20';
-
- await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should happily scan out Hank Pym for the day`, async() => {
- const scanTime = '16:00';
-
- await page.waitToClick(selectors.workerTimeControl.tuesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 7:40 hours`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.tuesdayWorkedHours, '07:40 h.');
- });
- });
-
- describe('on Wednesday', () => {
- it('should cheerfully scan in Hank Pym', async() => {
- const scanTime = '09:00';
-
- await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should cheerfully scan out Hank Pym for break`, async() => {
- const scanTime = '10:00';
-
- await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should cheerfully scan in Hank Pym from the break`, async() => {
- const scanTime = '10:20';
-
- await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should cheerfully scan out Hank Pym for the day`, async() => {
- const scanTime = '17:00';
-
- await page.waitToClick(selectors.workerTimeControl.wednesdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 7:40 cheerfull hours`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.wednesdayWorkedHours, '07:40 h.');
- });
- });
-
- describe('on Thursday', () => {
- it('should joyfully scan in Hank Pym', async() => {
- const scanTime = '09:59';
-
- await page.waitToClick(selectors.workerTimeControl.thursdayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfThursday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfThursday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfThursday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 7:40 joyfull hours`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.thursdayWorkedHours, '07:40 h.');
- });
- });
-
- describe('on Friday', () => {
- it('should smilingly scan in Hank Pym', async() => {
- const scanTime = '07:30';
- await page.waitToClick(selectors.workerTimeControl.fridayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfFriday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'intermediate');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.thirdEntryOfFriday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.fourthEntryOfFriday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 7:40 hours with a smile on his face`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.fridayWorkedHours, '07:40 h.');
- });
- });
+ expect(result).toContain(month);
});
- describe('as HHRR', () => {
- describe('on Saturday', () => {
- it('should log in as hr and pick the worker module', async() => {
- await page.loginAndModule('hr', 'worker');
- });
+ it('should go to current month', async() => {
+ const date = new Date();
+ const month = date.toLocaleString('default', {month: 'long'});
- it('should search for a worker and access to its summary', async() => {
- await page.accessToSearchResult('HankPym');
- await page.waitForState('worker.card.summary');
- });
+ await page.waitToClick(selectors.workerTimeControl.previousMonthButton);
+ const result = await page.waitToGetProperty(selectors.workerTimeControl.monthName, 'innerText');
- it('should access to the time control section', async() => {
- await page.accessToSection('worker.card.timeControl');
- await page.waitForState('worker.card.timeControl');
- await page.waitToClick(selectors.workerTimeControl.previousMonthButton);
- await page.waitToClick(selectors.workerTimeControl.secondWeekDay);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfSaturday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfSaturday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 7:40 hours with all his will`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.saturdayWorkedHours, '07:40 h.');
- });
- });
-
- describe('on Sunday', () => {
- it('should gladly scan in Hank Pym', async() => {
- const scanTime = '05:00';
- await page.waitToClick(selectors.workerTimeControl.sundayAddTimeButton);
- 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');
-
- expect(result).toEqual(scanTime);
- });
-
- 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.dialogTimeInput, scanTime);
- await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
- await page.respondToDialog('accept');
- const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfSunday, 'innerText');
-
- expect(result).toEqual(scanTime);
- });
-
- it(`should check Hank Pym worked 7:40 glad hours`, async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.sundayWorkedHours, '07:40 h.');
- });
-
- it(`should check Hank Pym doesn't have hours set on the next months second week`, async() => {
- await page.waitToClick(selectors.workerTimeControl.nextMonthButton);
- await page.waitToClick(selectors.workerTimeControl.secondWeekDay);
- await page.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '00:00 h.');
- });
-
- it(`should check he didn't scan in this week yet`, async() => {
- await page.waitToClick(selectors.workerTimeControl.navigateBackToIndex);
- await page.accessToSearchResult('salesBoss');
- await page.accessToSection('worker.card.timeControl');
-
- const wholeWeekHours = await page
- .waitToGetProperty(selectors.workerTimeControl.weekWorkedHours, 'innerText');
-
- expect(wholeWeekHours).toEqual('00:00 h.');
- });
- });
+ expect(result).toContain(month);
});
- describe('after all this amazing week', () => {
- it('should log in Hank', async() => {
- await page.loginAndModule('HankPym', 'worker');
- await page.accessToSearchResult('HankPym');
- await page.accessToSection('worker.card.timeControl');
- await page.waitToClick(selectors.workerTimeControl.previousMonthButton);
- await page.waitToClick(selectors.workerTimeControl.secondWeekDay);
- });
+ it('should go 1 month in the past', async() => {
+ const date = new Date();
+ date.setMonth(date.getMonth() - 1);
+ const timestamp = Math.round(date.getTime() / 1000);
+ const month = date.toLocaleString('default', {month: 'long'});
- it('should check his weekly hours are alright', async() => {
- await page.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '52:40 h.');
- });
+ await page.loginAndModule('salesBoss', 'worker');
+ await page.goto(`http://localhost:5000/#!/worker/${hankPymId}/time-control?timestamp=${timestamp}`);
+ await page.waitToClick(selectors.workerTimeControl.secondWeekDay);
+
+ const result = await page.waitToGetProperty(selectors.workerTimeControl.monthName, 'innerText');
+
+ expect(result).toContain(month);
+ });
+
+ it(`should return error when insert 'out' of first entry`, async() => {
+ await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
+ await page.pickTime(selectors.workerTimeControl.dialogTimeInput, eightAm);
+ await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
+ await page.respondToDialog('accept');
+ const message = await page.waitForSnackbar();
+
+ expect(message.text).toBeDefined();
+ });
+
+ it(`should insert 'in' monday`, async() => {
+ await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
+ await page.pickTime(selectors.workerTimeControl.dialogTimeInput, eightAm);
+ await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'in');
+ await page.respondToDialog('accept');
+ const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfMonday, 'innerText');
+
+ expect(result).toEqual(eightAm);
+ });
+
+ it(`should insert 'out' monday`, async() => {
+ await page.waitToClick(selectors.workerTimeControl.mondayAddTimeButton);
+ await page.pickTime(selectors.workerTimeControl.dialogTimeInput, fourPm);
+ await page.autocompleteSearch(selectors.workerTimeControl.dialogTimeDirection, 'out');
+ await page.respondToDialog('accept');
+ const result = await page.waitToGetProperty(selectors.workerTimeControl.secondEntryOfMonday, 'innerText');
+
+ expect(result).toEqual(fourPm);
+ });
+
+ it(`should check Hank Pym worked 8:20 hours`, async() => {
+ await page.waitForTextInElement(selectors.workerTimeControl.mondayWorkedHours, '08:20 h.');
+ await page.waitForTextInElement(selectors.workerTimeControl.weekWorkedHours, '08:20 h.');
+ });
+
+ it('should remove first entry of monday', async() => {
+ await page.waitForTextInElement(selectors.workerTimeControl.firstEntryOfMonday, eightAm);
+ await page.waitForTextInElement(selectors.workerTimeControl.secondEntryOfMonday, fourPm);
+ await page.waitToClick(selectors.workerTimeControl.firstEntryOfMondayDelete);
+ await page.respondToDialog('accept');
+ const message = await page.waitForSnackbar();
+
+ expect(message.text).toContain('Entry removed');
+ });
+
+ it(`should be the 'out' the first entry of monday`, async() => {
+ const result = await page.waitToGetProperty(selectors.workerTimeControl.firstEntryOfMonday, 'innerText');
+
+ expect(result).toEqual(fourPm);
+ });
+
+ it('should change week of month', async() => {
+ await page.waitToClick(selectors.workerTimeControl.thrirdWeekDay);
+ await page.waitForTextInElement(selectors.workerTimeControl.mondayWorkedHours, '00:00 h.');
});
});
diff --git a/e2e/paths/05-ticket/02_expeditions_and_log.spec.js b/e2e/paths/05-ticket/02_expeditions_and_log.spec.js
index 0e6482c94..dd2525f43 100644
--- a/e2e/paths/05-ticket/02_expeditions_and_log.spec.js
+++ b/e2e/paths/05-ticket/02_expeditions_and_log.spec.js
@@ -18,7 +18,7 @@ describe('Ticket expeditions and log path', () => {
});
it(`should delete a former expedition and confirm the remaining expedition are the expected ones`, async() => {
- await page.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton);
+ await page.waitToClick(selectors.ticketExpedition.thirdExpeditionRemoveButton);
await page.waitToClick(selectors.globalItems.acceptButton);
await page.reloadSection('ticket.card.expedition');
diff --git a/e2e/paths/05-ticket/06_basic_data_steps.spec.js b/e2e/paths/05-ticket/06_basic_data_steps.spec.js
index fa118c25d..46cbf29b8 100644
--- a/e2e/paths/05-ticket/06_basic_data_steps.spec.js
+++ b/e2e/paths/05-ticket/06_basic_data_steps.spec.js
@@ -42,7 +42,7 @@ describe('Ticket Edit basic data path', () => {
expect(disabled).toBeFalsy();
});
- it(`should check the zone is for Silla247`, async() => {
+ it(`should check the zone is for Gotham247`, async() => {
let zone = await page
.waitToGetProperty(selectors.ticketBasicData.zone, 'value');
@@ -63,7 +63,7 @@ describe('Ticket Edit basic data path', () => {
let zone = await page
.waitToGetProperty(selectors.ticketBasicData.agency, 'value');
- expect(zone).toContain('Silla247Expensive');
+ expect(zone).toContain('Gotham247Expensive');
});
it(`should click next`, async() => {
@@ -92,7 +92,7 @@ describe('Ticket Edit basic data path', () => {
});
it(`should split ticket without negatives`, async() => {
- const newAgency = 'Silla247';
+ const newAgency = 'Gotham247';
const newDate = new Date();
newDate.setDate(newDate.getDate() - 1);
diff --git a/e2e/paths/05-ticket/09_weekly.spec.js b/e2e/paths/05-ticket/09_weekly.spec.js
index 247dd2ab3..d04138ee5 100644
--- a/e2e/paths/05-ticket/09_weekly.spec.js
+++ b/e2e/paths/05-ticket/09_weekly.spec.js
@@ -80,7 +80,7 @@ describe('Ticket descriptor path', () => {
it('should confirm the ticket 11 was added on saturday', async() => {
await page.accessToSection('ticket.weekly.index');
- const result = await page.waitToGetProperty(selectors.ticketsIndex.fifthhWeeklyTicket, 'value');
+ const result = await page.waitToGetProperty(selectors.ticketsIndex.fiveWeeklyTicket, 'value');
expect(result).toEqual('Saturday');
});
@@ -108,7 +108,7 @@ describe('Ticket descriptor path', () => {
});
it('should update the agency then remove it afterwards', async() => {
- await page.autocompleteSearch(selectors.ticketsIndex.firstWeeklyTicketAgency, 'Silla247');
+ await page.autocompleteSearch(selectors.ticketsIndex.firstWeeklyTicketAgency, 'Gotham247');
let message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
diff --git a/e2e/paths/05-ticket/12_descriptor.spec.js b/e2e/paths/05-ticket/12_descriptor.spec.js
index 3429acc89..ca6fb8290 100644
--- a/e2e/paths/05-ticket/12_descriptor.spec.js
+++ b/e2e/paths/05-ticket/12_descriptor.spec.js
@@ -75,59 +75,6 @@ describe('Ticket descriptor path', () => {
});
});
- describe('Add stowaway', () => {
- it('should search for a ticket', async() => {
- await page.accessToSearchResult('16');
- await page.waitForState('ticket.card.summary');
- });
-
- it('should open the add stowaway dialog', async() => {
- await page.waitForFunction(() => {
- let element = document.querySelector('vn-ticket-descriptor-menu');
- return element.$ctrl.canShowStowaway === true;
- });
- await page.waitToClick(selectors.ticketDescriptor.moreMenu);
- await page.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway);
- await page.waitForSelector(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
- const isVisible = await page.isVisible(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
-
- expect(isVisible).toBeTruthy();
- });
-
- it('should add a ticket as stowaway', async() => {
- await page.waitToClick(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it(`should check the state of the stowaway ticket is embarked`, async() => {
- await page.waitForState('ticket.card.summary');
- const state = await page.waitToGetProperty(selectors.ticketDescriptor.stateLabelValue, 'innerText');
-
- expect(state).toEqual('State Embarcando');
- });
-
- it(`should navigate back to the added ticket using the descriptors ship button`, async() => {
- await page.waitToClick(selectors.ticketDescriptor.shipButton);
- await page.waitForState('ticket.card.summary');
- });
-
- it('should delete the stowaway', async() => {
- await page.waitToClick(selectors.ticketDescriptor.moreMenu);
- await page.waitForContentLoaded();
- await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteStowawayButton);
- await page.waitToClick(selectors.ticketDescriptor.acceptDeleteStowawayButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it(`should confirm the ship buton doesn't exisist any more`, async() => {
- await page.waitForSelector(selectors.ticketDescriptor.shipButton, {hidden: true});
- });
- });
-
describe('Make invoice', () => {
it('should login as administrative role then search for a ticket', async() => {
const invoiceableTicketId = '14';
diff --git a/e2e/paths/05-ticket/13_services.spec.js b/e2e/paths/05-ticket/13_services.spec.js
index 03e57b588..50df23582 100644
--- a/e2e/paths/05-ticket/13_services.spec.js
+++ b/e2e/paths/05-ticket/13_services.spec.js
@@ -23,9 +23,9 @@ describe('Ticket services path', () => {
await page.waitForClassPresent(selectors.ticketService.firstAddServiceTypeButton, 'disabled');
await page.waitToClick(selectors.ticketService.addServiceButton);
await page.waitForSelector(selectors.ticketService.firstAddServiceTypeButton);
- const result = await page.isDisabled(selectors.ticketService.firstAddServiceTypeButton);
+ const disabled = await page.isDisabled(selectors.ticketService.firstAddServiceTypeButton);
- expect(result).toBe(true);
+ expect(disabled).toBe(true);
});
it('should receive an error if you attempt to save a service without access rights', async() => {
diff --git a/e2e/paths/05-ticket/14_create_ticket.spec.js b/e2e/paths/05-ticket/14_create_ticket.spec.js
index bfaa08775..48b4ebdd0 100644
--- a/e2e/paths/05-ticket/14_create_ticket.spec.js
+++ b/e2e/paths/05-ticket/14_create_ticket.spec.js
@@ -6,7 +6,6 @@ describe('Ticket create path', () => {
let page;
let nextMonth = new Date();
nextMonth.setMonth(nextMonth.getMonth() + 1);
- let stowawayTicketId;
beforeAll(async() => {
browser = await getBrowser();
@@ -27,7 +26,7 @@ describe('Ticket create path', () => {
await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent');
await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth);
await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse Two');
- await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247');
+ await page.autocompleteSearch(selectors.createTicketView.agency, 'Gotham247');
await page.waitToClick(selectors.createTicketView.createButton);
const message = await page.waitForSnackbar();
@@ -36,8 +35,6 @@ describe('Ticket create path', () => {
it('should check the url is now the summary of the ticket', async() => {
await page.waitForState('ticket.card.summary');
- stowawayTicketId = await page.waitToGetProperty(selectors.ticketSummary.descriptorTicketId, 'innerText');
- stowawayTicketId = stowawayTicketId.substring(1);
});
it('should again open the new ticket form', async() => {
@@ -50,7 +47,7 @@ describe('Ticket create path', () => {
await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent');
await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth);
await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse One');
- await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247');
+ await page.autocompleteSearch(selectors.createTicketView.agency, 'Gotham247');
await page.waitToClick(selectors.createTicketView.createButton);
const message = await page.waitForSnackbar();
@@ -61,15 +58,6 @@ describe('Ticket create path', () => {
await page.waitForState('ticket.card.summary');
});
- it('should make the previously created ticket the stowaway of the current ticket', async() => {
- await page.waitToClick(selectors.ticketDescriptor.moreMenu);
- await page.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway);
- await page.waitToClick(selectors.ticketDescriptor.addStowawayDialogFirstTicket);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
it('should delete the current ticket', async() => {
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
@@ -78,11 +66,4 @@ describe('Ticket create path', () => {
expect(message.text).toContain('Ticket deleted. You can undo this action within the first hour');
});
-
- it('should search for the stowaway ticket of the previously deleted ticket', async() => {
- await page.accessToSearchResult(stowawayTicketId);
- const result = await page.countElement(selectors.ticketDescriptor.shipButton);
-
- expect(result).toBe(0);
- });
});
diff --git a/e2e/paths/06-claim/01_basic_data.spec.js b/e2e/paths/06-claim/01_basic_data.spec.js
index 2e2286939..0a08cad9f 100644
--- a/e2e/paths/06-claim/01_basic_data.spec.js
+++ b/e2e/paths/06-claim/01_basic_data.spec.js
@@ -22,8 +22,6 @@ describe('Claim edit basic data path', () => {
it(`should edit claim state and observation fields`, async() => {
await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Gestionado');
- await page.clearTextarea(selectors.claimBasicData.observation);
- await page.write(selectors.claimBasicData.observation, 'edited observation');
await page.clearInput(selectors.claimBasicData.packages);
await page.write(selectors.claimBasicData.packages, '2');
await page.waitToClick(selectors.claimBasicData.saveButton);
@@ -59,13 +57,6 @@ describe('Claim edit basic data path', () => {
expect(hasToPickUpCheckbox).toBe('checked');
});
- it('should confirm the claim observation was edited', async() => {
- const result = await page
- .waitToGetProperty(selectors.claimBasicData.observation, 'value');
-
- expect(result).toEqual('edited observation');
- });
-
it('should confirm the claim packages was edited', async() => {
const result = await page
.waitToGetProperty(selectors.claimBasicData.packages, 'value');
@@ -75,8 +66,6 @@ describe('Claim edit basic data path', () => {
it(`should edit the claim to leave it untainted`, async() => {
await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Pendiente');
- await page.clearTextarea(selectors.claimBasicData.observation);
- await page.write(selectors.claimBasicData.observation, 'Observation one');
await page.clearInput(selectors.claimBasicData.packages);
await page.write(selectors.claimBasicData.packages, '0');
await page.waitToClick(selectors.claimBasicData.saveButton);
diff --git a/e2e/paths/06-claim/05_summary.spec.js b/e2e/paths/06-claim/05_summary.spec.js
index 589b3b6cb..00b021f88 100644
--- a/e2e/paths/06-claim/05_summary.spec.js
+++ b/e2e/paths/06-claim/05_summary.spec.js
@@ -37,7 +37,7 @@ describe('Claim summary path', () => {
});
it('should display the observation', async() => {
- const result = await page.waitToGetProperty(selectors.claimSummary.observation, 'value');
+ const result = await page.waitToGetProperty(selectors.claimSummary.observation, 'innerText');
expect(result).toContain('Wisi forensibus mnesarchum in cum. Per id impetus abhorreant');
});
diff --git a/e2e/paths/06-claim/07_note.spec.js b/e2e/paths/06-claim/07_note.spec.js
new file mode 100644
index 000000000..830f77cbe
--- /dev/null
+++ b/e2e/paths/06-claim/07_note.spec.js
@@ -0,0 +1,46 @@
+import selectors from '../../helpers/selectors';
+import getBrowser from '../../helpers/puppeteer';
+
+describe('Claim Add note path', () => {
+ let browser;
+ let page;
+ beforeAll(async() => {
+ browser = await getBrowser();
+ page = browser.page;
+ await page.loginAndModule('salesPerson', 'claim');
+ await page.accessToSearchResult('2');
+ await page.accessToSection('claim.card.note.index');
+ });
+
+ afterAll(async() => {
+ await browser.close();
+ });
+
+ it(`should reach the claim note index`, async() => {
+ await page.waitForState('claim.card.note.index');
+ });
+
+ it(`should click on the add new note button`, async() => {
+ await page.waitToClick(selectors.claimNote.addNoteFloatButton);
+ await page.waitForState('claim.card.note.create');
+ });
+
+ it(`should create a new note`, async() => {
+ await page.waitForSelector(selectors.claimNote.note);
+ await page.type(`${selectors.claimNote.note} textarea`, 'The delivery was unsuccessful');
+ await page.waitToClick(selectors.claimNote.saveButton);
+ const message = await page.waitForSnackbar();
+
+ expect(message.text).toContain('Data saved!');
+ });
+
+ it(`should redirect back to the claim notes page`, async() => {
+ await page.waitForState('claim.card.note.index');
+ });
+
+ it('should confirm the note was created', async() => {
+ const result = await page.waitToGetProperty(selectors.claimNote.firstNoteText, 'innerText');
+
+ expect(result).toEqual('The delivery was unsuccessful');
+ });
+});
diff --git a/e2e/paths/07-order/01_summary.spec.js b/e2e/paths/07-order/01_summary.spec.js
index 9b9e37998..922d5eeee 100644
--- a/e2e/paths/07-order/01_summary.spec.js
+++ b/e2e/paths/07-order/01_summary.spec.js
@@ -34,7 +34,7 @@ describe('Order summary path', () => {
it('should check the summary contains the order consignee', async() => {
const result = await page.waitToGetProperty(selectors.orderSummary.consignee, 'innerText');
- expect(result).toEqual('address 26 - Silla (Province one)');
+ expect(result).toEqual('address 26 - Gotham (Province one)');
});
it('should check the summary contains the order subtotal', async() => {
diff --git a/e2e/paths/08-route/01_summary.spec.js b/e2e/paths/08-route/01_summary.spec.js
index 02cc71f2f..b6052dff6 100644
--- a/e2e/paths/08-route/01_summary.spec.js
+++ b/e2e/paths/08-route/01_summary.spec.js
@@ -9,7 +9,7 @@ describe('Route summary path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'route');
- await page.waitToClick('vn-route-index vn-tbody > a:nth-child(1)');
+ await page.waitToClick('vn-route-index vn-tbody > a:nth-child(7)');
});
afterAll(async() => {
diff --git a/e2e/paths/12-entry/02_descriptor.spec.js b/e2e/paths/12-entry/02_descriptor.spec.js
index 699d00517..997a6065c 100644
--- a/e2e/paths/12-entry/02_descriptor.spec.js
+++ b/e2e/paths/12-entry/02_descriptor.spec.js
@@ -29,7 +29,7 @@ describe('Entry descriptor path', () => {
it('should click the travels button to be redirected to the travels index filtered by the current agency', async() => {
await page.waitToClick(selectors.entryDescriptor.travelsQuicklink);
await page.expectURL('/travel/index');
- await page.expectURL('agencyFk');
+ await page.expectURL('agencyModeFk');
});
it('should go back to the entry summary', async() => {
diff --git a/e2e/paths/14-account/01_create_and_basic_data.spec.js b/e2e/paths/14-account/01_create_and_basic_data.spec.js
index 4048413ba..0fc657375 100644
--- a/e2e/paths/14-account/01_create_and_basic_data.spec.js
+++ b/e2e/paths/14-account/01_create_and_basic_data.spec.js
@@ -36,8 +36,7 @@ describe('Account create and basic data path', () => {
await page.waitForState('account.card.basicData');
});
- it('should reload the section and check the name is as expected', async() => {
- await page.reloadSection('account.card.basicData');
+ it('should check the name is as expected', async() => {
const result = await page.waitToGetProperty(selectors.accountBasicData.name, 'value');
expect(result).toEqual('Remy');
@@ -103,25 +102,39 @@ describe('Account create and basic data path', () => {
});
});
- // creating the account without the active property set to true seems to be creating an active user anyways
- // describe('activate user', () => {
- // it(`should check the inactive user icon is present in the descriptor`, async() => {
- // await page.waitForSelector(selectors.accountDescriptor.activeUserIcon, {visible: true});
- // });
+ describe('deactivate user', () => {
+ it(`should check the inactive user icon isn't present in the descriptor just yet`, async() => {
+ await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
+ });
- // it('should activate the user using the descriptor menu', async() => {
- // await page.waitToClick(selectors.accountDescriptor.menuButton);
- // await page.waitToClick(selectors.accountDescriptor.activateUser);
- // await page.waitToClick(selectors.accountDescriptor.acceptButton);
- // const message = await page.waitForSnackbar();
+ it('should deactivate the user using the descriptor menu', async() => {
+ await page.waitToClick(selectors.accountDescriptor.menuButton);
+ await page.waitToClick(selectors.accountDescriptor.deactivateUser);
+ await page.waitToClick(selectors.accountDescriptor.acceptButton);
+ const message = await page.waitForSnackbar();
- // expect(message.text).toContain('user enabled?');
- // });
+ expect(message.text).toContain('User deactivated!');
+ });
- // it('should check the inactive user icon is not present anymore', async() => {
- // await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
- // });
- // });
+ it('should check the inactive user icon is now present', async() => {
+ await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 1);
+ });
+ });
+
+ describe('activate user', () => {
+ it('should activate the user using the descriptor menu', async() => {
+ await page.waitToClick(selectors.accountDescriptor.menuButton);
+ await page.waitToClick(selectors.accountDescriptor.activateUser);
+ await page.waitToClick(selectors.accountDescriptor.acceptButton);
+ const message = await page.waitForSnackbar();
+
+ expect(message.text).toContain('User activated!');
+ });
+
+ it('should check the inactive user icon is not present anymore', async() => {
+ await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
+ });
+ });
describe('mail forwarding', () => {
it('should activate the mail forwarding and set the recipent email', async() => {
diff --git a/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js b/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js
index 0514899bc..dd35dd740 100644
--- a/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js
+++ b/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js
@@ -56,7 +56,7 @@ describe('Account Alias create and basic data path', () => {
expect(result).toContain('psykers');
});
- it('should search for the IT alias group then access to the users section then check the role listed is the expected one', async() => {
+ it('should search IT alias then access the user section to check the role listed is the expected one', async() => {
await page.accessToSearchResult('IT');
await page.accessToSection('account.alias.card.users');
const rolesCount = await page.countElement(selectors.accountAliasUsers.anyResult);
diff --git a/front/core/filters/currency.js b/front/core/filters/currency.js
index d44457813..a25ff6b27 100644
--- a/front/core/filters/currency.js
+++ b/front/core/filters/currency.js
@@ -15,8 +15,9 @@ export default function currency($translate) {
maximumFractionDigits: fractionSize
};
+ const lang = $translate.use() == 'es' ? 'de' : $translate.use();
if (typeof input == 'number') {
- return new Intl.NumberFormat($translate.use(), options)
+ return new Intl.NumberFormat(lang, options)
.format(input);
}
diff --git a/front/core/services/app.js b/front/core/services/app.js
index 6b2cd1d2a..889b24d01 100644
--- a/front/core/services/app.js
+++ b/front/core/services/app.js
@@ -10,6 +10,7 @@ export default class App {
constructor() {
this.loaderStatus = 0;
this.loading = false;
+ this.versionInterval = setInterval(this.getVersion.bind(this), 300000);
}
showMessage(message) {
@@ -38,6 +39,21 @@ export default class App {
if (this.loaderStatus === 0)
this.loading = false;
}
+
+ getVersion() {
+ this.logger.$http.get('Applications/status');
+ }
+
+ setVersion(newVersion) {
+ if (newVersion) {
+ const currentVersion = localStorage.getItem('salix-version');
+ if (newVersion != currentVersion) {
+ this.hasNewVersion = true;
+ clearInterval(this.versionInterval);
+ }
+ localStorage.setItem('salix-version', newVersion);
+ }
+ }
}
ngModule.service('vnApp', App);
diff --git a/front/core/services/interceptor.js b/front/core/services/interceptor.js
index b7cf3a0ec..3f3d9912b 100644
--- a/front/core/services/interceptor.js
+++ b/front/core/services/interceptor.js
@@ -30,14 +30,17 @@ function interceptor($q, vnApp, vnToken, $translate) {
},
response(response) {
vnApp.popLoader();
+ const newVersion = response.headers('salix-version');
+ vnApp.setVersion(newVersion);
+
return response;
},
responseError(rejection) {
vnApp.popLoader();
- let err = new HttpError(rejection.statusText);
+ const err = new HttpError(rejection.statusText);
Object.assign(err, rejection);
return $q.reject(err);
- }
+ },
};
}
ngModule.factory('vnInterceptor', interceptor);
diff --git a/front/core/styles/icons/salixfont.css b/front/core/styles/icons/salixfont.css
index c500f976d..2dee94c3b 100644
--- a/front/core/styles/icons/salixfont.css
+++ b/front/core/styles/icons/salixfont.css
@@ -343,9 +343,6 @@
.icon-splur:before {
content: "\e970";
}
-.icon-stowaway:before {
- content: "\e94f";
-}
.icon-supplier:before {
content: "\e925";
}
diff --git a/front/core/styles/icons/salixfont.svg b/front/core/styles/icons/salixfont.svg
index 2b8b1ac8a..96a584734 100644
--- a/front/core/styles/icons/salixfont.svg
+++ b/front/core/styles/icons/salixfont.svg
@@ -85,8 +85,6 @@