rerobe-js-orm 3.1.9 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,8 +99,9 @@ class OrderHelpers {
|
|
|
99
99
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
100
100
|
const orderRefunds = order.refunds ? [...order.refunds] : [];
|
|
101
101
|
const orderFulfillment = order.fulfillments ? [...order.fulfillments] : [];
|
|
102
|
-
const
|
|
103
|
-
const
|
|
102
|
+
const orderLineItems = order.lineItems && Array.isArray(order.lineItems) ? [...order.lineItems] : [];
|
|
103
|
+
const subtotalPrice = Object.assign(Object.assign({}, order.subtotalPrice), { amount: this.getSubtotalPrice(orderLineItems) });
|
|
104
|
+
const subtotalPricePresentment = Object.assign(Object.assign({}, order.subtotalPricePresentment), { amount: this.getAmountSumByField(orderLineItems, 'presentmentTotalPrice') });
|
|
104
105
|
const preparedOrder = {
|
|
105
106
|
documentId: order.documentId || '',
|
|
106
107
|
name: order.name || '',
|