Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
2c7b9968eb
|
@ -35,7 +35,7 @@ INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lan
|
||||||
(111, 'Missing', 'ac754a330530832ba1bf7687f577da91', 2 , 0, NULL, 'es'),
|
(111, 'Missing', 'ac754a330530832ba1bf7687f577da91', 2 , 0, NULL, 'es'),
|
||||||
(112, 'Trash', 'ac754a330530832ba1bf7687f577da91', 2 , 0, NULL, 'es');
|
(112, 'Trash', 'ac754a330530832ba1bf7687f577da91', 2 , 0, NULL, 'es');
|
||||||
|
|
||||||
INSERT INTO `vn2008`.`Trabajadores`(`CodigoTrabajador`, `Id_Trabajador`, `Nombre`, `Apellidos`, `user_id`)
|
INSERT INTO `vn2008`.`Trabajadores`(`CodigoTrabajador`, `Id_Trabajador`, `Nombre`, `Apellidos`, `user_id`)
|
||||||
VALUES
|
VALUES
|
||||||
('LGN', 106, 'David Charles', 'Haller', 106),
|
('LGN', 106, 'David Charles', 'Haller', 106),
|
||||||
('ANT', 107, 'Hank' , 'Pym' , 107),
|
('ANT', 107, 'Hank' , 'Pym' , 107),
|
||||||
|
@ -333,7 +333,7 @@ INSERT INTO `vn`.`observationType`(`id`,`description`)
|
||||||
(3,'observation three'),
|
(3,'observation three'),
|
||||||
(4,'comercial');
|
(4,'comercial');
|
||||||
|
|
||||||
INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`description`)
|
INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`description`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 1,'under the floor'),
|
(1, 1, 1,'under the floor'),
|
||||||
(2, 1, 2,'wears leather and goes out at night'),
|
(2, 1, 2,'wears leather and goes out at night'),
|
||||||
|
@ -372,11 +372,11 @@ INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
||||||
( 128, 1, 'The Best Bank', 'BBKKESMMMMMM'),
|
( 128, 1, 'The Best Bank', 'BBKKESMMMMMM'),
|
||||||
( 2100, 1, 'Caixa Bank', 'CAIXESBB');
|
( 2100, 1, 'Caixa Bank', 'CAIXESBB');
|
||||||
|
|
||||||
INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
|
INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
|
||||||
VALUES
|
VALUES
|
||||||
( 241, 442, 'ES111122333344111122221111', 128);
|
( 241, 442, 'ES111122333344111122221111', 128);
|
||||||
|
|
||||||
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`)
|
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`)
|
||||||
VALUES
|
VALUES
|
||||||
( 69 , 'CCs', NULL, 30, NULL, 0, NULL),
|
( 69 , 'CCs', NULL, 30, NULL, 0, NULL),
|
||||||
( 442 , 'VNL', 241, 30, 2 , 1, NULL),
|
( 442 , 'VNL', 241, 30, 2 , 1, NULL),
|
||||||
|
@ -384,23 +384,30 @@ INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
||||||
( 791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30'),
|
( 791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30'),
|
||||||
( 1381, 'ORN', NULL, 30, NULL, 7, NULL);
|
( 1381, 'ORN', NULL, 30, NULL, 7, NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`invoiceOut`(`id`,`ref`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `pdf`)
|
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `pdf`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, '1', 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
( 1, 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
( 2, '1', 'V', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
( 2, 'T', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
( 3, '1', 'E', 90.30 , CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
( 3, 'T', 90.30 , CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
( 4, '1', 'E', 290.30 , DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
( 4, 'T', 290.30 , DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||||
( 5, '1', 'R', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1);
|
( 5, 'A', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticket`(`id`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `created`)
|
UPDATE `vn`.`invoiceOut` SET ref = 'T1111111' WHERE id = 1;
|
||||||
|
UPDATE `vn`.`invoiceOut` SET ref = 'T2222222' WHERE id = 2;
|
||||||
|
UPDATE `vn`.`invoiceOut` SET ref = 'T3333333' WHERE id = 3;
|
||||||
|
UPDATE `vn`.`invoiceOut` SET ref = 'T4444444' WHERE id = 4;
|
||||||
|
UPDATE `vn`.`invoiceOut` SET ref = 'A1111111' WHERE id = 5;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`ticket`(`id`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY) , DATE_ADD(CURDATE(), INTERVAL -15 DAY) , 101, 'address 21', 121, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY) ),
|
(1 , 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY) , DATE_ADD(CURDATE(), INTERVAL -15 DAY) , 101, 'address 21', 121, 'T1111111', 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY) ),
|
||||||
(2 , 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -10 DAY) , DATE_ADD(CURDATE(), INTERVAL -10 DAY) , 101, 'address 21', 121, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY) ),
|
(2 , 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -10 DAY) , DATE_ADD(CURDATE(), INTERVAL -10 DAY) , 101, 'address 21', 121, 'T2222222', 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY) ),
|
||||||
(3 , 2, 2, 2, DATE_ADD(CURDATE(), INTERVAL -5 DAY) , DATE_ADD(CURDATE(), INTERVAL -5 DAY) , 102, 'address 22', 122, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY) ),
|
(3 , 2, 2, 2, DATE_ADD(CURDATE(), INTERVAL -5 DAY) , DATE_ADD(CURDATE(), INTERVAL -5 DAY) , 102, 'address 22', 122, 'T2222222', 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY) ),
|
||||||
(4 , 2, 2, 2, DATE_ADD(CURDATE(), INTERVAL -4 DAY) , DATE_ADD(CURDATE(), INTERVAL -4 DAY) , 102, 'address 22', 122, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY) ),
|
(4 , 2, 2, 2, DATE_ADD(CURDATE(), INTERVAL -4 DAY) , DATE_ADD(CURDATE(), INTERVAL -4 DAY) , 102, 'address 22', 122, 'T3333333', 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY) ),
|
||||||
(5 , 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -3 DAY) , DATE_ADD(CURDATE(), INTERVAL -3 DAY) , 103, 'address 23', 123, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY) ),
|
(5 , 3, 3, 3, DATE_ADD(CURDATE(), INTERVAL -3 DAY) , DATE_ADD(CURDATE(), INTERVAL -3 DAY) , 103, 'address 23', 123, 'T3333333', 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY) ),
|
||||||
(6 , 3, 3, 4, DATE_ADD(CURDATE(), INTERVAL -2 DAY) , DATE_ADD(CURDATE(), INTERVAL -2 DAY) , 103, 'address 23', 123, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY) ),
|
(6 , 3, 3, 4, DATE_ADD(CURDATE(), INTERVAL -2 DAY) , DATE_ADD(CURDATE(), INTERVAL -2 DAY) , 103, 'address 23', 123, 'T4444444', 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY) ),
|
||||||
(7 , 4, 4, 4, DATE_ADD(CURDATE(), INTERVAL -1 DAY) , DATE_ADD(CURDATE(), INTERVAL -1 DAY) , 104, 'address 24', 124, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY) ),
|
(7 , 4, 4, 4, DATE_ADD(CURDATE(), INTERVAL -1 DAY) , DATE_ADD(CURDATE(), INTERVAL -1 DAY) , 104, 'address 24', 124, 'T4444444', 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY) ),
|
||||||
(8 , 1, 1, 4, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 104, 'address 24', 124, NULL, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH) ),
|
(8 , 1, 1, 4, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 104, 'address 24', 124, NULL, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH) ),
|
||||||
(9 , 5, 5, 4, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 105, 'address 25', 125, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ),
|
(9 , 5, 5, 4, DATE_ADD(CURDATE(), INTERVAL -2 MONTH), DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 105, 'address 25', 125, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH) ),
|
||||||
(10, 6, 5, 5, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 105, 'address 25', 125, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH) ),
|
(10, 6, 5, 5, DATE_ADD(CURDATE(), INTERVAL -3 MONTH), DATE_ADD(CURDATE(), INTERVAL -3 MONTH), 105, 'address 25', 125, NULL, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH) ),
|
||||||
|
@ -568,12 +575,12 @@ INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`,
|
||||||
|
|
||||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
|
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
|
(1, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
|
||||||
( 2, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
|
(2, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
|
||||||
( 3, 2, 1, 2, CURDATE(), 3, 2, 0, NULL),
|
(3, 2, 1, 2, CURDATE(), 3, 2, 0, NULL),
|
||||||
( 4, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
|
(4, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
|
||||||
( 5, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
|
(5, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
|
||||||
( 6, 2, 1, 2, CURDATE(), 3, 2, 0, NULL);
|
(6, 2, 1, 2, CURDATE(), 3, 2, 0, NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`)
|
INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -583,35 +590,41 @@ INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPack
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, `created`, `pvp`)
|
INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, `created`, `pvp`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 1, 2, 2, CURDATE(), NULL),
|
(1, 1, 2, 2, CURDATE(), NULL),
|
||||||
( 2, 2, 2, 1, CURDATE(), NULL),
|
(2, 2, 2, 1, CURDATE(), NULL),
|
||||||
( 3, 3, 2, 4, CURDATE(), NULL);
|
(3, 3, 2, 4, CURDATE(), NULL);
|
||||||
|
|
||||||
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 , 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(1, 1, 1, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(2, 2, 1 , 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(2, 2, 1, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(3, 1, 1 , 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(3, 1, 1, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(4, 4, 1 , 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(4, 4, 1, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(5, 1, 2 , 'Object1 Gem1 5', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
|
(5, 1, 2, 'Object1 Gem1 5', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
|
||||||
(6, 1, 3 , 'Object1 Gem1 5', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
|
(6, 1, 3, 'Object1 Gem1 5', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
|
||||||
(7, 2, 11, 'Object2 Gem2 3', 15, 1.46, 0, 0, 0, CURDATE()),
|
(7, 2, 11, 'Object2 Gem2 3', 15, 1.46, 0, 0, 0, CURDATE()),
|
||||||
(8, 4, 11, 'Object4 Armor2 2', 10, 3.05, 0, 0, 0, CURDATE()),
|
(8, 4, 11, 'Object4 Armor2 2', 10, 3.05, 0, 0, 0, CURDATE()),
|
||||||
(9, 1, 16, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, CURDATE()),
|
(9, 1, 16, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, CURDATE()),
|
||||||
(10, 2, 16, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, CURDATE()),
|
(10, 2, 16, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, CURDATE()),
|
||||||
(11, 1, 16, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, CURDATE()),
|
(11, 1, 16, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, CURDATE()),
|
||||||
(12, 4, 16, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, CURDATE()),
|
(12, 4, 16, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, CURDATE()),
|
||||||
(13, 2, 8, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, CURDATE()),
|
(13, 2, 8, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(14, 1, 8, 'Object1 Gem1 5', 10, 2.30, 0, 0, 0, CURDATE()),
|
(14, 1, 8, 'Object1 Gem1 5', 10, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
|
||||||
(15, 1, 19, 'Object1 Gem1 5', 10, 1.50, 0, 0, 0, CURDATE()),
|
(15, 1, 19, 'Object1 Gem1 5', 10, 1.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(16, 2, 20, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, CURDATE()),
|
(16, 2, 20, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(17, 2, 22, 'Object2 Gem2 3', 30, 2.30, 0, 0, 0, CURDATE()),
|
(17, 2, 22, 'Object2 Gem2 3', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
(18, 4, 22, 'Object4 Armor2 2', 20, 3.00, 0, 0, 0, CURDATE());
|
(18, 4, 22, 'Object4 Armor2 2', 20, 3.00, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||||
|
(19, 1, 4, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY)),
|
||||||
|
(20, 1, 5, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY)),
|
||||||
|
(21, 1, 6, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY)),
|
||||||
|
(22, 1, 7, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY)),
|
||||||
|
(23, 1, 9, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
|
||||||
|
(24, 1, 10, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 0),
|
(1, 0),
|
||||||
( 2, 1);
|
(2, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -703,14 +716,44 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
(18, 28, 20.72),
|
(18, 28, 20.72),
|
||||||
(18, 29, -19.72),
|
(18, 29, -19.72),
|
||||||
(18, 37, 2),
|
(18, 37, 2),
|
||||||
(18, 39, 0.01);
|
(18, 39, 0.01),
|
||||||
|
(19, 15, 0.58),
|
||||||
|
(19, 23, 6.5),
|
||||||
|
(19, 28, 20.72),
|
||||||
|
(19, 29, -18.72),
|
||||||
|
(19, 39, 0.02),
|
||||||
|
(20, 15, 0.58),
|
||||||
|
(20, 23, 6.5),
|
||||||
|
(20, 28, 20.72),
|
||||||
|
(20, 29, -18.72),
|
||||||
|
(20, 39, 0.02),
|
||||||
|
(21, 15, 0.58),
|
||||||
|
(21, 23, 6.5),
|
||||||
|
(21, 28, 20.72),
|
||||||
|
(21, 29, -18.72),
|
||||||
|
(21, 39, 0.02),
|
||||||
|
(22, 15, 0.58),
|
||||||
|
(22, 23, 6.5),
|
||||||
|
(22, 28, 20.72),
|
||||||
|
(22, 29, -18.72),
|
||||||
|
(22, 39, 0.02),
|
||||||
|
(23, 15, 0.58),
|
||||||
|
(23, 23, 6.5),
|
||||||
|
(23, 28, 20.72),
|
||||||
|
(23, 29, -18.72),
|
||||||
|
(23, 39, 0.02),
|
||||||
|
(24, 15, 0.58),
|
||||||
|
(24, 23, 6.5),
|
||||||
|
(24, 28, 20.72),
|
||||||
|
(24, 29, -18.72),
|
||||||
|
(24, 39, 0.02);
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleTracking`(`saleFk`, `isChecked`, `created`, `originalQuantity`, `workerFk`, `actionFk`, `id`, `stateFk`)
|
INSERT INTO `vn`.`saleTracking`(`saleFk`, `isChecked`, `created`, `originalQuantity`, `workerFk`, `actionFk`, `id`, `stateFk`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 0, CURDATE(), 5, 55, 3, 1, 14),
|
(1, 0, CURDATE(), 5, 55, 3, 1, 14),
|
||||||
( 1, 1, CURDATE(), 5, 54, 3, 2, 8),
|
(1, 1, CURDATE(), 5, 54, 3, 2, 8),
|
||||||
( 2, 1, CURDATE(), 10, 40, 4, 3, 8),
|
(2, 1, CURDATE(), 10, 40, 4, 3, 8),
|
||||||
( 3, 1, CURDATE(), 2, 40, 4, 4, 8);
|
(3, 1, CURDATE(), 2, 40, 4, 4, 8);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`)
|
INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -2,5 +2,3 @@ import './module';
|
||||||
import './routes';
|
import './routes';
|
||||||
import './components';
|
import './components';
|
||||||
import './styles';
|
import './styles';
|
||||||
|
|
||||||
// XXX: Pull request: Test 2
|
|
||||||
|
|
|
@ -7,6 +7,6 @@ describe('Client get', () => {
|
||||||
|
|
||||||
expect(result.id).toEqual(101);
|
expect(result.id).toEqual(101);
|
||||||
expect(result.name).toEqual('Bruce Wayne');
|
expect(result.name).toEqual('Bruce Wayne');
|
||||||
expect(result.debt).toEqual(598.45);
|
expect(result.debt).toEqual(329.26);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('client summary()', () => {
|
||||||
it('should return a summary object containing debt', async() => {
|
it('should return a summary object containing debt', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.debt.debt).toEqual(598.45);
|
expect(result.debt.debt).toEqual(329.26);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing averageInvoiced', async() => {
|
it('should return a summary object containing averageInvoiced', async() => {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('item getShipped()', () => {
|
describe('item getShipped()', () => {
|
||||||
it('should return 3 entries, the first one with the property balance -100', async() => {
|
it('should return 3 entries and with a given balance for the first one', async() => {
|
||||||
let params = {where: {itemFk: 1, warehouseFk: 2}};
|
let params = {where: {itemFk: 1, warehouseFk: 2}};
|
||||||
let result = await app.models.Item.getDiary(params);
|
let result = await app.models.Item.getDiary(params);
|
||||||
|
|
||||||
expect(result.length).toBe(3);
|
expect(result.length).toBe(4);
|
||||||
expect(result[0].balance).toBe(-100);
|
expect(result[0].balance).toBe(-100);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,6 +71,10 @@ module.exports = Self => {
|
||||||
arg: 'orderFk',
|
arg: 'orderFk',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: `The order id filter`
|
description: `The order id filter`
|
||||||
|
}, {
|
||||||
|
arg: 'refFk',
|
||||||
|
type: 'string',
|
||||||
|
description: `The invoice reference filter`
|
||||||
}, {
|
}, {
|
||||||
arg: 'alertLevel',
|
arg: 'alertLevel',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
|
@ -138,6 +142,8 @@ module.exports = Self => {
|
||||||
return {'t.shipped': {lte: value}};
|
return {'t.shipped': {lte: value}};
|
||||||
case 'nickname':
|
case 'nickname':
|
||||||
return {'t.nickname': {like: `%${value}%`}};
|
return {'t.nickname': {like: `%${value}%`}};
|
||||||
|
case 'refFk':
|
||||||
|
return {'t.refFk': value};
|
||||||
case 'salesPersonFk':
|
case 'salesPersonFk':
|
||||||
return {'c.salesPersonFk': value};
|
return {'c.salesPersonFk': value};
|
||||||
case 'provinceFk':
|
case 'provinceFk':
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
<vn-th field="state" >State</vn-th>
|
<vn-th field="state" >State</vn-th>
|
||||||
<vn-th field="agencyMode">Agency</vn-th>
|
<vn-th field="agencyMode">Agency</vn-th>
|
||||||
<vn-th field="warehouse">Warehouse</vn-th>
|
<vn-th field="warehouse">Warehouse</vn-th>
|
||||||
|
<vn-th field="invoice">Invoice</vn-th>
|
||||||
<vn-th number>Total</vn-th>
|
<vn-th number>Total</vn-th>
|
||||||
<vn-th></vn-th>
|
<vn-th></vn-th>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
|
@ -105,6 +106,7 @@
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td>{{::ticket.agencyMode}}</vn-td>
|
<vn-td>{{::ticket.agencyMode}}</vn-td>
|
||||||
<vn-td>{{::ticket.warehouse}}</vn-td>
|
<vn-td>{{::ticket.warehouse}}</vn-td>
|
||||||
|
<vn-td>{{::ticket.refFk | dashIfEmpty}}</vn-td>
|
||||||
<vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td>
|
<vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td>
|
||||||
<vn-td actions>
|
<vn-td actions>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
|
|
@ -14,18 +14,28 @@
|
||||||
label="Nickname"
|
label="Nickname"
|
||||||
model="filter.nickname">
|
model="filter.nickname">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal>
|
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
vn-one
|
vn-one
|
||||||
label="Ticket id"
|
label="Ticket id"
|
||||||
model="filter.id">
|
model="filter.id">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
vn-one
|
vn-one
|
||||||
label="Client id"
|
label="Client id"
|
||||||
model="filter.clientFk">
|
model="filter.clientFk">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
<vn-autocomplete
|
||||||
|
vn-one
|
||||||
|
field="filter.salesPersonFk"
|
||||||
|
url="/client/api/Clients/activeWorkersWithRole"
|
||||||
|
search-function="{firstName: $search}"
|
||||||
|
value-field="id"
|
||||||
|
where="{role: 'employee'}"
|
||||||
|
label="Sales person">
|
||||||
|
<tpl-item>{{firstName}} {{name}}</tpl-item>
|
||||||
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-date-picker
|
<vn-date-picker
|
||||||
|
@ -56,14 +66,38 @@
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
field="filter.salesPersonFk"
|
label="State"
|
||||||
url="/client/api/Clients/activeWorkersWithRole"
|
field="filter.stateFk"
|
||||||
search-function="{firstName: $search}"
|
url="/api/States">
|
||||||
value-field="id"
|
|
||||||
where="{role: 'employee'}"
|
|
||||||
label="Sales person">
|
|
||||||
<tpl-item>{{firstName}} {{name}}</tpl-item>
|
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
<vn-autocomplete
|
||||||
|
vn-one
|
||||||
|
label="Grouped States"
|
||||||
|
value-field="alertLevel"
|
||||||
|
show-field="code"
|
||||||
|
field="filter.alertLevel"
|
||||||
|
url="/api/AlertLevels">
|
||||||
|
</vn-autocomplete>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-textfield
|
||||||
|
vn-one
|
||||||
|
label="Order id"
|
||||||
|
model="filter.orderFk">
|
||||||
|
</vn-textfield>
|
||||||
|
<vn-textfield
|
||||||
|
vn-one
|
||||||
|
label="Invoice"
|
||||||
|
model="filter.refFk">
|
||||||
|
</vn-textfield>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-check
|
||||||
|
vn-one
|
||||||
|
label="My team"
|
||||||
|
field="filter.myTeam"
|
||||||
|
triple-state="true">
|
||||||
|
</vn-check>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
label="Province"
|
label="Province"
|
||||||
|
@ -71,35 +105,6 @@
|
||||||
url="/api/Provinces">
|
url="/api/Provinces">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
|
||||||
<vn-autocomplete
|
|
||||||
vn-one
|
|
||||||
label="State"
|
|
||||||
field="filter.stateFk"
|
|
||||||
url="/api/States">
|
|
||||||
</vn-autocomplete>
|
|
||||||
<vn-textfield
|
|
||||||
vn-one
|
|
||||||
label="Order id"
|
|
||||||
model="filter.orderFk">
|
|
||||||
</vn-textfield>
|
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal>
|
|
||||||
<vn-autocomplete
|
|
||||||
vn-one
|
|
||||||
label="State"
|
|
||||||
value-field="alertLevel"
|
|
||||||
show-field="code"
|
|
||||||
field="filter.alertLevel"
|
|
||||||
url="/api/AlertLevels">
|
|
||||||
</vn-autocomplete>
|
|
||||||
<vn-check
|
|
||||||
vn-one
|
|
||||||
label="My team"
|
|
||||||
field="filter.myTeam"
|
|
||||||
triple-state="true">
|
|
||||||
</vn-check>
|
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal margin-large-top>
|
<vn-horizontal margin-large-top>
|
||||||
<vn-submit label="Search"></vn-submit>
|
<vn-submit label="Search"></vn-submit>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -9,3 +9,4 @@ Sales person: Comercial
|
||||||
Province: Provincia
|
Province: Provincia
|
||||||
My team: Mi equipo
|
My team: Mi equipo
|
||||||
Order id: Id pedido
|
Order id: Id pedido
|
||||||
|
Grouped States: Estado agrupado
|
Loading…
Reference in New Issue