diff --git a/db/install/dump/fixtures.sql b/db/install/dump/fixtures.sql
index dd618c431..4c09624e0 100644
--- a/db/install/dump/fixtures.sql
+++ b/db/install/dump/fixtures.sql
@@ -35,7 +35,7 @@ INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lan
(111, 'Missing', '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
('LGN', 106, 'David Charles', 'Haller', 106),
('ANT', 107, 'Hank' , 'Pym' , 107),
@@ -333,7 +333,7 @@ INSERT INTO `vn`.`observationType`(`id`,`description`)
(3,'observation three'),
(4,'comercial');
- INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`description`)
+INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`description`)
VALUES
(1, 1, 1,'under the floor'),
(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'),
( 2100, 1, 'Caixa Bank', 'CAIXESBB');
- INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
+INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
VALUES
( 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
( 69 , 'CCs', NULL, 30, NULL, 0, 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'),
( 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
- ( 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),
- ( 3, '1', 'E', 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),
- ( 5, '1', 'R', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1);
+ ( 1, 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
+ ( 2, 'T', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
+ ( 3, 'T', 90.30 , CURDATE(), 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, '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
- (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) ),
- (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) ),
- (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) ),
- (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) ),
- (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) ),
- (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) ),
- (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) ),
+ (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, '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, '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, '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, '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, '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, '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) ),
(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) ),
@@ -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`)
VALUES
- ( 1, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
- ( 2, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
- ( 3, 2, 1, 2, CURDATE(), 3, 2, 0, NULL),
- ( 4, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
- ( 5, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
- ( 6, 2, 1, 2, CURDATE(), 3, 2, 0, NULL);
+ (1, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
+ (2, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
+ (3, 2, 1, 2, CURDATE(), 3, 2, 0, NULL),
+ (4, 1, 1, 0, CURDATE(), 1, 0, 2, 1),
+ (5, 1, 1, 1, CURDATE(), 2, 1, 0, 2),
+ (6, 2, 1, 2, CURDATE(), 3, 2, 0, NULL);
INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`)
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`)
VALUES
- ( 1, 1, 2, 2, CURDATE(), NULL),
- ( 2, 2, 2, 1, CURDATE(), NULL),
- ( 3, 3, 2, 4, CURDATE(), NULL);
+ (1, 1, 2, 2, CURDATE(), NULL),
+ (2, 2, 2, 1, CURDATE(), NULL),
+ (3, 3, 2, 4, CURDATE(), NULL);
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
VALUES
- (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)),
- (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)),
- (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)),
- (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()),
- (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()),
- (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()),
- (13, 2, 8, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, CURDATE()),
- (14, 1, 8, 'Object1 Gem1 5', 10, 2.30, 0, 0, 0, CURDATE()),
- (15, 1, 19, 'Object1 Gem1 5', 10, 1.50, 0, 0, 0, CURDATE()),
- (16, 2, 20, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, CURDATE()),
- (17, 2, 22, 'Object2 Gem2 3', 30, 2.30, 0, 0, 0, CURDATE()),
- (18, 4, 22, 'Object4 Armor2 2', 20, 3.00, 0, 0, 0, CURDATE());
+ (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)),
+ (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)),
+ (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)),
+ (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()),
+ (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()),
+ (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()),
+ (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, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (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, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
+ (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, 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`)
VALUES
- ( 1, 0),
- ( 2, 1);
+ (1, 0),
+ (2, 1);
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
VALUES
@@ -703,14 +716,44 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
(18, 28, 20.72),
(18, 29, -19.72),
(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`)
VALUES
- ( 1, 0, CURDATE(), 5, 55, 3, 1, 14),
- ( 1, 1, CURDATE(), 5, 54, 3, 2, 8),
- ( 2, 1, CURDATE(), 10, 40, 4, 3, 8),
- ( 3, 1, CURDATE(), 2, 40, 4, 4, 8);
+ (1, 0, CURDATE(), 5, 55, 3, 1, 14),
+ (1, 1, CURDATE(), 5, 54, 3, 2, 8),
+ (2, 1, CURDATE(), 10, 40, 4, 3, 8),
+ (3, 1, CURDATE(), 2, 40, 4, 4, 8);
INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`)
VALUES
diff --git a/front/salix/index.js b/front/salix/index.js
index 67e4505a4..6788bae07 100644
--- a/front/salix/index.js
+++ b/front/salix/index.js
@@ -2,5 +2,3 @@ import './module';
import './routes';
import './components';
import './styles';
-
-// XXX: Pull request: Test 2
diff --git a/modules/client/back/methods/client/specs/getCard.spec.js b/modules/client/back/methods/client/specs/getCard.spec.js
index 768b65c9a..6930354a7 100644
--- a/modules/client/back/methods/client/specs/getCard.spec.js
+++ b/modules/client/back/methods/client/specs/getCard.spec.js
@@ -7,6 +7,6 @@ describe('Client get', () => {
expect(result.id).toEqual(101);
expect(result.name).toEqual('Bruce Wayne');
- expect(result.debt).toEqual(598.45);
+ expect(result.debt).toEqual(329.26);
});
});
diff --git a/modules/client/back/methods/client/specs/summary.spec.js b/modules/client/back/methods/client/specs/summary.spec.js
index 2916a548f..aa3489519 100644
--- a/modules/client/back/methods/client/specs/summary.spec.js
+++ b/modules/client/back/methods/client/specs/summary.spec.js
@@ -17,7 +17,7 @@ describe('client summary()', () => {
it('should return a summary object containing debt', async() => {
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() => {
diff --git a/modules/item/back/methods/item/specs/getDiary.spec.js b/modules/item/back/methods/item/specs/getDiary.spec.js
index 17045b30b..67f239c53 100644
--- a/modules/item/back/methods/item/specs/getDiary.spec.js
+++ b/modules/item/back/methods/item/specs/getDiary.spec.js
@@ -1,11 +1,11 @@
const app = require('vn-loopback/server/server');
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 result = await app.models.Item.getDiary(params);
- expect(result.length).toBe(3);
+ expect(result.length).toBe(4);
expect(result[0].balance).toBe(-100);
});
});
diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js
index 259fe5820..9c6c5cbe6 100644
--- a/modules/ticket/back/methods/ticket/filter.js
+++ b/modules/ticket/back/methods/ticket/filter.js
@@ -71,6 +71,10 @@ module.exports = Self => {
arg: 'orderFk',
type: 'Number',
description: `The order id filter`
+ }, {
+ arg: 'refFk',
+ type: 'string',
+ description: `The invoice reference filter`
}, {
arg: 'alertLevel',
type: 'Number',
@@ -138,6 +142,8 @@ module.exports = Self => {
return {'t.shipped': {lte: value}};
case 'nickname':
return {'t.nickname': {like: `%${value}%`}};
+ case 'refFk':
+ return {'t.refFk': value};
case 'salesPersonFk':
return {'c.salesPersonFk': value};
case 'provinceFk':
diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html
index 3835ba6b2..8bff26233 100644
--- a/modules/ticket/front/index/index.html
+++ b/modules/ticket/front/index/index.html
@@ -42,6 +42,7 @@
State
Agency
Warehouse
+ Invoice
Total
@@ -105,6 +106,7 @@
{{::ticket.agencyMode}}
{{::ticket.warehouse}}
+ {{::ticket.refFk | dashIfEmpty}}
{{::ticket.total | currency: 'EUR': 2}}
-
-
+
+
+
+ {{firstName}} {{name}}
+
- {{firstName}} {{name}}
+ label="State"
+ field="filter.stateFk"
+ url="/api/States">
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/ticket/front/search-panel/locale/es.yml b/modules/ticket/front/search-panel/locale/es.yml
index f63f2baf9..4bebb3962 100644
--- a/modules/ticket/front/search-panel/locale/es.yml
+++ b/modules/ticket/front/search-panel/locale/es.yml
@@ -8,4 +8,5 @@ Warehouse: Almacén
Sales person: Comercial
Province: Provincia
My team: Mi equipo
-Order id: Id pedido
\ No newline at end of file
+Order id: Id pedido
+Grouped States: Estado agrupado
\ No newline at end of file