@harbortouch/skytab-analytics-report-utils 0.5.2 → 0.6.1

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.
package/dist/index.js CHANGED
@@ -1,736 +1,3 @@
1
- // src/report.ts
2
- var Report = {
3
- TICKET_LIVE: "ticket-live",
4
- TICKET_ANALYTICS: "ticket-analytics",
5
- SALES_SUMMARY: "sales-summary",
6
- PRODUCT_MIX: "product-mix",
7
- MODIFIER_MIX: "modifier-mix",
8
- ITEM_TAX: "item-tax",
9
- EMPLOYEE_TIMECARD: "employee-timecard",
10
- EMPLOYEE_TIP: "employee-tip",
11
- SALES_BY_ITEM: "sales-by-item"
12
- };
13
-
14
- // src/columns/index.ts
15
- var COLUMN_REGISTRY = {
16
- fifteenMinInterval: {
17
- titleKey: "common.report-col.fifteen-min-interval",
18
- shortTitleKey: "common.report-col.fifteen-min-interval.short",
19
- infoTextKey: "common.report-col.fifteen-min-interval.info"
20
- },
21
- adjustedTips: {
22
- titleKey: "common.report-col.adjusted-tips",
23
- shortTitleKey: "common.report-col.adjusted-tips.short",
24
- infoTextKey: "common.report-col.adjusted-tips.info"
25
- },
26
- advantageProgram: {
27
- titleKey: "common.report-col.advantage-program",
28
- shortTitleKey: "common.report-col.advantage-program.short",
29
- infoTextKey: "common.report-col.advantage-program.info"
30
- },
31
- amex: {
32
- titleKey: "common.report-col.amex",
33
- shortTitleKey: "common.report-col.amex.short",
34
- infoTextKey: "common.report-col.amex.info"
35
- },
36
- amexReturns: {
37
- titleKey: "common.report-col.amex-returns",
38
- shortTitleKey: "common.report-col.amex-returns.short",
39
- infoTextKey: "common.report-col.amex-returns.info"
40
- },
41
- attachRate: {
42
- titleKey: "common.report-col.attach-rate",
43
- shortTitleKey: "common.report-col.attach-rate.short",
44
- infoTextKey: "common.report-col.attach-rate.info"
45
- },
46
- autoGratuity: {
47
- titleKey: "common.report-col.auto-gratuity",
48
- shortTitleKey: "common.report-col.auto-gratuity.short",
49
- infoTextKey: "common.report-col.auto-gratuity.info"
50
- },
51
- averageGrossPrice: {
52
- titleKey: "common.report-col.average-gross-price",
53
- shortTitleKey: "common.report-col.average-gross-price.short",
54
- infoTextKey: "common.report-col.average-gross-price.info"
55
- },
56
- bankFees: {
57
- titleKey: "common.report-col.bank-fees",
58
- shortTitleKey: "common.report-col.bank-fees.short",
59
- infoTextKey: "common.report-col.bank-fees.info"
60
- },
61
- batchAmount: {
62
- titleKey: "common.report-col.batch-amount",
63
- shortTitleKey: "common.report-col.batch-amount.short",
64
- infoTextKey: "common.report-col.batch-amount.info"
65
- },
66
- batchDate: {
67
- titleKey: "common.report-col.batch-date",
68
- shortTitleKey: "common.report-col.batch-date.short",
69
- infoTextKey: "common.report-col.batch-date.info"
70
- },
71
- batchNumber: {
72
- titleKey: "common.report-col.batch-number",
73
- shortTitleKey: "common.report-col.batch-number.short",
74
- infoTextKey: "common.report-col.batch-number.info"
75
- },
76
- clockInTime: {
77
- titleKey: "common.report-col.clock-in-time",
78
- shortTitleKey: "common.report-col.clock-in-time.short",
79
- infoTextKey: "common.report-col.clock-in-time.info"
80
- },
81
- clockOutTime: {
82
- titleKey: "common.report-col.clock-out-time",
83
- shortTitleKey: "common.report-col.clock-out-time.short",
84
- infoTextKey: "common.report-col.clock-out-time.info"
85
- },
86
- country: {
87
- titleKey: "common.report-col.country",
88
- shortTitleKey: "common.report-col.country.short",
89
- infoTextKey: "common.report-col.country.info"
90
- },
91
- customerName: {
92
- titleKey: "common.report-col.customer-name",
93
- shortTitleKey: "common.report-col.customer-name.short",
94
- infoTextKey: "common.report-col.customer-name.info"
95
- },
96
- date: {
97
- titleKey: "common.report-col.date",
98
- shortTitleKey: "common.report-col.date.short",
99
- infoTextKey: "common.report-col.date.info"
100
- },
101
- dateClose: {
102
- titleKey: "common.report-col.date-close",
103
- shortTitleKey: "common.report-col.date-close.short",
104
- infoTextKey: "common.report-col.date-close.info"
105
- },
106
- daypart: {
107
- titleKey: "common.report-col.daypart",
108
- shortTitleKey: "common.report-col.daypart.short",
109
- infoTextKey: "common.report-col.daypart.info"
110
- },
111
- debit: {
112
- titleKey: "common.report-col.debit",
113
- shortTitleKey: "common.report-col.debit.short",
114
- infoTextKey: "common.report-col.debit.info"
115
- },
116
- debitReturns: {
117
- titleKey: "common.report-col.debit-returns",
118
- shortTitleKey: "common.report-col.debit-returns.short",
119
- infoTextKey: "common.report-col.debit-returns.info"
120
- },
121
- declaredTips: {
122
- titleKey: "common.report-col.declared-tips",
123
- shortTitleKey: "common.report-col.declared-tips.short",
124
- infoTextKey: "common.report-col.declared-tips.info"
125
- },
126
- department: {
127
- titleKey: "common.report-col.department",
128
- shortTitleKey: "common.report-col.department.short",
129
- infoTextKey: "common.report-col.department.info"
130
- },
131
- depositCurrency: {
132
- titleKey: "common.report-col.deposit-currency",
133
- shortTitleKey: "common.report-col.deposit-currency.short",
134
- infoTextKey: "common.report-col.deposit-currency.info"
135
- },
136
- depositDate: {
137
- titleKey: "common.report-col.deposit-date",
138
- shortTitleKey: "common.report-col.deposit-date.short",
139
- infoTextKey: "common.report-col.deposit-date.info"
140
- },
141
- discountAmount: {
142
- titleKey: "common.report-col.discount-amount",
143
- shortTitleKey: "common.report-col.discount-amount.short",
144
- infoTextKey: "common.report-col.discount-amount.info"
145
- },
146
- discountCount: {
147
- titleKey: "common.report-col.discount-count",
148
- shortTitleKey: "common.report-col.discount-count.short",
149
- infoTextKey: "common.report-col.discount-count.info"
150
- },
151
- discover: {
152
- titleKey: "common.report-col.discover",
153
- shortTitleKey: "common.report-col.discover.short",
154
- infoTextKey: "common.report-col.discover.info"
155
- },
156
- discoverReturns: {
157
- titleKey: "common.report-col.discover-returns",
158
- shortTitleKey: "common.report-col.discover-returns.short",
159
- infoTextKey: "common.report-col.discover-returns.info"
160
- },
161
- ebt: {
162
- titleKey: "common.report-col.ebt",
163
- shortTitleKey: "common.report-col.ebt.short",
164
- infoTextKey: "common.report-col.ebt.info"
165
- },
166
- ebtReturns: {
167
- titleKey: "common.report-col.ebt-returns",
168
- shortTitleKey: "common.report-col.ebt-returns.short",
169
- infoTextKey: "common.report-col.ebt-returns.info"
170
- },
171
- employeeId: {
172
- titleKey: "common.report-col.employee-id",
173
- shortTitleKey: "common.report-col.employee-id.short",
174
- infoTextKey: "common.report-col.employee-id.info"
175
- },
176
- employeeJob: {
177
- titleKey: "common.report-col.employee-job",
178
- shortTitleKey: "common.report-col.employee-job.short",
179
- infoTextKey: "common.report-col.employee-job.info"
180
- },
181
- employeeName: {
182
- titleKey: "common.report-col.employee-name",
183
- shortTitleKey: "common.report-col.employee-name.short",
184
- infoTextKey: "common.report-col.employee-name.info"
185
- },
186
- exemptTaxes: {
187
- titleKey: "common.report-col.exempt-taxes",
188
- shortTitleKey: "common.report-col.exempt-taxes.short",
189
- infoTextKey: "common.report-col.exempt-taxes.info"
190
- },
191
- grandTotal: {
192
- titleKey: "common.report-col.grand-total",
193
- shortTitleKey: "common.report-col.grand-total.short",
194
- infoTextKey: "common.report-col.grand-total.info"
195
- },
196
- grossCashSales: {
197
- titleKey: "common.report-col.gross-cash-sales",
198
- shortTitleKey: "common.report-col.gross-cash-sales.short",
199
- infoTextKey: "common.report-col.gross-cash-sales.info"
200
- },
201
- grossCashTips: {
202
- titleKey: "common.report-col.gross-cash-tips",
203
- shortTitleKey: "common.report-col.gross-cash-tips.short",
204
- infoTextKey: "common.report-col.gross-cash-tips.info"
205
- },
206
- grossCreditCardTips: {
207
- titleKey: "common.report-col.gross-credit-card-tips",
208
- shortTitleKey: "common.report-col.gross-credit-card-tips.short",
209
- infoTextKey: "common.report-col.gross-credit-card-tips.info"
210
- },
211
- grossCreditSales: {
212
- titleKey: "common.report-col.gross-credit-sales",
213
- shortTitleKey: "common.report-col.gross-credit-sales.short",
214
- infoTextKey: "common.report-col.gross-credit-sales.info"
215
- },
216
- grossSales: {
217
- titleKey: "common.report-col.gross-sales",
218
- shortTitleKey: "common.report-col.gross-sales.short",
219
- infoTextKey: "common.report-col.gross-sales.info"
220
- },
221
- grossTips: {
222
- titleKey: "common.report-col.gross-tips",
223
- shortTitleKey: "common.report-col.gross-tips.short",
224
- infoTextKey: "common.report-col.gross-tips.info"
225
- },
226
- guestCount: {
227
- titleKey: "common.report-col.guest-count",
228
- shortTitleKey: "common.report-col.guest-count.short",
229
- infoTextKey: "common.report-col.guest-count.info"
230
- },
231
- guestsVarLw: {
232
- titleKey: "common.report-col.guests-var-lw",
233
- shortTitleKey: "common.report-col.guests-var-lw.short",
234
- infoTextKey: "common.report-col.guests-var-lw.info"
235
- },
236
- guestsVarLwPct: {
237
- titleKey: "common.report-col.guests-var-lw-pct",
238
- shortTitleKey: "common.report-col.guests-var-lw-pct.short",
239
- infoTextKey: "common.report-col.guests-var-lw-pct.info"
240
- },
241
- guestsVarLy: {
242
- titleKey: "common.report-col.guests-var-ly",
243
- shortTitleKey: "common.report-col.guests-var-ly.short",
244
- infoTextKey: "common.report-col.guests-var-ly.info"
245
- },
246
- guestsVarLyPct: {
247
- titleKey: "common.report-col.guests-var-ly-pct",
248
- shortTitleKey: "common.report-col.guests-var-ly-pct.short",
249
- infoTextKey: "common.report-col.guests-var-ly-pct.info"
250
- },
251
- hour: {
252
- titleKey: "common.report-col.hour",
253
- shortTitleKey: "common.report-col.hour.short",
254
- infoTextKey: "common.report-col.hour.info"
255
- },
256
- hoursWorked: {
257
- titleKey: "common.report-col.hours-worked",
258
- shortTitleKey: "common.report-col.hours-worked.short",
259
- infoTextKey: "common.report-col.hours-worked.info"
260
- },
261
- inclusiveTax: {
262
- titleKey: "common.report-col.inclusive-tax",
263
- shortTitleKey: "common.report-col.inclusive-tax.short",
264
- infoTextKey: "common.report-col.inclusive-tax.info"
265
- },
266
- itemName: {
267
- titleKey: "common.report-col.item-name",
268
- shortTitleKey: "common.report-col.item-name.short",
269
- infoTextKey: "common.report-col.item-name.info"
270
- },
271
- itemPrice: {
272
- titleKey: "common.report-col.item-price",
273
- shortTitleKey: "common.report-col.item-price.short",
274
- infoTextKey: "common.report-col.item-price.info"
275
- },
276
- locationCity: {
277
- titleKey: "common.report-col.location-city",
278
- shortTitleKey: "common.report-col.location-city.short",
279
- infoTextKey: "common.report-col.location-city.info"
280
- },
281
- locationId: {
282
- titleKey: "common.report-col.location-id",
283
- shortTitleKey: "common.report-col.location-id.short",
284
- infoTextKey: "common.report-col.location-id.info"
285
- },
286
- locationMid: {
287
- titleKey: "common.report-col.location-mid",
288
- shortTitleKey: "common.report-col.location-mid.short",
289
- infoTextKey: "common.report-col.location-mid.info"
290
- },
291
- locationName: {
292
- titleKey: "common.report-col.location-name",
293
- shortTitleKey: "common.report-col.location-name.short",
294
- infoTextKey: "common.report-col.location-name.info"
295
- },
296
- locationState: {
297
- titleKey: "common.report-col.location-state",
298
- shortTitleKey: "common.report-col.location-state.short",
299
- infoTextKey: "common.report-col.location-state.info"
300
- },
301
- mastercard: {
302
- titleKey: "common.report-col.mastercard",
303
- shortTitleKey: "common.report-col.mastercard.short",
304
- infoTextKey: "common.report-col.mastercard.info"
305
- },
306
- mcReturns: {
307
- titleKey: "common.report-col.mc-returns",
308
- shortTitleKey: "common.report-col.mc-returns.short",
309
- infoTextKey: "common.report-col.mc-returns.info"
310
- },
311
- modifierName: {
312
- titleKey: "common.report-col.modifier-name",
313
- shortTitleKey: "common.report-col.modifier-name.short",
314
- infoTextKey: "common.report-col.modifier-name.info"
315
- },
316
- modifierPrice: {
317
- titleKey: "common.report-col.modifier-price",
318
- shortTitleKey: "common.report-col.modifier-price.short",
319
- infoTextKey: "common.report-col.modifier-price.info"
320
- },
321
- modifierQuantity: {
322
- titleKey: "common.report-col.modifier-quantity",
323
- shortTitleKey: "common.report-col.modifier-quantity.short",
324
- infoTextKey: "common.report-col.modifier-quantity.info"
325
- },
326
- netSales: {
327
- titleKey: "common.report-col.net-sales",
328
- shortTitleKey: "common.report-col.net-sales.short",
329
- infoTextKey: "common.report-col.net-sales.info"
330
- },
331
- netTaxCollected: {
332
- titleKey: "common.report-col.net-tax-collected",
333
- shortTitleKey: "common.report-col.net-tax-collected.short",
334
- infoTextKey: "common.report-col.net-tax-collected.info"
335
- },
336
- netTips: {
337
- titleKey: "common.report-col.net-tips",
338
- shortTitleKey: "common.report-col.net-tips.short",
339
- infoTextKey: "common.report-col.net-tips.info"
340
- },
341
- numberOfGuests: {
342
- titleKey: "common.report-col.number-of-guests",
343
- shortTitleKey: "common.report-col.number-of-guests.short",
344
- infoTextKey: "common.report-col.number-of-guests.info"
345
- },
346
- orderType: {
347
- titleKey: "common.report-col.order-type",
348
- shortTitleKey: "common.report-col.order-type.short",
349
- infoTextKey: "common.report-col.order-type.info"
350
- },
351
- paymentType: {
352
- titleKey: "common.report-col.payment-type",
353
- shortTitleKey: "common.report-col.payment-type.short",
354
- infoTextKey: "common.report-col.payment-type.info"
355
- },
356
- payrollId: {
357
- titleKey: "common.report-col.payroll-id",
358
- shortTitleKey: "common.report-col.payroll-id.short",
359
- infoTextKey: "common.report-col.payroll-id.info"
360
- },
361
- quantity: {
362
- titleKey: "common.report-col.quantity",
363
- shortTitleKey: "common.report-col.quantity.short",
364
- infoTextKey: "common.report-col.quantity.info"
365
- },
366
- referenceNumber: {
367
- titleKey: "common.report-col.reference-number",
368
- shortTitleKey: "common.report-col.reference-number.short",
369
- infoTextKey: "common.report-col.reference-number.info"
370
- },
371
- refundAmount: {
372
- titleKey: "common.report-col.refund-amount",
373
- shortTitleKey: "common.report-col.refund-amount.short",
374
- infoTextKey: "common.report-col.refund-amount.info"
375
- },
376
- refundedTaxAmount: {
377
- titleKey: "common.report-col.refunded-tax-amount",
378
- shortTitleKey: "common.report-col.refunded-tax-amount.short",
379
- infoTextKey: "common.report-col.refunded-tax-amount.info"
380
- },
381
- revenueCenter: {
382
- titleKey: "common.report-col.revenue-center",
383
- shortTitleKey: "common.report-col.revenue-center.short",
384
- infoTextKey: "common.report-col.revenue-center.info"
385
- },
386
- revenueClass: {
387
- titleKey: "common.report-col.revenue-class",
388
- shortTitleKey: "common.report-col.revenue-class.short",
389
- infoTextKey: "common.report-col.revenue-class.info"
390
- },
391
- salesVarLw: {
392
- titleKey: "common.report-col.sales-var-lw",
393
- shortTitleKey: "common.report-col.sales-var-lw.short",
394
- infoTextKey: "common.report-col.sales-var-lw.info"
395
- },
396
- salesVarLwPct: {
397
- titleKey: "common.report-col.sales-var-lw-pct",
398
- shortTitleKey: "common.report-col.sales-var-lw-pct.short",
399
- infoTextKey: "common.report-col.sales-var-lw-pct.info"
400
- },
401
- salesVarLy: {
402
- titleKey: "common.report-col.sales-var-ly",
403
- shortTitleKey: "common.report-col.sales-var-ly.short",
404
- infoTextKey: "common.report-col.sales-var-ly.info"
405
- },
406
- salesVarLyPct: {
407
- titleKey: "common.report-col.sales-var-ly-pct",
408
- shortTitleKey: "common.report-col.sales-var-ly-pct.short",
409
- infoTextKey: "common.report-col.sales-var-ly-pct.info"
410
- },
411
- salesMixByPct: {
412
- titleKey: "common.report-col.sales-mix-by-pct",
413
- shortTitleKey: "common.report-col.sales-mix-by-pct.short",
414
- infoTextKey: "common.report-col.sales-mix-by-pct.info"
415
- },
416
- salesPerGuest: {
417
- titleKey: "common.report-col.sales-per-guest",
418
- shortTitleKey: "common.report-col.sales-per-guest.short",
419
- infoTextKey: "common.report-col.sales-per-guest.info"
420
- },
421
- salesPerGuestLw: {
422
- titleKey: "common.report-col.sales-per-guest-lw",
423
- shortTitleKey: "common.report-col.sales-per-guest-lw.short",
424
- infoTextKey: "common.report-col.sales-per-guest-lw.info"
425
- },
426
- salesPerGuestLy: {
427
- titleKey: "common.report-col.sales-per-guest-ly",
428
- shortTitleKey: "common.report-col.sales-per-guest-ly.short",
429
- infoTextKey: "common.report-col.sales-per-guest-ly.info"
430
- },
431
- scheduledShiftEnd: {
432
- titleKey: "common.report-col.scheduled-shift-end",
433
- shortTitleKey: "common.report-col.scheduled-shift-end.short",
434
- infoTextKey: "common.report-col.scheduled-shift-end.info"
435
- },
436
- scheduledShiftStart: {
437
- titleKey: "common.report-col.scheduled-shift-start",
438
- shortTitleKey: "common.report-col.scheduled-shift-start.short",
439
- infoTextKey: "common.report-col.scheduled-shift-start.info"
440
- },
441
- settlementBatchDate: {
442
- titleKey: "common.report-col.settlement-batch-date",
443
- shortTitleKey: "common.report-col.settlement-batch-date.short",
444
- infoTextKey: "common.report-col.settlement-batch-date.info"
445
- },
446
- shiftDurationHrs: {
447
- titleKey: "common.report-col.shift-duration-hrs",
448
- shortTitleKey: "common.report-col.shift-duration-hrs.short",
449
- infoTextKey: "common.report-col.shift-duration-hrs.info"
450
- },
451
- salePaymentType: {
452
- titleKey: "common.report-col.sale-payment-type",
453
- shortTitleKey: "common.report-col.sale-payment-type.short",
454
- infoTextKey: "common.report-col.sale-payment-type.info"
455
- },
456
- status: {
457
- titleKey: "common.report-col.status",
458
- shortTitleKey: "common.report-col.status.short",
459
- infoTextKey: "common.report-col.status.info"
460
- },
461
- subtotal: {
462
- titleKey: "common.report-col.subtotal",
463
- shortTitleKey: "common.report-col.subtotal.short",
464
- infoTextKey: "common.report-col.subtotal.info"
465
- },
466
- taxCollected: {
467
- titleKey: "common.report-col.tax-collected",
468
- shortTitleKey: "common.report-col.tax-collected.short",
469
- infoTextKey: "common.report-col.tax-collected.info"
470
- },
471
- taxName: {
472
- titleKey: "common.report-col.tax-name",
473
- shortTitleKey: "common.report-col.tax-name.short",
474
- infoTextKey: "common.report-col.tax-name.info"
475
- },
476
- taxRate: {
477
- titleKey: "common.report-col.tax-rate",
478
- shortTitleKey: "common.report-col.tax-rate.short",
479
- infoTextKey: "common.report-col.tax-rate.info"
480
- },
481
- taxableSales: {
482
- titleKey: "common.report-col.taxable-sales",
483
- shortTitleKey: "common.report-col.taxable-sales.short",
484
- infoTextKey: "common.report-col.taxable-sales.info"
485
- },
486
- ticketClosed: {
487
- titleKey: "common.report-col.ticket-closed",
488
- shortTitleKey: "common.report-col.ticket-closed.short",
489
- infoTextKey: "common.report-col.ticket-closed.info"
490
- },
491
- ticketFee: {
492
- titleKey: "common.report-col.ticket-fee",
493
- shortTitleKey: "common.report-col.ticket-fee.short",
494
- infoTextKey: "common.report-col.ticket-fee.info"
495
- },
496
- ticketNumber: {
497
- titleKey: "common.report-col.ticket-number",
498
- shortTitleKey: "common.report-col.ticket-number.short",
499
- infoTextKey: "common.report-col.ticket-number.info"
500
- },
501
- ticketOpen: {
502
- titleKey: "common.report-col.ticket-open",
503
- shortTitleKey: "common.report-col.ticket-open.short",
504
- infoTextKey: "common.report-col.ticket-open.info"
505
- },
506
- ticketTotal: {
507
- titleKey: "common.report-col.ticket-total",
508
- shortTitleKey: "common.report-col.ticket-total.short",
509
- infoTextKey: "common.report-col.ticket-total.info"
510
- },
511
- timeOpenMins: {
512
- titleKey: "common.report-col.time-open-mins",
513
- shortTitleKey: "common.report-col.time-open-mins.short",
514
- infoTextKey: "common.report-col.time-open-mins.info"
515
- },
516
- tipPct: {
517
- titleKey: "common.report-col.tip-pct",
518
- shortTitleKey: "common.report-col.tip-pct.short",
519
- infoTextKey: "common.report-col.tip-pct.info"
520
- },
521
- tipReduction: {
522
- titleKey: "common.report-col.tip-reduction",
523
- shortTitleKey: "common.report-col.tip-reduction.short",
524
- infoTextKey: "common.report-col.tip-reduction.info"
525
- },
526
- tipShare: {
527
- titleKey: "common.report-col.tip-share",
528
- shortTitleKey: "common.report-col.tip-share.short",
529
- infoTextKey: "common.report-col.tip-share.info"
530
- },
531
- tips: {
532
- titleKey: "common.report-col.tips",
533
- shortTitleKey: "common.report-col.tips.short",
534
- infoTextKey: "common.report-col.tips.info"
535
- },
536
- tipsPerHour: {
537
- titleKey: "common.report-col.tips-per-hour",
538
- shortTitleKey: "common.report-col.tips-per-hour.short",
539
- infoTextKey: "common.report-col.tips-per-hour.info"
540
- },
541
- totalCollected: {
542
- titleKey: "common.report-col.total-collected",
543
- shortTitleKey: "common.report-col.total-collected.short",
544
- infoTextKey: "common.report-col.total-collected.info"
545
- },
546
- totalItemSales: {
547
- titleKey: "common.report-col.total-item-sales",
548
- shortTitleKey: "common.report-col.total-item-sales.short",
549
- infoTextKey: "common.report-col.total-item-sales.info"
550
- },
551
- totalModifierSales: {
552
- titleKey: "common.report-col.total-modifier-sales",
553
- shortTitleKey: "common.report-col.total-modifier-sales.short",
554
- infoTextKey: "common.report-col.total-modifier-sales.info"
555
- },
556
- totalReturns: {
557
- titleKey: "common.report-col.total-returns",
558
- shortTitleKey: "common.report-col.total-returns.short",
559
- infoTextKey: "common.report-col.total-returns.info"
560
- },
561
- totalSales: {
562
- titleKey: "common.report-col.total-sales",
563
- shortTitleKey: "common.report-col.total-sales.short",
564
- infoTextKey: "common.report-col.total-sales.info"
565
- },
566
- totalTips: {
567
- titleKey: "common.report-col.total-tips",
568
- shortTitleKey: "common.report-col.total-tips.short",
569
- infoTextKey: "common.report-col.total-tips.info"
570
- },
571
- transactionDate: {
572
- titleKey: "common.report-col.transaction-date",
573
- shortTitleKey: "common.report-col.transaction-date.short",
574
- infoTextKey: "common.report-col.transaction-date.info"
575
- },
576
- transactionType: {
577
- titleKey: "common.report-col.transaction-type",
578
- shortTitleKey: "common.report-col.transaction-type.short",
579
- infoTextKey: "common.report-col.transaction-type.info"
580
- },
581
- untaxedSales: {
582
- titleKey: "common.report-col.untaxed-sales",
583
- shortTitleKey: "common.report-col.untaxed-sales.short",
584
- infoTextKey: "common.report-col.untaxed-sales.info"
585
- },
586
- visa: {
587
- titleKey: "common.report-col.visa",
588
- shortTitleKey: "common.report-col.visa.short",
589
- infoTextKey: "common.report-col.visa.info"
590
- },
591
- visaReturns: {
592
- titleKey: "common.report-col.visa-returns",
593
- shortTitleKey: "common.report-col.visa-returns.short",
594
- infoTextKey: "common.report-col.visa-returns.info"
595
- },
596
- paymentsCount: {
597
- titleKey: "common.report-col.payments-count",
598
- shortTitleKey: "common.report-col.payments-count.short",
599
- infoTextKey: "common.report-col.payments-count.info"
600
- },
601
- paymentsAmount: {
602
- titleKey: "common.report-col.payments-amount",
603
- shortTitleKey: "common.report-col.payments-amount.short",
604
- infoTextKey: "common.report-col.payments-amount.info"
605
- },
606
- paymentsTotal: {
607
- titleKey: "common.report-col.payments-total",
608
- shortTitleKey: "common.report-col.payments-total.short",
609
- infoTextKey: "common.report-col.payments-total.info"
610
- },
611
- refundVoidDescription: {
612
- titleKey: "common.report-col.refund-void-description",
613
- shortTitleKey: "common.report-col.refund-void-description.short",
614
- infoTextKey: "common.report-col.refund-void-description.info"
615
- },
616
- refundVoidCount: {
617
- titleKey: "common.report-col.refund-void-count",
618
- shortTitleKey: "common.report-col.refund-void-count.short",
619
- infoTextKey: "common.report-col.refund-void-count.info"
620
- },
621
- refundVoidAmount: {
622
- titleKey: "common.report-col.refund-void-amount",
623
- shortTitleKey: "common.report-col.refund-void-amount.short",
624
- infoTextKey: "common.report-col.refund-void-amount.info"
625
- },
626
- refundVoidPctSales: {
627
- titleKey: "common.report-col.refund-void-pct-sales",
628
- shortTitleKey: "common.report-col.refund-void-pct-sales.short",
629
- infoTextKey: "common.report-col.refund-void-pct-sales.info"
630
- },
631
- discountName: {
632
- titleKey: "common.report-col.discount-name",
633
- shortTitleKey: "common.report-col.discount-name.short",
634
- infoTextKey: "common.report-col.discount-name.info"
635
- },
636
- tickets: {
637
- titleKey: "common.report-col.tickets",
638
- shortTitleKey: "common.report-col.tickets.short",
639
- infoTextKey: "common.report-col.tickets.info"
640
- },
641
- guests: {
642
- titleKey: "common.report-col.guests",
643
- shortTitleKey: "common.report-col.guests.short",
644
- infoTextKey: "common.report-col.guests.info"
645
- },
646
- ticketAverage: {
647
- titleKey: "common.report-col.ticket-average",
648
- shortTitleKey: "common.report-col.ticket-average.short",
649
- infoTextKey: "common.report-col.ticket-average.info"
650
- },
651
- guestAverage: {
652
- titleKey: "common.report-col.guest-average",
653
- shortTitleKey: "common.report-col.guest-average.short",
654
- infoTextKey: "common.report-col.guest-average.info"
655
- },
656
- net: {
657
- titleKey: "common.report-col.net",
658
- shortTitleKey: "common.report-col.net.short",
659
- infoTextKey: "common.report-col.net.info"
660
- }
661
- };
662
- function getColumnMetadata(key) {
663
- return COLUMN_REGISTRY[key];
664
- }
665
-
666
- // src/utils/alignment.ts
667
- function getColumnAlignment(type) {
668
- if (type === "string" || type === "date" || type === "time") {
669
- return "left";
670
- }
671
- return "right";
672
- }
673
- function isNumericType(type) {
674
- return type === "money" || type === "number" || type === "percent" || type === "fixedNumber";
675
- }
676
-
677
- // src/totals.ts
678
- function calculateReportTotals(data, fieldConfig, opts) {
679
- const rows = data;
680
- const { labelField, label } = opts;
681
- const fieldsToSum = /* @__PURE__ */ new Set();
682
- const derivedFields = [];
683
- for (const [field, config] of Object.entries(fieldConfig)) {
684
- const { type, columnKey, footerCalculation: calc } = config;
685
- if (!type || type === "string" || type === "date" || type === "time" || type === "boolean") {
686
- continue;
687
- }
688
- if (calc?.type === "none") {
689
- } else if (!calc || calc.type === "sum") {
690
- if (columnKey || calc?.type === "sum") {
691
- fieldsToSum.add(field);
692
- }
693
- } else {
694
- derivedFields.push({ field, calc });
695
- if (calc.numeratorField) fieldsToSum.add(calc.numeratorField);
696
- if (calc.denominatorField) fieldsToSum.add(calc.denominatorField);
697
- }
698
- }
699
- const sums = {};
700
- for (const field of fieldsToSum) {
701
- sums[field] = rows.reduce((acc, row) => acc + (row[field] ?? 0), 0);
702
- }
703
- const derived = {};
704
- for (const { field, calc } of derivedFields) {
705
- const num = sums[calc.numeratorField ?? ""] ?? 0;
706
- const den = sums[calc.denominatorField ?? ""] ?? 0;
707
- if (calc.type === "percentChange") {
708
- derived[field] = den ? (num - den) / den : 0;
709
- } else if (calc.type === "average") {
710
- derived[field] = den > 0 ? num / den : 0;
711
- }
712
- }
713
- const result = {};
714
- for (const [field, config] of Object.entries(fieldConfig)) {
715
- const { type } = config;
716
- if (!type || type === "string" || type === "date" || type === "time") {
717
- result[field] = "";
718
- } else if (type === "boolean") {
719
- result[field] = false;
720
- } else {
721
- result[field] = 0;
722
- }
723
- }
724
- result[labelField] = label;
725
- for (const [field, value] of Object.entries(sums)) {
726
- result[field] = value;
727
- }
728
- for (const [field, value] of Object.entries(derived)) {
729
- result[field] = value;
730
- }
731
- return result;
732
- }
733
-
734
1
  // src/reports/salesSummary.ts
