From 77ecb3241118d5269f28d8c969ac39eb8e1811ce Mon Sep 17 00:00:00 2001 From: gofnnp Date: Wed, 10 May 2023 11:07:00 +0400 Subject: [PATCH] =?UTF-8?q?dev=20#13995=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/pages/guest-card/guest-card.component.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/angular/src/app/pages/guest-card/guest-card.component.ts b/angular/src/app/pages/guest-card/guest-card.component.ts index 908d046..1517d89 100644 --- a/angular/src/app/pages/guest-card/guest-card.component.ts +++ b/angular/src/app/pages/guest-card/guest-card.component.ts @@ -40,12 +40,11 @@ export class GuestCardComponent implements OnInit { currentPurchases: [], $loading: true, get currentAmount():number { - // const amount = this.currentPurchases.reduce((accumulator, currentValue) => { - // if (currentValue.transactionType !== 'PayFromWallet') return 0; - // return accumulator + currentValue.transactionSum; - // }, 0); - // return amount * -1 - return 8601 + const amount = this.currentPurchases.reduce((accumulator, currentValue) => { + if (currentValue.transactionType !== 'PayFromWallet') return 0; + return accumulator + currentValue.transactionSum; + }, 0); + return amount * -1 }, get lastAmount():number { const amount = this.lastPurchases.reduce((accumulator, currentValue) => {