From 3e1ccc1423ddcbb29065c57adb7eaafa5c4799b0 Mon Sep 17 00:00:00 2001 From: Luba Kaysina Date: Fri, 22 Jul 2022 16:09:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5=D0=BC=D1=83?= =?UTF-8?q?=20=D1=81=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=D0=BC=20=D1=81=D1=83=D0=BC=D0=BC=D1=8B,=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2=D0=BE=20?= =?UTF-8?q?=D0=B7=D0=BD=D0=B0=D0=BA=D0=BE=D0=B2=20=D0=BF=D0=BE=D1=81=D0=BB?= =?UTF-8?q?=D0=B5=20=D0=B7=D0=B0=D0=BF=D1=8F=D1=82=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/orders/orders.component.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/pages/orders/orders.component.ts b/src/app/pages/orders/orders.component.ts index 0f2d802..0f41731 100644 --- a/src/app/pages/orders/orders.component.ts +++ b/src/app/pages/orders/orders.component.ts @@ -33,6 +33,7 @@ export class OrdersComponent implements OnInit { public sumRef0: any = 0; public sumRef1: any = 0; public sumRef2: any = 0; + public sumRef3: any = 0; public matchModeOptions!: SelectItem[]; public dis: boolean = false; @@ -233,19 +234,16 @@ notif2() { if (this.refund.admin_return.status == 'COMPLETED') { this.sumRef0 = this.refund.admin_return.amount - } else this.sumRef0 = 0; - if (this.refund.difference_return.status == 'COMPLETED') { this.sumRef1 = this.refund.difference_return.amount - } else this.sumRef1 = 0; - if (this.refund.full_return.status == 'COMPLETED') { this.sumRef2 = this.refund.full_return.amount - - } else this.sumRef2 = 0 - this.sumRef = this.sumRef0 + this.sumRef1 + this.sumRef2 + } else this.sumRef2 = 0; + this.sumRef3 = this.sumRef0 + this.sumRef1 + this.sumRef2 + this.sumRef = parseFloat(this.sumRef3.toFixed(2)) + }, error: (err) => { console.log('ERROR: ', err) @@ -254,6 +252,7 @@ notif2() { summary: 'Произошла ошибка!', }) } + } );