735
2
  var FIRST_COLUMN_WIDTH = 240;
736
3
  var FIELDS = {
@@ -1317,54 +584,14 @@ var dailySalesDiscountsConfig = {
1317
584
  defaultVisibleColumns: DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS
1318
585
  };
1319
586
 
1320
- // src/reports/dailySalesRefundsVoids.ts
1321
- var FIRST_COLUMN_WIDTH7 = 240;
1322
- var FIELDS10 = {
1323
- description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH7 },
1324
- count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1325
- amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
1326
- pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
1327
- };
1328
- var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
1329
- "count",
1330
- "amount",
1331
- "pctSales"
1332
- ];
1333
- var DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS;
1334
- var dailySalesRefundsVoidsConfig = {
1335
- fields: FIELDS10,
1336
- availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1337
- defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS
1338
- };
1339
-
1340
- // src/reports/dailySalesTaxes.ts
1341
- var FIRST_COLUMN_WIDTH8 = 240;
1342
- var FIELDS11 = {
1343
- taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH8 },
1344
- taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
1345
- taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
1346
- exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
1347
- };
1348
- var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
1349
- "taxableSales",
1350
- "taxesAmount",
1351
- "exemptSales"
1352
- ];
1353
- var DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_TAXES_AVAILABLE_COLUMNS;
1354
- var dailySalesTaxesConfig = {
1355
- fields: FIELDS11,
1356
- availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1357
- defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
1358
- };
1359
-
1360
587
  // src/reports/employeeTimecard.ts
