@harbortouch/skytab-analytics-report-utils 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,1167 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ COLUMN_REGISTRY: () => COLUMN_REGISTRY,
24
+ ITEM_TAX_AVAILABLE_COLUMNS: () => ITEM_TAX_AVAILABLE_COLUMNS,
25
+ ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: () => ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
26
+ MODIFIER_MIX_AVAILABLE_COLUMNS: () => MODIFIER_MIX_AVAILABLE_COLUMNS,
27
+ MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS: () => MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS,
28
+ PRODUCT_MIX_AVAILABLE_COLUMNS: () => PRODUCT_MIX_AVAILABLE_COLUMNS,
29
+ PRODUCT_MIX_CHART_FIELDS: () => PRODUCT_MIX_CHART_FIELDS,
30
+ PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS: () => PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
31
+ SALES_SUMMARY_AVAILABLE_COLUMNS: () => SALES_SUMMARY_AVAILABLE_COLUMNS,
32
+ SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS: () => SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
33
+ TICKET_LIVE_AVAILABLE_COLUMNS: () => TICKET_LIVE_AVAILABLE_COLUMNS,
34
+ TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS: () => TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS,
35
+ TICKET_SUMMARY_AVAILABLE_COLUMNS: () => TICKET_SUMMARY_AVAILABLE_COLUMNS,
36
+ TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS: () => TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
37
+ calculateReportTotals: () => calculateReportTotals,
38
+ getColumnAlignment: () => getColumnAlignment,
39
+ getColumnMetadata: () => getColumnMetadata,
40
+ isNumericType: () => isNumericType,
41
+ itemTaxConfig: () => itemTaxConfig,
42
+ modifierMixConfig: () => modifierMixConfig,
43
+ productMixConfig: () => productMixConfig,
44
+ salesSummaryConfig: () => salesSummaryConfig,
45
+ ticketLiveConfig: () => ticketLiveConfig,
46
+ ticketSummaryConfig: () => ticketSummaryConfig
47
+ });
48
+ module.exports = __toCommonJS(index_exports);
49
+
50
+ // src/columns/index.ts
51
+ var COLUMN_REGISTRY = {
52
+ fifteenMinInterval: {
53
+ titleKey: "common.report-col.fifteen-min-interval",
54
+ shortTitleKey: "common.report-col.fifteen-min-interval.short",
55
+ infoTextKey: "common.report-col.fifteen-min-interval.info"
56
+ },
57
+ adjustedTips: {
58
+ titleKey: "common.report-col.adjusted-tips",
59
+ shortTitleKey: "common.report-col.adjusted-tips.short",
60
+ infoTextKey: "common.report-col.adjusted-tips.info"
61
+ },
62
+ advantageProgram: {
63
+ titleKey: "common.report-col.advantage-program",
64
+ shortTitleKey: "common.report-col.advantage-program.short",
65
+ infoTextKey: "common.report-col.advantage-program.info"
66
+ },
67
+ amex: {
68
+ titleKey: "common.report-col.amex",
69
+ shortTitleKey: "common.report-col.amex.short",
70
+ infoTextKey: "common.report-col.amex.info"
71
+ },
72
+ amexReturns: {
73
+ titleKey: "common.report-col.amex-returns",
74
+ shortTitleKey: "common.report-col.amex-returns.short",
75
+ infoTextKey: "common.report-col.amex-returns.info"
76
+ },
77
+ attachRate: {
78
+ titleKey: "common.report-col.attach-rate",
79
+ shortTitleKey: "common.report-col.attach-rate.short",
80
+ infoTextKey: "common.report-col.attach-rate.info"
81
+ },
82
+ autoGratuity: {
83
+ titleKey: "common.report-col.auto-gratuity",
84
+ shortTitleKey: "common.report-col.auto-gratuity.short",
85
+ infoTextKey: "common.report-col.auto-gratuity.info"
86
+ },
87
+ averageGrossPrice: {
88
+ titleKey: "common.report-col.average-gross-price",
89
+ shortTitleKey: "common.report-col.average-gross-price.short",
90
+ infoTextKey: "common.report-col.average-gross-price.info"
91
+ },
92
+ bankFees: {
93
+ titleKey: "common.report-col.bank-fees",
94
+ shortTitleKey: "common.report-col.bank-fees.short",
95
+ infoTextKey: "common.report-col.bank-fees.info"
96
+ },
97
+ batchAmount: {
98
+ titleKey: "common.report-col.batch-amount",
99
+ shortTitleKey: "common.report-col.batch-amount.short",
100
+ infoTextKey: "common.report-col.batch-amount.info"
101
+ },
102
+ batchDate: {
103
+ titleKey: "common.report-col.batch-date",
104
+ shortTitleKey: "common.report-col.batch-date.short",
105
+ infoTextKey: "common.report-col.batch-date.info"
106
+ },
107
+ batchNumber: {
108
+ titleKey: "common.report-col.batch-number",
109
+ shortTitleKey: "common.report-col.batch-number.short",
110
+ infoTextKey: "common.report-col.batch-number.info"
111
+ },
112
+ clockInTime: {
113
+ titleKey: "common.report-col.clock-in-time",
114
+ shortTitleKey: "common.report-col.clock-in-time.short",
115
+ infoTextKey: "common.report-col.clock-in-time.info"
116
+ },
117
+ clockOutTime: {
118
+ titleKey: "common.report-col.clock-out-time",
119
+ shortTitleKey: "common.report-col.clock-out-time.short",
120
+ infoTextKey: "common.report-col.clock-out-time.info"
121
+ },
122
+ country: {
123
+ titleKey: "common.report-col.country",
124
+ shortTitleKey: "common.report-col.country.short",
125
+ infoTextKey: "common.report-col.country.info"
126
+ },
127
+ customerName: {
128
+ titleKey: "common.report-col.customer-name",
129
+ shortTitleKey: "common.report-col.customer-name.short",
130
+ infoTextKey: "common.report-col.customer-name.info"
131
+ },
132
+ date: {
133
+ titleKey: "common.report-col.date",
134
+ shortTitleKey: "common.report-col.date.short",
135
+ infoTextKey: "common.report-col.date.info"
136
+ },
137
+ dateClose: {
138
+ titleKey: "common.report-col.date-close",
139
+ shortTitleKey: "common.report-col.date-close.short",
140
+ infoTextKey: "common.report-col.date-close.info"
141
+ },
142
+ daypart: {
143
+ titleKey: "common.report-col.daypart",
144
+ shortTitleKey: "common.report-col.daypart.short",
145
+ infoTextKey: "common.report-col.daypart.info"
146
+ },
147
+ debit: {
148
+ titleKey: "common.report-col.debit",
149
+ shortTitleKey: "common.report-col.debit.short",
150
+ infoTextKey: "common.report-col.debit.info"
151
+ },
152
+ debitReturns: {
153
+ titleKey: "common.report-col.debit-returns",
154
+ shortTitleKey: "common.report-col.debit-returns.short",
155
+ infoTextKey: "common.report-col.debit-returns.info"
156
+ },
157
+ declaredTips: {
158
+ titleKey: "common.report-col.declared-tips",
159
+ shortTitleKey: "common.report-col.declared-tips.short",
160
+ infoTextKey: "common.report-col.declared-tips.info"
161
+ },
162
+ department: {
163
+ titleKey: "common.report-col.department",
164
+ shortTitleKey: "common.report-col.department.short",
165
+ infoTextKey: "common.report-col.department.info"
166
+ },
167
+ depositCurrency: {
168
+ titleKey: "common.report-col.deposit-currency",
169
+ shortTitleKey: "common.report-col.deposit-currency.short",
170
+ infoTextKey: "common.report-col.deposit-currency.info"
171
+ },
172
+ depositDate: {
173
+ titleKey: "common.report-col.deposit-date",
174
+ shortTitleKey: "common.report-col.deposit-date.short",
175
+ infoTextKey: "common.report-col.deposit-date.info"
176
+ },
177
+ discountAmount: {
178
+ titleKey: "common.report-col.discount-amount",
179
+ shortTitleKey: "common.report-col.discount-amount.short",
180
+ infoTextKey: "common.report-col.discount-amount.info"
181
+ },
182
+ discover: {
183
+ titleKey: "common.report-col.discover",
184
+ shortTitleKey: "common.report-col.discover.short",
185
+ infoTextKey: "common.report-col.discover.info"
186
+ },
187
+ discoverReturns: {
188
+ titleKey: "common.report-col.discover-returns",
189
+ shortTitleKey: "common.report-col.discover-returns.short",
190
+ infoTextKey: "common.report-col.discover-returns.info"
191
+ },
192
+ ebt: {
193
+ titleKey: "common.report-col.ebt",
194
+ shortTitleKey: "common.report-col.ebt.short",
195
+ infoTextKey: "common.report-col.ebt.info"
196
+ },
197
+ ebtReturns: {
198
+ titleKey: "common.report-col.ebt-returns",
199
+ shortTitleKey: "common.report-col.ebt-returns.short",
200
+ infoTextKey: "common.report-col.ebt-returns.info"
201
+ },
202
+ employeeId: {
203
+ titleKey: "common.report-col.employee-id",
204
+ shortTitleKey: "common.report-col.employee-id.short",
205
+ infoTextKey: "common.report-col.employee-id.info"
206
+ },
207
+ employeeJob: {
208
+ titleKey: "common.report-col.employee-job",
209
+ shortTitleKey: "common.report-col.employee-job.short",
210
+ infoTextKey: "common.report-col.employee-job.info"
211
+ },
212
+ employeeName: {
213
+ titleKey: "common.report-col.employee-name",
214
+ shortTitleKey: "common.report-col.employee-name.short",
215
+ infoTextKey: "common.report-col.employee-name.info"
216
+ },
217
+ exemptTaxes: {
218
+ titleKey: "common.report-col.exempt-taxes",
219
+ shortTitleKey: "common.report-col.exempt-taxes.short",
220
+ infoTextKey: "common.report-col.exempt-taxes.info"
221
+ },
222
+ grandTotal: {
223
+ titleKey: "common.report-col.grand-total",
224
+ shortTitleKey: "common.report-col.grand-total.short",
225
+ infoTextKey: "common.report-col.grand-total.info"
226
+ },
227
+ grossCashSales: {
228
+ titleKey: "common.report-col.gross-cash-sales",
229
+ shortTitleKey: "common.report-col.gross-cash-sales.short",
230
+ infoTextKey: "common.report-col.gross-cash-sales.info"
231
+ },
232
+ grossCashTips: {
233
+ titleKey: "common.report-col.gross-cash-tips",
234
+ shortTitleKey: "common.report-col.gross-cash-tips.short",
235
+ infoTextKey: "common.report-col.gross-cash-tips.info"
236
+ },
237
+ grossCreditCardTips: {
238
+ titleKey: "common.report-col.gross-credit-card-tips",
239
+ shortTitleKey: "common.report-col.gross-credit-card-tips.short",
240
+ infoTextKey: "common.report-col.gross-credit-card-tips.info"
241
+ },
242
+ grossCreditSales: {
243
+ titleKey: "common.report-col.gross-credit-sales",
244
+ shortTitleKey: "common.report-col.gross-credit-sales.short",
245
+ infoTextKey: "common.report-col.gross-credit-sales.info"
246
+ },
247
+ grossSales: {
248
+ titleKey: "common.report-col.gross-sales",
249
+ shortTitleKey: "common.report-col.gross-sales.short",
250
+ infoTextKey: "common.report-col.gross-sales.info"
251
+ },
252
+ grossTips: {
253
+ titleKey: "common.report-col.gross-tips",
254
+ shortTitleKey: "common.report-col.gross-tips.short",
255
+ infoTextKey: "common.report-col.gross-tips.info"
256
+ },
257
+ guestCount: {
258
+ titleKey: "common.report-col.guest-count",
259
+ shortTitleKey: "common.report-col.guest-count.short",
260
+ infoTextKey: "common.report-col.guest-count.info"
261
+ },
262
+ guestsVarLw: {
263
+ titleKey: "common.report-col.guests-var-lw",
264
+ shortTitleKey: "common.report-col.guests-var-lw.short",
265
+ infoTextKey: "common.report-col.guests-var-lw.info"
266
+ },
267
+ guestsVarLwPct: {
268
+ titleKey: "common.report-col.guests-var-lw-pct",
269
+ shortTitleKey: "common.report-col.guests-var-lw-pct.short",
270
+ infoTextKey: "common.report-col.guests-var-lw-pct.info"
271
+ },
272
+ guestsVarLy: {
273
+ titleKey: "common.report-col.guests-var-ly",
274
+ shortTitleKey: "common.report-col.guests-var-ly.short",
275
+ infoTextKey: "common.report-col.guests-var-ly.info"
276
+ },
277
+ guestsVarLyPct: {
278
+ titleKey: "common.report-col.guests-var-ly-pct",
279
+ shortTitleKey: "common.report-col.guests-var-ly-pct.short",
280
+ infoTextKey: "common.report-col.guests-var-ly-pct.info"
281
+ },
282
+ hour: {
283
+ titleKey: "common.report-col.hour",
284
+ shortTitleKey: "common.report-col.hour.short",
285
+ infoTextKey: "common.report-col.hour.info"
286
+ },
287
+ hoursWorked: {
288
+ titleKey: "common.report-col.hours-worked",
289
+ shortTitleKey: "common.report-col.hours-worked.short",
290
+ infoTextKey: "common.report-col.hours-worked.info"
291
+ },
292
+ inclusiveTax: {
293
+ titleKey: "common.report-col.inclusive-tax",
294
+ shortTitleKey: "common.report-col.inclusive-tax.short",
295
+ infoTextKey: "common.report-col.inclusive-tax.info"
296
+ },
297
+ itemName: {
298
+ titleKey: "common.report-col.item-name",
299
+ shortTitleKey: "common.report-col.item-name.short",
300
+ infoTextKey: "common.report-col.item-name.info"
301
+ },
302
+ itemPrice: {
303
+ titleKey: "common.report-col.item-price",
304
+ shortTitleKey: "common.report-col.item-price.short",
305
+ infoTextKey: "common.report-col.item-price.info"
306
+ },
307
+ locationCity: {
308
+ titleKey: "common.report-col.location-city",
309
+ shortTitleKey: "common.report-col.location-city.short",
310
+ infoTextKey: "common.report-col.location-city.info"
311
+ },
312
+ locationMid: {
313
+ titleKey: "common.report-col.location-mid",
314
+ shortTitleKey: "common.report-col.location-mid.short",
315
+ infoTextKey: "common.report-col.location-mid.info"
316
+ },
317
+ locationName: {
318
+ titleKey: "common.report-col.location-name",
319
+ shortTitleKey: "common.report-col.location-name.short",
320
+ infoTextKey: "common.report-col.location-name.info"
321
+ },
322
+ locationState: {
323
+ titleKey: "common.report-col.location-state",
324
+ shortTitleKey: "common.report-col.location-state.short",
325
+ infoTextKey: "common.report-col.location-state.info"
326
+ },
327
+ mastercard: {
328
+ titleKey: "common.report-col.mastercard",
329
+ shortTitleKey: "common.report-col.mastercard.short",
330
+ infoTextKey: "common.report-col.mastercard.info"
331
+ },
332
+ mcReturns: {
333
+ titleKey: "common.report-col.mc-returns",
334
+ shortTitleKey: "common.report-col.mc-returns.short",
335
+ infoTextKey: "common.report-col.mc-returns.info"
336
+ },
337
+ modifierName: {
338
+ titleKey: "common.report-col.modifier-name",
339
+ shortTitleKey: "common.report-col.modifier-name.short",
340
+ infoTextKey: "common.report-col.modifier-name.info"
341
+ },
342
+ modifierPrice: {
343
+ titleKey: "common.report-col.modifier-price",
344
+ shortTitleKey: "common.report-col.modifier-price.short",
345
+ infoTextKey: "common.report-col.modifier-price.info"
346
+ },
347
+ modifierQuantity: {
348
+ titleKey: "common.report-col.modifier-quantity",
349
+ shortTitleKey: "common.report-col.modifier-quantity.short",
350
+ infoTextKey: "common.report-col.modifier-quantity.info"
351
+ },
352
+ netSales: {
353
+ titleKey: "common.report-col.net-sales",
354
+ shortTitleKey: "common.report-col.net-sales.short",
355
+ infoTextKey: "common.report-col.net-sales.info"
356
+ },
357
+ netTaxCollected: {
358
+ titleKey: "common.report-col.net-tax-collected",
359
+ shortTitleKey: "common.report-col.net-tax-collected.short",
360
+ infoTextKey: "common.report-col.net-tax-collected.info"
361
+ },
362
+ netTips: {
363
+ titleKey: "common.report-col.net-tips",
364
+ shortTitleKey: "common.report-col.net-tips.short",
365
+ infoTextKey: "common.report-col.net-tips.info"
366
+ },
367
+ numberOfGuests: {
368
+ titleKey: "common.report-col.number-of-guests",
369
+ shortTitleKey: "common.report-col.number-of-guests.short",
370
+ infoTextKey: "common.report-col.number-of-guests.info"
371
+ },
372
+ orderType: {
373
+ titleKey: "common.report-col.order-type",
374
+ shortTitleKey: "common.report-col.order-type.short",
375
+ infoTextKey: "common.report-col.order-type.info"
376
+ },
377
+ paymentType: {
378
+ titleKey: "common.report-col.payment-type",
379
+ shortTitleKey: "common.report-col.payment-type.short",
380
+ infoTextKey: "common.report-col.payment-type.info"
381
+ },
382
+ payrollId: {
383
+ titleKey: "common.report-col.payroll-id",
384
+ shortTitleKey: "common.report-col.payroll-id.short",
385
+ infoTextKey: "common.report-col.payroll-id.info"
386
+ },
387
+ quantity: {
388
+ titleKey: "common.report-col.quantity",
389
+ shortTitleKey: "common.report-col.quantity.short",
390
+ infoTextKey: "common.report-col.quantity.info"
391
+ },
392
+ referenceNumber: {
393
+ titleKey: "common.report-col.reference-number",
394
+ shortTitleKey: "common.report-col.reference-number.short",
395
+ infoTextKey: "common.report-col.reference-number.info"
396
+ },
397
+ refundAmount: {
398
+ titleKey: "common.report-col.refund-amount",
399
+ shortTitleKey: "common.report-col.refund-amount.short",
400
+ infoTextKey: "common.report-col.refund-amount.info"
401
+ },
402
+ refundedTaxAmount: {
403
+ titleKey: "common.report-col.refunded-tax-amount",
404
+ shortTitleKey: "common.report-col.refunded-tax-amount.short",
405
+ infoTextKey: "common.report-col.refunded-tax-amount.info"
406
+ },
407
+ revenueCenter: {
408
+ titleKey: "common.report-col.revenue-center",
409
+ shortTitleKey: "common.report-col.revenue-center.short",
410
+ infoTextKey: "common.report-col.revenue-center.info"
411
+ },
412
+ revenueClass: {
413
+ titleKey: "common.report-col.revenue-class",
414
+ shortTitleKey: "common.report-col.revenue-class.short",
415
+ infoTextKey: "common.report-col.revenue-class.info"
416
+ },
417
+ salesVarLw: {
418
+ titleKey: "common.report-col.sales-var-lw",
419
+ shortTitleKey: "common.report-col.sales-var-lw.short",
420
+ infoTextKey: "common.report-col.sales-var-lw.info"
421
+ },
422
+ salesVarLwPct: {
423
+ titleKey: "common.report-col.sales-var-lw-pct",
424
+ shortTitleKey: "common.report-col.sales-var-lw-pct.short",
425
+ infoTextKey: "common.report-col.sales-var-lw-pct.info"
426
+ },
427
+ salesVarLy: {
428
+ titleKey: "common.report-col.sales-var-ly",
429
+ shortTitleKey: "common.report-col.sales-var-ly.short",
430
+ infoTextKey: "common.report-col.sales-var-ly.info"
431
+ },
432
+ salesVarLyPct: {
433
+ titleKey: "common.report-col.sales-var-ly-pct",
434
+ shortTitleKey: "common.report-col.sales-var-ly-pct.short",
435
+ infoTextKey: "common.report-col.sales-var-ly-pct.info"
436
+ },
437
+ salesMixByPct: {
438
+ titleKey: "common.report-col.sales-mix-by-pct",
439
+ shortTitleKey: "common.report-col.sales-mix-by-pct.short",
440
+ infoTextKey: "common.report-col.sales-mix-by-pct.info"
441
+ },
442
+ salesPerGuest: {
443
+ titleKey: "common.report-col.sales-per-guest",
444
+ shortTitleKey: "common.report-col.sales-per-guest.short",
445
+ infoTextKey: "common.report-col.sales-per-guest.info"
446
+ },
447
+ salesPerGuestLw: {
448
+ titleKey: "common.report-col.sales-per-guest-lw",
449
+ shortTitleKey: "common.report-col.sales-per-guest-lw.short",
450
+ infoTextKey: "common.report-col.sales-per-guest-lw.info"
451
+ },
452
+ salesPerGuestLy: {
453
+ titleKey: "common.report-col.sales-per-guest-ly",
454
+ shortTitleKey: "common.report-col.sales-per-guest-ly.short",
455
+ infoTextKey: "common.report-col.sales-per-guest-ly.info"
456
+ },
457
+ scheduledShiftEnd: {
458
+ titleKey: "common.report-col.scheduled-shift-end",
459
+ shortTitleKey: "common.report-col.scheduled-shift-end.short",
460
+ infoTextKey: "common.report-col.scheduled-shift-end.info"
461
+ },
462
+ scheduledShiftStart: {
463
+ titleKey: "common.report-col.scheduled-shift-start",
464
+ shortTitleKey: "common.report-col.scheduled-shift-start.short",
465
+ infoTextKey: "common.report-col.scheduled-shift-start.info"
466
+ },
467
+ settlementBatchDate: {
468
+ titleKey: "common.report-col.settlement-batch-date",
469
+ shortTitleKey: "common.report-col.settlement-batch-date.short",
470
+ infoTextKey: "common.report-col.settlement-batch-date.info"
471
+ },
472
+ shiftDurationHrs: {
473
+ titleKey: "common.report-col.shift-duration-hrs",
474
+ shortTitleKey: "common.report-col.shift-duration-hrs.short",
475
+ infoTextKey: "common.report-col.shift-duration-hrs.info"
476
+ },
477
+ subtotal: {
478
+ titleKey: "common.report-col.subtotal",
479
+ shortTitleKey: "common.report-col.subtotal.short",
480
+ infoTextKey: "common.report-col.subtotal.info"
481
+ },
482
+ taxCollected: {
483
+ titleKey: "common.report-col.tax-collected",
484
+ shortTitleKey: "common.report-col.tax-collected.short",
485
+ infoTextKey: "common.report-col.tax-collected.info"
486
+ },
487
+ taxName: {
488
+ titleKey: "common.report-col.tax-name",
489
+ shortTitleKey: "common.report-col.tax-name.short",
490
+ infoTextKey: "common.report-col.tax-name.info"
491
+ },
492
+ taxRate: {
493
+ titleKey: "common.report-col.tax-rate",
494
+ shortTitleKey: "common.report-col.tax-rate.short",
495
+ infoTextKey: "common.report-col.tax-rate.info"
496
+ },
497
+ taxableSales: {
498
+ titleKey: "common.report-col.taxable-sales",
499
+ shortTitleKey: "common.report-col.taxable-sales.short",
500
+ infoTextKey: "common.report-col.taxable-sales.info"
501
+ },
502
+ ticketClosed: {
503
+ titleKey: "common.report-col.ticket-closed",
504
+ shortTitleKey: "common.report-col.ticket-closed.short",
505
+ infoTextKey: "common.report-col.ticket-closed.info"
506
+ },
507
+ ticketFee: {
508
+ titleKey: "common.report-col.ticket-fee",
509
+ shortTitleKey: "common.report-col.ticket-fee.short",
510
+ infoTextKey: "common.report-col.ticket-fee.info"
511
+ },
512
+ ticketNumber: {
513
+ titleKey: "common.report-col.ticket-number",
514
+ shortTitleKey: "common.report-col.ticket-number.short",
515
+ infoTextKey: "common.report-col.ticket-number.info"
516
+ },
517
+ ticketOpen: {
518
+ titleKey: "common.report-col.ticket-open",
519
+ shortTitleKey: "common.report-col.ticket-open.short",
520
+ infoTextKey: "common.report-col.ticket-open.info"
521
+ },
522
+ ticketTotal: {
523
+ titleKey: "common.report-col.ticket-total",
524
+ shortTitleKey: "common.report-col.ticket-total.short",
525
+ infoTextKey: "common.report-col.ticket-total.info"
526
+ },
527
+ timeOpenMins: {
528
+ titleKey: "common.report-col.time-open-mins",
529
+ shortTitleKey: "common.report-col.time-open-mins.short",
530
+ infoTextKey: "common.report-col.time-open-mins.info"
531
+ },
532
+ tipPct: {
533
+ titleKey: "common.report-col.tip-pct",
534
+ shortTitleKey: "common.report-col.tip-pct.short",
535
+ infoTextKey: "common.report-col.tip-pct.info"
536
+ },
537
+ tipReduction: {
538
+ titleKey: "common.report-col.tip-reduction",
539
+ shortTitleKey: "common.report-col.tip-reduction.short",
540
+ infoTextKey: "common.report-col.tip-reduction.info"
541
+ },
542
+ tipShare: {
543
+ titleKey: "common.report-col.tip-share",
544
+ shortTitleKey: "common.report-col.tip-share.short",
545
+ infoTextKey: "common.report-col.tip-share.info"
546
+ },
547
+ tips: {
548
+ titleKey: "common.report-col.tips",
549
+ shortTitleKey: "common.report-col.tips.short",
550
+ infoTextKey: "common.report-col.tips.info"
551
+ },
552
+ tipsPerHour: {
553
+ titleKey: "common.report-col.tips-per-hour",
554
+ shortTitleKey: "common.report-col.tips-per-hour.short",
555
+ infoTextKey: "common.report-col.tips-per-hour.info"
556
+ },
557
+ totalCollected: {
558
+ titleKey: "common.report-col.total-collected",
559
+ shortTitleKey: "common.report-col.total-collected.short",
560
+ infoTextKey: "common.report-col.total-collected.info"
561
+ },
562
+ totalItemSales: {
563
+ titleKey: "common.report-col.total-item-sales",
564
+ shortTitleKey: "common.report-col.total-item-sales.short",
565
+ infoTextKey: "common.report-col.total-item-sales.info"
566
+ },
567
+ totalModifierSales: {
568
+ titleKey: "common.report-col.total-modifier-sales",
569
+ shortTitleKey: "common.report-col.total-modifier-sales.short",
570
+ infoTextKey: "common.report-col.total-modifier-sales.info"
571
+ },
572
+ totalReturns: {
573
+ titleKey: "common.report-col.total-returns",
574
+ shortTitleKey: "common.report-col.total-returns.short",
575
+ infoTextKey: "common.report-col.total-returns.info"
576
+ },
577
+ totalSales: {
578
+ titleKey: "common.report-col.total-sales",
579
+ shortTitleKey: "common.report-col.total-sales.short",
580
+ infoTextKey: "common.report-col.total-sales.info"
581
+ },
582
+ totalTips: {
583
+ titleKey: "common.report-col.total-tips",
584
+ shortTitleKey: "common.report-col.total-tips.short",
585
+ infoTextKey: "common.report-col.total-tips.info"
586
+ },
587
+ transactionDate: {
588
+ titleKey: "common.report-col.transaction-date",
589
+ shortTitleKey: "common.report-col.transaction-date.short",
590
+ infoTextKey: "common.report-col.transaction-date.info"
591
+ },
592
+ transactionType: {
593
+ titleKey: "common.report-col.transaction-type",
594
+ shortTitleKey: "common.report-col.transaction-type.short",
595
+ infoTextKey: "common.report-col.transaction-type.info"
596
+ },
597
+ untaxedSales: {
598
+ titleKey: "common.report-col.untaxed-sales",
599
+ shortTitleKey: "common.report-col.untaxed-sales.short",
600
+ infoTextKey: "common.report-col.untaxed-sales.info"
601
+ },
602
+ visa: {
603
+ titleKey: "common.report-col.visa",
604
+ shortTitleKey: "common.report-col.visa.short",
605
+ infoTextKey: "common.report-col.visa.info"
606
+ },
607
+ visaReturns: {
608
+ titleKey: "common.report-col.visa-returns",
609
+ shortTitleKey: "common.report-col.visa-returns.short",
610
+ infoTextKey: "common.report-col.visa-returns.info"
611
+ }
612
+ };
613
+ function getColumnMetadata(key) {
614
+ return COLUMN_REGISTRY[key];
615
+ }
616
+
617
+ // src/utils/alignment.ts
618
+ function getColumnAlignment(type) {
619
+ if (type === "string" || type === "date" || type === "time") {
620
+ return "left";
621
+ }
622
+ return "right";
623
+ }
624
+ function isNumericType(type) {
625
+ return type === "money" || type === "number" || type === "percent" || type === "fixedNumber";
626
+ }
627
+
628
+ // src/totals.ts
629
+ function calculateReportTotals(data, fieldConfig, opts) {
630
+ const { labelField, label } = opts;
631
+ const fieldsToSum = /* @__PURE__ */ new Set();
632
+ const derivedFields = [];
633
+ for (const [field, config] of Object.entries(fieldConfig)) {
634
+ const { type, columnKey, footerCalculation: calc } = config;
635
+ if (!type || type === "string" || type === "date" || type === "time" || type === "boolean") {
636
+ continue;
637
+ }
638
+ if (calc?.type === "none") {
639
+ } else if (!calc || calc.type === "sum") {
640
+ if (columnKey || calc?.type === "sum") {
641
+ fieldsToSum.add(field);
642
+ }
643
+ } else {
644
+ derivedFields.push({ field, calc });
645
+ if (calc.numeratorField) fieldsToSum.add(calc.numeratorField);
646
+ if (calc.denominatorField) fieldsToSum.add(calc.denominatorField);
647
+ }
648
+ }
649
+ const sums = {};
650
+ for (const field of fieldsToSum) {
651
+ sums[field] = data.reduce((acc, row) => acc + (row[field] ?? 0), 0);
652
+ }
653
+ const derived = {};
654
+ for (const { field, calc } of derivedFields) {
655
+ const num = sums[calc.numeratorField ?? ""] ?? 0;
656
+ const den = sums[calc.denominatorField ?? ""] ?? 0;
657
+ if (calc.type === "percentChange") {
658
+ derived[field] = den ? (num - den) / den : 0;
659
+ } else if (calc.type === "average") {
660
+ derived[field] = den > 0 ? num / den : 0;
661
+ }
662
+ }
663
+ const result = {};
664
+ for (const [field, config] of Object.entries(fieldConfig)) {
665
+ const { type } = config;
666
+ if (!type || type === "string" || type === "date" || type === "time") {
667
+ result[field] = "";
668
+ } else if (type === "boolean") {
669
+ result[field] = false;
670
+ } else {
671
+ result[field] = 0;
672
+ }
673
+ }
674
+ result[labelField] = label;
675
+ for (const [field, value] of Object.entries(sums)) {
676
+ result[field] = value;
677
+ }
678
+ for (const [field, value] of Object.entries(derived)) {
679
+ result[field] = value;
680
+ }
681
+ return result;
682
+ }
683
+
684
+ // src/reports/salesSummary.ts
685
+ var FIRST_COLUMN_WIDTH = 240;
686
+ var FIELDS = {
687
+ groupById: { type: "number" },
688
+ groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
689
+ salesAmountNet: { type: "money", columnKey: "netSales" },
690
+ salesVarLW: { type: "money", columnKey: "salesVarLw" },
691
+ salesVarLY: { type: "money", columnKey: "salesVarLy" },
692
+ salesVarLWPct: {
693
+ type: "percent",
694
+ columnKey: "salesVarLwPct",
695
+ footerCalculation: {
696
+ type: "percentChange",
697
+ numeratorField: "salesAmountNet",
698
+ denominatorField: "salesAmountNetLastWeek"
699
+ }
700
+ },
701
+ salesVarLYPct: {
702
+ type: "percent",
703
+ columnKey: "salesVarLyPct",
704
+ footerCalculation: {
705
+ type: "percentChange",
706
+ numeratorField: "salesAmountNet",
707
+ denominatorField: "salesAmountNetLastYear"
708
+ }
709
+ },
710
+ salesAmountNetLastWeek: { type: "money" },
711
+ salesAmountNetLastYear: { type: "money" },
712
+ salesAmountGross: { type: "money" },
713
+ salesAmountGrossLastWeek: { type: "money" },
714
+ salesAmountGrossLastYear: { type: "money" },
715
+ ticketsCount: { type: "number" },
716
+ ticketsCountLastWeek: { type: "number" },
717
+ ticketsCountLastYear: { type: "number" },
718
+ guestsCount: { type: "number", columnKey: "guestCount" },
719
+ guestsVarLW: { type: "number", columnKey: "guestsVarLw" },
720
+ guestsVarLY: { type: "number", columnKey: "guestsVarLy" },
721
+ guestsVarLWPct: {
722
+ type: "percent",
723
+ columnKey: "guestsVarLwPct",
724
+ footerCalculation: {
725
+ type: "percentChange",
726
+ numeratorField: "guestsCount",
727
+ denominatorField: "guestsCountLastWeek"
728
+ }
729
+ },
730
+ guestsVarLYPct: {
731
+ type: "percent",
732
+ columnKey: "guestsVarLyPct",
733
+ footerCalculation: {
734
+ type: "percentChange",
735
+ numeratorField: "guestsCount",
736
+ denominatorField: "guestsCountLastYear"
737
+ }
738
+ },
739
+ guestsCountLastWeek: { type: "number" },
740
+ guestsCountLastYear: { type: "number" },
741
+ salesPerGuestTY: {
742
+ type: "money",
743
+ columnKey: "salesPerGuest",
744
+ footerCalculation: {
745
+ type: "average",
746
+ numeratorField: "salesAmountNet",
747
+ denominatorField: "guestsCount"
748
+ }
749
+ },
750
+ salesPerGuestLW: {
751
+ type: "money",
752
+ columnKey: "salesPerGuestLw",
753
+ footerCalculation: {
754
+ type: "average",
755
+ numeratorField: "salesAmountNetLastWeek",
756
+ denominatorField: "guestsCountLastWeek"
757
+ }
758
+ },
759
+ salesPerGuestLY: {
760
+ type: "money",
761
+ columnKey: "salesPerGuestLy",
762
+ footerCalculation: {
763
+ type: "average",
764
+ numeratorField: "salesAmountNetLastYear",
765
+ denominatorField: "guestsCountLastYear"
766
+ }
767
+ }
768
+ };
769
+ var COLUMN_GROUPS = [
770
+ {
771
+ id: "sales",
772
+ headerTranslationKey: "table.groups.sales",
773
+ baseFields: ["salesAmountNet"],
774
+ lastWeekFields: ["salesVarLW", "salesVarLWPct"],
775
+ lastYearFields: ["salesVarLY", "salesVarLYPct"]
776
+ },
777
+ {
778
+ id: "guests",
779
+ headerTranslationKey: "table.groups.guests",
780
+ baseFields: ["guestsCount"],
781
+ lastWeekFields: ["guestsVarLW", "guestsVarLWPct"],
782
+ lastYearFields: ["guestsVarLY", "guestsVarLYPct"]
783
+ },
784
+ {
785
+ id: "salesPerGuest",
786
+ headerTranslationKey: "table.groups.sales-per-guest",
787
+ baseFields: ["salesPerGuestTY"],
788
+ lastWeekFields: ["salesPerGuestLW"],
789
+ lastYearFields: ["salesPerGuestLY"]
790
+ }
791
+ ];
792
+ var SALES_SUMMARY_AVAILABLE_COLUMNS = [
793
+ "salesAmountNet",
794
+ "salesVarLW",
795
+ "salesVarLWPct",
796
+ "salesVarLY",
797
+ "salesVarLYPct",
798
+ "guestsCount",
799
+ "guestsVarLW",
800
+ "guestsVarLWPct",
801
+ "guestsVarLY",
802
+ "guestsVarLYPct",
803
+ "salesPerGuestTY",
804
+ "salesPerGuestLW",
805
+ "salesPerGuestLY"
806
+ ];
807
+ var SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS = [
808
+ "salesAmountNet",
809
+ "guestsCount",
810
+ "salesPerGuestTY"
811
+ ];
812
+ var salesSummaryConfig = {
813
+ fields: FIELDS,
814
+ availableColumns: SALES_SUMMARY_AVAILABLE_COLUMNS,
815
+ defaultVisibleColumns: SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
816
+ columnGroups: COLUMN_GROUPS
817
+ };
818
+
819
+ // src/reports/ticketSummary.ts
820
+ var FIELDS2 = {
821
+ ticketId: { type: "string" },
822
+ locationId: { type: "number" },
823
+ orderName: { type: "string" },
824
+ revenueCenterName: { type: "string", columnKey: "revenueCenter" },
825
+ daypartName: { type: "string", columnKey: "daypart" },
826
+ inclusiveTaxesAmount: {
827
+ type: "money",
828
+ columnKey: "inclusiveTax",
829
+ footerCalculation: { type: "sum" }
830
+ },
831
+ locationName: { type: "string", size: 240, columnKey: "locationName" },
832
+ orderNumber: { type: "number", columnKey: "ticketNumber", footerCalculation: { type: "none" } },
833
+ businessDate: { type: "date", columnKey: "date" },
834
+ ticketOpenedAt: { type: "time", columnKey: "ticketOpen" },
835
+ ticketClosedAt: { type: "time", columnKey: "ticketClosed" },
836
+ ticketTime: { type: "number", columnKey: "timeOpenMins", enableSorting: false },
837
+ ticketSubtotal: {
838
+ type: "money",
839
+ columnKey: "subtotal",
840
+ footerCalculation: { type: "sum" }
841
+ },
842
+ discountsAmount: {
843
+ type: "money",
844
+ columnKey: "discountAmount",
845
+ footerCalculation: { type: "sum" }
846
+ },
847
+ surchargesAmount: {
848
+ type: "money",
849
+ columnKey: "ticketFee",
850
+ footerCalculation: { type: "sum" }
851
+ },
852
+ taxesAmount: {
853
+ type: "money",
854
+ columnKey: "taxCollected",
855
+ footerCalculation: { type: "sum" }
856
+ },
857
+ ticketGrandTotal: {
858
+ type: "money",
859
+ columnKey: "grandTotal",
860
+ footerCalculation: { type: "sum" }
861
+ },
862
+ gratuitiesAmount: {
863
+ type: "money",
864
+ columnKey: "autoGratuity",
865
+ footerCalculation: { type: "sum" }
866
+ },
867
+ tipAmount: {
868
+ type: "money",
869
+ columnKey: "tips",
870
+ footerCalculation: { type: "sum" }
871
+ },
872
+ paymentsAmount: {
873
+ type: "money",
874
+ columnKey: "totalCollected",
875
+ footerCalculation: { type: "sum" }
876
+ },
877
+ paymentTypeName: { type: "string", columnKey: "paymentType" },
878
+ guestsCount: {
879
+ type: "number",
880
+ columnKey: "guestCount",
881
+ footerCalculation: { type: "sum" }
882
+ },
883
+ employeeName: { type: "string", columnKey: "employeeName" },
884
+ orderTypeName: { type: "string", columnKey: "orderType" }
885
+ };
886
+ var TICKET_SUMMARY_AVAILABLE_COLUMNS = [
887
+ "locationName",
888
+ "orderNumber",
889
+ "businessDate",
890
+ "ticketOpenedAt",
891
+ "ticketClosedAt",
892
+ "ticketTime",
893
+ "ticketSubtotal",
894
+ "discountsAmount",
895
+ "surchargesAmount",
896
+ "taxesAmount",
897
+ "ticketGrandTotal",
898
+ "gratuitiesAmount",
899
+ "tipAmount",
900
+ "paymentsAmount",
901
+ "paymentTypeName",
902
+ "guestsCount",
903
+ "employeeName",
904
+ "orderTypeName"
905
+ ];
906
+ var TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS = TICKET_SUMMARY_AVAILABLE_COLUMNS;
907
+ var ticketSummaryConfig = {
908
+ fields: FIELDS2,
909
+ availableColumns: TICKET_SUMMARY_AVAILABLE_COLUMNS,
910
+ defaultVisibleColumns: TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS
911
+ };
912
+
913
+ // src/reports/ticketLive.ts
914
+ var FIELDS3 = {
915
+ locationName: { type: "string", columnKey: "locationName" },
916
+ orderNumber: {
917
+ type: "number",
918
+ columnKey: "ticketNumber",
919
+ footerCalculation: { type: "none" }
920
+ },
921
+ dateOpen: { type: "string", columnKey: "date" },
922
+ timeOpen: { type: "string", columnKey: "ticketOpen" },
923
+ dateClose: { type: "string", columnKey: "dateClose" },
924
+ timeClose: { type: "string", columnKey: "ticketClosed" },
925
+ durationMinutes: { type: "number", columnKey: "timeOpenMins" },
926
+ subtotal: { type: "money", columnKey: "subtotal" },
927
+ discountTotal: { type: "money", columnKey: "discountAmount" },
928
+ surchargeTotal: { type: "money", columnKey: "ticketFee" },
929
+ taxTotal: { type: "money", columnKey: "taxCollected" },
930
+ grandTotal: { type: "money", columnKey: "grandTotal" },
931
+ gratuityTotal: { type: "money", columnKey: "autoGratuity" },
932
+ totalTips: { type: "money", columnKey: "totalTips" },
933
+ paymentsReceived: { type: "money", columnKey: "totalCollected" },
934
+ paymentTypeName: { type: "string", columnKey: "paymentType" },
935
+ guestCount: {
936
+ type: "number",
937
+ columnKey: "guestCount",
938
+ footerCalculation: { type: "sum" }
939
+ },
940
+ customerName: { type: "string", columnKey: "customerName" },
941
+ employeeName: { type: "string", columnKey: "employeeName" },
942
+ orderType: { type: "string", columnKey: "orderType" }
943
+ };
944
+ var TICKET_LIVE_AVAILABLE_COLUMNS = [
945
+ "locationName",
946
+ "orderNumber",
947
+ "dateOpen",
948
+ "timeOpen",
949
+ "timeClose",
950
+ "durationMinutes",
951
+ "subtotal",
952
+ "discountTotal",
953
+ "surchargeTotal",
954
+ "taxTotal",
955
+ "grandTotal",
956
+ "gratuityTotal",
957
+ "totalTips",
958
+ "paymentsReceived",
959
+ "paymentTypeName",
960
+ "guestCount",
961
+ "employeeName",
962
+ "orderType"
963
+ ];
964
+ var TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS = TICKET_LIVE_AVAILABLE_COLUMNS;
965
+ var ticketLiveConfig = {
966
+ fields: FIELDS3,
967
+ availableColumns: TICKET_LIVE_AVAILABLE_COLUMNS,
968
+ defaultVisibleColumns: TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS
969
+ };
970
+
971
+ // src/reports/productMix.ts
972
+ var FIRST_COLUMN_WIDTH2 = 240;
973
+ var FIELDS4 = {
974
+ groupById: { type: "string" },
975
+ groupByName: { type: "string", size: FIRST_COLUMN_WIDTH2 },
976
+ salesAmountGross: { type: "money", columnKey: "grossSales" },
977
+ discountsAmount: { type: "money", columnKey: "discountAmount" },
978
+ inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
979
+ salesAmountNet: { type: "money", columnKey: "netSales" },
980
+ itemsQuantity: { type: "number", columnKey: "quantity" },
981
+ avgPrice: {
982
+ type: "fixedNumber",
983
+ columnKey: "averageGrossPrice",
984
+ footerCalculation: {
985
+ type: "average",
986
+ numeratorField: "salesAmountGross",
987
+ denominatorField: "itemsQuantity"
988
+ }
989
+ },
990
+ salesMixPct: { type: "percent", columnKey: "salesMixByPct" }
991
+ };
992
+ var PRODUCT_MIX_AVAILABLE_COLUMNS = [
993
+ "salesAmountGross",
994
+ "discountsAmount",
995
+ "inclusiveTaxesAmount",
996
+ "salesAmountNet",
997
+ "itemsQuantity",
998
+ "avgPrice",
999
+ "salesMixPct"
1000
+ ];
1001
+ var PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS = PRODUCT_MIX_AVAILABLE_COLUMNS;
1002
+ var PRODUCT_MIX_CHART_FIELDS = [
1003
+ "salesAmountGross",
1004
+ "itemsQuantity",
1005
+ "avgPrice",
1006
+ "discountsAmount",
1007
+ "inclusiveTaxesAmount",
1008
+ "salesAmountNet",
1009
+ "salesMixPct"
1010
+ ];
1011
+ var productMixConfig = {
1012
+ fields: FIELDS4,
1013
+ availableColumns: PRODUCT_MIX_AVAILABLE_COLUMNS,
1014
+ defaultVisibleColumns: PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS
1015
+ };
1016
+
1017
+ // src/reports/modifierMix.ts
1018
+ var FIRST_COLUMN_WIDTH3 = 240;
1019
+ var FIELDS5 = {
1020
+ groupById: { type: "string", filteringAvailable: false },
1021
+ groupByName: { type: "string", size: FIRST_COLUMN_WIDTH3, filteringAvailable: false },
1022
+ groupById2: { type: "string", filteringAvailable: false },
1023
+ groupByName2: { type: "string", size: FIRST_COLUMN_WIDTH3, filteringAvailable: false },
1024
+ modifiersSales: { type: "money", columnKey: "totalModifierSales" },
1025
+ modifiersQuantity: { type: "number", columnKey: "modifierQuantity" },
1026
+ itemsQuantity: {
1027
+ type: "number",
1028
+ columnKey: "quantity",
1029
+ filteringAvailable: false
1030
+ },
1031
+ avgGross: {
1032
+ type: "money",
1033
+ columnKey: "averageGrossPrice",
1034
+ footerCalculation: {
1035
+ type: "average",
1036
+ numeratorField: "modifiersSales",
1037
+ denominatorField: "modifiersQuantity"
1038
+ }
1039
+ },
1040
+ attachRate: {
1041
+ type: "percent",
1042
+ columnKey: "attachRate",
1043
+ footerCalculation: {
1044
+ type: "average",
1045
+ numeratorField: "modifiersQuantity",
1046
+ denominatorField: "itemsQuantity"
1047
+ }
1048
+ },
1049
+ modifiersSalesComp: { type: "money", filteringAvailable: false },
1050
+ modifiersQuantityComp: { type: "number", filteringAvailable: false },
1051
+ itemsQuantityComp: { type: "number", filteringAvailable: false },
1052
+ attachRateComp: { type: "percent", filteringAvailable: false },
1053
+ modifiersSalesVar: { type: "money", filteringAvailable: false },
1054
+ modifiersSalesVarPct: {
1055
+ type: "percent",
1056
+ filteringAvailable: false,
1057
+ footerCalculation: {
1058
+ type: "percentChange",
1059
+ numeratorField: "modifiersSales",
1060
+ denominatorField: "modifiersSalesComp"
1061
+ }
1062
+ },
1063
+ modifiersQuantityVar: { type: "number", filteringAvailable: false },
1064
+ modifiersQuantityVarPct: {
1065
+ type: "percent",
1066
+ filteringAvailable: false,
1067
+ footerCalculation: {
1068
+ type: "percentChange",
1069
+ numeratorField: "modifiersQuantity",
1070
+ denominatorField: "modifiersQuantityComp"
1071
+ }
1072
+ },
1073
+ attachRateVar: { type: "percent", filteringAvailable: false },
1074
+ attachRateVarPct: {
1075
+ type: "percent",
1076
+ filteringAvailable: false,
1077
+ footerCalculation: {
1078
+ type: "percentChange",
1079
+ numeratorField: "attachRate",
1080
+ denominatorField: "attachRateComp"
1081
+ }
1082
+ }
1083
+ };
1084
+ var MODIFIER_MIX_AVAILABLE_COLUMNS = [
1085
+ "modifiersSales",
1086
+ "modifiersQuantity",
1087
+ "avgGross",
1088
+ "attachRate"
1089
+ ];
1090
+ var MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS = MODIFIER_MIX_AVAILABLE_COLUMNS;
1091
+ var modifierMixConfig = {
1092
+ fields: FIELDS5,
1093
+ availableColumns: MODIFIER_MIX_AVAILABLE_COLUMNS,
1094
+ defaultVisibleColumns: MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS
1095
+ };
1096
+
1097
+ // src/reports/itemTax.ts
1098
+ var FIELDS6 = {
1099
+ locationId: { type: "number", filteringAvailable: false },
1100
+ taxIsFlat: { type: "boolean", filteringAvailable: false },
1101
+ merchantId: { type: "string", columnKey: "locationMid", filteringAvailable: false },
1102
+ locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
1103
+ locationCity: { type: "string", columnKey: "locationCity", filteringAvailable: false },
1104
+ locationState: { type: "string", columnKey: "locationState", filteringAvailable: false },
1105
+ itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
1106
+ itemPrice: { type: "money", columnKey: "itemPrice" },
1107
+ departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
1108
+ revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
1109
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1110
+ taxName: { type: "string", columnKey: "taxName", filteringAvailable: false },
1111
+ taxValue: { type: "money", columnKey: "taxableSales" },
1112
+ taxRate: { type: "number", columnKey: "taxRate" },
1113
+ recordsCount: { type: "number", columnKey: "quantity" },
1114
+ taxableSales: { type: "money", columnKey: "taxableSales" },
1115
+ totalCollected: { type: "money", columnKey: "totalCollected" },
1116
+ itemTax: { type: "money", columnKey: "taxCollected" },
1117
+ taxCollected: { type: "money", columnKey: "taxCollected" }
1118
+ };
1119
+ var ITEM_TAX_AVAILABLE_COLUMNS = [
1120
+ "merchantId",
1121
+ "locationName",
1122
+ "locationCity",
1123
+ "locationState",
1124
+ "itemName",
1125
+ "departmentName",
1126
+ "revenueClassName",
1127
+ "orderTypeName",
1128
+ "recordsCount",
1129
+ "itemPrice",
1130
+ "taxName",
1131
+ "taxRate",
1132
+ "taxableSales",
1133
+ "taxCollected"
1134
+ ];
1135
+ var ITEM_TAX_DEFAULT_VISIBLE_COLUMNS = ITEM_TAX_AVAILABLE_COLUMNS;
1136
+ var itemTaxConfig = {
1137
+ fields: FIELDS6,
1138
+ availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
1139
+ defaultVisibleColumns: ITEM_TAX_DEFAULT_VISIBLE_COLUMNS
1140
+ };
1141
+ // Annotate the CommonJS export names for ESM import in node:
1142
+ 0 && (module.exports = {
1143
+ COLUMN_REGISTRY,
1144
+ ITEM_TAX_AVAILABLE_COLUMNS,
1145
+ ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1146
+ MODIFIER_MIX_AVAILABLE_COLUMNS,
1147
+ MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS,
1148
+ PRODUCT_MIX_AVAILABLE_COLUMNS,
1149
+ PRODUCT_MIX_CHART_FIELDS,
1150
+ PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1151
+ SALES_SUMMARY_AVAILABLE_COLUMNS,
1152
+ SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
1153
+ TICKET_LIVE_AVAILABLE_COLUMNS,
1154
+ TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS,
1155
+ TICKET_SUMMARY_AVAILABLE_COLUMNS,
1156
+ TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
1157
+ calculateReportTotals,
1158
+ getColumnAlignment,
1159
+ getColumnMetadata,
1160
+ isNumericType,
1161
+ itemTaxConfig,
1162
+ modifierMixConfig,
1163
+ productMixConfig,
1164
+ salesSummaryConfig,
1165
+ ticketLiveConfig,
1166
+ ticketSummaryConfig
1167
+ });