From d7251078ef6a91b80a5ffd82e774c266562f7ac5 Mon Sep 17 00:00:00 2001 From: Alec Ritson Date: Wed, 2 Oct 2019 11:01:59 +0100 Subject: [PATCH] Fix order edit and table view shipping info --- .../order-processing/orders/OrderEdit.vue | 27 +++++++++++-------- .../order-processing/orders/OrdersTable.vue | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/resources/assets/js/components/order-processing/orders/OrderEdit.vue b/resources/assets/js/components/order-processing/orders/OrderEdit.vue index eb8d2ac8..9dd31433 100644 --- a/resources/assets/js/components/order-processing/orders/OrderEdit.vue +++ b/resources/assets/js/components/order-processing/orders/OrderEdit.vue @@ -78,6 +78,11 @@ return !line.is_shipping; }); }, + shippingLine() { + return _.find(this.order.lines.data, line => { + return line.is_shipping && !line.is_manual; + }); + }, shipping() { return _.filter(this.order.lines.data, line => { return line.is_shipping; @@ -322,13 +327,13 @@

Shipping Method

- {{ order.shipping_details.method }} + {{ shippingLine.description }}

Shipping Zone

- {{ order.shipping.option }} + {{ shippingLine.option }}
@@ -338,6 +343,11 @@
+
+

Order Notes

+

{{ order.notes }}

+
+
@@ -356,7 +366,7 @@ - + @@ -367,10 +377,10 @@ {{ line.description }} - - + + @@ -464,11 +474,6 @@
Sub total (Excl VAT)
- {{ line.variant_name }} + {{ line.variant_name ? line.variant_name : '-' }} -{{ line.quantity }} 1 -
-
-

Order Notes

-

{{ order.notes }}

-
-

Discounts Applied

diff --git a/resources/assets/js/components/order-processing/orders/OrdersTable.vue b/resources/assets/js/components/order-processing/orders/OrdersTable.vue index 9986355f..adfde0c2 100644 --- a/resources/assets/js/components/order-processing/orders/OrdersTable.vue +++ b/resources/assets/js/components/order-processing/orders/OrdersTable.vue @@ -59,7 +59,7 @@ }, zone(order) { let shipping = _.find(order.lines.data, line => { - return line.is_shipping; + return line.is_shipping && !line.is_manual; }); return shipping ? shipping.option : null; },