From 92b916580e2d59382f57b055ba53af41638d5368 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 26 Oct 2021 10:20:35 +0200 Subject: [PATCH] feat(description): concat bank with tickets --- modules/client/front/balance/create/index.js | 4 +++- modules/client/front/balance/create/index.spec.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index e78a9c1b2..5b5866732 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -45,6 +45,7 @@ class Controller extends Dialog { set description(value) { this.receipt.description = value; + this.originalDescription = value; } get description() { @@ -60,7 +61,8 @@ class Controller extends Dialog { if (value) { const accountingType = value.accountingType; - this.receipt.description = accountingType && accountingType.receiptDescription; + this.receipt.description = + `${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`; } } diff --git a/modules/client/front/balance/create/index.spec.js b/modules/client/front/balance/create/index.spec.js index bd0607a79..3aade58c6 100644 --- a/modules/client/front/balance/create/index.spec.js +++ b/modules/client/front/balance/create/index.spec.js @@ -36,7 +36,7 @@ describe('Client', () => { } }; - expect(controller.receipt.description).toEqual('Cash'); + expect(controller.receipt.description).toContain('Cash'); }); });