@darkpos/pricing 1.0.41 → 1.0.44

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.
Files changed (51) hide show
  1. package/__TEST__/item/getItemsModifierDescription.test.js +148 -0
  2. package/__TEST__/mocks/addItemMock.js +18729 -19357
  3. package/__TEST__/mocks/partially-paid/order-modifiers.json +48 -51
  4. package/__TEST__/mocks/partially-paid/order-partially-paid.json +893 -860
  5. package/__TEST__/mocks/unpaid/order-modifiers.json +48 -52
  6. package/__TEST__/modifier/calculate.test.js +1 -0
  7. package/__TEST__/modifier/getGroupedModifierLabels.test.js +95 -0
  8. package/__TEST__/modifier/getGroupedModifiers.test.js +65 -0
  9. package/__TEST__/modifier/getMatchTagsModifiers.test.js +72 -18
  10. package/__TEST__/modifier/getModifierIndex.test.js +10 -7
  11. package/__TEST__/modifier/getNotesToModifierTags.test.js +78 -0
  12. package/__TEST__/modifier/getRecommendedModifiers.test.js +6 -4
  13. package/__TEST__/modifier/hasAttribute.test.js +11 -5
  14. package/__TEST__/modifier/hasMatchTags.test.js +33 -11
  15. package/__TEST__/modifier/isOptionsOverride.test.js +46 -0
  16. package/__TEST__/modifier/sort.test.js +1 -1
  17. package/__TEST__/order/conditionsNotMet.test.js +133 -0
  18. package/__TEST__/order/order.test.js +7 -5
  19. package/__TEST__/order/pickEndDate.test.js +4 -4
  20. package/__TEST__/order/validateConditionsCalculate.test.js +397 -0
  21. package/lib/constants/index.js +1 -1
  22. package/lib/index.js +11 -2
  23. package/lib/item/calculate.js +27 -10
  24. package/lib/item/getItemModifiersDescription.js +40 -7
  25. package/lib/item/markModifiersAsLocked.js +3 -1
  26. package/lib/modifier/areConditionsMet.js +71 -0
  27. package/lib/modifier/getGroupedModifierLabels.js +10 -0
  28. package/lib/modifier/getGroupedModifiers.js +21 -0
  29. package/lib/modifier/getNotesToModifierTags.js +21 -0
  30. package/lib/modifier/index.js +22 -5
  31. package/lib/modifier/isOptionsOverride.js +9 -0
  32. package/lib/modifier/isPaymentMethodModifier.js +1 -1
  33. package/lib/modifier/isPaymentTypeModifier.js +1 -1
  34. package/lib/modifier/isValid.js +12 -0
  35. package/lib/modifier/validate.js +14 -0
  36. package/lib/modifier/validateDateDaysDiff.js +30 -0
  37. package/lib/modifier/validateInArr.js +12 -0
  38. package/lib/modifier/validateNumberCondition.js +20 -0
  39. package/lib/modifier/validateRequiredModifiers.js +16 -0
  40. package/lib/order/addItemModifier.js +72 -28
  41. package/lib/order/calculate.js +12 -7
  42. package/lib/order/index.js +0 -2
  43. package/lib/order/removeModifiersWithPaymentMethods.js +1 -2
  44. package/lib/order/removeModifiersWithPaymentTypes.js +1 -2
  45. package/lib/store/getRecommendedEndDate.js +13 -0
  46. package/lib/store/index.js +25 -0
  47. package/lib/store/pickEndDate.js +62 -0
  48. package/package.json +3 -3
  49. package/lib/modifier/findByPaymentMethod.js +0 -10
  50. package/lib/modifier/findByPaymentType.js +0 -10
  51. package/lib/order/pickEndDate.js +0 -65
