@darkpos/pricing 1.0.164 → 1.0.166

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.
@@ -375,6 +375,102 @@ describe('addItemModifier Function', () => {
375
375
  expect(result.items[0].price).toBe(129);
376
376
  });
377
377
 
378
+ test('Keep zero price on repair-only parent when adding and removing a compute modifier', () => {
379
+ let order = {
380
+ _id: 'order-repair-only',
381
+ customer: {
382
+ _id: '66bb8d1e38ebaee653177a92',
383
+ tags: ['default'],
384
+ },
385
+ items: [],
386
+ };
387
+
388
+ const parentItem = {
389
+ _id: 'parent1',
390
+ itemId: 'item-blouse',
391
+ name: 'Blouse',
392
+ quantity: 1,
393
+ price: 4.5,
394
+ modifiers: [],
395
+ priceLevels: [
396
+ {
397
+ value: 4.5,
398
+ tags: ['default'],
399
+ },
400
+ ],
401
+ };
402
+
403
+ order = pricingService.order.addItem({
404
+ order,
405
+ item: parentItem,
406
+ }).updatedOrder;
407
+
408
+ const addedParent = order.items.find(each => each.itemId === 'item-blouse');
409
+ expect(addedParent.price).toBe(4.5);
410
+
411
+ const relatedItem = {
412
+ _id: 'related1',
413
+ itemId: 'item-sleeve',
414
+ name: 'Blouse Sleeve',
415
+ quantity: 1,
416
+ price: 10,
417
+ modifiers: [],
418
+ properties: {
419
+ relatedItem: true,
420
+ parentItemId: addedParent.itemId,
421
+ parentId: addedParent._id,
422
+ repairOnly: true,
423
+ },
424
+ };
425
+
426
+ order = pricingService.order.addItem({
427
+ order,
428
+ item: relatedItem,
429
+ }).updatedOrder;
430
+
431
+ const parentIndex = order.items.findIndex(
432
+ each => each._id === addedParent._id
433
+ );
434
+ expect(order.items[parentIndex].price).toBe(0);
435
+
436
+ const linenModifier = {
437
+ _id: 'mod-linen',
438
+ modifierId: 'mod-linen',
439
+ name: 'Linen',
440
+ tags: ['default'],
441
+ direct: true,
442
+ included: true,
443
+ compute: {
444
+ type: 'fixed',
445
+ action: 'add',
446
+ amount: 1,
447
+ },
448
+ };
449
+
450
+ order = pricingService.order.addItemModifier({
451
+ order,
452
+ modifier: linenModifier,
453
+ itemIndex: parentIndex,
454
+ });
455
+
456
+ expect(order.items[parentIndex].price).toBe(0);
457
+
458
+ const calculated = pricingService.order.calculate(order);
459
+ expect(calculated.items[parentIndex].price).toBe(0);
460
+ expect(calculated.items[parentIndex].total).toBe(1);
461
+
462
+ order = pricingService.order.removeItemModifier({
463
+ order,
464
+ modifier: order.items[parentIndex].modifiers.find(
465
+ mod => mod.modifierId === 'mod-linen'
466
+ ),
467
+ itemIndex: parentIndex,
468
+ });
469
+
470
+ expect(order.items[parentIndex].price).toBe(0);
471
+ expect(order.items[parentIndex].total).toBe(0);
472
+ });
473
+
378
474
  test('Calculate item with Override Modifier and unitAsAmountMultiplier=true', () => {
379
475
  const item = {
380
476
  location: {},
@@ -16,7 +16,8 @@ const makeGiftModifier = ({
16
16
  compute: { amount },
17
17
  });
18
18
 
19
- const makePaidItem = (modifiers = []) => ({
19
+ const makePaidItem = (modifiers = [], _id = 'item1') => ({
20
+ _id,
20
21
  status: { paid: { value: true } },
21
22
  modifiers,
22
23
  });
@@ -25,25 +26,30 @@ const makeOrder = (items = []) => ({ items, orders: [] });
25
26
 
26
27
  describe('getGiftModifierSources', () => {
27
28
  test('returns empty array for empty orders', () => {
28
- expect(pricingService.order.getGiftModifierSources([], new Date())).toEqual(
29
- []
30
- );
29
+ expect(
30
+ pricingService.order.getGiftModifierSources({
31
+ orders: [],
32
+ purchasedDate: new Date(),
33
+ })
34
+ ).toEqual([]);
31
35
  });
32
36
 
33
37
  test('maps paid gift modifier to source with correct fields', () => {
34
38
  const purchasedDate = new Date('2026-05-01T00:00:00.000Z');
35
39
  const orders = [
36
40
  makeOrder([
37
- makePaidItem([
38
- makeGiftModifier({ number: '111222', pin: '9999', amount: 75 }),
39
- ]),
41
+ makePaidItem(
42
+ [makeGiftModifier({ number: '111222', pin: '9999', amount: 75 })],
43
+ 'item1'
44
+ ),
40
45
  ]),
41
46
  ];
42
47
 
43
- const result = pricingService.order.getGiftModifierSources(
48
+ const result = pricingService.order.getGiftModifierSources({
44
49
  orders,
45
- purchasedDate
46
- );
50
+ purchasedDate,
51
+ itemIds: ['item1'],
52
+ });
47
53
 
48
54
  expect(result).toHaveLength(1);
49
55
  expect(result[0]).toEqual({
@@ -60,22 +66,26 @@ describe('getGiftModifierSources', () => {
60
66
  const purchasedDate = new Date('2026-05-01T00:00:00.000Z');
61
67
  const orders = [
62
68
  makeOrder([
63
- makePaidItem([
64
- makeGiftModifier({
65
- number: '333444',
66
- pin: '0000',
67
- amount: 100,
68
- expMonth: 12,
69
- expYear: 2028,
70
- }),
71
- ]),
69
+ makePaidItem(
70
+ [
71
+ makeGiftModifier({
72
+ number: '333444',
73
+ pin: '0000',
74
+ amount: 100,
75
+ expMonth: 12,
76
+ expYear: 2028,
77
+ }),
78
+ ],
79
+ 'item1'
80
+ ),
72
81
  ]),
73
82
  ];
74
83
 
75
- const result = pricingService.order.getGiftModifierSources(
84
+ const result = pricingService.order.getGiftModifierSources({
76
85
  orders,
77
- purchasedDate
78
- );
86
+ purchasedDate,
87
+ itemIds: ['item1'],
88
+ });
79
89
 
80
90
  expect(result[0].expMonth).toBe(12);
81
91
  expect(result[0].expYear).toBe(2028);
@@ -84,16 +94,18 @@ describe('getGiftModifierSources', () => {
84
94
  test('returns null for missing expMonth/expYear', () => {
85
95
  const orders = [
86
96
  makeOrder([
87
- makePaidItem([
88
- makeGiftModifier({ expMonth: undefined, expYear: undefined }),
89
- ]),
97
+ makePaidItem(
98
+ [makeGiftModifier({ expMonth: undefined, expYear: undefined })],
99
+ 'item1'
100
+ ),
90
101
  ]),
91
102
  ];
92
103
 
93
- const result = pricingService.order.getGiftModifierSources(
104
+ const result = pricingService.order.getGiftModifierSources({
94
105
  orders,
95
- new Date()
96
- );
106
+ purchasedDate: new Date(),
107
+ itemIds: ['item1'],
108
+ });
97
109
 
98
110
  expect(result[0].expMonth).toBeNull();
99
111
  expect(result[0].expYear).toBeNull();
@@ -101,12 +113,13 @@ describe('getGiftModifierSources', () => {
101
113
 
102
114
  test('sets purchasedDate from argument', () => {
103
115
  const purchasedDate = new Date('2026-01-15T08:00:00.000Z');
104
- const orders = [makeOrder([makePaidItem([makeGiftModifier()])])];
116
+ const orders = [makeOrder([makePaidItem([makeGiftModifier()], 'item1')])];
105
117
 
106
- const result = pricingService.order.getGiftModifierSources(
118
+ const result = pricingService.order.getGiftModifierSources({
107
119
  orders,
108
- purchasedDate
109
- );
120
+ purchasedDate,
121
+ itemIds: ['item1'],
122
+ });
110
123
 
111
124
  expect(result[0].purchasedDate).toBe(purchasedDate);
112
125
  });
@@ -114,15 +127,16 @@ describe('getGiftModifierSources', () => {
114
127
  test('returns multiple sources for multiple gift modifiers', () => {
115
128
  const orders = [
116
129
  makeOrder([
117
- makePaidItem([makeGiftModifier({ number: '111111', amount: 50 })]),
118
- makePaidItem([makeGiftModifier({ number: '222222', amount: 25 })]),
130
+ makePaidItem([makeGiftModifier({ number: '111111', amount: 50 })], 'item1'),
131
+ makePaidItem([makeGiftModifier({ number: '222222', amount: 25 })], 'item2'),
119
132
  ]),
120
133
  ];
121
134
 
122
- const result = pricingService.order.getGiftModifierSources(
135
+ const result = pricingService.order.getGiftModifierSources({
123
136
  orders,
124
- new Date()
125
- );
137
+ purchasedDate: new Date(),
138
+ itemIds: ['item1', 'item2'],
139
+ });
126
140
 
127
141
  expect(result).toHaveLength(2);
128
142
  expect(result.map(s => s.number)).toEqual(['111111', '222222']);
@@ -130,15 +144,17 @@ describe('getGiftModifierSources', () => {
130
144
 
131
145
  test('skips modifiers from unpaid items', () => {
132
146
  const unpaidItem = {
147
+ _id: 'item1',
133
148
  status: { paid: { value: false } },
134
149
  modifiers: [makeGiftModifier()],
135
150
  };
136
151
  const orders = [makeOrder([unpaidItem])];
137
152
 
138
- const result = pricingService.order.getGiftModifierSources(
153
+ const result = pricingService.order.getGiftModifierSources({
139
154
  orders,
140
- new Date()
141
- );
155
+ purchasedDate: new Date(),
156
+ itemIds: ['item1'],
157
+ });
142
158
 
143
159
  expect(result).toHaveLength(0);
144
160
  });
@@ -16,31 +16,42 @@ const makeGiftModifier = ({
16
16
  compute: { amount },
17
17
  });
18
18
 
19
- const makePaidItem = (modifiers = []) => ({
19
+ const makePaidItem = (modifiers = [], _id = 'item1') => ({
20
+ _id,
20
21
  status: { paid: { value: true } },
21
22
  modifiers,
22
23
  });
23
24
 
24
- const makeUnpaidItem = (modifiers = []) => ({
25
+ const makeUnpaidItem = (modifiers = [], _id = 'item1') => ({
26
+ _id,
25
27
  status: { paid: { value: false } },
26
28
  modifiers,
27
29
  });
28
30
 
29
31
  describe('getPaidGiftModifiers', () => {
30
32
  test('returns empty array for empty orders', () => {
31
- expect(pricingService.order.getPaidGiftModifiers([])).toEqual([]);
33
+ expect(pricingService.order.getPaidGiftModifiers({ orders: [] })).toEqual(
34
+ []
35
+ );
32
36
  });
33
37
 
34
38
  test('returns empty array when orders is null or undefined', () => {
35
- expect(pricingService.order.getPaidGiftModifiers(null)).toEqual([]);
36
- expect(pricingService.order.getPaidGiftModifiers(undefined)).toEqual([]);
39
+ expect(
40
+ pricingService.order.getPaidGiftModifiers({ orders: null })
41
+ ).toEqual([]);
42
+ expect(
43
+ pricingService.order.getPaidGiftModifiers({ orders: undefined })
44
+ ).toEqual([]);
37
45
  });
38
46
 
39
47
  test('returns gift modifiers from paid items', () => {
40
48
  const giftMod = makeGiftModifier({ number: '111222' });
41
- const orders = [{ items: [makePaidItem([giftMod])], orders: [] }];
49
+ const orders = [{ items: [makePaidItem([giftMod], 'item1')], orders: [] }];
42
50
 
43
- const result = pricingService.order.getPaidGiftModifiers(orders);
51
+ const result = pricingService.order.getPaidGiftModifiers({
52
+ orders,
53
+ itemIds: ['item1'],
54
+ });
44
55
 
45
56
  expect(result).toHaveLength(1);
46
57
  expect(result[0]).toBe(giftMod);
@@ -48,9 +59,14 @@ describe('getPaidGiftModifiers', () => {
48
59
 
49
60
  test('ignores gift modifiers from unpaid items', () => {
50
61
  const giftMod = makeGiftModifier();
51
- const orders = [{ items: [makeUnpaidItem([giftMod])], orders: [] }];
62
+ const orders = [
63
+ { items: [makeUnpaidItem([giftMod], 'item1')], orders: [] },
64
+ ];
52
65
 
53
- const result = pricingService.order.getPaidGiftModifiers(orders);
66
+ const result = pricingService.order.getPaidGiftModifiers({
67
+ orders,
68
+ itemIds: ['item1'],
69
+ });
54
70
 
55
71
  expect(result).toHaveLength(0);
56
72
  });
@@ -60,11 +76,14 @@ describe('getPaidGiftModifiers', () => {
60
76
  const orders = [
61
77
  {
62
78
  items: [],
63
- orders: [{ items: [makePaidItem([giftMod])] }],
79
+ orders: [{ items: [makePaidItem([giftMod], 'item1')] }],
64
80
  },
65
81
  ];
66
82
 
67
- const result = pricingService.order.getPaidGiftModifiers(orders);
83
+ const result = pricingService.order.getPaidGiftModifiers({
84
+ orders,
85
+ itemIds: ['item1'],
86
+ });
68
87
 
69
88
  expect(result).toHaveLength(1);
70
89
  expect(result[0]).toBe(giftMod);
@@ -76,9 +95,12 @@ describe('getPaidGiftModifiers', () => {
76
95
  properties: { gift: { number: '555444', pin: '1111' } },
77
96
  compute: { amount: 30 },
78
97
  };
79
- const orders = [{ items: [makePaidItem([mod])], orders: [] }];
98
+ const orders = [{ items: [makePaidItem([mod], 'item1')], orders: [] }];
80
99
 
81
- const result = pricingService.order.getPaidGiftModifiers(orders);
100
+ const result = pricingService.order.getPaidGiftModifiers({
101
+ orders,
102
+ itemIds: ['item1'],
103
+ });
82
104
 
83
105
  expect(result).toHaveLength(1);
84
106
  });
@@ -89,9 +111,14 @@ describe('getPaidGiftModifiers', () => {
89
111
  properties: {},
90
112
  compute: { amount: 10 },
91
113
  };
92
- const orders = [{ items: [makePaidItem([nonGiftMod])], orders: [] }];
114
+ const orders = [
115
+ { items: [makePaidItem([nonGiftMod], 'item1')], orders: [] },
116
+ ];
93
117
 
94
- const result = pricingService.order.getPaidGiftModifiers(orders);
118
+ const result = pricingService.order.getPaidGiftModifiers({
119
+ orders,
120
+ itemIds: ['item1'],
121
+ });
95
122
 
96
123
  expect(result).toHaveLength(0);
97
124
  });
@@ -100,12 +127,27 @@ describe('getPaidGiftModifiers', () => {
100
127
  const mod1 = makeGiftModifier({ number: '111111' });
101
128
  const mod2 = makeGiftModifier({ number: '222222' });
102
129
  const orders = [
103
- { items: [makePaidItem([mod1])], orders: [] },
104
- { items: [makePaidItem([mod2])], orders: [] },
130
+ { items: [makePaidItem([mod1], 'item1')], orders: [] },
131
+ { items: [makePaidItem([mod2], 'item2')], orders: [] },
105
132
  ];
106
133
 
107
- const result = pricingService.order.getPaidGiftModifiers(orders);
134
+ const result = pricingService.order.getPaidGiftModifiers({
135
+ orders,
136
+ itemIds: ['item1', 'item2'],
137
+ });
108
138
 
109
139
  expect(result).toHaveLength(2);
110
140
  });
141
+
142
+ test('excludes items not in itemIds', () => {
143
+ const giftMod = makeGiftModifier();
144
+ const orders = [{ items: [makePaidItem([giftMod], 'item1')], orders: [] }];
145
+
146
+ const result = pricingService.order.getPaidGiftModifiers({
147
+ orders,
148
+ itemIds: ['other-item'],
149
+ });
150
+
151
+ expect(result).toHaveLength(0);
152
+ });
111
153
  });
@@ -0,0 +1,48 @@
1
+ const usePricing = require('../../index');
2
+
3
+ const pricingService = usePricing();
4
+
5
+ const makePayment = (invoices) => ({ paymentInvoices: invoices });
6
+
7
+ const makeInvoice = (itemIds) => ({
8
+ paymentOrderItems: itemIds.map(orderItemId => ({ orderItemId })),
9
+ });
10
+
11
+ describe('getPaymentItemIds', () => {
12
+ test('returns empty array when payment is null', () => {
13
+ expect(pricingService.payment.getPaymentItemIds(null)).toEqual([]);
14
+ });
15
+
16
+ test('returns empty array when payment has no invoices', () => {
17
+ expect(pricingService.payment.getPaymentItemIds({})).toEqual([]);
18
+ });
19
+
20
+ test('returns empty array when paymentInvoices is empty', () => {
21
+ expect(pricingService.payment.getPaymentItemIds(makePayment([]))).toEqual([]);
22
+ });
23
+
24
+ test('extracts itemIds from single invoice', () => {
25
+ const payment = makePayment([makeInvoice(['item1', 'item2'])]);
26
+ expect(pricingService.payment.getPaymentItemIds(payment)).toEqual(['item1', 'item2']);
27
+ });
28
+
29
+ test('extracts itemIds from multiple invoices', () => {
30
+ const payment = makePayment([makeInvoice(['item1']), makeInvoice(['item2', 'item3'])]);
31
+ expect(pricingService.payment.getPaymentItemIds(payment)).toEqual(['item1', 'item2', 'item3']);
32
+ });
33
+
34
+ test('filters out null/undefined itemIds', () => {
35
+ const payment = makePayment([{ paymentOrderItems: [{ orderItemId: 'item1' }, { orderItemId: null }, {}] }]);
36
+ expect(pricingService.payment.getPaymentItemIds(payment)).toEqual(['item1']);
37
+ });
38
+
39
+ test('coerces itemIds to strings', () => {
40
+ const payment = makePayment([{ paymentOrderItems: [{ orderItemId: 123 }] }]);
41
+ expect(pricingService.payment.getPaymentItemIds(payment)).toEqual(['123']);
42
+ });
43
+
44
+ test('handles invoice with no paymentOrderItems', () => {
45
+ const payment = makePayment([{}]);
46
+ expect(pricingService.payment.getPaymentItemIds(payment)).toEqual([]);
47
+ });
48
+ });
@@ -0,0 +1,48 @@
1
+ const usePricing = require('../../index');
2
+
3
+ const pricingService = usePricing();
4
+
5
+ const makePayment = (invoices) => ({ paymentInvoices: invoices });
6
+
7
+ const makeInvoice = (orderIds) => ({
8
+ paymentOrderItems: orderIds.map(orderId => ({ orderId })),
9
+ });
10
+
11
+ describe('getPaymentOrderIds', () => {
12
+ test('returns empty array when payment is null', () => {
13
+ expect(pricingService.payment.getPaymentOrderIds(null)).toEqual([]);
14
+ });
15
+
16
+ test('returns empty array when payment has no invoices', () => {
17
+ expect(pricingService.payment.getPaymentOrderIds({})).toEqual([]);
18
+ });
19
+
20
+ test('returns empty array when paymentInvoices is empty', () => {
21
+ expect(pricingService.payment.getPaymentOrderIds(makePayment([]))).toEqual([]);
22
+ });
23
+
24
+ test('extracts orderIds from single invoice', () => {
25
+ const payment = makePayment([makeInvoice(['order1', 'order2'])]);
26
+ expect(pricingService.payment.getPaymentOrderIds(payment)).toEqual(['order1', 'order2']);
27
+ });
28
+
29
+ test('extracts orderIds from multiple invoices', () => {
30
+ const payment = makePayment([makeInvoice(['order1']), makeInvoice(['order2', 'order3'])]);
31
+ expect(pricingService.payment.getPaymentOrderIds(payment)).toEqual(['order1', 'order2', 'order3']);
32
+ });
33
+
34
+ test('filters out null/undefined orderIds', () => {
35
+ const payment = makePayment([{ paymentOrderItems: [{ orderId: 'order1' }, { orderId: null }, {}] }]);
36
+ expect(pricingService.payment.getPaymentOrderIds(payment)).toEqual(['order1']);
37
+ });
38
+
39
+ test('coerces orderIds to strings', () => {
40
+ const payment = makePayment([{ paymentOrderItems: [{ orderId: 123 }] }]);
41
+ expect(pricingService.payment.getPaymentOrderIds(payment)).toEqual(['123']);
42
+ });
43
+
44
+ test('handles invoice with no paymentOrderItems', () => {
45
+ const payment = makePayment([{}]);
46
+ expect(pricingService.payment.getPaymentOrderIds(payment)).toEqual([]);
47
+ });
48
+ });
@@ -1,6 +1,6 @@
1
1
  module.exports = ({ actions, modifierActions }) =>
2
- function getGiftModifierSources(orders, purchasedDate) {
3
- const paidItemModifiers = actions.getPaidGiftModifiers(orders);
2
+ function getGiftModifierSources({ orders, purchasedDate, itemIds }) {
3
+ const paidItemModifiers = actions.getPaidGiftModifiers({ orders, itemIds });
4
4
  return (paidItemModifiers || []).map(modifier =>
5
5
  modifierActions.getGiftModifierSource(modifier, purchasedDate)
6
6
  );
@@ -1,5 +1,5 @@
1
- module.exports = () =>
2
- function getPaidGiftModifiers(orders) {
1
+ module.exports = ({ itemActions }) =>
2
+ function getPaidGiftModifiers({ orders, itemIds }) {
3
3
  if ((orders || []).length === 0) return [];
4
4
 
5
5
  const allItems = orders
@@ -7,7 +7,8 @@ module.exports = () =>
7
7
  ...(order.items || []),
8
8
  ...(order.orders || []).flatMap(subOrder => subOrder.items || []),
9
9
  ])
10
- .filter(item => item.status.paid.value);
10
+ .filter(item => itemIds.includes(item._id))
11
+ .filter(item => itemActions.isPaid({ item }));
11
12
 
12
13
  return allItems.flatMap(item =>
13
14
  (item.modifiers || []).filter(
@@ -44,11 +44,13 @@ module.exports = ({ actions, modifierActions, itemActions, _ }) => {
44
44
  originalItem,
45
45
  });
46
46
 
47
- item.price = itemActions.getItemPrice({
48
- item,
49
- itemPriceLevels: originalItem ? originalItem.priceLevels : undefined,
50
- customer,
51
- });
47
+ if (!itemActions.isPriceChanged(item)) {
48
+ item.price = itemActions.getItemPrice({
49
+ item,
50
+ itemPriceLevels: originalItem ? originalItem.priceLevels : undefined,
51
+ customer,
52
+ });
53
+ }
52
54
 
53
55
  order.items[itemIndex] = item;
54
56
 
@@ -6,6 +6,10 @@ module.exports = ({ itemActions }) =>
6
6
  {
7
7
  ...item,
8
8
  price: 0,
9
+ properties: {
10
+ ...(item.properties || {}),
11
+ priceChanged: true,
12
+ },
9
13
  },
10
14
  {}
11
15
  );
@@ -0,0 +1,9 @@
1
+ module.exports = () =>
2
+ function getPaymentItemIds(payment) {
3
+ if (!payment || (payment.paymentInvoices || []).length === 0) return [];
4
+
5
+ return (payment.paymentInvoices || [])
6
+ .flatMap(pi => (pi.paymentOrderItems || []).map(poi => poi.orderItemId))
7
+ .filter(Boolean)
8
+ .map(String);
9
+ };
@@ -0,0 +1,9 @@
1
+ module.exports = () =>
2
+ function getPaymentOrderIds(payment) {
3
+ if (!payment || (payment.paymentInvoices || []).length === 0) return [];
4
+
5
+ return (payment.paymentInvoices || [])
6
+ .flatMap(pi => (pi.paymentOrderItems || []).map(poi => poi.orderId))
7
+ .filter(Boolean)
8
+ .map(String);
9
+ };
@@ -4,6 +4,8 @@ const getMaxAmountToVoid = require('./getMaxAmountToVoid');
4
4
  const getRefundableOrderAmount = require('./getRefundableOrderAmount');
5
5
  const getMethodLabel = require('./getMethodLabel');
6
6
  const getOverPaidOrders = require('./getOverPaidOrders');
7
+ const getPaymentItemIds = require('./getPaymentItemIds');
8
+ const getPaymentOrderIds = require('./getPaymentOrderIds');
7
9
 
8
10
  const orderActions = (deps = {}) => {
9
11
  const actions = {};
@@ -19,6 +21,8 @@ const orderActions = (deps = {}) => {
19
21
  getRefundableOrderAmount: getRefundableOrderAmount(innerDeps),
20
22
  getMethodLabel: getMethodLabel(innerDeps),
21
23
  getOverPaidOrders: getOverPaidOrders(innerDeps),
24
+ getPaymentItemIds: getPaymentItemIds(innerDeps),
25
+ getPaymentOrderIds: getPaymentOrderIds(innerDeps),
22
26
  });
23
27
 
24
28
  Object.keys(freezedActions).forEach(actionName => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkpos/pricing",
3
- "version": "1.0.164",
3
+ "version": "1.0.166",
4
4
  "description": "Pricing calculator",
5
5
  "author": "Dark POS",
6
6
  "license": "ISC",
@@ -54,5 +54,5 @@
54
54
  "supertest": "^6.2.3",
55
55
  "supervisor": "^0.12.0"
56
56
  },
57
- "gitHead": "b9786e89438ac14114630c52ecaf5f4770aa2bf8"
57
+ "gitHead": "e51c44c8e3b47c531140a33cf4f9bea75055a8df"
58
58
  }