1361
- var FIRST_COLUMN_WIDTH9 = 240;
588
+ var FIRST_COLUMN_WIDTH7 = 240;
1362
589
  var EMPLOYEE_NAME_WIDTH = 220;
1363
590
  var STATUS_WIDTH = 140;
1364
591
  var LOOKUP_WIDTH = 160;
1365
592
  var PAYROLL_WIDTH = 160;
1366
593
  var JOB_WIDTH = 200;
1367
- var FIELDS12 = {
594
+ var FIELDS10 = {
1368
595
  locationId: {
1369
596
  type: "number",
1370
597
  enableSorting: false,
@@ -1372,7 +599,7 @@ var FIELDS12 = {
1372
599
  },
1373
600
  locationName: {
1374
601
  type: "string",
1375
- size: FIRST_COLUMN_WIDTH9,
602
+ size: FIRST_COLUMN_WIDTH7,
1376
603
  columnKey: "locationName"
1377
604
  },
1378
605
  businessDate: {
@@ -1439,7 +666,7 @@ var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
1439
666
  ];
1440
667
  var EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS = EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS;
1441
668
  var employeeTimecardConfig = {
1442
- fields: FIELDS12,
669
+ fields: FIELDS10,
1443
670
  availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
1444
671
  defaultVisibleColumns: EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
1445
672
  columnGroups: []
@@ -1447,7 +674,7 @@ var employeeTimecardConfig = {
1447
674
  };
1448
675
 
1449
676
  // src/reports/salesByItemDetail.ts
1450
- var FIELDS13 = {
677
+ var FIELDS11 = {
1451
678
  businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
1452
679
  ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1453
680
  hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
@@ -1489,12 +716,144 @@ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
1489
716
  ];
1490
717
  var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
1491
718
  var salesByItemDetailConfig = {
1492
- fields: FIELDS13,
719
+ fields: FIELDS11,
1493
720
  availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1494
721
  defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
1495
722
  };
723
+
724
+ // src/report.ts
725
+ var Report = {
726
+ TICKET_LIVE: "ticket-live",
727
+ TICKET_ANALYTICS: "ticket-analytics",
728
+ SALES_SUMMARY: "sales-summary",
729
+ PRODUCT_MIX: "product-mix",
730
+ MODIFIER_MIX: "modifier-mix",
731
+ ITEM_TAX: "item-tax",
732
+ EMPLOYEE_TIMECARD: "employee-timecard",
733
+ EMPLOYEE_TIP: "employee-tip",
734
+ SALES_BY_ITEM: "sales-by-item"
735
+ };
736
+ var REPORT_CONFIG_MAP = {
737
+ "sales-summary": salesSummaryConfig,
738
+ "ticket-analytics": ticketSummaryConfig,
739
+ "ticket-live": ticketLiveConfig,
740
+ "product-mix": productMixConfig,
741
+ "modifier-mix": modifierMixConfig,
742
+ "item-tax": itemTaxConfig,
743
+ "employee-timecard": employeeTimecardConfig,
744
+ "employee-tip": null,
745
+ "sales-by-item": salesByItemDetailConfig
746
+ };
747
+ var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
748
+
749
+ // src/utils/alignment.ts
750
+ function getColumnAlignment(type) {
751
+ if (type === "string" || type === "date" || type === "time") {
752
+ return "left";
753
+ }
754
+ return "right";
755
+ }
756
+ function isNumericType(type) {
757
+ return type === "money" || type === "number" || type === "percent" || type === "fixedNumber";
758
+ }
759
+
760
+ // src/totals.ts
761
+ function calculateReportTotals(data, fieldConfig, opts) {
762
+ const rows = data;
763
+ const { labelField, label } = opts;
764
+ const fieldsToSum = /* @__PURE__ */ new Set();
765
+ const derivedFields = [];
766
+ for (const [field, config] of Object.entries(fieldConfig)) {
767
+ const { type, columnKey, footerCalculation: calc } = config;
768
+ if (!type || type === "string" || type === "date" || type === "time" || type === "boolean") {
769
+ continue;
770
+ }
771
+ if (calc?.type === "none") {
772
+ } else if (!calc || calc.type === "sum") {
773
+ if (columnKey || calc?.type === "sum") {
774
+ fieldsToSum.add(field);
775
+ }
776
+ } else {
777
+ derivedFields.push({ field, calc });
778
+ if (calc.numeratorField) fieldsToSum.add(calc.numeratorField);
779
+ if (calc.denominatorField) fieldsToSum.add(calc.denominatorField);
780
+ }
781
+ }
782
+ const sums = {};
783
+ for (const field of fieldsToSum) {
784
+ sums[field] = rows.reduce((acc, row) => acc + (row[field] ?? 0), 0);
785
+ }
786
+ const derived = {};
787
+ for (const { field, calc } of derivedFields) {
788
+ const num = sums[calc.numeratorField ?? ""] ?? 0;
789
+ const den = sums[calc.denominatorField ?? ""] ?? 0;
790
+ if (calc.type === "percentChange") {
791
+ derived[field] = den ? (num - den) / den : 0;
792
+ } else if (calc.type === "average") {
793
+ derived[field] = den > 0 ? num / den : 0;
794
+ }
795
+ }
796
+ const result = {};
797
+ for (const [field, config] of Object.entries(fieldConfig)) {
798
+ const { type } = config;
799
+ if (!type || type === "string" || type === "date" || type === "time") {
800
+ result[field] = "";
801
+ } else if (type === "boolean") {
802
+ result[field] = false;
803
+ } else {
804
+ result[field] = 0;
805
+ }
806
+ }
807
+ result[labelField] = label;
808
+ for (const [field, value] of Object.entries(sums)) {
809
+ result[field] = value;
810
+ }
811
+ for (const [field, value] of Object.entries(derived)) {
812
+ result[field] = value;
813
+ }
814
+ return result;
815
+ }
816
+
817
+ // src/reports/dailySalesRefundsVoids.ts
818
+ var FIRST_COLUMN_WIDTH8 = 240;
819
+ var FIELDS12 = {
820
+ description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH8 },
821
+ count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
822
+ amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
823
+ pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
824
+ };
825
+ var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
826
+ "count",
827
+ "amount",
828
+ "pctSales"
829
+ ];
830
+ var DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS;
831
+ var dailySalesRefundsVoidsConfig = {
832
+ fields: FIELDS12,
833
+ availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
834
+ defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS
835
+ };
836
+
837
+ // src/reports/dailySalesTaxes.ts
838
+ var FIRST_COLUMN_WIDTH9 = 240;
839
+ var FIELDS13 = {
840
+ taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH9 },
841
+ taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
842
+ taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
843
+ exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
844
+ };
845
+ var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
846
+ "taxableSales",
847
+ "taxesAmount",
848
+ "exemptSales"
849
+ ];
850
+ var DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_TAXES_AVAILABLE_COLUMNS;
851
+ var dailySalesTaxesConfig = {
852
+ fields: FIELDS13,
853
+ availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
854
+ defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
855
+ };
1496
856
  export {
1497
- COLUMN_REGISTRY,
1498
857
  DAILY_SALES_AVAILABLE_COLUMNS,
1499
858
  DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
1500
859
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
@@ -1534,7 +893,7 @@ export {
1534
893
  dailySalesTrendsConfig,
1535
894
  employeeTimecardConfig,
1536
895
  getColumnAlignment,
1537
- getColumnMetadata,
896
+ getReportConfig,
1538
897
  isNumericType,
1539
898
  itemTaxConfig,
1540
899
  modifierMixConfig,