diff --git a/src/app/pages/orders/orders.component.html b/src/app/pages/orders/orders.component.html
index 201c266..2fb70a1 100644
--- a/src/app/pages/orders/orders.component.html
+++ b/src/app/pages/orders/orders.component.html
@@ -159,7 +159,7 @@
| {{pay.summ}} |
{{pay.type | paymentType}} |
- {{pay.payload.status | paymentStatus}} |
+ {{pay?.payload?.status | paymentStatus}} |
@@ -167,22 +167,6 @@
|
-
- Возвраты:
-
-
-
- | Сумма по возвратам: |
- |
-
-
- | {{sumRef}} |
- |
-
-
-
-
-
diff --git a/src/app/pages/orders/orders.component.ts b/src/app/pages/orders/orders.component.ts
index 0c447c8..4f602be 100644
--- a/src/app/pages/orders/orders.component.ts
+++ b/src/app/pages/orders/orders.component.ts
@@ -41,7 +41,6 @@ export class OrdersComponent implements OnInit {
public map_due = new Map();
public myAudioP = new Audio();
public myAudioA = new Audio();
- public refund!: Refund;
public sumRef: number = 0;
public sumRef0: any = 0;
public sumRef1: any = 0;
@@ -291,7 +290,6 @@ export class OrdersComponent implements OnInit {
},
});
this.view = false;
- setTimeout(() => this.getOrderRefunds(this.order[0].external_id), 400);
}
getPaymentData() {
@@ -323,14 +321,14 @@ export class OrdersComponent implements OnInit {
]).subscribe({
next: ([paymentData, paymentStatus]) => {
const payment_request = paymentData.result.payment_request;
- this.order[0].payment.push({
+ this.order[0].payment = [{
summ: payment_request.amount,
type: payment_request.type,
payload: {
id: payment_request.id,
status: paymentStatus.result.status,
},
- });
+ }];
},
error: (error) => {
console.log('ERROR: ', error);
@@ -406,43 +404,6 @@ export class OrdersComponent implements OnInit {
});
}
- async getOrderRefunds(id: any) {
- await this.jsonRpcService
- .rpc2(
- {
- method: 'getOrderRefunds',
- params: { external_id: id },
- },
- RpcService.authService,
- false
- )
- .subscribe({
- next: (result) => {
- let data = result.result;
- this.refund = data;
-
- 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.sumRef3 = this.sumRef0 + this.sumRef1 + this.sumRef2;
- this.sumRef = parseFloat(this.sumRef3.toFixed(2));
- },
- error: (err) => {
- console.log('ERROR: ', err);
- this.messageService.add({
- severity: 'error',
- summary: 'Произошла ошибка!',
- });
- },
- });
- }
-
doAdminRefund(id: any, type: any, id_: any) {
this.dis = false;
let qr_id: string;