From 48cd9e29190f95ad24faf4c4421dac9c502bd13a Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 1 Apr 2019 09:13:24 +0200 Subject: [PATCH 1/2] price fixes --- db/install/dump/fixtures.sql | 2 +- e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js | 2 +- modules/client/back/methods/client/specs/getCard.spec.js | 2 +- modules/client/back/methods/client/specs/summary.spec.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/install/dump/fixtures.sql b/db/install/dump/fixtures.sql index 47328d3da..32c904bce 100644 --- a/db/install/dump/fixtures.sql +++ b/db/install/dump/fixtures.sql @@ -615,7 +615,7 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric (5, 1, 2, 'Ranged weapon longbow 2m', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)), (6, 1, 3, 'Ranged weapon longbow 2m', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)), (7, 2, 11, 'Melee weapon combat first 15cm', 15, 1.46, 0, 0, 0, CURDATE()), - (8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.05, 0, 0, 0, CURDATE()), + (8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.04, 0, 0, 0, CURDATE()), (9, 1, 16, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, CURDATE()), (10, 2, 16, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, CURDATE()), (11, 1, 16, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, CURDATE()), diff --git a/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js b/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js index 1a51a9a60..ebdace2a7 100644 --- a/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js +++ b/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js @@ -73,7 +73,7 @@ describe('Ticket Edit basic data path', () => { .wait(1900) .waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText'); - expect(result).toContain('-€202.25'); + expect(result).toContain('-€203.25'); }); it(`should then click next to move on to step three`, async() => { diff --git a/modules/client/back/methods/client/specs/getCard.spec.js b/modules/client/back/methods/client/specs/getCard.spec.js index 6930354a7..821dd23f7 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(329.26); + expect(result.debt).toEqual(329.13); }); }); diff --git a/modules/client/back/methods/client/specs/summary.spec.js b/modules/client/back/methods/client/specs/summary.spec.js index aa3489519..55801fdb9 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(329.26); + expect(result.debt.debt).toEqual(329.13); }); it('should return a summary object containing averageInvoiced', async() => { From 3f1889daa3ffc12e180f8b7595289c6cb0574900 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 1 Apr 2019 09:48:22 +0200 Subject: [PATCH 2/2] fix open client card from ticket descriptor #1291 --- front/core/components/input-time/index.js | 5 +++-- modules/ticket/front/descriptor/index.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/front/core/components/input-time/index.js b/front/core/components/input-time/index.js index e9b2b2d7a..9dd6a041e 100644 --- a/front/core/components/input-time/index.js +++ b/front/core/components/input-time/index.js @@ -1,9 +1,10 @@ import ngModule from '../../module'; -import Textfield from '../textfield/textfield'; +import Input from '../../lib/input'; import './style.scss'; -export default class InputTime extends Textfield { +export default class InputTime extends Input { set offsetedValue(value) { + if (!value) return; this._offsetedValue = value; let date = new Date(value); diff --git a/modules/ticket/front/descriptor/index.js b/modules/ticket/front/descriptor/index.js index a58d84c2a..30f3390d4 100644 --- a/modules/ticket/front/descriptor/index.js +++ b/modules/ticket/front/descriptor/index.js @@ -132,6 +132,7 @@ class Controller { state: `client.card.summary({id: ${value.clientFk}})`, tooltip: 'Client card' }}; + if (value.stowaway) { links.btnTwo = { icon: 'icon-stowaway',