Merge branch 'dev' into 5652-ItemTrash
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
43f5bbb04e
|
@ -9,8 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [2338.01] - 2023-09-21
|
## [2338.01] - 2023-09-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- (Ticket -> Servicios) Se pueden abonar servicios
|
||||||
### Changed
|
### Changed
|
||||||
|
- (Trabajadores -> Calendario) Icono de check arreglado cuando pulsas un tipo de dia
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
ALTER TABLE `vn`.`deviceLog` ADD serialNumber varchar(45) DEFAULT NULL NULL;
|
||||||
|
|
||||||
|
INSERT INTO `salix`.`ACL` ( model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES( 'DeviceLog', 'create', 'WRITE', 'ALLOW', 'ROLE', 'employee');
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE `vn`.`province` ADD CONSTRAINT `countryName_UN` UNIQUE KEY (`countryFk`,`name`);
|
File diff suppressed because one or more lines are too long
|
@ -871,7 +871,9 @@ INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`)
|
||||||
('SLV', 'Silver', 1, 4, 'CACFD2'),
|
('SLV', 'Silver', 1, 4, 'CACFD2'),
|
||||||
('BRW', 'Brown', 1, 5, 'DC7633'),
|
('BRW', 'Brown', 1, 5, 'DC7633'),
|
||||||
('BLK', 'Black', 1, 6, '000000'),
|
('BLK', 'Black', 1, 6, '000000'),
|
||||||
('BAS', 'Blue/Silver', 1, 7, '5DADE2');
|
('BAS', 'Blue/Silver', 1, 7, '5DADE2'),
|
||||||
|
('GRN', 'Green', 1, 8, '28A745'),
|
||||||
|
('WHT', 'White', 1, 9, 'FFFFFF');
|
||||||
|
|
||||||
INSERT INTO `vn`.`origin`(`id`,`code`, `name`)
|
INSERT INTO `vn`.`origin`(`id`,`code`, `name`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -918,26 +920,26 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`)
|
||||||
('SER', 'Services'),
|
('SER', 'Services'),
|
||||||
('VT', 'Sales');
|
('VT', 'Sales');
|
||||||
|
|
||||||
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenceFk`,
|
INSERT INTO `vn`.`item`(`id`, `typeFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenceFk`,
|
||||||
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `stars`, `family`, `isFloramondo`, `genericFk`, `itemPackingTypeFk`, `hasMinPrice`, `packingShelve`, `weightByPiece`)
|
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `stars`, `family`, `isFloramondo`, `genericFk`, `itemPackingTypeFk`, `hasMinPrice`, `packingShelve`, `weightByPiece`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 1, 'EMB', 0, NULL, 'V', 0, 15,3),
|
(1, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 1, 'EMB', 0, NULL, 'V', 0, 15,3),
|
||||||
(2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 2, 'VT', 0, NULL, 'H', 0, 10,2),
|
(2, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 2, 'VT', 0, NULL, 'H', 0, 10,2),
|
||||||
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, 5,5),
|
(3, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, 5,5),
|
||||||
(4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(4, 1, 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(5, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(6, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(7, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(8, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
|
(9, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
|
||||||
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(10, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(11, 1, 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
(12, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 2, 'VT', 1, NULL, NULL, 1, NULL,NULL),
|
(13, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 2, 'VT', 1, NULL, NULL, 1, NULL,NULL),
|
||||||
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
|
(14, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
|
||||||
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
|
(15, 4, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(16, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
|
(16, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
|
||||||
(71, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'VT', 0, NULL, NULL, 0, NULL,NULL);
|
(71, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'VT', 0, NULL, NULL, 0, NULL,NULL);
|
||||||
|
|
||||||
-- Update the taxClass after insert of the items
|
-- Update the taxClass after insert of the items
|
||||||
UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2
|
UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2
|
||||||
|
@ -1005,45 +1007,45 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
|
||||||
|
|
||||||
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 1, 'Ranged weapon longbow 2m', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
(1, 1, 1, 'Ranged weapon longbow 200cm', 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)),
|
(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)),
|
(3, 1, 1, 'Ranged weapon longbow 200cm', 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)),
|
(4, 4, 1, 'Melee weapon heavy shield 100cm', 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)),
|
(5, 1, 2, 'Ranged weapon longbow 200cm', 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)),
|
(6, 1, 3, 'Ranged weapon longbow 200cm', 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()),
|
(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()),
|
(8, 4, 11, 'Melee weapon heavy shield 100cm', 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()),
|
(9, 1, 16, 'Ranged weapon longbow 200cm', 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()),
|
(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()),
|
(11, 1, 16, 'Ranged weapon longbow 200cm', 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()),
|
(12, 4, 16, 'Melee weapon heavy shield 100cm', 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()),
|
(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()),
|
(14, 1, 8, 'Ranged weapon longbow 200cm', 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()),
|
(15, 1, 19, 'Ranged weapon longbow 200cm', 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()),
|
(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)),
|
(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)),
|
(18, 4, 22, 'Melee weapon heavy shield 100cm', 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)),
|
(19, 1, 4, 'Ranged weapon longbow 200cm', 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)),
|
(20, 1, 5, 'Ranged weapon longbow 200cm', 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)),
|
(21, 1, 6, 'Ranged weapon longbow 200cm', 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()),
|
(22, 1, 7, 'Ranged weapon longbow 200cm', 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()),
|
(23, 1, 9, 'Ranged weapon longbow 200cm', 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()),
|
(24, 1, 10, 'Ranged weapon longbow 200cm', 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()),
|
(25, 4, 12, 'Melee weapon heavy shield 100cm', 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()),
|
(26, 4, 13, 'Melee weapon heavy shield 100cm', 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()),
|
(27, 4, 14, 'Melee weapon heavy shield 100cm', 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()),
|
(28, 4, 15, 'Melee weapon heavy shield 100cm', 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()),
|
(29, 4, 17, 'Melee weapon heavy shield 100cm', 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()),
|
(30, 4, 18, 'Melee weapon heavy shield 100cm', 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()),
|
(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()),
|
(32, 1, 24, 'Ranged weapon longbow 200cm', -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()),
|
(33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE()),
|
||||||
(34, 4, 28, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
(34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||||
(35, 4, 29, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
(35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||||
(37, 4, 31, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
(37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||||
(36, 4, 30, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
(36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||||
(38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
|
(38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(39, 1, 32, 'Ranged weapon longbow 2m', 2, 103.49, 0, 0, 0, util.VN_CURDATE());
|
(39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1259,7 +1261,7 @@ INSERT INTO `vn`.`tag`(`id`, `code`, `name`, `isFree`, `isQuantitatif`, `sourceT
|
||||||
(5, NULL, 'Diámetro', 1, 1, NULL, 'mm',NULL, 'diameter'),
|
(5, NULL, 'Diámetro', 1, 1, NULL, 'mm',NULL, 'diameter'),
|
||||||
(7, NULL, 'Ancho de la base', 1, 1, NULL, 'mm',NULL, NULL),
|
(7, NULL, 'Ancho de la base', 1, 1, NULL, 'mm',NULL, NULL),
|
||||||
(23, 'stems', 'Tallos', 1, 1, NULL, NULL, NULL, 'stems'),
|
(23, 'stems', 'Tallos', 1, 1, NULL, NULL, NULL, 'stems'),
|
||||||
(27, NULL, 'Longitud(cm)', 1, 1, NULL, 'cm', NULL, NULL),
|
(27, NULL, 'Longitud(cm)', 1, 1, NULL, 'cm', NULL, 'size'),
|
||||||
(36, 'producer', 'Proveedor', 1, 0, NULL, NULL, NULL, 'producer'),
|
(36, 'producer', 'Proveedor', 1, 0, NULL, NULL, NULL, 'producer'),
|
||||||
(56, NULL, 'Genero', 1, 0, NULL, NULL, NULL, NULL),
|
(56, NULL, 'Genero', 1, 0, NULL, NULL, NULL, NULL),
|
||||||
(58, NULL, 'Variedad', 1, 0, NULL, NULL, NULL, NULL),
|
(58, NULL, 'Variedad', 1, 0, NULL, NULL, NULL, NULL),
|
||||||
|
@ -1270,7 +1272,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 56, 'Ranged weapon', 1),
|
(1, 1, 56, 'Ranged weapon', 1),
|
||||||
(2, 1, 58, 'longbow', 2),
|
(2, 1, 58, 'longbow', 2),
|
||||||
(3, 1, 27, '2m', 3),
|
(3, 1, 27, '200cm', 3),
|
||||||
(4, 1, 36, 'Stark Industries', 4),
|
(4, 1, 36, 'Stark Industries', 4),
|
||||||
(5, 1, 1, 'Brown', 5),
|
(5, 1, 1, 'Brown', 5),
|
||||||
(6, 1, 67, '+1 precission', 6),
|
(6, 1, 67, '+1 precission', 6),
|
||||||
|
@ -1284,42 +1286,42 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(14, 2, 23, '2', 7),
|
(14, 2, 23, '2', 7),
|
||||||
(15, 3, 56, 'Ranged weapon', 1),
|
(15, 3, 56, 'Ranged weapon', 1),
|
||||||
(16, 3, 58, 'sniper rifle', 2),
|
(16, 3, 58, 'sniper rifle', 2),
|
||||||
(17, 3, 4, '300mm', 3),
|
(17, 3, 4, '113cm', 3),
|
||||||
(18, 3, 36, 'Stark Industries', 4),
|
(18, 3, 36, 'Stark Industries', 4),
|
||||||
(19, 3, 1, 'Green', 5),
|
(19, 3, 1, 'Green', 5),
|
||||||
(20, 3, 67, 'precission', 6),
|
(20, 3, 67, 'precission', 6),
|
||||||
(21, 3, 23, '3', 7),
|
(21, 3, 23, '3', 7),
|
||||||
(22, 4, 56, 'Melee weapon', 1),
|
(22, 4, 56, 'Melee weapon', 1),
|
||||||
(23, 4, 58, 'heavy shield', 2),
|
(23, 4, 58, 'heavy shield', 2),
|
||||||
(24, 4, 4, '1x0.5m', 3),
|
(24, 4, 4, '100cm', 3),
|
||||||
(25, 4, 36, 'Stark Industries', 4),
|
(25, 4, 36, 'Stark Industries', 4),
|
||||||
(26, 4, 1, 'Black', 5),
|
(26, 4, 1, 'Black', 5),
|
||||||
(27, 4, 67, 'containtment', 6),
|
(27, 4, 67, 'containtment', 6),
|
||||||
(28, 4, 23, '4', 7),
|
(28, 4, 23, '4', 7),
|
||||||
(29, 5, 56, 'Ranged weapon', 1),
|
(29, 5, 56, 'Ranged weapon', 1),
|
||||||
(30, 5, 58, 'pistol', 2),
|
(30, 5, 58, 'pistol', 2),
|
||||||
(31, 5, 27, '9mm', 3),
|
(31, 5, 67, '9mm', 3),
|
||||||
(32, 5, 36, 'Stark Industries', 4),
|
(32, 5, 36, 'Stark Industries', 4),
|
||||||
(33, 5, 1, 'Silver', 5),
|
(33, 5, 1, 'Silver', 5),
|
||||||
(34, 5, 67, 'rapid fire', 6),
|
(34, 5, 27, '15cm', 6),
|
||||||
(35, 5, 23, '5', 7),
|
(35, 5, 23, '5', 7),
|
||||||
(36, 6, 56, 'Container', 1),
|
(36, 6, 56, 'Container', 1),
|
||||||
(37, 6, 58, 'ammo box', 2),
|
(37, 6, 58, 'ammo box', 2),
|
||||||
(38, 6, 27, '1m', 3),
|
(38, 6, 27, '100cm', 3),
|
||||||
(39, 6, 36, 'Stark Industries', 4),
|
(39, 6, 36, 'Stark Industries', 4),
|
||||||
(40, 6, 1, 'Green', 5),
|
(40, 6, 1, 'Green', 5),
|
||||||
(41, 6, 67, 'supply', 6),
|
(41, 6, 67, 'supply', 6),
|
||||||
(42, 6, 23, '6', 7),
|
(42, 6, 23, '6', 7),
|
||||||
(43, 7, 56, 'Container', 1),
|
(43, 7, 56, 'Container', 1),
|
||||||
(44, 7, 58, 'medical box', 2),
|
(44, 7, 58, 'medical box', 2),
|
||||||
(45, 7, 27, '1m', 3),
|
(45, 7, 27, '100cm', 3),
|
||||||
(46, 7, 36, 'Stark Industries', 4),
|
(46, 7, 36, 'Stark Industries', 4),
|
||||||
(47, 7, 1, 'White', 5),
|
(47, 7, 1, 'White', 5),
|
||||||
(48, 7, 67, 'supply', 6),
|
(48, 7, 67, 'supply', 6),
|
||||||
(49, 7, 23, '7', 7),
|
(49, 7, 23, '7', 7),
|
||||||
(50, 8, 56, 'Ranged Reinforced weapon', 1),
|
(50, 8, 56, 'Ranged Reinforced weapon', 1),
|
||||||
(51, 8, 58, '+1 longbow', 2),
|
(51, 8, 58, '+1 longbow', 2),
|
||||||
(52, 8, 27, '2m', 3),
|
(52, 8, 27, '200cm', 3),
|
||||||
(53, 8, 36, 'Stark Industries', 4),
|
(53, 8, 36, 'Stark Industries', 4),
|
||||||
(54, 8, 1, 'Brown', 5),
|
(54, 8, 1, 'Brown', 5),
|
||||||
(55, 8, 67, 'precission', 6),
|
(55, 8, 67, 'precission', 6),
|
||||||
|
@ -1333,14 +1335,14 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(63, 9, 23, '9', 7),
|
(63, 9, 23, '9', 7),
|
||||||
(64, 10, 56, 'Ranged Reinforced weapon', 1),
|
(64, 10, 56, 'Ranged Reinforced weapon', 1),
|
||||||
(65, 10, 58, 'sniper rifle', 2),
|
(65, 10, 58, 'sniper rifle', 2),
|
||||||
(66, 10, 4, '300mm', 3),
|
(66, 10, 67, '700mm', 3),
|
||||||
(67, 10, 36, 'Stark Industries', 4),
|
(67, 10, 36, 'Stark Industries', 4),
|
||||||
(68, 10, 1, 'Green', 5),
|
(68, 10, 1, 'Green', 5),
|
||||||
(69, 10, 67, 'precission', 6),
|
(69, 10, 27, '130cm', 6),
|
||||||
(70, 10, 23, '10', 7),
|
(70, 10, 23, '10', 7),
|
||||||
(71, 11, 56, 'Melee Reinforced weapon', 1),
|
(71, 11, 56, 'Melee Reinforced weapon', 1),
|
||||||
(72, 11, 58, 'heavy shield', 2),
|
(72, 11, 58, 'heavy shield', 2),
|
||||||
(73, 11, 4, '1x0.5m', 3),
|
(73, 11, 4, '120cm', 3),
|
||||||
(74, 11, 36, 'Stark Industries', 4),
|
(74, 11, 36, 'Stark Industries', 4),
|
||||||
(75, 11, 1, 'Black', 5),
|
(75, 11, 1, 'Black', 5),
|
||||||
(76, 11, 67, 'containtment', 6),
|
(76, 11, 67, 'containtment', 6),
|
||||||
|
@ -1350,18 +1352,18 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(80, 12, 27, '9mm', 3),
|
(80, 12, 27, '9mm', 3),
|
||||||
(81, 12, 36, 'Stark Industries', 4),
|
(81, 12, 36, 'Stark Industries', 4),
|
||||||
(82, 12, 1, 'Silver', 5),
|
(82, 12, 1, 'Silver', 5),
|
||||||
(83, 12, 67, 'rapid fire', 6),
|
(83, 12, 67, '23cm', 6),
|
||||||
(84, 12, 23, '12', 7),
|
(84, 12, 23, '12', 7),
|
||||||
(85, 13, 56, 'Chest', 1),
|
(85, 13, 56, 'Chest', 1),
|
||||||
(86, 13, 58, 'ammo box', 2),
|
(86, 13, 58, 'ammo box', 2),
|
||||||
(87, 13, 27, '1m', 3),
|
(87, 13, 27, '100cm', 3),
|
||||||
(88, 13, 36, 'Stark Industries', 4),
|
(88, 13, 36, 'Stark Industries', 4),
|
||||||
(89, 13, 1, 'Green', 5),
|
(89, 13, 1, 'Green', 5),
|
||||||
(90, 13, 67, 'supply', 6),
|
(90, 13, 67, 'supply', 6),
|
||||||
(91, 13, 23, '13', 7),
|
(91, 13, 23, '13', 7),
|
||||||
(92, 14, 56, 'Chest', 1),
|
(92, 14, 56, 'Chest', 1),
|
||||||
(93, 14, 58, 'medical box', 2),
|
(93, 14, 58, 'medical box', 2),
|
||||||
(94, 14, 27, '1m', 3),
|
(94, 14, 27, '100cm', 3),
|
||||||
(95, 14, 36, 'Stark Industries', 4),
|
(95, 14, 36, 'Stark Industries', 4),
|
||||||
(96, 14, 1, 'White', 5),
|
(96, 14, 1, 'White', 5),
|
||||||
(97, 14, 67, 'supply', 6),
|
(97, 14, 67, 'supply', 6),
|
||||||
|
@ -1927,9 +1929,9 @@ INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY)),
|
(1, 'Ranged weapon longbow 200cm', 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)),
|
(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()),
|
(3, 'Melee weapon heavy shield 100cm', 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()),
|
(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());
|
(5, 'Melee weapon combat first 15cm', 18, 35, 15, 4, 1.30, 0, NULL, 18, util.VN_CURDATE());
|
||||||
|
|
||||||
|
@ -1965,6 +1967,8 @@ INSERT INTO `vn`.`calendarType` (`id`, `description`, `hoursWeek`, `isPartial`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'General schedule', 40, 0);
|
(1, 'General schedule', 40, 0);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`workerBusinessAgreement` (`id`, `name`, `monthHolidays`, `yearHours`, `started`, `ended`)
|
||||||
|
VALUES(1, 'flowers', 2.5, 1830, '2001-01-01', NULL);
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.worker;
|
DROP TEMPORARY TABLE IF EXISTS tmp.worker;
|
||||||
CREATE TEMPORARY TABLE tmp.worker
|
CREATE TEMPORARY TABLE tmp.worker
|
||||||
|
@ -2776,11 +2780,13 @@ INSERT INTO `util`.`notification` (`id`, `name`, `description`)
|
||||||
(2, 'invoice-electronic', 'A electronic invoice has been generated'),
|
(2, 'invoice-electronic', 'A electronic invoice has been generated'),
|
||||||
(3, 'not-main-printer-configured', 'A printer distinct than main has been configured'),
|
(3, 'not-main-printer-configured', 'A printer distinct than main has been configured'),
|
||||||
(4, 'supplier-pay-method-update', 'A supplier pay method has been updated'),
|
(4, 'supplier-pay-method-update', 'A supplier pay method has been updated'),
|
||||||
(5, 'modified-entry', 'An entry has been modified');
|
(5, 'modified-entry', 'An entry has been modified'),
|
||||||
|
(6, 'book-entry-deleted', 'accounting entries deleted');
|
||||||
|
|
||||||
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 9);
|
(1, 9),
|
||||||
|
(6, 9);
|
||||||
|
|
||||||
INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`)
|
INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2793,8 +2799,9 @@ INSERT INTO `util`.`notificationSubscription` (`notificationFk`, `userFk`)
|
||||||
(1, 1109),
|
(1, 1109),
|
||||||
(1, 1110),
|
(1, 1110),
|
||||||
(2, 1109),
|
(2, 1109),
|
||||||
(1,9),
|
(1, 9),
|
||||||
(1,3);
|
(1, 3),
|
||||||
|
(6, 9);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
|
INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
|
||||||
|
@ -2830,7 +2837,7 @@ INSERT INTO `vn`.`ticketLog` (`originFk`, userFk, `action`, changedModel, oldIns
|
||||||
(7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL),
|
(7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL),
|
||||||
(7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL),
|
(7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL),
|
||||||
(7, 18, 'update', 'Sale', '{"price":3}', '{"price":5}', 1, NULL),
|
(7, 18, 'update', 'Sale', '{"price":3}', '{"price":5}', 1, NULL),
|
||||||
(7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 1x0.5m de '5' a '10'"),
|
(7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 100cm de '5' a '10'"),
|
||||||
(16, 9, 'update', 'Sale', '{"quantity":10,"concept":"Shield", "price": 10.5, "itemFk": 1}', '{"quantity":8,"concept":"Shield", "price": 10.5, "itemFk": 1}' , 5689, 'Shield');
|
(16, 9, 'update', 'Sale', '{"quantity":10,"concept":"Shield", "price": 10.5, "itemFk": 1}', '{"quantity":8,"concept":"Shield", "price": 10.5, "itemFk": 1}' , 5689, 'Shield');
|
||||||
|
|
||||||
|
|
||||||
|
@ -2896,11 +2903,11 @@ INSERT INTO `vn`.`deviceProductionState` (`code`, `description`)
|
||||||
('retired', 'retirada');
|
('retired', 'retirada');
|
||||||
|
|
||||||
INSERT INTO `vn`.`deviceProduction` (`imei`, `modelFk`, `macWifi`, `serialNumber`, `android_id`, `purchased`, `stateFk`, `isInScalefusion`, `description`)
|
INSERT INTO `vn`.`deviceProduction` (`imei`, `modelFk`, `macWifi`, `serialNumber`, `android_id`, `purchased`, `stateFk`, `isInScalefusion`, `description`)
|
||||||
VALUES
|
VALUES
|
||||||
('ime1', 'BLACKVIEW', 'macWifi1', 'serialNumber1', 'android_id1', util.VN_NOW(), 'active', 0, NULL),
|
('ime1', 'BLACKVIEW', 'macWifi1', 'serialNumber1', 'androidid11234567890', util.VN_NOW(), 'active', 0, NULL),
|
||||||
('ime2', 'DODGEE', 'macWifi2', 'serialNumber2', 'android_id2', util.VN_NOW(), 'idle', 0, NULL),
|
('ime2', 'DODGEE', 'macWifi2', 'serialNumber2', 'androidid21234567890', util.VN_NOW(), 'idle', 0, NULL),
|
||||||
('ime3', 'ZEBRA', 'macWifi3', 'serialNumber3', 'android_id3', util.VN_NOW(), 'active', 0, NULL),
|
('ime3', 'ZEBRA', 'macWifi3', 'serialNumber3', 'androidid31234567890', util.VN_NOW(), 'active', 0, NULL),
|
||||||
('ime4', 'BLACKVIEW', 'macWifi4', 'serialNumber4', 'android_id4', util.VN_NOW(), 'idle', 0, NULL);
|
('ime4', 'BLACKVIEW', 'macWifi4', 'serialNumber4', 'androidid41234567890', util.VN_NOW(), 'idle', 0, NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`deviceProductionUser` (`deviceProductionFk`, `userFk`, `created`)
|
INSERT INTO `vn`.`deviceProductionUser` (`deviceProductionFk`, `userFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2959,6 +2966,14 @@ INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 0, 0, 'marvel.com');
|
(1, 0, 0, 'marvel.com');
|
||||||
|
|
||||||
|
INSERT INTO vn.XDiario (id, ASIEN, FECHA, SUBCTA, CONTRA, CONCEPTO, EURODEBE, EUROHABER, BASEEURO, SERIE, FACTURA, IVA, RECEQUIV, CLAVE, CAMBIO, DEBEME, HABERME, AUXILIAR, MONEDAUSO, TIPOOPE, NFACTICK, TERIDNIF, TERNIF, TERNOM, OPBIENES, L340, enlazado, FECHA_EX, LRECT349, empresa_id, LDIFADUAN, METAL, METALIMP, CLIENTE, METALEJE, FECHA_OP, FACTURAEX, TIPOCLAVE, TIPOEXENCI, TIPONOSUJE, TIPOFACT, TIPORECTIF, SERIE_RT, FACTU_RT, BASEIMP_RT, BASEIMP_RF, RECTIFICA, FECHA_RT, FECREGCON, enlazadoSage)
|
||||||
|
VALUES
|
||||||
|
(1, 1.0, util.VN_CURDATE(), '4300001104', NULL, 'n/fra T3333333', 8.88, NULL, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 1),
|
||||||
|
(2, 1.0, util.VN_CURDATE(), '2000000000', '4300001104', 'n/fra T3333333 Tony Stark', NULL, 8.07, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 1),
|
||||||
|
(3, 1.0, util.VN_CURDATE(), '4770000010', '4300001104', 'Inmovilizado pendiente : n/fra T3333333 Tony Stark', NULL, 0.81, 8.07, 'T', '3333333', 10.00, NULL, NULL, NULL, NULL, NULL, '', '2', '', 1, 1, '06089160W', 'IRON MAN', 1, 1, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 1),
|
||||||
|
(4, 2.0, util.VN_CURDATE(), '4300001104', NULL, 'n/fra T4444444', 8.88, NULL, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0),
|
||||||
|
(5, 2.0, util.VN_CURDATE(), '2000000000', '4300001104', 'n/fra T4444444 Tony Stark', NULL, 8.07, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0),
|
||||||
|
(6, 2.0, util.VN_CURDATE(), '4770000010', '4300001104', 'Inmovilizado pendiente : n/fra T4444444 Tony Stark', NULL, 0.81, 8.07, 'T', '4444444', 10.00, NULL, NULL, NULL, NULL, NULL, '', '2', '', 1, 1, '06089160W', 'IRON MAN', 1, 1, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0);
|
||||||
--fixtures for getaddress
|
--fixtures for getaddress
|
||||||
UPDATE vn.client
|
UPDATE vn.client
|
||||||
SET typeFk='loses'
|
SET typeFk='loses'
|
||||||
|
|
20878
db/dump/structure.sql
20878
db/dump/structure.sql
File diff suppressed because it is too large
Load Diff
|
@ -671,8 +671,8 @@ export default {
|
||||||
firstAddServiceTypeButton: 'vn-ticket-service vn-icon-button[vn-tooltip="New service type"]',
|
firstAddServiceTypeButton: 'vn-ticket-service vn-icon-button[vn-tooltip="New service type"]',
|
||||||
firstServiceType: 'vn-ticket-service vn-autocomplete[ng-model="service.ticketServiceTypeFk"]',
|
firstServiceType: 'vn-ticket-service vn-autocomplete[ng-model="service.ticketServiceTypeFk"]',
|
||||||
firstQuantity: 'vn-ticket-service vn-input-number[ng-model="service.quantity"]',
|
firstQuantity: 'vn-ticket-service vn-input-number[ng-model="service.quantity"]',
|
||||||
firstPrice: 'vn-ticket-service vn-horizontal:nth-child(1) vn-input-number[ng-model="service.price"]',
|
firstPrice: 'vn-ticket-service vn-horizontal:nth-child(2) vn-input-number[ng-model="service.price"]',
|
||||||
fistDeleteServiceButton: 'vn-ticket-service form vn-horizontal:nth-child(1) vn-icon-button[icon="delete"]',
|
fistDeleteServiceButton: 'vn-ticket-service form vn-horizontal:nth-child(2) vn-icon-button[icon="delete"]',
|
||||||
newServiceTypeName: '.vn-dialog.shown vn-textfield[ng-model="newServiceType.name"]',
|
newServiceTypeName: '.vn-dialog.shown vn-textfield[ng-model="newServiceType.name"]',
|
||||||
serviceLine: 'vn-ticket-service > form > vn-card > vn-one:nth-child(2) > vn-horizontal',
|
serviceLine: 'vn-ticket-service > form > vn-card > vn-one:nth-child(2) > vn-horizontal',
|
||||||
saveServiceButton: 'button[type=submit]',
|
saveServiceButton: 'button[type=submit]',
|
||||||
|
|
|
@ -27,10 +27,10 @@ describe('Item summary path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from basic data`, async() => {
|
it(`should check the item summary preview shows fields from basic data`, async() => {
|
||||||
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 2m');
|
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 200cm');
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Ranged weapon longbow 2m');
|
expect(result).toContain('Ranged weapon longbow 200cm');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from tags`, async() => {
|
it(`should check the item summary preview shows fields from tags`, async() => {
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('Item edit tax path', () => {
|
||||||
browser = await getBrowser();
|
browser = await getBrowser();
|
||||||
page = browser.page;
|
page = browser.page;
|
||||||
await page.loginAndModule('buyer', 'item');
|
await page.loginAndModule('buyer', 'item');
|
||||||
await page.accessToSearchResult('Ranged weapon longbow 2m');
|
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
||||||
await page.accessToSection('item.card.tax');
|
await page.accessToSection('item.card.tax');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('Item create tags path', () => {
|
||||||
browser = await getBrowser();
|
browser = await getBrowser();
|
||||||
page = browser.page;
|
page = browser.page;
|
||||||
await page.loginAndModule('buyer', 'item');
|
await page.loginAndModule('buyer', 'item');
|
||||||
await page.accessToSearchResult('Ranged weapon longbow 2m');
|
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
||||||
await page.accessToSection('item.card.tags');
|
await page.accessToSection('item.card.tags');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('Item Create barcodes path', () => {
|
||||||
browser = await getBrowser();
|
browser = await getBrowser();
|
||||||
page = browser.page;
|
page = browser.page;
|
||||||
await page.loginAndModule('buyer', 'item');
|
await page.loginAndModule('buyer', 'item');
|
||||||
await page.accessToSearchResult('Ranged weapon longbow 2m');
|
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
||||||
await page.accessToSection('item.card.itemBarcode');
|
await page.accessToSection('item.card.itemBarcode');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ describe('Item request path', () => {
|
||||||
it('should fill the id and quantity then check the concept was updated', async() => {
|
it('should fill the id and quantity then check the concept was updated', async() => {
|
||||||
await page.writeOnEditableTD(selectors.itemRequest.firstRequestItemID, '4');
|
await page.writeOnEditableTD(selectors.itemRequest.firstRequestItemID, '4');
|
||||||
await page.writeOnEditableTD(selectors.itemRequest.firstRequestQuantity, '10');
|
await page.writeOnEditableTD(selectors.itemRequest.firstRequestQuantity, '10');
|
||||||
await page.waitForTextInElement(selectors.itemRequest.firstRequestConcept, 'Melee weapon heavy shield 1x0.5m');
|
await page.waitForTextInElement(selectors.itemRequest.firstRequestConcept, 'Melee weapon heavy shield 100cm');
|
||||||
let filledConcept = await page.waitToGetProperty(selectors.itemRequest.firstRequestConcept, 'innerText');
|
let filledConcept = await page.waitToGetProperty(selectors.itemRequest.firstRequestConcept, 'innerText');
|
||||||
|
|
||||||
expect(filledConcept).toContain('Melee weapon heavy shield 1x0.5m');
|
expect(filledConcept).toContain('Melee weapon heavy shield 100cm');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check the status of the request should now be accepted', async() => {
|
it('should check the status of the request should now be accepted', async() => {
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe('Ticket List sale path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should select a valid item to be added as the second item in the sales list', async() => {
|
it('should select a valid item to be added as the second item in the sales list', async() => {
|
||||||
let searchValue = 'Melee weapon heavy shield 1x0.5m';
|
let searchValue = 'Melee weapon heavy shield 100cm';
|
||||||
await page.autocompleteSearch(selectors.ticketSales.secondSaleIdAutocomplete, searchValue);
|
await page.autocompleteSearch(selectors.ticketSales.secondSaleIdAutocomplete, searchValue);
|
||||||
await page.waitToClick(selectors.ticketSales.secondSaleQuantityCell);
|
await page.waitToClick(selectors.ticketSales.secondSaleQuantityCell);
|
||||||
await page.type(selectors.ticketSales.secondSaleQuantity, '1');
|
await page.type(selectors.ticketSales.secondSaleQuantity, '1');
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
it(`should delete the first package and receive and error to save a new one with blank quantity`, async() => {
|
it(`should delete the first package and receive and error to save a new one with blank quantity`, async() => {
|
||||||
await page.clearInput($.firstQuantity);
|
await page.clearInput($.firstQuantity);
|
||||||
await page.autocompleteSearch($.firstPackage, 'Container medical box 1m');
|
await page.autocompleteSearch($.firstPackage, 'Container medical box 100cm');
|
||||||
await page.waitToClick($.savePackagesButton);
|
await page.waitToClick($.savePackagesButton);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
@ -63,10 +63,10 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
it(`should confirm the first select is the expected one`, async() => {
|
it(`should confirm the first select is the expected one`, async() => {
|
||||||
await page.reloadSection('ticket.card.package');
|
await page.reloadSection('ticket.card.package');
|
||||||
await page.waitForTextInField($.firstPackage, 'Container medical box 1m');
|
await page.waitForTextInField($.firstPackage, 'Container medical box 100cm');
|
||||||
const result = await page.waitToGetProperty($.firstPackage, 'value');
|
const result = await page.waitToGetProperty($.firstPackage, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Container medical box 1m');
|
expect(result).toEqual('Container medical box 100cm');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm quantity is just a number and the string part was ignored by the imput number`, async() => {
|
it(`should confirm quantity is just a number and the string part was ignored by the imput number`, async() => {
|
||||||
|
|
|
@ -82,32 +82,24 @@ describe('InvoiceIn basic data path', () => {
|
||||||
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
||||||
let message = await page.waitForSnackbar();
|
let message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('The company can\'t be empty');
|
|
||||||
|
|
||||||
await page.clearInput(selectors.invoiceInBasicData.companyId);
|
await page.clearInput(selectors.invoiceInBasicData.companyId);
|
||||||
await page.autocompleteSearch(selectors.invoiceInBasicData.companyId, 'VNL');
|
await page.autocompleteSearch(selectors.invoiceInBasicData.companyId, 'VNL');
|
||||||
|
|
||||||
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
||||||
message = await page.waitForSnackbar();
|
message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('The warehouse can\'t be empty');
|
|
||||||
|
|
||||||
await page.clearInput(selectors.invoiceInBasicData.warehouseId);
|
await page.clearInput(selectors.invoiceInBasicData.warehouseId);
|
||||||
await page.autocompleteSearch(selectors.invoiceInBasicData.warehouseId, 'Warehouse One');
|
await page.autocompleteSearch(selectors.invoiceInBasicData.warehouseId, 'Warehouse One');
|
||||||
|
|
||||||
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
||||||
message = await page.waitForSnackbar();
|
message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('The DMS Type can\'t be empty');
|
|
||||||
|
|
||||||
await page.clearInput(selectors.invoiceInBasicData.dmsTypeId);
|
await page.clearInput(selectors.invoiceInBasicData.dmsTypeId);
|
||||||
await page.autocompleteSearch(selectors.invoiceInBasicData.dmsTypeId, 'Ticket');
|
await page.autocompleteSearch(selectors.invoiceInBasicData.dmsTypeId, 'Ticket');
|
||||||
|
|
||||||
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
await page.waitToClick(selectors.invoiceInBasicData.confirm);
|
||||||
message = await page.waitForSnackbar();
|
message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('The description can\'t be empty');
|
|
||||||
|
|
||||||
await page.waitToClick(selectors.invoiceInBasicData.description);
|
await page.waitToClick(selectors.invoiceInBasicData.description);
|
||||||
await page.write(selectors.invoiceInBasicData.description, 'Dms without edition.');
|
await page.write(selectors.invoiceInBasicData.description, 'Dms without edition.');
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,10 @@ describe('Entry import, create and edit buys path', () => {
|
||||||
await page.waitForTextInField(selectors.entryBuys.ref, '200573095, 200573106, 200573117, 200573506');
|
await page.waitForTextInField(selectors.entryBuys.ref, '200573095, 200573106, 200573117, 200573506');
|
||||||
await page.waitForTextInField(selectors.entryBuys.observation, '729-6340 2846');
|
await page.waitForTextInField(selectors.entryBuys.observation, '729-6340 2846');
|
||||||
|
|
||||||
await page.autocompleteSearch(selectors.entryBuys.firstImportedItem, 'Ranged weapon longbow 2m');
|
await page.autocompleteSearch(selectors.entryBuys.firstImportedItem, 'Ranged weapon longbow 200cm');
|
||||||
await page.autocompleteSearch(selectors.entryBuys.secondImportedItem, 'Ranged weapon longbow 2m');
|
await page.autocompleteSearch(selectors.entryBuys.secondImportedItem, 'Ranged weapon longbow 200cm');
|
||||||
await page.autocompleteSearch(selectors.entryBuys.thirdImportedItem, 'Ranged weapon sniper rifle 300mm');
|
await page.autocompleteSearch(selectors.entryBuys.thirdImportedItem, 'Ranged weapon sniper rifle 113cm');
|
||||||
await page.autocompleteSearch(selectors.entryBuys.fourthImportedItem, 'Melee weapon heavy shield 1x0.5m');
|
await page.autocompleteSearch(selectors.entryBuys.fourthImportedItem, 'Melee weapon heavy shield 100cm');
|
||||||
|
|
||||||
await page.waitToClick(selectors.entryBuys.importBuysButton);
|
await page.waitToClick(selectors.entryBuys.importBuysButton);
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,10 @@ export const validators = {
|
||||||
if (validator.isEmpty(value ? String(value) : ''))
|
if (validator.isEmpty(value ? String(value) : ''))
|
||||||
throw new Error(_($translate, `Value can't be empty`));
|
throw new Error(_($translate, `Value can't be empty`));
|
||||||
},
|
},
|
||||||
|
negative: $translate => {
|
||||||
|
if (validator < 0)
|
||||||
|
throw new Error(_($translate, `Negative numbers are not allowed. Please enter a valid number.`));
|
||||||
|
},
|
||||||
absence: ($translate, value) => {
|
absence: ($translate, value) => {
|
||||||
if (!validator.isEmpty(value))
|
if (!validator.isEmpty(value))
|
||||||
throw new Error(_($translate, `Value should be empty`));
|
throw new Error(_($translate, `Value should be empty`));
|
||||||
|
@ -104,9 +108,8 @@ export function checkNull($translate, value, conf) {
|
||||||
export function _($translate, text, params = []) {
|
export function _($translate, text, params = []) {
|
||||||
text = $translate.instant(text);
|
text = $translate.instant(text);
|
||||||
|
|
||||||
for (let i = 0; i < params.length; i++) {
|
for (let i = 0; i < params.length; i++)
|
||||||
text = text.replace('%s', params[i]);
|
text = text.replace('%s', params[i]);
|
||||||
}
|
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ Value can't be empty: El valor no puede estar vacío
|
||||||
Value should be empty: El valor debe estar vacío
|
Value should be empty: El valor debe estar vacío
|
||||||
Value should be integer: El valor debe ser entero
|
Value should be integer: El valor debe ser entero
|
||||||
Value should be a number: El valor debe ser numérico
|
Value should be a number: El valor debe ser numérico
|
||||||
|
Negative numbers are not allowed. Please enter a valid number: No se permiten números negativos. Por favor, ingrese un número válido
|
||||||
Invalid value: Valor incorrecto
|
Invalid value: Valor incorrecto
|
||||||
Value can't be blank: El valor no puede estar en blanco
|
Value can't be blank: El valor no puede estar en blanco
|
||||||
Value can't be null: El valor no puede ser nulo
|
Value can't be null: El valor no puede ser nulo
|
||||||
|
|
|
@ -179,12 +179,13 @@
|
||||||
"You can not use the same password": "You can not use the same password",
|
"You can not use the same password": "You can not use the same password",
|
||||||
"Valid priorities": "Valid priorities: %d",
|
"Valid priorities": "Valid priorities: %d",
|
||||||
"Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}",
|
"Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}",
|
||||||
"This ticket cannot be left empty.": "This ticket cannot be left empty. %s",
|
"This ticket cannot be left empty.": "This ticket cannot be left empty. %s",
|
||||||
"Social name should be uppercase": "Social name should be uppercase",
|
"Social name should be uppercase": "Social name should be uppercase",
|
||||||
"Street should be uppercase": "Street should be uppercase",
|
"Street should be uppercase": "Street should be uppercase",
|
||||||
"You don't have enough privileges.": "You don't have enough privileges.",
|
"You don't have enough privileges.": "You don't have enough privileges.",
|
||||||
"This ticket is locked.": "This ticket is locked.",
|
"This ticket is locked.": "This ticket is locked.",
|
||||||
"This ticket is not editable.": "This ticket is not editable.",
|
"This ticket is not editable.": "This ticket is not editable.",
|
||||||
"The ticket doesn't exist.": "The ticket doesn't exist.",
|
"The ticket doesn't exist.": "The ticket doesn't exist.",
|
||||||
|
"The sales do not exists": "The sales do not exists",
|
||||||
"Ticket without Route": "Ticket without route"
|
"Ticket without Route": "Ticket without route"
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,7 @@
|
||||||
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
||||||
"You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado",
|
"You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado",
|
||||||
"This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %s",
|
"This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %s",
|
||||||
"The company has not informed the supplier account for bank transfers": "La empresa no tiene informado la cuenta de proveedor para transferencias bancarias",
|
"The company has not informed the supplier account for bank transfers": "La empresa no tiene informado la cuenta de proveedor para transferencias bancarias",
|
||||||
"You cannot assign/remove an alias that you are not assigned to": "No puede asignar/eliminar un alias que no tenga asignado",
|
"You cannot assign/remove an alias that you are not assigned to": "No puede asignar/eliminar un alias que no tenga asignado",
|
||||||
"This invoice has a linked vehicle.": "Esta factura tiene un vehiculo vinculado",
|
"This invoice has a linked vehicle.": "Esta factura tiene un vehiculo vinculado",
|
||||||
"You don't have enough privileges.": "No tienes suficientes permisos.",
|
"You don't have enough privileges.": "No tienes suficientes permisos.",
|
||||||
|
|
|
@ -136,5 +136,8 @@
|
||||||
},
|
},
|
||||||
"Incoterms": {
|
"Incoterms": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"Xdiario": {
|
||||||
|
"dataSource": "vn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "XDiario",
|
"name": "Xdiario",
|
||||||
"base": "VnModel",
|
"base": "VnModel",
|
||||||
"options": {
|
"options": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
|
@ -7,10 +7,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"ASIEN": {
|
"id": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"id": true,
|
"id": true
|
||||||
"description": "Identifier"
|
},
|
||||||
|
"ASIEN": {
|
||||||
|
"type": "number"
|
||||||
},
|
},
|
||||||
"FECHA": {
|
"FECHA": {
|
||||||
"type": "date"
|
"type": "date"
|
||||||
|
@ -71,6 +73,9 @@
|
||||||
},
|
},
|
||||||
"MONEDAUSO": {
|
"MONEDAUSO": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"enlazadoSage": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -4,14 +4,14 @@ columns:
|
||||||
dated: fecha
|
dated: fecha
|
||||||
reference: referencia
|
reference: referencia
|
||||||
invoiceNumber: número factura
|
invoiceNumber: número factura
|
||||||
isBooked: reservado
|
isBooked: contabilizado
|
||||||
isExcludedFromAvailable: excluido del disponible
|
isExcludedFromAvailable: excluido del disponible
|
||||||
notes: notas
|
notes: notas
|
||||||
isConfirmed: confirmado
|
isConfirmed: confirmado
|
||||||
isVirtual: virtual
|
isVirtual: virtual
|
||||||
isRaid: incursión
|
isRaid: redada
|
||||||
commission: comisión
|
commission: comisión
|
||||||
isOrdered: precio3
|
isOrdered: pedida
|
||||||
created: creado
|
created: creado
|
||||||
observation: observación
|
observation: observación
|
||||||
isBlocked: bloqueado
|
isBlocked: bloqueado
|
||||||
|
|
|
@ -85,7 +85,6 @@ module.exports = Self => {
|
||||||
price2: buyUltimate.price2,
|
price2: buyUltimate.price2,
|
||||||
price3: buyUltimate.price3,
|
price3: buyUltimate.price3,
|
||||||
minPrice: buyUltimate.minPrice,
|
minPrice: buyUltimate.minPrice,
|
||||||
printedStickers: args.printedStickers,
|
|
||||||
workerFk: buyUltimate.workerFk,
|
workerFk: buyUltimate.workerFk,
|
||||||
isChecked: buyUltimate.isChecked,
|
isChecked: buyUltimate.isChecked,
|
||||||
isPickedOff: buyUltimate.isPickedOff,
|
isPickedOff: buyUltimate.isPickedOff,
|
||||||
|
@ -95,6 +94,8 @@ module.exports = Self => {
|
||||||
deliveryFk: buyUltimate.deliveryFk,
|
deliveryFk: buyUltimate.deliveryFk,
|
||||||
itemOriginalFk: buyUltimate.itemOriginalFk
|
itemOriginalFk: buyUltimate.itemOriginalFk
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
if (buy)
|
||||||
|
await buy.updateAttribute('printedStickers', args.printedStickers, myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
|
@ -33,7 +33,6 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const where = {isActive: true};
|
const where = {isActive: true};
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
|
@ -47,34 +46,30 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
const travel = entry.travel();
|
const travel = entry.travel();
|
||||||
|
|
||||||
const stmts = [];
|
const stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
|
||||||
stmt = new ParameterizedSQL(`CALL buyUltimate(?, ?)`, [
|
stmt = new ParameterizedSQL(`CALL buyUltimate(?, ?)`, [
|
||||||
travel.warehouseInFk,
|
travel.warehouseInFk,
|
||||||
travel.landed
|
travel.landed
|
||||||
]);
|
]);
|
||||||
stmts.push(stmt);
|
stmts.push(stmt);
|
||||||
|
|
||||||
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.item');
|
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.item');
|
||||||
stmt = new ParameterizedSQL(
|
stmt = new ParameterizedSQL(
|
||||||
`CREATE TEMPORARY TABLE tmp.item
|
`CREATE TEMPORARY TABLE tmp.item
|
||||||
(PRIMARY KEY (id))
|
(PRIMARY KEY (id))
|
||||||
SELECT
|
SELECT
|
||||||
i.*,
|
i.*,
|
||||||
p.name AS producerName,
|
p.name AS producerName,
|
||||||
nk.name AS inkName
|
nk.name AS inkName
|
||||||
FROM item i
|
FROM item i
|
||||||
JOIN producer p ON p.id = i.producerFk
|
LEFT JOIN producer p ON p.id = i.producerFk
|
||||||
JOIN ink nk ON nk.id = i.inkFk
|
LEFT JOIN ink nk ON nk.id = i.inkFk
|
||||||
JOIN tmp.buyUltimate bu ON i.id = bu.itemFk
|
JOIN tmp.buyUltimate bu ON i.id = bu.itemFk
|
||||||
AND bu.warehouseFk = ?
|
AND bu.warehouseFk = ?
|
||||||
`, [travel.warehouseInFk]);
|
`, [travel.warehouseInFk]);
|
||||||
stmts.push(stmt);
|
stmts.push(stmt);
|
||||||
|
|
||||||
stmt = new ParameterizedSQL('SELECT * FROM tmp.item');
|
stmt = new ParameterizedSQL('SELECT * FROM tmp.item');
|
||||||
stmt.merge(conn.makeSuffix(filter));
|
stmt.merge(conn.makeSuffix(filter));
|
||||||
|
|
||||||
|
@ -84,7 +79,6 @@ module.exports = Self => {
|
||||||
|
|
||||||
const sql = ParameterizedSQL.join(stmts, ';');
|
const sql = ParameterizedSQL.join(stmts, ';');
|
||||||
const result = await conn.executeStmt(sql, myOptions);
|
const result = await conn.executeStmt(sql, myOptions);
|
||||||
|
|
||||||
return result[itemsIndex];
|
return result[itemsIndex];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe('Buy editLatestsBuys()', () => {
|
||||||
try {
|
try {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
search: 'Ranged weapon longbow 2m'
|
search: 'Ranged weapon longbow 200cm'
|
||||||
},
|
},
|
||||||
req: {accessToken: {userId: 1}}
|
req: {accessToken: {userId: 1}}
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('Entry latests buys filter()', () => {
|
||||||
try {
|
try {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
search: 'Ranged weapon longbow 2m'
|
search: 'Ranged weapon longbow 200cm'
|
||||||
},
|
},
|
||||||
req: {accessToken: {userId: 1}}
|
req: {accessToken: {userId: 1}}
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@ describe('Entry latests buys filter()', () => {
|
||||||
const firstBuy = results[0];
|
const firstBuy = results[0];
|
||||||
|
|
||||||
expect(results.length).toEqual(1);
|
expect(results.length).toEqual(1);
|
||||||
expect(firstBuy.size).toEqual(70);
|
expect(firstBuy.size).toEqual(200);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -57,7 +57,7 @@ describe('Entry latests buys filter()', () => {
|
||||||
const ctx = {
|
const ctx = {
|
||||||
args: {
|
args: {
|
||||||
tags: [
|
tags: [
|
||||||
{tagFk: 27, value: '2m'}
|
{tagFk: 27, value: '200cm'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
req: {accessToken: {userId: 1}}
|
req: {accessToken: {userId: 1}}
|
||||||
|
|
|
@ -67,17 +67,22 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
openCreateDialog() {
|
openCreateDialog() {
|
||||||
this.dms = {
|
const params = {filter: {
|
||||||
reference: null,
|
where: {code: 'invoiceIn'}
|
||||||
warehouseId: null,
|
}};
|
||||||
companyId: null,
|
this.$http.get('DmsTypes/findOne', {params}).then(res => {
|
||||||
dmsTypeId: null,
|
this.dms = {
|
||||||
description: null,
|
reference: this.invoiceIn.supplierRef,
|
||||||
hasFile: true,
|
warehouseId: this.vnConfig.warehouseFk,
|
||||||
hasFileAttached: true,
|
companyId: this.vnConfig.companyFk,
|
||||||
files: null
|
dmsTypeId: res.data.id,
|
||||||
};
|
description: this.invoiceIn.supplier.name,
|
||||||
this.$.dmsCreateDialog.show();
|
hasFile: true,
|
||||||
|
hasFileAttached: true,
|
||||||
|
files: null
|
||||||
|
};
|
||||||
|
this.$.dmsCreateDialog.show();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadFile(dmsId) {
|
downloadFile(dmsId) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ class Controller extends Section {
|
||||||
this.invoiceIn = {};
|
this.invoiceIn = {};
|
||||||
if (this.$params && this.$params.supplierFk)
|
if (this.$params && this.$params.supplierFk)
|
||||||
this.invoiceIn.supplierFk = this.$params.supplierFk;
|
this.invoiceIn.supplierFk = this.$params.supplierFk;
|
||||||
|
this.invoiceIn.issued = Date.vnNew();
|
||||||
}
|
}
|
||||||
|
|
||||||
get companyFk() {
|
get companyFk() {
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
import './index.js';
|
|
||||||
import watcher from 'core/mocks/watcher';
|
|
||||||
|
|
||||||
describe('InvoiceIn', () => {
|
|
||||||
describe('Component vnInvoiceInCreate', () => {
|
|
||||||
let controller;
|
|
||||||
let $element;
|
|
||||||
|
|
||||||
beforeEach(ngModule('invoiceIn'));
|
|
||||||
|
|
||||||
beforeEach(inject(($componentController, $rootScope) => {
|
|
||||||
const $scope = $rootScope.$new();
|
|
||||||
$scope.watcher = watcher;
|
|
||||||
$element = angular.element('<vn-invoice-in-create></vn-invoice-in-create>');
|
|
||||||
controller = $componentController('vnInvoiceInCreate', {$element, $scope});
|
|
||||||
controller.$params = {};
|
|
||||||
}));
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
$element.remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('onInit()', () => {
|
|
||||||
it(`should defined the controller's invoiceIn property`, () => {
|
|
||||||
expect(controller.invoiceIn).toBeUndefined();
|
|
||||||
|
|
||||||
controller.$onInit();
|
|
||||||
|
|
||||||
expect(controller.invoiceIn).toEqual({});
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should define invoiceIn and it's supplierFk when received via params`, () => {
|
|
||||||
controller.$params.supplierFk = 'supplierId';
|
|
||||||
|
|
||||||
controller.$onInit();
|
|
||||||
|
|
||||||
expect(controller.invoiceIn.supplierFk).toEqual('supplierId');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('onSubmit()', () => {
|
|
||||||
it(`should redirect to basic data by calling the $state.go function`, () => {
|
|
||||||
jest.spyOn(controller.$state, 'go');
|
|
||||||
|
|
||||||
controller.onSubmit();
|
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('invoiceIn.card.basicData', {id: 1234});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethod('delete', {
|
Self.remoteMethod('delete', {
|
||||||
description: 'Delete a invoiceOut',
|
description: 'Delete a invoiceOut',
|
||||||
|
@ -34,19 +33,41 @@ module.exports = Self => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const invoiceOut = await Self.findById(id, {}, myOptions);
|
const invoiceOut = await Self.findById(id, {}, myOptions);
|
||||||
const tickets = await Self.app.models.Ticket.find({
|
const models = Self.app.models;
|
||||||
|
const tickets = await models.Ticket.find({
|
||||||
where: {refFk: invoiceOut.ref}
|
where: {refFk: invoiceOut.ref}
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
|
const [bookEntry] = await models.Xdiario.find({
|
||||||
|
where: {
|
||||||
|
SERIE: invoiceOut.ref[0],
|
||||||
|
FACTURA: invoiceOut.ref.slice(1)
|
||||||
|
}
|
||||||
|
}, myOptions);
|
||||||
const promises = [];
|
const promises = [];
|
||||||
|
|
||||||
for (let ticket of tickets)
|
for (let ticket of tickets)
|
||||||
promises.push(ticket.updateAttribute('refFk', null, myOptions));
|
promises.push(ticket.updateAttribute('refFk', null, myOptions));
|
||||||
|
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
|
|
||||||
await invoiceOut.destroy(myOptions);
|
await invoiceOut.destroy(myOptions);
|
||||||
|
|
||||||
|
if (bookEntry) {
|
||||||
|
if (bookEntry.enlazadoSage) {
|
||||||
|
const params = {
|
||||||
|
bookEntry: bookEntry.ASIEN,
|
||||||
|
invoiceOutRef: invoiceOut.ref
|
||||||
|
}
|
||||||
|
await Self.rawSql(`SELECT util.notification_send('book-entry-deleted', ?, NULL)`,
|
||||||
|
[JSON.stringify(params)],
|
||||||
|
myOptions);
|
||||||
|
};
|
||||||
|
|
||||||
|
await models.Xdiario.destroyAll({
|
||||||
|
ASIEN: bookEntry.ASIEN
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
||||||
return tickets;
|
return tickets;
|
||||||
|
|
|
@ -2,18 +2,24 @@ const models = require('vn-loopback/server/server').models;
|
||||||
const LoopBackContext = require('loopback-context');
|
const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
describe('invoiceOut delete()', () => {
|
describe('invoiceOut delete()', () => {
|
||||||
const invoiceOutId = 2;
|
const invoiceOutId = 2;
|
||||||
const userId = 1106;
|
const userId = 106;
|
||||||
const activeCtx = {
|
const activeCtx = {
|
||||||
accessToken: {userId: userId},
|
accessToken: {userId: userId},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||||
|
active: activeCtx
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('should check that there is one ticket in the target invoiceOut', async() => {
|
it('should check that there is one ticket in the target invoiceOut', async() => {
|
||||||
const tx = await models.InvoiceOut.beginTransaction({});
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const invoiceOut = await models.InvoiceOut.findById(invoiceOutId, {}, options);
|
const invoiceOut = await models.InvoiceOut.findById(invoiceOutId , {}, options);
|
||||||
const tickets = await models.Ticket.find({where: {refFk: invoiceOut.ref}}, options);
|
const tickets = await models.Ticket.find({where: {refFk: invoiceOut.ref}}, options);
|
||||||
|
|
||||||
expect(tickets.length).toEqual(1);
|
expect(tickets.length).toEqual(1);
|
||||||
|
@ -31,12 +37,7 @@ describe('invoiceOut delete()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
|
||||||
active: activeCtx
|
|
||||||
});
|
|
||||||
|
|
||||||
await models.InvoiceOut.delete(invoiceOutId, options);
|
await models.InvoiceOut.delete(invoiceOutId, options);
|
||||||
|
|
||||||
const originalTicket = await models.Ticket.findById(3, {}, options);
|
const originalTicket = await models.Ticket.findById(3, {}, options);
|
||||||
|
|
||||||
const deletedInvoiceOut = await models.InvoiceOut.findById(invoiceOutId, {}, options);
|
const deletedInvoiceOut = await models.InvoiceOut.findById(invoiceOutId, {}, options);
|
||||||
|
@ -50,4 +51,107 @@ describe('invoiceOut delete()', () => {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should delete the corresponding bookEntry and not notify', async () => {
|
||||||
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
|
const options = {transaction: tx};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const filter = {
|
||||||
|
where: {
|
||||||
|
ASIEN: 2
|
||||||
|
},
|
||||||
|
fields: ['id', 'enlazadoSage']
|
||||||
|
};
|
||||||
|
|
||||||
|
const [beforeXdiario] = await models.Xdiario.find(filter, options)
|
||||||
|
|
||||||
|
const [beforeNotification] = await models.NotificationQueue.find({
|
||||||
|
where: {
|
||||||
|
notificationFk: 'book-entry-deleted',
|
||||||
|
status: 'pending'
|
||||||
|
}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
expect(beforeXdiario).toBeDefined();
|
||||||
|
expect(beforeXdiario.enlazadoSage).toBeFalsy;
|
||||||
|
expect(beforeNotification).not.toBeDefined();
|
||||||
|
|
||||||
|
await models.InvoiceOut.delete(4, options);
|
||||||
|
|
||||||
|
const [afterXdiario] = await models.Xdiario.find({
|
||||||
|
where: {
|
||||||
|
ASIEN: 2
|
||||||
|
}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
const [afterNotification] = await models.NotificationQueue.find({
|
||||||
|
where: {
|
||||||
|
notificationFk: 'book-entry-deleted',
|
||||||
|
params: '{"bookEntry":2,"invoiceOutRef":"T4444444"}',
|
||||||
|
status: 'pending'
|
||||||
|
}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
expect(afterXdiario).not.toBeDefined();
|
||||||
|
expect(afterNotification).not.toBeDefined();
|
||||||
|
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
await tx.rollback();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should delete the corresponding bookEntry and notify', async () => {
|
||||||
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
|
const options = {transaction: tx};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const filter = {
|
||||||
|
where: {
|
||||||
|
ASIEN: 1
|
||||||
|
},
|
||||||
|
fields: ['id', 'enlazadoSage']
|
||||||
|
};
|
||||||
|
|
||||||
|
const [beforeXdiario] = await models.Xdiario.find(filter, options)
|
||||||
|
|
||||||
|
const [beforeNotification] = await models.NotificationQueue.find({
|
||||||
|
where: {
|
||||||
|
notificationFk: 'book-entry-deleted',
|
||||||
|
status: 'pending'
|
||||||
|
}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
expect(beforeXdiario).toBeDefined();
|
||||||
|
expect(beforeXdiario.enlazadoSage).toBeTruthy();
|
||||||
|
expect(beforeNotification).not.toBeDefined();
|
||||||
|
|
||||||
|
await models.InvoiceOut.delete(3, options);
|
||||||
|
|
||||||
|
const [afterXdiario] = await models.Xdiario.find({
|
||||||
|
where: {
|
||||||
|
ASIEN: 1
|
||||||
|
}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
const [afterNotification] = await models.NotificationQueue.find({
|
||||||
|
where: {
|
||||||
|
notificationFk: 'book-entry-deleted',
|
||||||
|
params: '{"bookEntry":1,"invoiceOutRef":"T3333333"}',
|
||||||
|
status: 'pending'
|
||||||
|
}
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
expect(afterXdiario).not.toBeDefined();
|
||||||
|
expect(afterNotification).toBeDefined();
|
||||||
|
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
await tx.rollback();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -40,7 +40,7 @@ describe('route updateWorkCenter()', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`shoul set the default commision work center if that worker didn't have one yet`, async() => {
|
it(`should set the default commision work center if that worker didn't have one yet`, async() => {
|
||||||
const tx = await models.Route.beginTransaction({});
|
const tx = await models.Route.beginTransaction({});
|
||||||
try {
|
try {
|
||||||
const userWithoutWorkCenter = 2;
|
const userWithoutWorkCenter = 2;
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe('Supplier getItemsPackaging()', () => {
|
||||||
const [item] = await app.models.Supplier.getItemsPackaging(1, 1);
|
const [item] = await app.models.Supplier.getItemsPackaging(1, 1);
|
||||||
|
|
||||||
expect(item.id).toEqual(1);
|
expect(item.id).toEqual(1);
|
||||||
expect(item.name).toEqual('Ranged weapon longbow 2m');
|
expect(item.name).toEqual('Ranged weapon longbow 200cm');
|
||||||
expect(item.quantity).toEqual(5000);
|
expect(item.quantity).toEqual(5000);
|
||||||
expect(item.quantityTotal).toEqual(5100);
|
expect(item.quantityTotal).toEqual(5100);
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ module.exports = Self => {
|
||||||
const bankEntity = await Self.app.models.BankEntity.findById(this.bankEntityFk);
|
const bankEntity = await Self.app.models.BankEntity.findById(this.bankEntityFk);
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['code'],
|
fields: ['code'],
|
||||||
where: {id: bankEntity.countryFk}
|
where: {id: bankEntity?.countryFk}
|
||||||
};
|
};
|
||||||
|
|
||||||
const country = await Self.app.models.Country.findOne(filter);
|
const country = await Self.app.models.Country.findOne(filter);
|
||||||
|
|
|
@ -10,7 +10,7 @@ describe('ticket listPackaging()', () => {
|
||||||
const filter = {where: {packagingFk: 1}};
|
const filter = {where: {packagingFk: 1}};
|
||||||
const [response] = await models.Packaging.listPackaging(filter, options);
|
const [response] = await models.Packaging.listPackaging(filter, options);
|
||||||
|
|
||||||
expect(response.name).toEqual('Container ammo box 1m');
|
expect(response.name).toEqual('Container ammo box 100cm');
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -5,8 +5,7 @@ module.exports = Self => {
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
arg: 'salesIds',
|
arg: 'salesIds',
|
||||||
type: ['number'],
|
type: ['number']
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'servicesIds',
|
arg: 'servicesIds',
|
||||||
|
@ -41,6 +40,7 @@ module.exports = Self => {
|
||||||
myOptions.transaction = tx;
|
myOptions.transaction = tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let refundTicket = null;
|
||||||
try {
|
try {
|
||||||
const refundAgencyMode = await models.AgencyMode.findOne({
|
const refundAgencyMode = await models.AgencyMode.findOne({
|
||||||
include: {
|
include: {
|
||||||
|
@ -55,42 +55,55 @@ module.exports = Self => {
|
||||||
|
|
||||||
const refoundZoneId = refundAgencyMode.zones()[0].id;
|
const refoundZoneId = refundAgencyMode.zones()[0].id;
|
||||||
|
|
||||||
const salesFilter = {
|
if (salesIds) {
|
||||||
where: {id: {inq: salesIds}},
|
const salesFilter = {
|
||||||
include: {
|
where: {id: {inq: salesIds}},
|
||||||
relation: 'components',
|
include: {
|
||||||
scope: {
|
relation: 'components',
|
||||||
fields: ['saleFk', 'componentFk', 'value']
|
scope: {
|
||||||
|
fields: ['saleFk', 'componentFk', 'value']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
const sales = await models.Sale.find(salesFilter, myOptions);
|
||||||
|
const ticketsIds = [...new Set(sales.map(sale => sale.ticketFk))];
|
||||||
|
|
||||||
|
const now = Date.vnNew();
|
||||||
|
const [firstTicketId] = ticketsIds;
|
||||||
|
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
|
refundTicket = await createTicketRefund(firstTicketId, now, refundAgencyMode, refoundZoneId, withWarehouse, myOptions);
|
||||||
|
|
||||||
|
for (const sale of sales) {
|
||||||
|
const createdSale = await models.Sale.create({
|
||||||
|
ticketFk: refundTicket.id,
|
||||||
|
itemFk: sale.itemFk,
|
||||||
|
quantity: - sale.quantity,
|
||||||
|
concept: sale.concept,
|
||||||
|
price: sale.price,
|
||||||
|
discount: sale.discount,
|
||||||
|
}, myOptions);
|
||||||
|
|
||||||
|
const components = sale.components();
|
||||||
|
for (const component of components)
|
||||||
|
component.saleFk = createdSale.id;
|
||||||
|
|
||||||
|
await models.SaleComponent.create(components, myOptions);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
const sales = await models.Sale.find(salesFilter, myOptions);
|
|
||||||
const ticketsIds = [...new Set(sales.map(sale => sale.ticketFk))];
|
|
||||||
|
|
||||||
let [firstTicketId] = ticketsIds;
|
|
||||||
if (!firstTicketId) {
|
|
||||||
[ticketServices] = await models.TicketService.find({where: {id: {inq: servicesIds}}}, myOptions);
|
|
||||||
firstTicketId = ticketServices.ticketFk;
|
|
||||||
}
|
}
|
||||||
const now = Date.vnNew();
|
|
||||||
|
|
||||||
const refundTicket = await createTicketRefund(firstTicketId, now, refundAgencyMode, refoundZoneId, withWarehouse, myOptions);
|
if (!refundTicket) {
|
||||||
|
const servicesFilter = {
|
||||||
|
where: {id: {inq: servicesIds}}
|
||||||
|
};
|
||||||
|
const services = await models.TicketService.find(servicesFilter, myOptions);
|
||||||
|
const ticketsIds = [...new Set(services.map(service => service.ticketFk))];
|
||||||
|
|
||||||
for (const sale of sales) {
|
const now = Date.vnNew();
|
||||||
const createdSale = await models.Sale.create({
|
const [firstTicketId] = ticketsIds;
|
||||||
ticketFk: refundTicket.id,
|
|
||||||
itemFk: sale.itemFk,
|
|
||||||
quantity: - sale.quantity,
|
|
||||||
concept: sale.concept,
|
|
||||||
price: sale.price,
|
|
||||||
discount: sale.discount,
|
|
||||||
}, myOptions);
|
|
||||||
|
|
||||||
const components = sale.components();
|
// eslint-disable-next-line max-len
|
||||||
for (const component of components)
|
refundTicket = await createTicketRefund(firstTicketId, now, refundAgencyMode, refoundZoneId, withWarehouse, myOptions);
|
||||||
component.saleFk = createdSale.id;
|
|
||||||
|
|
||||||
await models.SaleComponent.create(components, myOptions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (servicesIds && servicesIds.length > 0) {
|
if (servicesIds && servicesIds.length > 0) {
|
||||||
|
@ -101,8 +114,8 @@ module.exports = Self => {
|
||||||
for (const service of services) {
|
for (const service of services) {
|
||||||
await models.TicketService.create({
|
await models.TicketService.create({
|
||||||
description: service.description,
|
description: service.description,
|
||||||
quantity: - service.quantity,
|
quantity: service.quantity,
|
||||||
price: service.price,
|
price: - service.price,
|
||||||
taxClassFk: service.taxClassFk,
|
taxClassFk: service.taxClassFk,
|
||||||
ticketFk: refundTicket.id,
|
ticketFk: refundTicket.id,
|
||||||
ticketServiceTypeFk: service.ticketServiceTypeFk,
|
ticketServiceTypeFk: service.ticketServiceTypeFk,
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe('sale getClaimableFromTicket()', () => {
|
||||||
|
|
||||||
const claimableFromTicket = await models.Sale.getClaimableFromTicket(16, options);
|
const claimableFromTicket = await models.Sale.getClaimableFromTicket(16, options);
|
||||||
|
|
||||||
expect(claimableFromTicket[0].concept).toBe('Ranged weapon longbow 2m');
|
expect(claimableFromTicket[0].concept).toBe('Ranged weapon longbow 200cm');
|
||||||
expect(claimableFromTicket.length).toBe(3);
|
expect(claimableFromTicket.length).toBe(3);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
vn-id="model"
|
vn-id="model"
|
||||||
url="TicketServices"
|
url="TicketServices"
|
||||||
link="{ticketFk: $ctrl.$params.id}"
|
link="{ticketFk: $ctrl.$params.id}"
|
||||||
|
@ -24,7 +24,21 @@
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
<vn-horizontal ng-repeat="service in $ctrl.services track by $index">
|
<vn-button-bar>
|
||||||
|
<vn-button
|
||||||
|
disabled="watcher.dataChanged() || !$ctrl.checkeds.length"
|
||||||
|
label="Pay"
|
||||||
|
ng-click="$ctrl.createRefund()"
|
||||||
|
vn-acl="invoicing, claimManager, salesAssistant"
|
||||||
|
vn-acl-action="remove">
|
||||||
|
</vn-button>
|
||||||
|
</vn-button-bar>
|
||||||
|
<vn-horizontal ng-repeat="service in $ctrl.services">
|
||||||
|
<vn-check
|
||||||
|
tabindex="1"
|
||||||
|
on-change="$ctrl.addChecked(service.id)"
|
||||||
|
disabled="!service.id">
|
||||||
|
</vn-check>
|
||||||
<vn-autocomplete vn-two vn-focus
|
<vn-autocomplete vn-two vn-focus
|
||||||
data="ticketServiceTypes"
|
data="ticketServiceTypes"
|
||||||
label="Description"
|
label="Description"
|
||||||
|
@ -43,10 +57,12 @@
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-input-number
|
<vn-input-number
|
||||||
vn-one
|
vn-one
|
||||||
step="1"
|
step="1"
|
||||||
label="Quantity"
|
label="Quantity"
|
||||||
|
info="To create services with negative amounts mark the service on the source ticket and press the pay button."
|
||||||
ng-model="service.quantity"
|
ng-model="service.quantity"
|
||||||
rule="TicketService">
|
rule="TicketService"
|
||||||
|
min="0">
|
||||||
</vn-input-number>
|
</vn-input-number>
|
||||||
<vn-input-number
|
<vn-input-number
|
||||||
vn-one
|
vn-one
|
||||||
|
@ -60,7 +76,7 @@
|
||||||
vn-tooltip="Remove service"
|
vn-tooltip="Remove service"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
ng-click="model.remove($index)">
|
ng-click="model.remove($index)">
|
||||||
</vn-icon-button>
|
</vn-icon-button>
|
||||||
</vn-auto>
|
</vn-auto>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -76,18 +92,11 @@
|
||||||
disabled="!watcher.dataChanged()"
|
disabled="!watcher.dataChanged()"
|
||||||
label="Save">
|
label="Save">
|
||||||
</vn-submit>
|
</vn-submit>
|
||||||
<!-- # #2680 Undo changes button bugs -->
|
|
||||||
<!-- <vn-button
|
|
||||||
class="cancel"
|
|
||||||
label="Undo changes"
|
|
||||||
disabled="!watcher.dataChanged()"
|
|
||||||
ng-click="watcher.loadOriginalData()">
|
|
||||||
</vn-button> -->
|
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Create service type dialog -->
|
<!-- Create service type dialog -->
|
||||||
<vn-dialog class="edit"
|
<vn-dialog class="edit"
|
||||||
vn-id="newServiceTypeDialog"
|
vn-id="newServiceTypeDialog"
|
||||||
on-accept="$ctrl.onNewServiceTypeAccept($data)"
|
on-accept="$ctrl.onNewServiceTypeAccept($data)"
|
||||||
on-close="newServiceType = null"
|
on-close="newServiceType = null"
|
||||||
|
@ -106,4 +115,4 @@
|
||||||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
||||||
<button response="accept" translate>Create</button>
|
<button response="accept" translate>Create</button>
|
||||||
</tpl-buttons>
|
</tpl-buttons>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
|
|
@ -6,6 +6,8 @@ class Controller extends Section {
|
||||||
$onInit() {
|
$onInit() {
|
||||||
this.services = [];
|
this.services = [];
|
||||||
this.getDefaultTaxClass();
|
this.getDefaultTaxClass();
|
||||||
|
this.isDataSaved = false;
|
||||||
|
this.checkeds = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
getDefaultTaxClass() {
|
getDefaultTaxClass() {
|
||||||
|
@ -49,6 +51,26 @@ class Controller extends Section {
|
||||||
.then(() => this.$.model.refresh())
|
.then(() => this.$.model.refresh())
|
||||||
.then(() => this.$.watcher.notifySaved());
|
.then(() => this.$.watcher.notifySaved());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createRefund() {
|
||||||
|
if (!this.checkeds.length) return;
|
||||||
|
|
||||||
|
const params = {servicesIds: this.checkeds, withWarehouse: false};
|
||||||
|
const query = 'Sales/refund';
|
||||||
|
this.$http.post(query, params).then(res => {
|
||||||
|
const refundTicket = res.data;
|
||||||
|
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {
|
||||||
|
ticketId: refundTicket.id
|
||||||
|
}));
|
||||||
|
this.$state.go('ticket.card.sale', {id: refundTicket.id});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
addChecked(id) {
|
||||||
|
if (this.checkeds.includes(id))
|
||||||
|
return this.checkeds = this.checkeds.filter(check => check != id);
|
||||||
|
this.checkeds.push(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngModule.vnComponent('vnTicketService', {
|
ngModule.vnComponent('vnTicketService', {
|
||||||
|
|
|
@ -19,12 +19,11 @@ describe('Ticket component vnTicketService', () => {
|
||||||
|
|
||||||
describe('getDefaultTaxClass', () => {
|
describe('getDefaultTaxClass', () => {
|
||||||
it('should set the default tax class in the controller', () => {
|
it('should set the default tax class in the controller', () => {
|
||||||
$httpBackend.whenRoute('GET', `TaxClasses/findOne`)
|
$httpBackend.whenRoute('GET', `TaxClasses/findOne`).respond({
|
||||||
.respond({
|
id: 4000,
|
||||||
id: 4000,
|
name: 'Whatever',
|
||||||
name: 'Whatever',
|
code: 'GG',
|
||||||
code: 'GG'
|
});
|
||||||
});
|
|
||||||
controller.getDefaultTaxClass();
|
controller.getDefaultTaxClass();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
@ -49,15 +48,15 @@ describe('Ticket component vnTicketService', () => {
|
||||||
it('should set the description of the selected service upon service type creation', () => {
|
it('should set the description of the selected service upon service type creation', () => {
|
||||||
const service = {
|
const service = {
|
||||||
id: 1,
|
id: 1,
|
||||||
quantity: 10
|
quantity: 10,
|
||||||
};
|
};
|
||||||
$scope.newServiceType = {
|
$scope.newServiceType = {
|
||||||
name: 'Totally new stuff'
|
name: 'Totally new stuff',
|
||||||
};
|
};
|
||||||
|
|
||||||
$httpBackend.when('POST', 'TicketServiceTypes').respond({
|
$httpBackend.when('POST', 'TicketServiceTypes').respond({
|
||||||
id: 4001,
|
id: 4001,
|
||||||
name: 'Totally new stuff'
|
name: 'Totally new stuff',
|
||||||
});
|
});
|
||||||
controller.onNewServiceTypeAccept(service);
|
controller.onNewServiceTypeAccept(service);
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
@ -65,4 +64,20 @@ describe('Ticket component vnTicketService', () => {
|
||||||
expect(service.ticketServiceTypeFk).toEqual(4001);
|
expect(service.ticketServiceTypeFk).toEqual(4001);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('addChecked', () => {
|
||||||
|
it('should add an item to the checkeds array', () => {
|
||||||
|
controller.checkeds = [];
|
||||||
|
controller.addChecked(1);
|
||||||
|
|
||||||
|
expect(controller.checkeds).toEqual([1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should remove an item if it is already in the checkeds array', () => {
|
||||||
|
controller.checkeds = [1, 2, 3];
|
||||||
|
controller.addChecked(2);
|
||||||
|
|
||||||
|
expect(controller.checkeds).toEqual([1, 3]);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,4 +2,6 @@ Service: Servicios
|
||||||
Tax class: Tipo IVA
|
Tax class: Tipo IVA
|
||||||
Add service: Añadir servicio
|
Add service: Añadir servicio
|
||||||
Remove service: Quitar servicio
|
Remove service: Quitar servicio
|
||||||
New service type: Nuevo tipo de servicio
|
New service type: Nuevo tipo de servicio
|
||||||
|
Pay: Abonar
|
||||||
|
To create services with negative amounts mark the service on the source ticket and press the pay button.: Para crear sevicios con cantidades negativas marcar servicio en el ticket origen y apretar el boton abonar.
|
|
@ -23,6 +23,9 @@
|
||||||
"Device": {
|
"Device": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"DeviceLog": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"DeviceProduction": {
|
"DeviceProduction": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"name": "DeviceLog",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "deviceLog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"id": true,
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"android_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"userFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"created": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"nameApp": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"versionApp": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"deviceProductionFk": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"relations": {
|
||||||
|
"user": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "VnUser",
|
||||||
|
"foreignKey": "userFk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -84,7 +84,8 @@
|
||||||
<div name="absenceTypes" class="input vn-py-md" style="overflow: hidden;">
|
<div name="absenceTypes" class="input vn-py-md" style="overflow: hidden;">
|
||||||
<vn-chip ng-repeat="absenceType in absenceTypes" ng-class="::{'selectable': $ctrl.isSubordinate}" ng-click="$ctrl.pick(absenceType)">
|
<vn-chip ng-repeat="absenceType in absenceTypes" ng-class="::{'selectable': $ctrl.isSubordinate}" ng-click="$ctrl.pick(absenceType)">
|
||||||
<vn-avatar ng-style="{backgroundColor: absenceType.rgb}">
|
<vn-avatar ng-style="{backgroundColor: absenceType.rgb}">
|
||||||
<vn-icon icon="check" ng-if="absenceType.id == $ctrl.absenceType.id"></vn-icon>
|
<vn-icon class="check" icon="check" ng-if="absenceType.id == $ctrl.absenceType.id"></vn-icon>
|
||||||
|
|
||||||
</vn-avatar>
|
</vn-avatar>
|
||||||
{{absenceType.name}}
|
{{absenceType.name}}
|
||||||
</vn-chip>
|
</vn-chip>
|
||||||
|
|
|
@ -9,7 +9,7 @@ vn-worker-calendar {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: $spacing-md;
|
padding: $spacing-md;
|
||||||
|
|
||||||
& > vn-calendar {
|
& > vn-calendar {
|
||||||
border: $border-thin;
|
border: $border-thin;
|
||||||
margin: $spacing-md;
|
margin: $spacing-md;
|
||||||
|
@ -32,7 +32,7 @@ vn-worker-calendar {
|
||||||
}
|
}
|
||||||
|
|
||||||
vn-icon[icon="info"] {
|
vn-icon[icon="info"] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 16px;
|
top: 16px;
|
||||||
right: 16px
|
right: 16px
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ vn-worker-calendar {
|
||||||
vn-side-menu div > .input {
|
vn-side-menu div > .input {
|
||||||
border-bottom: $border-thin;
|
border-bottom: $border-thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
.festive,
|
.festive,
|
||||||
vn-avatar.today {
|
vn-avatar.today {
|
||||||
color: $color-font;
|
color: $color-font;
|
||||||
|
@ -56,4 +56,10 @@ vn-worker-calendar {
|
||||||
vn-avatar.today {
|
vn-avatar.today {
|
||||||
border: 2px solid $color-font-link
|
border: 2px solid $color-font-link
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.check {
|
||||||
|
margin-top: 0.5px;
|
||||||
|
margin-left: -3px;
|
||||||
|
font-size: 125%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const vnPrintPath = path.resolve('print');
|
||||||
|
|
||||||
|
module.exports = new Stylesheet([
|
||||||
|
`${vnPrintPath}/common/css/spacing.css`,
|
||||||
|
`${vnPrintPath}/common/css/misc.css`,
|
||||||
|
`${vnPrintPath}/common/css/layout.css`,
|
||||||
|
`${vnPrintPath}/common/css/email.css`])
|
||||||
|
.mergeStyles();
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<email-body v-bind="$props">
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block vn-pa-ml">
|
||||||
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
<p v-html="$t('description', [bookEntry], [invoiceOutRef])"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</email-body>
|
|
@ -0,0 +1,19 @@
|
||||||
|
const Component = require(`vn-print/core/component`);
|
||||||
|
const emailBody = new Component();
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'book-entry-deleted',
|
||||||
|
components: {
|
||||||
|
'email-body': emailBody.build(),
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
bookEntry: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
invoiceOutRef: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,5 @@
|
||||||
|
Subject: Linked Accounting Entry Deleted
|
||||||
|
Title: Linked Accounting Entry Deleted
|
||||||
|
Description: The linked accounting entry that was associated with SAGE has been deleted. <br/><br/>
|
||||||
|
Entry No. {0} <br/><br/>
|
||||||
|
This entry has been deleted because the associated invoice {1} has been removed.
|
|
@ -0,0 +1,5 @@
|
||||||
|
subject: Asiento contable enlazado eliminado
|
||||||
|
title: Asiento contable enlazado eliminado
|
||||||
|
description: Se ha borrado el asiento contable que se encuentraba enlazado a SAGE <br/><br/>
|
||||||
|
Asientos nº {0} <br/><br/>
|
||||||
|
Este asiento se ha borrado porque se ha eliminado la factura asociada {1}
|
Loading…
Reference in New Issue