@@ -1,890 +1,923 @@
1
1
  {
2
- "__typename": "Order",
3
- "_createdAt": "2022-12-06T16:47:37.671Z",
4
- "_updatedAt": "2022-12-06T16:48:23.450Z",
5
- "totalPaid": 34,
6
- "user": {
7
- "__typename": "User",
8
- "_id": "63652e1daa91c400196496e3",
9
- "firstName": "nov4",
10
- "lastName": "nov4",
11
- "username": "nov4"
12
- },
13
- "items": [{
14
- "__typename": "OrderItem",
15
- "modifiers": [{
16
- "__typename": "Modifier",
17
- "addModifiers": [],
18
- "delModifiers": [],
19
- "conditions": null,
20
- "compute": null,
21
- "_createdAt": "2022-12-06T16:47:37.671Z",
22
- "_updatedAt": "2022-12-06T16:47:37.671Z",
23
- "_id": "638f7208e6994f736b714de4",
24
- "modifierId": "63652e1eed087c0012dbddda",
25
- "_parentId": null,
26
- "locked": null,
27
- "name": "Dry Cleaning",
28
- "sku": "",
29
- "description": "",
30
- "group": "",
31
- "type": null,
32
- "attributes": ["department"],
33
- "color": "",
34
- "backgroundColor": null,
35
- "icon": null,
36
- "url": "",
37
- "tags": null,
38
- "order": 1,
39
- "included": false,
40
- "direct": true,
41
- "hidden": true,
42
- "print": false,
43
- "required": true,
44
- "recommended": false,
45
- "default": false,
46
- "code": "D",
47
- "properties": {
48
- "department": {
49
- "tagSize": "Small",
50
- "customerTagsExtend": null,
51
- "maxItems": 4
52
- }
53
- },
54
- "_computed": {
55
- "amount": 0,
56
- "description": "Dry Cleaning ($0.00)"
2
+ "__typename": "Order",
3
+ "_createdAt": "2022-12-06T16:47:37.671Z",
4
+ "_updatedAt": "2022-12-06T16:48:23.450Z",
5
+ "totalPaid": 34,
6
+ "user": {
7
+ "__typename": "User",
8
+ "_id": "63652e1daa91c400196496e3",
9
+ "firstName": "nov4",
10
+ "lastName": "nov4",
11
+ "username": "nov4"
12
+ },
13
+ "items": [
14
+ {
15
+ "__typename": "OrderItem",
16
+ "modifiers": [
17
+ {
18
+ "__typename": "Modifier",
19
+ "addModifiers": [],
20
+ "delModifiers": [],
21
+ "conditions": null,
22
+ "compute": null,
23
+ "_createdAt": "2022-12-06T16:47:37.671Z",
24
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
25
+ "_id": "638f7208e6994f736b714de4",
26
+ "modifierId": "63652e1eed087c0012dbddda",
27
+ "_parentId": null,
28
+ "locked": null,
29
+ "name": "Dry Cleaning",
30
+ "sku": "",
31
+ "description": "",
32
+ "group": "",
33
+ "type": null,
34
+ "attributes": ["department"],
35
+ "color": "",
36
+ "backgroundColor": null,
37
+ "icon": null,
38
+ "url": "",
39
+ "tags": null,
40
+ "order": 1,
41
+ "included": false,
42
+ "direct": true,
43
+ "hidden": true,
44
+ "print": false,
45
+ "required": true,
46
+ "recommended": false,
47
+ "default": false,
48
+ "code": "D",
49
+ "properties": {
50
+ "department": {
51
+ "tagSize": "Small",
52
+ "customerTagsExtend": null,
53
+ "maxItems": 4
57
54
  }
58
- }, {
59
- "__typename": "Modifier",
60
- "addModifiers": [],
61
- "delModifiers": [],
62
- "conditions": null,
63
- "compute": {
64
- "__typename": "Compute",
65
- "type": "fixed",
66
- "action": "subtract",
67
- "amount": 2.36
68
- },
69
- "_createdAt": "2022-12-06T16:47:37.671Z",
70
- "_updatedAt": "2022-12-06T16:47:37.671Z",
71
- "_id": "638f72294dc5daa063e13981",
72
- "modifierId": "638f7210e6994f736b714dee",
73
- "_parentId": "638f7210e6994f736b714dee",
74
- "locked": false,
75
- "name": "$10.00 discount",
76
- "sku": "",
77
- "description": "",
78
- "group": "",
79
- "type": "discount",
80
- "attributes": [],
81
- "color": "",
82
- "backgroundColor": "",
83
- "icon": "",
84
- "url": "",
85
- "tags": [],
86
- "order": 0,
87
- "included": false,
88
- "direct": false,
89
- "hidden": false,
90
- "print": true,
91
- "required": false,
92
- "recommended": false,
93
- "default": false,
94
- "code": "",
95
- "properties": {
96
- "ignoreQuantity": true
97
- },
98
- "_computed": {
99
- "amount": -2.36,
100
- "description": "$10.00 discount (-$2.36)"
101
- }
102
- }, {
103
- "__typename": "Modifier",
104
- "addModifiers": [],
105
- "delModifiers": [],
106
- "conditions": {
107
- "__typename": "Conditions",
108
- "paymentTypes": ["cash"],
109
- "paymentMethods": [],
110
- "modifiers": [],
111
- "minItemQuantity": 0,
112
- "minItemPieces": 0
113
- },
114
- "compute": {
115
- "__typename": "Compute",
116
- "type": "fixed",
117
- "action": "add",
118
- "amount": 0.48
119
- },
120
- "_createdAt": "2022-11-08T16:09:49.227Z",
121
- "_updatedAt": "2022-11-28T18:44:16.821Z",
122
- "_id": "638f72544dc5daa063e13986",
123
- "modifierId": "636a7f3ec19c040636f3da9a",
124
- "_parentId": "638f72544dc5daa063e13985",
125
- "locked": true,
126
- "name": "Cash fee",
127
- "sku": "",
128
- "description": "",
129
- "group": "",
130
- "type": "fee",
131
- "attributes": [],
132
- "color": "",
133
- "backgroundColor": "",
134
- "icon": "",
135
- "url": "",
136
- "tags": ["default"],
137
- "order": 0,
138
- "included": false,
139
- "direct": false,
140
- "hidden": false,
141
- "print": true,
142
- "required": false,
143
- "recommended": false,
144
- "default": false,
145
- "code": "",
146
- "properties": {
147
- "ignoreQuantity": true
148
- },
149
- "_computed": {
150
- "amount": 0.48,
151
- "description": "Cash fee ($0.48)"
152
- }
153
- }],
154
- "notes": [],
155
- "totalPaid": 8.07,
156
- "status": {
157
- "picked": {
158
- "value": true,
159
- "date": "2022-12-06T16:48:16.800Z"
160
- },
161
- "paid": {
162
- "value": true,
163
- "date": "2022-12-06T16:48:21.864Z"
164
- },
165
- "tracker": []
55
+ },
56
+ "_computed": {
57
+ "amount": 0,
58
+ "description": "Dry Cleaning ($0.00)"
59
+ }
166
60
  },
167
- "_id": "638f7208e6994f736b714de3",
168
- "itemId": "63652e1eed087c0012dbde60",
169
- "name": "Army 2pc Uniform",
170
- "description": null,
171
- "modifiersTotalAmount": 0,
172
- "location": null,
173
- "price": 9.95,
174
- "pieces": 2,
175
- "quantity": 1,
176
- "path": ["menuCategories", "0"],
177
- "menuId": "63652e1faa91c40019649787",
178
- "serial": null,
179
- "sku": null,
180
- "total": 8.07,
181
- "subTotals": {
182
- "_included": 0,
183
- "_xincluded": -1.88,
184
- "_direct": 0,
185
- "_xdirect": -1.88,
186
- "_simple": 9.95,
187
- "_actual": 9.95,
188
- "discount": -2.36,
189
- "fee": 0.48
61
+ {
62
+ "__typename": "Modifier",
63
+ "addModifiers": [],
64
+ "delModifiers": [],
65
+ "conditions": null,
66
+ "compute": {
67
+ "__typename": "Compute",
68
+ "type": "fixed",
69
+ "action": "subtract",
70
+ "amount": 2.36
71
+ },
72
+ "_createdAt": "2022-12-06T16:47:37.671Z",
73
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
74
+ "_id": "638f72294dc5daa063e13981",
75
+ "modifierId": "638f7210e6994f736b714dee",
76
+ "_parentId": "638f7210e6994f736b714dee",
77
+ "locked": false,
78
+ "name": "$10.00 discount",
79
+ "sku": "",
80
+ "description": "",
81
+ "group": "",
82
+ "type": "discount",
83
+ "attributes": [],
84
+ "color": "",
85
+ "backgroundColor": "",
86
+ "icon": "",
87
+ "url": "",
88
+ "tags": [],
89
+ "order": 0,
90
+ "included": false,
91
+ "direct": false,
92
+ "hidden": false,
93
+ "print": true,
94
+ "required": false,
95
+ "recommended": false,
96
+ "default": false,
97
+ "code": "",
98
+ "properties": {
99
+ "ignoreQuantity": true
100
+ },
101
+ "_computed": {
102
+ "amount": -2.36,
103
+ "description": "$10.00 discount (-$2.36)"
104
+ }
190
105
  },
191
- "taxes": [],
192
- "properties": false
193
- }, {
194
- "__typename": "OrderItem",
195
- "modifiers": [{
196
- "__typename": "Modifier",
197
- "addModifiers": [],
198
- "delModifiers": [],
199
- "conditions": null,
200
- "compute": null,
201
- "_createdAt": "2022-12-06T16:47:37.671Z",
202
- "_updatedAt": "2022-12-06T16:47:37.671Z",
203
- "_id": "638f7206e6994f736b714de2",
204
- "modifierId": "63652e1eed087c0012dbddda",
205
- "_parentId": null,
206
- "locked": null,
207
- "name": "Dry Cleaning",
208
- "sku": "",
209
- "description": "",
210
- "group": "",
211
- "type": null,
212
- "attributes": ["department"],
213
- "color": "",
214
- "backgroundColor": null,
215
- "icon": null,
216
- "url": "",
217
- "tags": null,
218
- "order": 1,
219
- "included": false,
220
- "direct": true,
221
- "hidden": true,
222
- "print": false,
223
- "required": true,
224
- "recommended": false,
225
- "default": false,
226
- "code": "D",
227
- "properties": {
228
- "department": {
229
- "tagSize": "Small",
230
- "customerTagsExtend": null,
231
- "maxItems": 4
232
- }
233
- },
234
- "_computed": {
235
- "amount": 0,
236
- "description": "Dry Cleaning ($0.00)"
237
- }
238
- }, {
239
- "__typename": "Modifier",
240
- "addModifiers": [],
241
- "delModifiers": [],
242
- "conditions": null,
243
- "compute": {
244
- "__typename": "Compute",
245
- "type": "fixed",
246
- "action": "subtract",
247
- "amount": 2.23
248
- },
249
- "_createdAt": "2022-12-06T16:47:37.671Z",
250
- "_updatedAt": "2022-12-06T16:47:37.671Z",
251
- "_id": "638f72294dc5daa063e13982",
252
- "modifierId": "638f7210e6994f736b714dee",
253
- "_parentId": "638f7210e6994f736b714dee",
254
- "locked": false,
255
- "name": "$10.00 discount",
256
- "sku": "",
257
- "description": "",
258
- "group": "",
259
- "type": "discount",
260
- "attributes": [],
261
- "color": "",
262
- "backgroundColor": "",
263
- "icon": "",
264
- "url": "",
265
- "tags": [],
266
- "order": 0,
267
- "included": false,
268
- "direct": false,
269
- "hidden": false,
270
- "print": true,
271
- "required": false,
272
- "recommended": false,
273
- "default": false,
274
- "code": "",
275
- "properties": null,
276
- "_computed": {
277
- "amount": -2.23,
278
- "description": "$10.00 discount (-$2.23)"
106
+ {
107
+ "__typename": "Modifier",
108
+ "addModifiers": [],
109
+ "delModifiers": [],
110
+ "conditions": {
111
+ "rules":[
112
+ {
113
+ "key": "paymentTypes",
114
+ "operand": "$in",
115
+ "value": ["cash"]
279
116
  }
280
- }, {
281
- "__typename": "Modifier",
282
- "addModifiers": [],
283
- "delModifiers": [],
284
- "conditions": {
285
- "__typename": "Conditions",
286
- "paymentTypes": ["cash"],
287
- "paymentMethods": [],
288
- "modifiers": [],
289
- "minItemQuantity": 0,
290
- "minItemPieces": 0
291
- },
292
- "compute": {
293
- "__typename": "Compute",
294
- "type": "fixed",
295
- "action": "add",
296
- "amount": 0.44
297
- },
298
- "_createdAt": "2022-11-08T16:09:49.227Z",
299
- "_updatedAt": "2022-11-28T18:44:16.821Z",
300
- "_id": "638f72544dc5daa063e13987",
301
- "modifierId": "636a7f3ec19c040636f3da9a",
302
- "_parentId": "638f72544dc5daa063e13985",
303
- "locked": true,
304
- "name": "Cash fee",
305
- "sku": "",
306
- "description": "",
307
- "group": "",
308
- "type": "fee",
309
- "attributes": [],
310
- "color": "",
311
- "backgroundColor": "",
312
- "icon": "",
313
- "url": "",
314
- "tags": ["default"],
315
- "order": 0,
316
- "included": false,
317
- "direct": false,
318
- "hidden": false,
319
- "print": true,
320
- "required": false,
321
- "recommended": false,
322
- "default": false,
323
- "code": "",
324
- "properties": null,
325
- "_computed": {
326
- "amount": 0.44,
327
- "description": "Cash fee ($0.44)"
328
- }
329
- }],
330
- "notes": [],
331
- "totalPaid": 7.71,
332
- "status": {
333
- "picked": {
334
- "value": true,
335
- "date": "2022-12-06T16:48:16.800Z"
336
- },
337
- "paid": {
338
- "value": true,
339
- "date": "2022-12-06T16:48:21.864Z"
340
- },
341
- "tracker": []
117
+ ]
342
118
  },
343
- "_id": "638f7206e6994f736b714de1",
344
- "itemId": "63652e1eed087c0012dbde61",
345
- "name": "Sport Men's 2pc Suit",
346
- "description": "",
347
- "modifiersTotalAmount": 0,
348
- "location": null,
349
- "price": 9.5,
350
- "pieces": 2,
351
- "quantity": 1,
352
- "path": ["menuCategories", "0"],
353
- "menuId": "63652e1faa91c40019649787",
354
- "serial": null,
355
- "sku": null,
356
- "total": 7.71,
357
- "subTotals": {
358
- "_included": 0,
359
- "_xincluded": -1.79,
360
- "_direct": 0,
361
- "_xdirect": -1.79,
362
- "_simple": 9.5,
363
- "_actual": 9.5,
364
- "discount": -2.23,
365
- "fee": 0.44
119
+ "compute": {
120
+ "__typename": "Compute",
121
+ "type": "fixed",
122
+ "action": "add",
123
+ "amount": 0.48
124
+ },
125
+ "_createdAt": "2022-11-08T16:09:49.227Z",
126
+ "_updatedAt": "2022-11-28T18:44:16.821Z",
127
+ "_id": "638f72544dc5daa063e13986",
128
+ "modifierId": "636a7f3ec19c040636f3da9a",
129
+ "_parentId": "638f72544dc5daa063e13985",
130
+ "locked": true,
131
+ "name": "Cash fee",
132
+ "sku": "",
133
+ "description": "",
134
+ "group": "",
135
+ "type": "fee",
136
+ "attributes": [],
137
+ "color": "",
138
+ "backgroundColor": "",
139
+ "icon": "",
140
+ "url": "",
141
+ "tags": ["default"],
142
+ "order": 0,
143
+ "included": false,
144
+ "direct": false,
145
+ "hidden": false,
146
+ "print": true,
147
+ "required": false,
148
+ "recommended": false,
149
+ "default": false,
150
+ "code": "",
151
+ "properties": {
152
+ "ignoreQuantity": true
153
+ },
154
+ "_computed": {
155
+ "amount": 0.48,
156
+ "description": "Cash fee ($0.48)"
157
+ }
158
+ }
159
+ ],
160
+ "notes": [],
161
+ "totalPaid": 8.07,
162
+ "status": {
163
+ "picked": {
164
+ "value": true,
165
+ "date": "2022-12-06T16:48:16.800Z"
366
166
  },
367
- "taxes": [],
368
- "properties": false
369
- }, {
370
- "__typename": "OrderItem",
371
- "modifiers": [{
372
- "__typename": "Modifier",
373
- "addModifiers": [],
374
- "delModifiers": [],
375
- "conditions": null,
376
- "compute": null,
377
- "_createdAt": "2022-12-06T16:47:37.671Z",
378
- "_updatedAt": "2022-12-06T16:47:37.671Z",
379
- "_id": "638f7206e6994f736b714de0",
380
- "modifierId": "63652e1eed087c0012dbddda",
381
- "_parentId": null,
382
- "locked": null,
383
- "name": "Dry Cleaning",
384
- "sku": "",
385
- "description": "",
386
- "group": "",
387
- "type": null,
388
- "attributes": ["department"],
389
- "color": "",
390
- "backgroundColor": null,
391
- "icon": null,
392
- "url": "",
393
- "tags": null,
394
- "order": 1,
395
- "included": false,
396
- "direct": true,
397
- "hidden": true,
398
- "print": false,
399
- "required": true,
400
- "recommended": false,
401
- "default": false,
402
- "code": "D",
403
- "properties": {
404
- "department": {
405
- "tagSize": "Small",
406
- "customerTagsExtend": null,
407
- "maxItems": 4
408
- }
409
- },
410
- "_computed": {
411
- "amount": 0,
412
- "description": "Dry Cleaning ($0.00)"
413
- }
414
- }, {
415
- "__typename": "Modifier",
416
- "addModifiers": [],
417
- "delModifiers": [],
418
- "conditions": null,
419
- "compute": {
420
- "__typename": "Compute",
421
- "type": "fixed",
422
- "action": "subtract",
423
- "amount": 3.29
424
- },
425
- "_createdAt": "2022-12-06T16:47:37.671Z",
426
- "_updatedAt": "2022-12-06T16:47:37.671Z",
427
- "_id": "638f72294dc5daa063e13983",
428
- "modifierId": "638f7210e6994f736b714dee",
429
- "_parentId": "638f7210e6994f736b714dee",
430
- "locked": false,
431
- "name": "$10.00 discount",
432
- "sku": "",
433
- "description": "",
434
- "group": "",
435
- "type": "discount",
436
- "attributes": [],
437
- "color": "",
438
- "backgroundColor": "",
439
- "icon": "",
440
- "url": "",
441
- "tags": [],
442
- "order": 0,
443
- "included": false,
444
- "direct": false,
445
- "hidden": false,
446
- "print": true,
447
- "required": false,
448
- "recommended": false,
449
- "default": false,
450
- "code": "",
451
- "properties": null,
452
- "_computed": {
453
- "amount": -3.29,
454
- "description": "$10.00 discount (-$3.29)"
455
- }
456
- }, {
457
- "__typename": "Modifier",
458
- "addModifiers": [],
459
- "delModifiers": [],
460
- "conditions": {
461
- "__typename": "Conditions",
462
- "paymentTypes": ["cash"],
463
- "paymentMethods": [],
464
- "modifiers": [],
465
- "minItemQuantity": 0,
466
- "minItemPieces": 0
467
- },
468
- "compute": {
469
- "__typename": "Compute",
470
- "type": "fixed",
471
- "action": "add",
472
- "amount": 0.66
473
- },
474
- "_createdAt": "2022-11-08T16:09:49.227Z",
475
- "_updatedAt": "2022-11-28T18:44:16.821Z",
476
- "_id": "638f72544dc5daa063e13988",
477
- "modifierId": "636a7f3ec19c040636f3da9a",
478
- "_parentId": "638f72544dc5daa063e13985",
479
- "locked": true,
480
- "name": "Cash fee",
481
- "sku": "",
482
- "description": "",
483
- "group": "",
484
- "type": "fee",
485
- "attributes": [],
486
- "color": "",
487
- "backgroundColor": "",
488
- "icon": "",
489
- "url": "",
490
- "tags": ["default"],
491
- "order": 0,
492
- "included": false,
493
- "direct": false,
494
- "hidden": false,
495
- "print": true,
496
- "required": false,
497
- "recommended": false,
498
- "default": false,
499
- "code": "",
500
- "properties": null,
501
- "_computed": {
502
- "amount": 0.66,
503
- "description": "Cash fee ($0.66)"
167
+ "paid": {
168
+ "value": true,
169
+ "date": "2022-12-06T16:48:21.864Z"
170
+ },
171
+ "tracker": []
172
+ },
173
+ "_id": "638f7208e6994f736b714de3",
174
+ "itemId": "63652e1eed087c0012dbde60",
175
+ "name": "Army 2pc Uniform",
176
+ "description": null,
177
+ "modifiersTotalAmount": 0,
178
+ "location": null,
179
+ "price": 9.95,
180
+ "pieces": 2,
181
+ "quantity": 1,
182
+ "path": ["menuCategories", "0"],
183
+ "menuId": "63652e1faa91c40019649787",
184
+ "serial": null,
185
+ "sku": null,
186
+ "total": 8.07,
187
+ "subTotals": {
188
+ "_included": 0,
189
+ "_xincluded": -1.88,
190
+ "_direct": 0,
191
+ "_xdirect": -1.88,
192
+ "_simple": 9.95,
193
+ "_actual": 9.95,
194
+ "discount": -2.36,
195
+ "fee": 0.48
196
+ },
197
+ "taxes": [],
198
+ "properties": false
199
+ },
200
+ {
201
+ "__typename": "OrderItem",
202
+ "modifiers": [
203
+ {
204
+ "__typename": "Modifier",
205
+ "addModifiers": [],
206
+ "delModifiers": [],
207
+ "conditions": null,
208
+ "compute": null,
209
+ "_createdAt": "2022-12-06T16:47:37.671Z",
210
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
211
+ "_id": "638f7206e6994f736b714de2",
212
+ "modifierId": "63652e1eed087c0012dbddda",
213
+ "_parentId": null,
214
+ "locked": null,
215
+ "name": "Dry Cleaning",
216
+ "sku": "",
217
+ "description": "",
218
+ "group": "",
219
+ "type": null,
220
+ "attributes": ["department"],
221
+ "color": "",
222
+ "backgroundColor": null,
223
+ "icon": null,
224
+ "url": "",
225
+ "tags": null,
226
+ "order": 1,
227
+ "included": false,
228
+ "direct": true,
229
+ "hidden": true,
230
+ "print": false,
231
+ "required": true,
232
+ "recommended": false,
233
+ "default": false,
234
+ "code": "D",
235
+ "properties": {
236
+ "department": {
237
+ "tagSize": "Small",
238
+ "customerTagsExtend": null,
239
+ "maxItems": 4
504
240
  }
505
- }],
506
- "notes": [],
507
- "totalPaid": 11.37,
508
- "status": {
509
- "picked": {
510
- "value": true,
511
- "date": "2022-12-06T16:48:16.800Z"
512
- },
513
- "paid": {
514
- "value": true,
515
- "date": "2022-12-06T16:48:21.864Z"
516
- },
517
- "tracker": []
241
+ },
242
+ "_computed": {
243
+ "amount": 0,
244
+ "description": "Dry Cleaning ($0.00)"
245
+ }
518
246
  },
519
- "_id": "638f7206e6994f736b714ddf",
520
- "itemId": "63652e1eed087c0012dbde5f",
521
- "name": "M-L 3pc Suit",
522
- "description": null,
523
- "modifiersTotalAmount": 0,
524
- "location": null,
525
- "price": 14,
526
- "pieces": 3,
527
- "quantity": 1,
528
- "path": ["menuCategories", "0"],
529
- "menuId": "63652e1faa91c40019649787",
530
- "serial": null,
531
- "sku": null,
532
- "total": 11.37,
533
- "subTotals": {
534
- "_included": 0,
535
- "_xincluded": -2.63,
536
- "_direct": 0,
537
- "_xdirect": -2.63,
538
- "_simple": 14,
539
- "_actual": 14,
540
- "discount": -3.29,
541
- "fee": 0.66
247
+ {
248
+ "__typename": "Modifier",
249
+ "addModifiers": [],
250
+ "delModifiers": [],
251
+ "conditions": null,
252
+ "compute": {
253
+ "__typename": "Compute",
254
+ "type": "fixed",
255
+ "action": "subtract",
256
+ "amount": 2.23
257
+ },
258
+ "_createdAt": "2022-12-06T16:47:37.671Z",
259
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
260
+ "_id": "638f72294dc5daa063e13982",
261
+ "modifierId": "638f7210e6994f736b714dee",
262
+ "_parentId": "638f7210e6994f736b714dee",
263
+ "locked": false,
264
+ "name": "$10.00 discount",
265
+ "sku": "",
266
+ "description": "",
267
+ "group": "",
268
+ "type": "discount",
269
+ "attributes": [],
270
+ "color": "",
271
+ "backgroundColor": "",
272
+ "icon": "",
273
+ "url": "",
274
+ "tags": [],
275
+ "order": 0,
276
+ "included": false,
277
+ "direct": false,
278
+ "hidden": false,
279
+ "print": true,
280
+ "required": false,
281
+ "recommended": false,
282
+ "default": false,
283
+ "code": "",
284
+ "properties": null,
285
+ "_computed": {
286
+ "amount": -2.23,
287
+ "description": "$10.00 discount (-$2.23)"
288
+ }
542
289
  },
543
- "taxes": [],
544
- "properties": false
545
- }, {
546
- "__typename": "OrderItem",
547
- "modifiers": [{
548
- "__typename": "Modifier",
549
- "addModifiers": [],
550
- "delModifiers": [],
551
- "conditions": null,
552
- "compute": null,
553
- "_createdAt": "2022-12-06T16:47:37.671Z",
554
- "_updatedAt": "2022-12-06T16:47:37.671Z",
555
- "_id": "638f7205e6994f736b714dde",
556
- "modifierId": "63652e1eed087c0012dbddda",
557
- "_parentId": null,
558
- "locked": null,
559
- "name": "Dry Cleaning",
560
- "sku": "",
561
- "description": "",
562
- "group": "",
563
- "type": null,
564
- "attributes": ["department"],
565
- "color": "",
566
- "backgroundColor": null,
567
- "icon": null,
568
- "url": "",
569
- "tags": null,
570
- "order": 1,
571
- "included": false,
572
- "direct": true,
573
- "hidden": true,
574
- "print": false,
575
- "required": true,
576
- "recommended": false,
577
- "default": false,
578
- "code": "D",
579
- "properties": {
580
- "department": {
581
- "tagSize": "Small",
582
- "customerTagsExtend": null,
583
- "maxItems": 4
584
- }
585
- },
586
- "_computed": {
587
- "amount": 0,
588
- "description": "Dry Cleaning ($0.00)"
589
- }
590
- }, {
591
- "__typename": "Modifier",
592
- "addModifiers": [],
593
- "delModifiers": [],
594
- "conditions": null,
595
- "compute": {
596
- "__typename": "Compute",
597
- "type": "fixed",
598
- "action": "subtract",
599
- "amount": 2.12
600
- },
601
- "_createdAt": "2022-12-06T16:47:37.671Z",
602
- "_updatedAt": "2022-12-06T16:47:37.671Z",
603
- "_id": "638f72294dc5daa063e13984",
604
- "modifierId": "638f7210e6994f736b714dee",
605
- "_parentId": "638f7210e6994f736b714dee",
606
- "locked": false,
607
- "name": "$10.00 discount",
608
- "sku": "",
609
- "description": "",
610
- "group": "",
611
- "type": "discount",
612
- "attributes": [],
613
- "color": "",
614
- "backgroundColor": "",
615
- "icon": "",
616
- "url": "",
617
- "tags": [],
618
- "order": 0,
619
- "included": false,
620
- "direct": false,
621
- "hidden": false,
622
- "print": true,
623
- "required": false,
624
- "recommended": false,
625
- "default": false,
626
- "code": "",
627
- "properties": null,
628
- "_computed": {
629
- "amount": -2.12,
630
- "description": "$10.00 discount (-$2.12)"
631
- }
632
- }, {
633
- "__typename": "Modifier",
634
- "addModifiers": [],
635
- "delModifiers": [],
636
- "conditions": {
637
- "__typename": "Conditions",
638
- "paymentTypes": ["cash"],
639
- "paymentMethods": [],
640
- "modifiers": [],
641
- "minItemQuantity": 0,
642
- "minItemPieces": 0
643
- },
644
- "compute": {
645
- "__typename": "Compute",
646
- "type": "fixed",
647
- "action": "add",
648
- "amount": 0.42
649
- },
650
- "_createdAt": "2022-11-08T16:09:49.227Z",
651
- "_updatedAt": "2022-11-28T18:44:16.821Z",
652
- "_id": "638f72544dc5daa063e13989",
653
- "modifierId": "636a7f3ec19c040636f3da9a",
654
- "_parentId": "638f72544dc5daa063e13985",
655
- "locked": true,
656
- "name": "Cash fee",
657
- "sku": "",
658
- "description": "",
659
- "group": "",
660
- "type": "fee",
661
- "attributes": [],
662
- "color": "",
663
- "backgroundColor": "",
664
- "icon": "",
665
- "url": "",
666
- "tags": ["default"],
667
- "order": 0,
668
- "included": false,
669
- "direct": false,
670
- "hidden": false,
671
- "print": true,
672
- "required": false,
673
- "recommended": false,
674
- "default": false,
675
- "code": "",
676
- "properties": null,
677
- "_computed": {
678
- "amount": 0.42,
679
- "description": "Cash fee ($0.42)"
290
+ {
291
+ "__typename": "Modifier",
292
+ "addModifiers": [],
293
+ "delModifiers": [],
294
+ "conditions": {
295
+ "rules":[
296
+ {
297
+ "key": "paymentTypes",
298
+ "operand": "$in",
299
+ "value": ["cash"]
680
300
  }
681
- }],
682
- "notes": [],
683
- "totalPaid": 6.85,
684
- "status": {
685
- "picked": {
686
- "value": true,
687
- "date": "2022-12-06T16:48:16.800Z"
688
- },
689
- "paid": {
690
- "value": false,
691
- "date": "2022-12-06T16:48:21.864Z"
692
- },
693
- "tracker": []
301
+ ]
694
302
  },
695
- "_id": "638f7205e6994f736b714ddd",
696
- "itemId": "63652e1eed087c0012dbde5e",
697
- "name": "M-L 2pc Suit",
698
- "description": null,
699
- "modifiersTotalAmount": 0,
700
- "location": null,
701
- "price": 9,
702
- "pieces": 2,
703
- "quantity": 1,
704
- "path": ["menuCategories", "0"],
705
- "menuId": "63652e1faa91c40019649787",
706
- "serial": null,
707
- "sku": null,
708
- "total": 7.3,
709
- "subTotals": {
710
- "_included": 0,
711
- "_xincluded": -1.7,
712
- "_direct": 0,
713
- "_xdirect": -1.7,
714
- "_simple": 9,
715
- "_actual": 9,
716
- "discount": -2.12,
717
- "fee": 0.42
303
+ "compute": {
304
+ "__typename": "Compute",
305
+ "type": "fixed",
306
+ "action": "add",
307
+ "amount": 0.44
308
+ },
309
+ "_createdAt": "2022-11-08T16:09:49.227Z",
310
+ "_updatedAt": "2022-11-28T18:44:16.821Z",
311
+ "_id": "638f72544dc5daa063e13987",
312
+ "modifierId": "636a7f3ec19c040636f3da9a",
313
+ "_parentId": "638f72544dc5daa063e13985",
314
+ "locked": true,
315
+ "name": "Cash fee",
316
+ "sku": "",
317
+ "description": "",
318
+ "group": "",
319
+ "type": "fee",
320
+ "attributes": [],
321
+ "color": "",
322
+ "backgroundColor": "",
323
+ "icon": "",
324
+ "url": "",
325
+ "tags": ["default"],
326
+ "order": 0,
327
+ "included": false,
328
+ "direct": false,
329
+ "hidden": false,
330
+ "print": true,
331
+ "required": false,
332
+ "recommended": false,
333
+ "default": false,
334
+ "code": "",
335
+ "properties": null,
336
+ "_computed": {
337
+ "amount": 0.44,
338
+ "description": "Cash fee ($0.44)"
339
+ }
340
+ }
341
+ ],
342
+ "notes": [],
343
+ "totalPaid": 7.71,
344
+ "status": {
345
+ "picked": {
346
+ "value": true,
347
+ "date": "2022-12-06T16:48:16.800Z"
718
348
  },
719
- "taxes": [],
720
- "properties": false
721
- }],
722
- "notes": [{
723
- "__typename": "Note",
724
- "user": {
725
- "__typename": "User",
726
- "_id": "63652e1daa91c400196496e3",
727
- "firstName": "nov4",
728
- "lastName": "nov4"
349
+ "paid": {
350
+ "value": true,
351
+ "date": "2022-12-06T16:48:21.864Z"
729
352
  },
730
- "message": "This order was split from order #193",
731
- "attributes": [],
732
- "name": null,
733
- "type": null,
734
- "date": "2022-12-06T16:47:37.315Z",
735
- "url": ""
736
- }],
737
- "start": {
738
- "__typename": "OrderStart",
739
- "actualDate": "2022-12-06T16:42:12.568Z",
740
- "requestDate": "2022-12-06T16:42:12.568Z",
741
- "location": null
353
+ "tracker": []
354
+ },
355
+ "_id": "638f7206e6994f736b714de1",
356
+ "itemId": "63652e1eed087c0012dbde61",
357
+ "name": "Sport Men's 2pc Suit",
358
+ "description": "",
359
+ "modifiersTotalAmount": 0,
360
+ "location": null,
361
+ "price": 9.5,
362
+ "pieces": 2,
363
+ "quantity": 1,
364
+ "path": ["menuCategories", "0"],
365
+ "menuId": "63652e1faa91c40019649787",
366
+ "serial": null,
367
+ "sku": null,
368
+ "total": 7.71,
369
+ "subTotals": {
370
+ "_included": 0,
371
+ "_xincluded": -1.79,
372
+ "_direct": 0,
373
+ "_xdirect": -1.79,
374
+ "_simple": 9.5,
375
+ "_actual": 9.5,
376
+ "discount": -2.23,
377
+ "fee": 0.44
378
+ },
379
+ "taxes": [],
380
+ "properties": false
742
381
  },
743
- "end": {
744
- "__typename": "OrderEnd",
745
- "actualDate": null,
746
- "requestDate": "2022-12-08T22:00:00.000Z",
747
- "location": {
748
- "name": "nov4",
749
- "locationType": "store",
750
- "storeId": "63652e1ced087c0012dbddc3"
751
- }
752
- },
753
- "customer": {
754
- "__typename": "Customer",
755
- "_id": "637e99678c3a0690e8565397",
756
- "firstName": "Test",
757
- "lastName": "1",
758
- "tags": ["default", "all"],
759
- "notes": [],
760
- "modifiers": [],
761
- "properties": {
762
- "events": [],
763
- "relationships": [{
764
- "name": "dark",
765
- "type": "_company",
766
- "__typename": "Relationship"
767
- }]
382
+ {
383
+ "__typename": "OrderItem",
384
+ "modifiers": [
385
+ {
386
+ "__typename": "Modifier",
387
+ "addModifiers": [],
388
+ "delModifiers": [],
389
+ "conditions": null,
390
+ "compute": null,
391
+ "_createdAt": "2022-12-06T16:47:37.671Z",
392
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
393
+ "_id": "638f7206e6994f736b714de0",
394
+ "modifierId": "63652e1eed087c0012dbddda",
395
+ "_parentId": null,
396
+ "locked": null,
397
+ "name": "Dry Cleaning",
398
+ "sku": "",
399
+ "description": "",
400
+ "group": "",
401
+ "type": null,
402
+ "attributes": ["department"],
403
+ "color": "",
404
+ "backgroundColor": null,
405
+ "icon": null,
406
+ "url": "",
407
+ "tags": null,
408
+ "order": 1,
409
+ "included": false,
410
+ "direct": true,
411
+ "hidden": true,
412
+ "print": false,
413
+ "required": true,
414
+ "recommended": false,
415
+ "default": false,
416
+ "code": "D",
417
+ "properties": {
418
+ "department": {
419
+ "tagSize": "Small",
420
+ "customerTagsExtend": null,
421
+ "maxItems": 4
422
+ }
423
+ },
424
+ "_computed": {
425
+ "amount": 0,
426
+ "description": "Dry Cleaning ($0.00)"
427
+ }
428
+ },
429
+ {
430
+ "__typename": "Modifier",
431
+ "addModifiers": [],
432
+ "delModifiers": [],
433
+ "conditions": null,
434
+ "compute": {
435
+ "__typename": "Compute",
436
+ "type": "fixed",
437
+ "action": "subtract",
438
+ "amount": 3.29
439
+ },
440
+ "_createdAt": "2022-12-06T16:47:37.671Z",
441
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
442
+ "_id": "638f72294dc5daa063e13983",
443
+ "modifierId": "638f7210e6994f736b714dee",
444
+ "_parentId": "638f7210e6994f736b714dee",
445
+ "locked": false,
446
+ "name": "$10.00 discount",
447
+ "sku": "",
448
+ "description": "",
449
+ "group": "",
450
+ "type": "discount",
451
+ "attributes": [],
452
+ "color": "",
453
+ "backgroundColor": "",
454
+ "icon": "",
455
+ "url": "",
456
+ "tags": [],
457
+ "order": 0,
458
+ "included": false,
459
+ "direct": false,
460
+ "hidden": false,
461
+ "print": true,
462
+ "required": false,
463
+ "recommended": false,
464
+ "default": false,
465
+ "code": "",
466
+ "properties": null,
467
+ "_computed": {
468
+ "amount": -3.29,
469
+ "description": "$10.00 discount (-$3.29)"
470
+ }
471
+ },
472
+ {
473
+ "__typename": "Modifier",
474
+ "addModifiers": [],
475
+ "delModifiers": [],
476
+ "conditions": {
477
+ "rules":[
478
+ {
479
+ "key": "paymentTypes",
480
+ "operand": "$in",
481
+ "value": ["cash"]
482
+ }
483
+ ]
484
+ },
485
+ "compute": {
486
+ "__typename": "Compute",
487
+ "type": "fixed",
488
+ "action": "add",
489
+ "amount": 0.66
490
+ },
491
+ "_createdAt": "2022-11-08T16:09:49.227Z",
492
+ "_updatedAt": "2022-11-28T18:44:16.821Z",
493
+ "_id": "638f72544dc5daa063e13988",
494
+ "modifierId": "636a7f3ec19c040636f3da9a",
495
+ "_parentId": "638f72544dc5daa063e13985",
496
+ "locked": true,
497
+ "name": "Cash fee",
498
+ "sku": "",
499
+ "description": "",
500
+ "group": "",
501
+ "type": "fee",
502
+ "attributes": [],
503
+ "color": "",
504
+ "backgroundColor": "",
505
+ "icon": "",
506
+ "url": "",
507
+ "tags": ["default"],
508
+ "order": 0,
509
+ "included": false,
510
+ "direct": false,
511
+ "hidden": false,
512
+ "print": true,
513
+ "required": false,
514
+ "recommended": false,
515
+ "default": false,
516
+ "code": "",
517
+ "properties": null,
518
+ "_computed": {
519
+ "amount": 0.66,
520
+ "description": "Cash fee ($0.66)"
521
+ }
768
522
  }
523
+ ],
524
+ "notes": [],
525
+ "totalPaid": 11.37,
526
+ "status": {
527
+ "picked": {
528
+ "value": true,
529
+ "date": "2022-12-06T16:48:16.800Z"
530
+ },
531
+ "paid": {
532
+ "value": true,
533
+ "date": "2022-12-06T16:48:21.864Z"
534
+ },
535
+ "tracker": []
536
+ },
537
+ "_id": "638f7206e6994f736b714ddf",
538
+ "itemId": "63652e1eed087c0012dbde5f",
539
+ "name": "M-L 3pc Suit",
540
+ "description": null,
541
+ "modifiersTotalAmount": 0,
542
+ "location": null,
543
+ "price": 14,
544
+ "pieces": 3,
545
+ "quantity": 1,
546
+ "path": ["menuCategories", "0"],
547
+ "menuId": "63652e1faa91c40019649787",
548
+ "serial": null,
549
+ "sku": null,
550
+ "total": 11.37,
551
+ "subTotals": {
552
+ "_included": 0,
553
+ "_xincluded": -2.63,
554
+ "_direct": 0,
555
+ "_xdirect": -2.63,
556
+ "_simple": 14,
557
+ "_actual": 14,
558
+ "discount": -3.29,
559
+ "fee": 0.66
560
+ },
561
+ "taxes": [],
562
+ "properties": false
769
563
  },
770
- "modifiers": [{
771
- "__typename": "Modifier",
772
- "addModifiers": [],
773
- "delModifiers": [],
774
- "conditions": null,
775
- "compute": {
564
+ {
565
+ "__typename": "OrderItem",
566
+ "modifiers": [
567
+ {
568
+ "__typename": "Modifier",
569
+ "addModifiers": [],
570
+ "delModifiers": [],
571
+ "conditions": null,
572
+ "compute": null,
573
+ "_createdAt": "2022-12-06T16:47:37.671Z",
574
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
575
+ "_id": "638f7205e6994f736b714dde",
576
+ "modifierId": "63652e1eed087c0012dbddda",
577
+ "_parentId": null,
578
+ "locked": null,
579
+ "name": "Dry Cleaning",
580
+ "sku": "",
581
+ "description": "",
582
+ "group": "",
583
+ "type": null,
584
+ "attributes": ["department"],
585
+ "color": "",
586
+ "backgroundColor": null,
587
+ "icon": null,
588
+ "url": "",
589
+ "tags": null,
590
+ "order": 1,
591
+ "included": false,
592
+ "direct": true,
593
+ "hidden": true,
594
+ "print": false,
595
+ "required": true,
596
+ "recommended": false,
597
+ "default": false,
598
+ "code": "D",
599
+ "properties": {
600
+ "department": {
601
+ "tagSize": "Small",
602
+ "customerTagsExtend": null,
603
+ "maxItems": 4
604
+ }
605
+ },
606
+ "_computed": {
607
+ "amount": 0,
608
+ "description": "Dry Cleaning ($0.00)"
609
+ }
610
+ },
611
+ {
612
+ "__typename": "Modifier",
613
+ "addModifiers": [],
614
+ "delModifiers": [],
615
+ "conditions": null,
616
+ "compute": {
776
617
  "__typename": "Compute",
777
618
  "type": "fixed",
778
619
  "action": "subtract",
779
- "amount": 10
620
+ "amount": 2.12
621
+ },
622
+ "_createdAt": "2022-12-06T16:47:37.671Z",
623
+ "_updatedAt": "2022-12-06T16:47:37.671Z",
624
+ "_id": "638f72294dc5daa063e13984",
625
+ "modifierId": "638f7210e6994f736b714dee",
626
+ "_parentId": "638f7210e6994f736b714dee",
627
+ "locked": false,
628
+ "name": "$10.00 discount",
629
+ "sku": "",
630
+ "description": "",
631
+ "group": "",
632
+ "type": "discount",
633
+ "attributes": [],
634
+ "color": "",
635
+ "backgroundColor": "",
636
+ "icon": "",
637
+ "url": "",
638
+ "tags": [],
639
+ "order": 0,
640
+ "included": false,
641
+ "direct": false,
642
+ "hidden": false,
643
+ "print": true,
644
+ "required": false,
645
+ "recommended": false,
646
+ "default": false,
647
+ "code": "",
648
+ "properties": null,
649
+ "_computed": {
650
+ "amount": -2.12,
651
+ "description": "$10.00 discount (-$2.12)"
652
+ }
780
653
  },
781
- "_createdAt": "2022-12-06T16:48:20.610Z",
782
- "_updatedAt": "2022-12-06T16:48:20.610Z",
783
- "_id": "638f7210e6994f736b714dee",
784
- "modifierId": null,
785
- "_parentId": null,
786
- "locked": false,
787
- "name": "$10.00 discount",
788
- "sku": "",
789
- "description": "",
790
- "group": "",
791
- "type": "discount",
792
- "attributes": [],
793
- "color": "",
794
- "backgroundColor": "",
795
- "icon": "",
796
- "url": "",
797
- "tags": [],
798
- "order": 0,
799
- "included": false,
800
- "direct": true,
801
- "hidden": false,
802
- "print": true,
803
- "required": false,
804
- "recommended": false,
805
- "default": false,
806
- "code": "",
807
- "properties": null,
808
- "_computed": null
809
- }, {
810
- "__typename": "Modifier",
811
- "addModifiers": [],
812
- "delModifiers": [],
813
- "conditions": {
814
- "__typename": "Conditions",
815
- "paymentTypes": ["cash"],
816
- "paymentMethods": [],
817
- "modifiers": [],
818
- "minItemQuantity": 0,
819
- "minItemPieces": 0
654
+ {
655
+ "__typename": "Modifier",
656
+ "addModifiers": [],
657
+ "delModifiers": [],
658
+ "conditions": {
659
+ "rules":[
660
+ {
661
+ "key": "paymentTypes",
662
+ "operand": "$in",
663
+ "value": ["cash"]
664
+ }
665
+ ]
820
666
  },
821
- "compute": {
667
+ "compute": {
822
668
  "__typename": "Compute",
823
669
  "type": "fixed",
824
670
  "action": "add",
825
- "amount": 2
671
+ "amount": 0.42
672
+ },
673
+ "_createdAt": "2022-11-08T16:09:49.227Z",
674
+ "_updatedAt": "2022-11-28T18:44:16.821Z",
675
+ "_id": "638f72544dc5daa063e13989",
676
+ "modifierId": "636a7f3ec19c040636f3da9a",
677
+ "_parentId": "638f72544dc5daa063e13985",
678
+ "locked": true,
679
+ "name": "Cash fee",
680
+ "sku": "",
681
+ "description": "",
682
+ "group": "",
683
+ "type": "fee",
684
+ "attributes": [],
685
+ "color": "",
686
+ "backgroundColor": "",
687
+ "icon": "",
688
+ "url": "",
689
+ "tags": ["default"],
690
+ "order": 0,
691
+ "included": false,
692
+ "direct": false,
693
+ "hidden": false,
694
+ "print": true,
695
+ "required": false,
696
+ "recommended": false,
697
+ "default": false,
698
+ "code": "",
699
+ "properties": null,
700
+ "_computed": {
701
+ "amount": 0.42,
702
+ "description": "Cash fee ($0.42)"
703
+ }
704
+ }
705
+ ],
706
+ "notes": [],
707
+ "totalPaid": 6.85,
708
+ "status": {
709
+ "picked": {
710
+ "value": true,
711
+ "date": "2022-12-06T16:48:16.800Z"
826
712
  },
827
- "_createdAt": "2022-12-06T16:48:20.610Z",
828
- "_updatedAt": "2022-12-06T16:48:20.610Z",
829
- "_id": "638f72544dc5daa063e13985",
830
- "modifierId": "636a7f3ec19c040636f3da9a",
831
- "_parentId": null,
832
- "locked": true,
833
- "name": "Cash fee",
834
- "sku": "",
835
- "description": "",
836
- "group": "",
837
- "type": "fee",
838
- "attributes": [],
839
- "color": "",
840
- "backgroundColor": "",
841
- "icon": "",
842
- "url": "",
843
- "tags": ["default"],
844
- "order": 0,
845
- "included": false,
846
- "direct": true,
847
- "hidden": false,
848
- "print": true,
849
- "required": false,
850
- "recommended": false,
851
- "default": false,
852
- "code": "",
853
- "properties": null,
854
- "_computed": null
855
- }],
856
- "_storeId": "63652e1ced087c0012dbddc3",
857
- "_id": "638f7225e6994f736b714dfd",
858
- "parentId": "638f7200e6994f736b714dcf",
859
- "isParent": false,
860
- "subTotal": 42.45,
861
- "tax": 0,
862
- "discount": 0,
863
- "total": 34.45,
864
- "displayId": "193-1",
865
- "description": "",
866
- "type": "",
867
- "fee": 0,
868
- "location": null,
869
- "status": {
870
- "order": "open",
871
- "kitchen": "open",
872
- "delivery": "none",
873
- "detailed": true,
874
- "fullyPaid": false,
875
- "fullyPicked": true,
876
- "invoice": "partial"
877
- },
878
- "attributes": [],
879
- "properties": {
880
- "notify": {
881
- "sms": false
713
+ "paid": {
714
+ "value": false,
715
+ "date": "2022-12-06T16:48:21.864Z"
882
716
  },
883
- "pieces": [],
884
- "split": "manual"
717
+ "tracker": []
718
+ },
719
+ "_id": "638f7205e6994f736b714ddd",
720
+ "itemId": "63652e1eed087c0012dbde5e",
721
+ "name": "M-L 2pc Suit",
722
+ "description": null,
723
+ "modifiersTotalAmount": 0,
724
+ "location": null,
725
+ "price": 9,
726
+ "pieces": 2,
727
+ "quantity": 1,
728
+ "path": ["menuCategories", "0"],
729
+ "menuId": "63652e1faa91c40019649787",
730
+ "serial": null,
731
+ "sku": null,
732
+ "total": 7.3,
733
+ "subTotals": {
734
+ "_included": 0,
735
+ "_xincluded": -1.7,
736
+ "_direct": 0,
737
+ "_xdirect": -1.7,
738
+ "_simple": 9,
739
+ "_actual": 9,
740
+ "discount": -2.12,
741
+ "fee": 0.42
742
+ },
743
+ "taxes": [],
744
+ "properties": false
745
+ }
746
+ ],
747
+ "notes": [
748
+ {
749
+ "__typename": "Note",
750
+ "user": {
751
+ "__typename": "User",
752
+ "_id": "63652e1daa91c400196496e3",
753
+ "firstName": "nov4",
754
+ "lastName": "nov4"
755
+ },
756
+ "message": "This order was split from order #193",
757
+ "attributes": [],
758
+ "name": null,
759
+ "type": null,
760
+ "date": "2022-12-06T16:47:37.315Z",
761
+ "url": ""
762
+ }
763
+ ],
764
+ "start": {
765
+ "__typename": "OrderStart",
766
+ "actualDate": "2022-12-06T16:42:12.568Z",
767
+ "requestDate": "2022-12-06T16:42:12.568Z",
768
+ "location": null
769
+ },
770
+ "end": {
771
+ "__typename": "OrderEnd",
772
+ "actualDate": null,
773
+ "requestDate": "2022-12-08T22:00:00.000Z",
774
+ "location": {
775
+ "name": "nov4",
776
+ "locationType": "store",
777
+ "storeId": "63652e1ced087c0012dbddc3"
778
+ }
779
+ },
780
+ "customer": {
781
+ "__typename": "Customer",
782
+ "_id": "637e99678c3a0690e8565397",
783
+ "firstName": "Test",
784
+ "lastName": "1",
785
+ "tags": ["default", "all"],
786
+ "notes": [],
787
+ "modifiers": [],
788
+ "properties": {
789
+ "events": [],
790
+ "relationships": [
791
+ {
792
+ "name": "dark",
793
+ "type": "_company",
794
+ "__typename": "Relationship"
795
+ }
796
+ ]
797
+ }
798
+ },
799
+ "modifiers": [
800
+ {
801
+ "__typename": "Modifier",
802
+ "addModifiers": [],
803
+ "delModifiers": [],
804
+ "conditions": null,
805
+ "compute": {
806
+ "__typename": "Compute",
807
+ "type": "fixed",
808
+ "action": "subtract",
809
+ "amount": 10
810
+ },
811
+ "_createdAt": "2022-12-06T16:48:20.610Z",
812
+ "_updatedAt": "2022-12-06T16:48:20.610Z",
813
+ "_id": "638f7210e6994f736b714dee",
814
+ "modifierId": null,
815
+ "_parentId": null,
816
+ "locked": false,
817
+ "name": "$10.00 discount",
818
+ "sku": "",
819
+ "description": "",
820
+ "group": "",
821
+ "type": "discount",
822
+ "attributes": [],
823
+ "color": "",
824
+ "backgroundColor": "",
825
+ "icon": "",
826
+ "url": "",
827
+ "tags": [],
828
+ "order": 0,
829
+ "included": false,
830
+ "direct": true,
831
+ "hidden": false,
832
+ "print": true,
833
+ "required": false,
834
+ "recommended": false,
835
+ "default": false,
836
+ "code": "",
837
+ "properties": null,
838
+ "_computed": null
885
839
  },
886
- "subTotals": {
887
- "discount": -10,
888
- "fee": 2
840
+ {
841
+ "__typename": "Modifier",
842
+ "addModifiers": [],
843
+ "delModifiers": [],
844
+ "conditions": {
845
+ "rules":[
846
+ {
847
+ "key": "paymentTypes",
848
+ "operand": "$in",
849
+ "value": ["cash"]
850
+ }
851
+ ]
852
+ },
853
+ "compute": {
854
+ "__typename": "Compute",
855
+ "type": "fixed",
856
+ "action": "add",
857
+ "amount": 2
858
+ },
859
+ "_createdAt": "2022-12-06T16:48:20.610Z",
860
+ "_updatedAt": "2022-12-06T16:48:20.610Z",
861
+ "_id": "638f72544dc5daa063e13985",
862
+ "modifierId": "636a7f3ec19c040636f3da9a",
863
+ "_parentId": null,
864
+ "locked": true,
865
+ "name": "Cash fee",
866
+ "sku": "",
867
+ "description": "",
868
+ "group": "",
869
+ "type": "fee",
870
+ "attributes": [],
871
+ "color": "",
872
+ "backgroundColor": "",
873
+ "icon": "",
874
+ "url": "",
875
+ "tags": ["default"],
876
+ "order": 0,
877
+ "included": false,
878
+ "direct": true,
879
+ "hidden": false,
880
+ "print": true,
881
+ "required": false,
882
+ "recommended": false,
883
+ "default": false,
884
+ "code": "",
885
+ "properties": null,
886
+ "_computed": null
889
887
  }
888
+ ],
889
+ "_storeId": "63652e1ced087c0012dbddc3",
890
+ "_id": "638f7225e6994f736b714dfd",
891
+ "parentId": "638f7200e6994f736b714dcf",
892
+ "isParent": false,
893
+ "subTotal": 42.45,
894
+ "tax": 0,
895
+ "discount": 0,
896
+ "total": 34.45,
897
+ "displayId": "193-1",
898
+ "description": "",
899
+ "type": "",
900
+ "fee": 0,
901
+ "location": null,
902
+ "status": {
903
+ "order": "open",
904
+ "kitchen": "open",
905
+ "delivery": "none",
906
+ "detailed": true,
907
+ "fullyPaid": false,
908
+ "fullyPicked": true,
909
+ "invoice": "partial"
910
+ },
911
+ "attributes": [],
912
+ "properties": {
913
+ "notify": {
914
+ "sms": false
915
+ },
916
+ "pieces": [],
917
+ "split": "manual"
918
+ },
919
+ "subTotals": {
920
+ "discount": -10,
921
+ "fee": 2
922
+ }
890
923
  }