Browse Source

fix(admin-ui): Correctly refund shipping amount when refunding an order

Fixes #989
Michael Bromley 4 years ago
parent
commit
42ef9bfcdb

+ 1 - 1
packages/admin-ui/src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.html

@@ -122,7 +122,7 @@
                 <input type="checkbox" clrCheckbox [(ngModel)]="refundShipping" [disabled]="!isRefunding()" />
                 <label>
                     {{ 'order.refund-shipping' | translate }} ({{
-                        order.shipping | localeCurrency: order.currencyCode
+                        order.shippingWithTax | localeCurrency: order.currencyCode
                     }})
                 </label>
             </clr-checkbox-wrapper>

+ 1 - 1
packages/admin-ui/src/lib/order/src/components/refund-order-dialog/refund-order-dialog.component.ts

@@ -139,7 +139,7 @@ export class RefundOrderDialogComponent
                 refund: {
                     lines: refundLines,
                     reason: this.reason,
-                    shipping: this.refundShipping ? this.order.shipping : 0,
+                    shipping: this.refundShipping ? this.order.shippingWithTax : 0,
                     adjustment: this.adjustment,
                     paymentId: payment.id,
                 },