@harbortouch/skytab-analytics-report-utils 0.5.2 → 0.6.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 +1141 -1127
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1140 -1127
- package/dist/report.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -61,6 +61,7 @@ __export(index_exports, {
|
|
|
61
61
|
employeeTimecardConfig: () => employeeTimecardConfig,
|
|
62
62
|
getColumnAlignment: () => getColumnAlignment,
|
|
63
63
|
getColumnMetadata: () => getColumnMetadata,
|
|
64
|
+
getReportConfig: () => getReportConfig,
|
|
64
65
|
isNumericType: () => isNumericType,
|
|
65
66
|
itemTaxConfig: () => itemTaxConfig,
|
|
66
67
|
modifierMixConfig: () => modifierMixConfig,
|
|
@@ -72,180 +73,915 @@ __export(index_exports, {
|
|
|
72
73
|
});
|
|
73
74
|
module.exports = __toCommonJS(index_exports);
|
|
74
75
|
|
|
75
|
-
// src/
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
titleKey: "common.report-col.fifteen-min-interval",
|
|
92
|
-
shortTitleKey: "common.report-col.fifteen-min-interval.short",
|
|
93
|
-
infoTextKey: "common.report-col.fifteen-min-interval.info"
|
|
94
|
-
},
|
|
95
|
-
adjustedTips: {
|
|
96
|
-
titleKey: "common.report-col.adjusted-tips",
|
|
97
|
-
shortTitleKey: "common.report-col.adjusted-tips.short",
|
|
98
|
-
infoTextKey: "common.report-col.adjusted-tips.info"
|
|
76
|
+
// src/reports/salesSummary.ts
|
|
77
|
+
var FIRST_COLUMN_WIDTH = 240;
|
|
78
|
+
var FIELDS = {
|
|
79
|
+
groupById: { type: "number" },
|
|
80
|
+
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
|
|
81
|
+
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
82
|
+
salesVarLW: { type: "money", columnKey: "salesVarLw" },
|
|
83
|
+
salesVarLY: { type: "money", columnKey: "salesVarLy" },
|
|
84
|
+
salesVarLWPct: {
|
|
85
|
+
type: "percent",
|
|
86
|
+
columnKey: "salesVarLwPct",
|
|
87
|
+
footerCalculation: {
|
|
88
|
+
type: "percentChange",
|
|
89
|
+
numeratorField: "salesAmountNet",
|
|
90
|
+
denominatorField: "salesAmountNetLastWeek"
|
|
91
|
+
}
|
|
99
92
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
93
|
+
salesVarLYPct: {
|
|
94
|
+
type: "percent",
|
|
95
|
+
columnKey: "salesVarLyPct",
|
|
96
|
+
footerCalculation: {
|
|
97
|
+
type: "percentChange",
|
|
98
|
+
numeratorField: "salesAmountNet",
|
|
99
|
+
denominatorField: "salesAmountNetLastYear"
|
|
100
|
+
}
|
|
104
101
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
salesAmountNetLastWeek: { type: "money" },
|
|
103
|
+
salesAmountNetLastYear: { type: "money" },
|
|
104
|
+
salesAmountGross: { type: "money" },
|
|
105
|
+
salesAmountGrossLastWeek: { type: "money" },
|
|
106
|
+
salesAmountGrossLastYear: { type: "money" },
|
|
107
|
+
ticketsCount: { type: "number" },
|
|
108
|
+
ticketsCountLastWeek: { type: "number" },
|
|
109
|
+
ticketsCountLastYear: { type: "number" },
|
|
110
|
+
guestsCount: { type: "number", columnKey: "guestCount" },
|
|
111
|
+
guestsVarLW: { type: "number", columnKey: "guestsVarLw" },
|
|
112
|
+
guestsVarLY: { type: "number", columnKey: "guestsVarLy" },
|
|
113
|
+
guestsVarLWPct: {
|
|
114
|
+
type: "percent",
|
|
115
|
+
columnKey: "guestsVarLwPct",
|
|
116
|
+
footerCalculation: {
|
|
117
|
+
type: "percentChange",
|
|
118
|
+
numeratorField: "guestsCount",
|
|
119
|
+
denominatorField: "guestsCountLastWeek"
|
|
120
|
+
}
|
|
109
121
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
guestsVarLYPct: {
|
|
123
|
+
type: "percent",
|
|
124
|
+
columnKey: "guestsVarLyPct",
|
|
125
|
+
footerCalculation: {
|
|
126
|
+
type: "percentChange",
|
|
127
|
+
numeratorField: "guestsCount",
|
|
128
|
+
denominatorField: "guestsCountLastYear"
|
|
129
|
+
}
|
|
114
130
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
131
|
+
guestsCountLastWeek: { type: "number" },
|
|
132
|
+
guestsCountLastYear: { type: "number" },
|
|
133
|
+
salesPerGuestTY: {
|
|
134
|
+
type: "money",
|
|
135
|
+
columnKey: "salesPerGuest",
|
|
136
|
+
footerCalculation: {
|
|
137
|
+
type: "average",
|
|
138
|
+
numeratorField: "salesAmountNet",
|
|
139
|
+
denominatorField: "guestsCount"
|
|
140
|
+
}
|
|
119
141
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
142
|
+
salesPerGuestLW: {
|
|
143
|
+
type: "money",
|
|
144
|
+
columnKey: "salesPerGuestLw",
|
|
145
|
+
footerCalculation: {
|
|
146
|
+
type: "average",
|
|
147
|
+
numeratorField: "salesAmountNetLastWeek",
|
|
148
|
+
denominatorField: "guestsCountLastWeek"
|
|
149
|
+
}
|
|
124
150
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
151
|
+
salesPerGuestLY: {
|
|
152
|
+
type: "money",
|
|
153
|
+
columnKey: "salesPerGuestLy",
|
|
154
|
+
footerCalculation: {
|
|
155
|
+
type: "average",
|
|
156
|
+
numeratorField: "salesAmountNetLastYear",
|
|
157
|
+
denominatorField: "guestsCountLastYear"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
var COLUMN_GROUPS = [
|
|
162
|
+
{
|
|
163
|
+
id: "sales",
|
|
164
|
+
headerTranslationKey: "table.groups.sales",
|
|
165
|
+
baseFields: ["salesAmountNet"],
|
|
166
|
+
lastWeekFields: ["salesVarLW", "salesVarLWPct"],
|
|
167
|
+
lastYearFields: ["salesVarLY", "salesVarLYPct"]
|
|
129
168
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
169
|
+
{
|
|
170
|
+
id: "guests",
|
|
171
|
+
headerTranslationKey: "table.groups.guests",
|
|
172
|
+
baseFields: ["guestsCount"],
|
|
173
|
+
lastWeekFields: ["guestsVarLW", "guestsVarLWPct"],
|
|
174
|
+
lastYearFields: ["guestsVarLY", "guestsVarLYPct"]
|
|
134
175
|
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
176
|
+
{
|
|
177
|
+
id: "salesPerGuest",
|
|
178
|
+
headerTranslationKey: "table.groups.sales-per-guest",
|
|
179
|
+
baseFields: ["salesPerGuestTY"],
|
|
180
|
+
lastWeekFields: ["salesPerGuestLW"],
|
|
181
|
+
lastYearFields: ["salesPerGuestLY"]
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
var SALES_SUMMARY_AVAILABLE_COLUMNS = [
|
|
185
|
+
"salesAmountNet",
|
|
186
|
+
"salesVarLW",
|
|
187
|
+
"salesVarLWPct",
|
|
188
|
+
"salesVarLY",
|
|
189
|
+
"salesVarLYPct",
|
|
190
|
+
"guestsCount",
|
|
191
|
+
"guestsVarLW",
|
|
192
|
+
"guestsVarLWPct",
|
|
193
|
+
"guestsVarLY",
|
|
194
|
+
"guestsVarLYPct",
|
|
195
|
+
"salesPerGuestTY",
|
|
196
|
+
"salesPerGuestLW",
|
|
197
|
+
"salesPerGuestLY"
|
|
198
|
+
];
|
|
199
|
+
var SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS = [
|
|
200
|
+
"salesAmountNet",
|
|
201
|
+
"guestsCount",
|
|
202
|
+
"salesPerGuestTY"
|
|
203
|
+
];
|
|
204
|
+
var salesSummaryConfig = {
|
|
205
|
+
fields: FIELDS,
|
|
206
|
+
availableColumns: SALES_SUMMARY_AVAILABLE_COLUMNS,
|
|
207
|
+
defaultVisibleColumns: SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
|
|
208
|
+
columnGroups: COLUMN_GROUPS
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// src/reports/ticketSummary.ts
|
|
212
|
+
var FIELDS2 = {
|
|
213
|
+
ticketId: { type: "string" },
|
|
214
|
+
locationId: { type: "number" },
|
|
215
|
+
orderName: { type: "string" },
|
|
216
|
+
revenueCenterName: { type: "string", columnKey: "revenueCenter" },
|
|
217
|
+
daypartName: { type: "string", columnKey: "daypart" },
|
|
218
|
+
inclusiveTaxesAmount: {
|
|
219
|
+
type: "money",
|
|
220
|
+
columnKey: "inclusiveTax",
|
|
221
|
+
footerCalculation: { type: "sum" }
|
|
139
222
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
223
|
+
locationName: { type: "string", size: 240, columnKey: "locationName" },
|
|
224
|
+
orderNumber: { type: "number", columnKey: "ticketNumber", footerCalculation: { type: "none" } },
|
|
225
|
+
businessDate: { type: "date", columnKey: "date" },
|
|
226
|
+
ticketOpenedAt: { type: "time", columnKey: "ticketOpen" },
|
|
227
|
+
ticketClosedAt: { type: "time", columnKey: "ticketClosed" },
|
|
228
|
+
ticketTime: { type: "number", columnKey: "timeOpenMins", enableSorting: false },
|
|
229
|
+
ticketSubtotal: {
|
|
230
|
+
type: "money",
|
|
231
|
+
columnKey: "subtotal",
|
|
232
|
+
footerCalculation: { type: "sum" }
|
|
144
233
|
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
234
|
+
discountsAmount: {
|
|
235
|
+
type: "money",
|
|
236
|
+
columnKey: "discountAmount",
|
|
237
|
+
footerCalculation: { type: "sum" }
|
|
149
238
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
239
|
+
surchargesAmount: {
|
|
240
|
+
type: "money",
|
|
241
|
+
columnKey: "ticketFee",
|
|
242
|
+
footerCalculation: { type: "sum" }
|
|
154
243
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
244
|
+
taxesAmount: {
|
|
245
|
+
type: "money",
|
|
246
|
+
columnKey: "taxCollected",
|
|
247
|
+
footerCalculation: { type: "sum" }
|
|
159
248
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
249
|
+
ticketGrandTotal: {
|
|
250
|
+
type: "money",
|
|
251
|
+
columnKey: "grandTotal",
|
|
252
|
+
footerCalculation: { type: "sum" }
|
|
164
253
|
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
254
|
+
gratuitiesAmount: {
|
|
255
|
+
type: "money",
|
|
256
|
+
columnKey: "autoGratuity",
|
|
257
|
+
footerCalculation: { type: "sum" }
|
|
169
258
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
259
|
+
tipAmount: {
|
|
260
|
+
type: "money",
|
|
261
|
+
columnKey: "tips",
|
|
262
|
+
footerCalculation: { type: "sum" }
|
|
174
263
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
daypart: {
|
|
181
|
-
titleKey: "common.report-col.daypart",
|
|
182
|
-
shortTitleKey: "common.report-col.daypart.short",
|
|
183
|
-
infoTextKey: "common.report-col.daypart.info"
|
|
184
|
-
},
|
|
185
|
-
debit: {
|
|
186
|
-
titleKey: "common.report-col.debit",
|
|
187
|
-
shortTitleKey: "common.report-col.debit.short",
|
|
188
|
-
infoTextKey: "common.report-col.debit.info"
|
|
189
|
-
},
|
|
190
|
-
debitReturns: {
|
|
191
|
-
titleKey: "common.report-col.debit-returns",
|
|
192
|
-
shortTitleKey: "common.report-col.debit-returns.short",
|
|
193
|
-
infoTextKey: "common.report-col.debit-returns.info"
|
|
194
|
-
},
|
|
195
|
-
declaredTips: {
|
|
196
|
-
titleKey: "common.report-col.declared-tips",
|
|
197
|
-
shortTitleKey: "common.report-col.declared-tips.short",
|
|
198
|
-
infoTextKey: "common.report-col.declared-tips.info"
|
|
199
|
-
},
|
|
200
|
-
department: {
|
|
201
|
-
titleKey: "common.report-col.department",
|
|
202
|
-
shortTitleKey: "common.report-col.department.short",
|
|
203
|
-
infoTextKey: "common.report-col.department.info"
|
|
264
|
+
paymentsAmount: {
|
|
265
|
+
type: "money",
|
|
266
|
+
columnKey: "totalCollected",
|
|
267
|
+
footerCalculation: { type: "sum" }
|
|
204
268
|
},
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
269
|
+
paymentTypeName: { type: "string", columnKey: "paymentType" },
|
|
270
|
+
guestsCount: {
|
|
271
|
+
type: "number",
|
|
272
|
+
columnKey: "guestCount",
|
|
273
|
+
footerCalculation: { type: "sum" }
|
|
209
274
|
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
275
|
+
employeeName: { type: "string", columnKey: "employeeName" },
|
|
276
|
+
orderTypeName: { type: "string", columnKey: "orderType" }
|
|
277
|
+
};
|
|
278
|
+
var TICKET_SUMMARY_AVAILABLE_COLUMNS = [
|
|
279
|
+
"locationName",
|
|
280
|
+
"orderNumber",
|
|
281
|
+
"businessDate",
|
|
282
|
+
"ticketOpenedAt",
|
|
283
|
+
"ticketClosedAt",
|
|
284
|
+
"ticketTime",
|
|
285
|
+
"ticketSubtotal",
|
|
286
|
+
"discountsAmount",
|
|
287
|
+
"surchargesAmount",
|
|
288
|
+
"taxesAmount",
|
|
289
|
+
"ticketGrandTotal",
|
|
290
|
+
"gratuitiesAmount",
|
|
291
|
+
"tipAmount",
|
|
292
|
+
"paymentsAmount",
|
|
293
|
+
"paymentTypeName",
|
|
294
|
+
"guestsCount",
|
|
295
|
+
"employeeName",
|
|
296
|
+
"orderTypeName"
|
|
297
|
+
];
|
|
298
|
+
var TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS = TICKET_SUMMARY_AVAILABLE_COLUMNS;
|
|
299
|
+
var ticketSummaryConfig = {
|
|
300
|
+
fields: FIELDS2,
|
|
301
|
+
availableColumns: TICKET_SUMMARY_AVAILABLE_COLUMNS,
|
|
302
|
+
defaultVisibleColumns: TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
// src/reports/ticketLive.ts
|
|
306
|
+
var FIELDS3 = {
|
|
307
|
+
locationName: { type: "string", columnKey: "locationName" },
|
|
308
|
+
orderNumber: {
|
|
309
|
+
type: "number",
|
|
310
|
+
columnKey: "ticketNumber",
|
|
311
|
+
footerCalculation: { type: "none" }
|
|
214
312
|
},
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
313
|
+
dateOpen: { type: "string", columnKey: "date" },
|
|
314
|
+
timeOpen: { type: "string", columnKey: "ticketOpen" },
|
|
315
|
+
dateClose: { type: "string", columnKey: "dateClose" },
|
|
316
|
+
timeClose: { type: "string", columnKey: "ticketClosed" },
|
|
317
|
+
durationMinutes: { type: "number", columnKey: "timeOpenMins" },
|
|
318
|
+
subtotal: { type: "money", columnKey: "subtotal" },
|
|
319
|
+
discountTotal: { type: "money", columnKey: "discountAmount" },
|
|
320
|
+
surchargeTotal: { type: "money", columnKey: "ticketFee" },
|
|
321
|
+
taxTotal: { type: "money", columnKey: "taxCollected" },
|
|
322
|
+
grandTotal: { type: "money", columnKey: "grandTotal" },
|
|
323
|
+
gratuityTotal: { type: "money", columnKey: "autoGratuity" },
|
|
324
|
+
totalTips: { type: "money", columnKey: "totalTips" },
|
|
325
|
+
paymentsReceived: { type: "money", columnKey: "totalCollected" },
|
|
326
|
+
paymentTypeName: { type: "string", columnKey: "paymentType" },
|
|
327
|
+
guestCount: {
|
|
328
|
+
type: "number",
|
|
329
|
+
columnKey: "guestCount",
|
|
330
|
+
footerCalculation: { type: "sum" }
|
|
219
331
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
332
|
+
customerName: { type: "string", columnKey: "customerName" },
|
|
333
|
+
employeeName: { type: "string", columnKey: "employeeName" },
|
|
334
|
+
orderType: { type: "string", columnKey: "orderType" }
|
|
335
|
+
};
|
|
336
|
+
var TICKET_LIVE_AVAILABLE_COLUMNS = [
|
|
337
|
+
"locationName",
|
|
338
|
+
"orderNumber",
|
|
339
|
+
"dateOpen",
|
|
340
|
+
"timeOpen",
|
|
341
|
+
"timeClose",
|
|
342
|
+
"durationMinutes",
|
|
343
|
+
"subtotal",
|
|
344
|
+
"discountTotal",
|
|
345
|
+
"surchargeTotal",
|
|
346
|
+
"taxTotal",
|
|
347
|
+
"grandTotal",
|
|
348
|
+
"gratuityTotal",
|
|
349
|
+
"totalTips",
|
|
350
|
+
"paymentsReceived",
|
|
351
|
+
"paymentTypeName",
|
|
352
|
+
"guestCount",
|
|
353
|
+
"employeeName",
|
|
354
|
+
"orderType"
|
|
355
|
+
];
|
|
356
|
+
var TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS = TICKET_LIVE_AVAILABLE_COLUMNS;
|
|
357
|
+
var ticketLiveConfig = {
|
|
358
|
+
fields: FIELDS3,
|
|
359
|
+
availableColumns: TICKET_LIVE_AVAILABLE_COLUMNS,
|
|
360
|
+
defaultVisibleColumns: TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
// src/reports/productMix.ts
|
|
364
|
+
var FIRST_COLUMN_WIDTH2 = 240;
|
|
365
|
+
var FIELDS4 = {
|
|
366
|
+
groupById: { type: "string" },
|
|
367
|
+
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH2 },
|
|
368
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
369
|
+
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
370
|
+
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
371
|
+
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
372
|
+
itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
|
|
373
|
+
avgPrice: {
|
|
374
|
+
type: "fixedNumber",
|
|
375
|
+
columnKey: "averageGrossPrice",
|
|
376
|
+
footerCalculation: {
|
|
377
|
+
type: "average",
|
|
378
|
+
numeratorField: "salesAmountGross",
|
|
379
|
+
denominatorField: "itemsQuantity"
|
|
380
|
+
}
|
|
224
381
|
},
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
382
|
+
salesMixPct: { type: "percent", columnKey: "salesMixByPct" }
|
|
383
|
+
};
|
|
384
|
+
var PRODUCT_MIX_AVAILABLE_COLUMNS = [
|
|
385
|
+
"salesAmountGross",
|
|
386
|
+
"discountsAmount",
|
|
387
|
+
"inclusiveTaxesAmount",
|
|
388
|
+
"salesAmountNet",
|
|
389
|
+
"itemsQuantity",
|
|
390
|
+
"avgPrice",
|
|
391
|
+
"salesMixPct"
|
|
392
|
+
];
|
|
393
|
+
var PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS = PRODUCT_MIX_AVAILABLE_COLUMNS;
|
|
394
|
+
var PRODUCT_MIX_CHART_FIELDS = [
|
|
395
|
+
"salesAmountGross",
|
|
396
|
+
"itemsQuantity",
|
|
397
|
+
"avgPrice",
|
|
398
|
+
"discountsAmount",
|
|
399
|
+
"inclusiveTaxesAmount",
|
|
400
|
+
"salesAmountNet",
|
|
401
|
+
"salesMixPct"
|
|
402
|
+
];
|
|
403
|
+
var productMixConfig = {
|
|
404
|
+
fields: FIELDS4,
|
|
405
|
+
availableColumns: PRODUCT_MIX_AVAILABLE_COLUMNS,
|
|
406
|
+
defaultVisibleColumns: PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
// src/reports/modifierMix.ts
|
|
410
|
+
var FIRST_COLUMN_WIDTH3 = 240;
|
|
411
|
+
var FIELDS5 = {
|
|
412
|
+
groupById: { type: "string", filteringAvailable: false },
|
|
413
|
+
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH3, filteringAvailable: false },
|
|
414
|
+
groupById2: { type: "string", filteringAvailable: false },
|
|
415
|
+
groupByName2: { type: "string", size: FIRST_COLUMN_WIDTH3, filteringAvailable: false },
|
|
416
|
+
modifiersSales: { type: "money", columnKey: "totalModifierSales" },
|
|
417
|
+
modifiersQuantity: { type: "number", columnKey: "modifierQuantity" },
|
|
418
|
+
itemsQuantity: {
|
|
419
|
+
type: "number",
|
|
420
|
+
columnKey: "quantity",
|
|
421
|
+
filteringAvailable: false
|
|
229
422
|
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
423
|
+
avgGross: {
|
|
424
|
+
type: "money",
|
|
425
|
+
columnKey: "averageGrossPrice",
|
|
426
|
+
footerCalculation: {
|
|
427
|
+
type: "average",
|
|
428
|
+
numeratorField: "modifiersSales",
|
|
429
|
+
denominatorField: "modifiersQuantity"
|
|
430
|
+
}
|
|
234
431
|
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
432
|
+
attachRate: {
|
|
433
|
+
type: "percent",
|
|
434
|
+
columnKey: "attachRate",
|
|
435
|
+
footerCalculation: {
|
|
436
|
+
type: "average",
|
|
437
|
+
numeratorField: "modifiersQuantity",
|
|
438
|
+
denominatorField: "itemsQuantity"
|
|
439
|
+
}
|
|
239
440
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
441
|
+
modifiersSalesComp: { type: "money", filteringAvailable: false },
|
|
442
|
+
modifiersQuantityComp: { type: "number", filteringAvailable: false },
|
|
443
|
+
itemsQuantityComp: { type: "number", filteringAvailable: false },
|
|
444
|
+
attachRateComp: { type: "percent", filteringAvailable: false },
|
|
445
|
+
modifiersSalesVar: { type: "money", filteringAvailable: false },
|
|
446
|
+
modifiersSalesVarPct: {
|
|
447
|
+
type: "percent",
|
|
448
|
+
filteringAvailable: false,
|
|
449
|
+
footerCalculation: {
|
|
450
|
+
type: "percentChange",
|
|
451
|
+
numeratorField: "modifiersSales",
|
|
452
|
+
denominatorField: "modifiersSalesComp"
|
|
453
|
+
}
|
|
244
454
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
455
|
+
modifiersQuantityVar: { type: "number", filteringAvailable: false },
|
|
456
|
+
modifiersQuantityVarPct: {
|
|
457
|
+
type: "percent",
|
|
458
|
+
filteringAvailable: false,
|
|
459
|
+
footerCalculation: {
|
|
460
|
+
type: "percentChange",
|
|
461
|
+
numeratorField: "modifiersQuantity",
|
|
462
|
+
denominatorField: "modifiersQuantityComp"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
attachRateVar: { type: "percent", filteringAvailable: false },
|
|
466
|
+
attachRateVarPct: {
|
|
467
|
+
type: "percent",
|
|
468
|
+
filteringAvailable: false,
|
|
469
|
+
footerCalculation: {
|
|
470
|
+
type: "percentChange",
|
|
471
|
+
numeratorField: "attachRate",
|
|
472
|
+
denominatorField: "attachRateComp"
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
var MODIFIER_MIX_AVAILABLE_COLUMNS = ["modifiersSales", "modifiersQuantity", "avgGross"];
|
|
477
|
+
var MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS = MODIFIER_MIX_AVAILABLE_COLUMNS;
|
|
478
|
+
var modifierMixConfig = {
|
|
479
|
+
fields: FIELDS5,
|
|
480
|
+
availableColumns: MODIFIER_MIX_AVAILABLE_COLUMNS,
|
|
481
|
+
defaultVisibleColumns: MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// src/reports/itemTax.ts
|
|
485
|
+
var FIELDS6 = {
|
|
486
|
+
locationId: { type: "number", filteringAvailable: false },
|
|
487
|
+
taxIsFlat: { type: "boolean", filteringAvailable: false },
|
|
488
|
+
merchantId: { type: "string", columnKey: "locationMid", filteringAvailable: false },
|
|
489
|
+
locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
|
|
490
|
+
locationCity: { type: "string", columnKey: "locationCity", filteringAvailable: false },
|
|
491
|
+
locationState: { type: "string", columnKey: "locationState", filteringAvailable: false },
|
|
492
|
+
itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
|
|
493
|
+
itemPrice: { type: "money", columnKey: "itemPrice" },
|
|
494
|
+
departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
|
|
495
|
+
revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
|
|
496
|
+
orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
|
|
497
|
+
taxName: { type: "string", columnKey: "taxName", filteringAvailable: false },
|
|
498
|
+
taxValue: { type: "money", columnKey: "taxableSales" },
|
|
499
|
+
taxRate: { type: "number", columnKey: "taxRate" },
|
|
500
|
+
recordsCount: { type: "number", columnKey: "quantity" },
|
|
501
|
+
taxableSales: { type: "money", columnKey: "taxableSales" },
|
|
502
|
+
totalCollected: { type: "money", columnKey: "totalCollected" },
|
|
503
|
+
itemTax: { type: "money", columnKey: "taxCollected" },
|
|
504
|
+
taxCollected: { type: "money", columnKey: "taxCollected" }
|
|
505
|
+
};
|
|
506
|
+
var ITEM_TAX_AVAILABLE_COLUMNS = [
|
|
507
|
+
"merchantId",
|
|
508
|
+
"locationName",
|
|
509
|
+
"locationCity",
|
|
510
|
+
"locationState",
|
|
511
|
+
"itemName",
|
|
512
|
+
"departmentName",
|
|
513
|
+
"revenueClassName",
|
|
514
|
+
"orderTypeName",
|
|
515
|
+
"recordsCount",
|
|
516
|
+
"itemPrice",
|
|
517
|
+
"taxName",
|
|
518
|
+
"taxRate",
|
|
519
|
+
"taxableSales",
|
|
520
|
+
"taxCollected"
|
|
521
|
+
];
|
|
522
|
+
var ITEM_TAX_DEFAULT_VISIBLE_COLUMNS = ITEM_TAX_AVAILABLE_COLUMNS;
|
|
523
|
+
var itemTaxConfig = {
|
|
524
|
+
fields: FIELDS6,
|
|
525
|
+
availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
|
|
526
|
+
defaultVisibleColumns: ITEM_TAX_DEFAULT_VISIBLE_COLUMNS
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
// src/reports/dailySales.ts
|
|
530
|
+
var FIRST_COLUMN_WIDTH4 = 240;
|
|
531
|
+
var FIELDS7 = {
|
|
532
|
+
groupById: { type: "string" },
|
|
533
|
+
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH4 },
|
|
534
|
+
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
535
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
536
|
+
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
537
|
+
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
538
|
+
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
539
|
+
salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
|
|
540
|
+
avgPrice: {
|
|
541
|
+
type: "fixedNumber",
|
|
542
|
+
columnKey: "averageGrossPrice",
|
|
543
|
+
footerCalculation: {
|
|
544
|
+
type: "average",
|
|
545
|
+
numeratorField: "salesAmountGross",
|
|
546
|
+
denominatorField: "itemsQuantity"
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
ticketsCount: { type: "number", columnKey: "tickets" },
|
|
550
|
+
guestsCount: { type: "number", columnKey: "guests" },
|
|
551
|
+
ticketAverage: {
|
|
552
|
+
type: "money",
|
|
553
|
+
columnKey: "ticketAverage",
|
|
554
|
+
footerCalculation: {
|
|
555
|
+
type: "average",
|
|
556
|
+
numeratorField: "salesAmountNet",
|
|
557
|
+
denominatorField: "ticketsCount"
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
guestAverage: {
|
|
561
|
+
type: "money",
|
|
562
|
+
columnKey: "guestAverage",
|
|
563
|
+
footerCalculation: {
|
|
564
|
+
type: "average",
|
|
565
|
+
numeratorField: "salesAmountNet",
|
|
566
|
+
denominatorField: "guestsCount"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
ticketAvg: {
|
|
570
|
+
type: "money",
|
|
571
|
+
columnKey: "ticketAverage",
|
|
572
|
+
footerCalculation: {
|
|
573
|
+
type: "average",
|
|
574
|
+
numeratorField: "salesAmountNet",
|
|
575
|
+
denominatorField: "ticketsCount"
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
guestAvg: {
|
|
579
|
+
type: "money",
|
|
580
|
+
columnKey: "guestAverage",
|
|
581
|
+
footerCalculation: {
|
|
582
|
+
type: "average",
|
|
583
|
+
numeratorField: "salesAmountNet",
|
|
584
|
+
denominatorField: "guestsCount"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
var DAILY_SALES_AVAILABLE_COLUMNS = [
|
|
589
|
+
"itemsQuantity",
|
|
590
|
+
"salesAmountGross",
|
|
591
|
+
"discountsAmount",
|
|
592
|
+
"inclusiveTaxesAmount",
|
|
593
|
+
"salesAmountNet",
|
|
594
|
+
"salesMixPct"
|
|
595
|
+
];
|
|
596
|
+
var DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS = [
|
|
597
|
+
"ticketsCount",
|
|
598
|
+
"guestsCount",
|
|
599
|
+
"ticketAverage",
|
|
600
|
+
"guestAverage",
|
|
601
|
+
"salesAmountNet"
|
|
602
|
+
];
|
|
603
|
+
var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
|
|
604
|
+
var dailySalesConfig = {
|
|
605
|
+
fields: FIELDS7,
|
|
606
|
+
availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
|
|
607
|
+
defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
|
|
608
|
+
};
|
|
609
|
+
var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
|
|
610
|
+
"ticketsCount",
|
|
611
|
+
"guestsCount",
|
|
612
|
+
"ticketAvg",
|
|
613
|
+
"guestAvg",
|
|
614
|
+
"salesAmountNet"
|
|
615
|
+
];
|
|
616
|
+
var dailySalesTrendsConfig = {
|
|
617
|
+
fields: FIELDS7,
|
|
618
|
+
availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
|
|
619
|
+
defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
// src/reports/dailySalesPayments.ts
|
|
623
|
+
var FIRST_COLUMN_WIDTH5 = 240;
|
|
624
|
+
var FIELDS8 = {
|
|
625
|
+
paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH5 },
|
|
626
|
+
paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
|
|
627
|
+
paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
|
|
628
|
+
tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
|
|
629
|
+
totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
|
|
630
|
+
};
|
|
631
|
+
var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
|
|
632
|
+
"paymentsCount",
|
|
633
|
+
"paymentsAmount",
|
|
634
|
+
"tipsAmount",
|
|
635
|
+
"totalSales"
|
|
636
|
+
];
|
|
637
|
+
var DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS;
|
|
638
|
+
var dailySalesPaymentsConfig = {
|
|
639
|
+
fields: FIELDS8,
|
|
640
|
+
availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
641
|
+
defaultVisibleColumns: DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
// src/reports/dailySalesDiscounts.ts
|
|
645
|
+
var FIRST_COLUMN_WIDTH6 = 240;
|
|
646
|
+
var FIELDS9 = {
|
|
647
|
+
discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH6 },
|
|
648
|
+
discountsCount: { type: "number", columnKey: "discountCount", footerCalculation: { type: "sum" } },
|
|
649
|
+
discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
|
|
650
|
+
};
|
|
651
|
+
var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
|
|
652
|
+
"discountsCount",
|
|
653
|
+
"discountsAmount"
|
|
654
|
+
];
|
|
655
|
+
var DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS;
|
|
656
|
+
var dailySalesDiscountsConfig = {
|
|
657
|
+
fields: FIELDS9,
|
|
658
|
+
availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
|
|
659
|
+
defaultVisibleColumns: DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
// src/reports/employeeTimecard.ts
|
|
663
|
+
var FIRST_COLUMN_WIDTH7 = 240;
|
|
664
|
+
var EMPLOYEE_NAME_WIDTH = 220;
|
|
665
|
+
var STATUS_WIDTH = 140;
|
|
666
|
+
var LOOKUP_WIDTH = 160;
|
|
667
|
+
var PAYROLL_WIDTH = 160;
|
|
668
|
+
var JOB_WIDTH = 200;
|
|
669
|
+
var FIELDS10 = {
|
|
670
|
+
locationId: {
|
|
671
|
+
type: "number",
|
|
672
|
+
enableSorting: false,
|
|
673
|
+
filteringAvailable: false
|
|
674
|
+
},
|
|
675
|
+
locationName: {
|
|
676
|
+
type: "string",
|
|
677
|
+
size: FIRST_COLUMN_WIDTH7,
|
|
678
|
+
columnKey: "locationName"
|
|
679
|
+
},
|
|
680
|
+
businessDate: {
|
|
681
|
+
type: "date",
|
|
682
|
+
columnKey: "date"
|
|
683
|
+
},
|
|
684
|
+
employeeName: {
|
|
685
|
+
type: "string",
|
|
686
|
+
size: EMPLOYEE_NAME_WIDTH,
|
|
687
|
+
columnKey: "employeeName"
|
|
688
|
+
},
|
|
689
|
+
isActive: {
|
|
690
|
+
type: "string",
|
|
691
|
+
size: STATUS_WIDTH,
|
|
692
|
+
columnKey: "status",
|
|
693
|
+
enableSorting: false,
|
|
694
|
+
filteringAvailable: false
|
|
695
|
+
},
|
|
696
|
+
lookup: {
|
|
697
|
+
type: "string",
|
|
698
|
+
size: LOOKUP_WIDTH,
|
|
699
|
+
columnKey: "employeeId"
|
|
700
|
+
},
|
|
701
|
+
payrollCode: {
|
|
702
|
+
type: "string",
|
|
703
|
+
size: PAYROLL_WIDTH,
|
|
704
|
+
columnKey: "payrollId"
|
|
705
|
+
},
|
|
706
|
+
jobName: {
|
|
707
|
+
type: "string",
|
|
708
|
+
size: JOB_WIDTH,
|
|
709
|
+
columnKey: "employeeJob"
|
|
710
|
+
},
|
|
711
|
+
isBreak: {
|
|
712
|
+
type: "string",
|
|
713
|
+
enableSorting: false,
|
|
714
|
+
filteringAvailable: false
|
|
715
|
+
},
|
|
716
|
+
startTime: {
|
|
717
|
+
type: "string",
|
|
718
|
+
columnKey: "clockInTime"
|
|
719
|
+
},
|
|
720
|
+
endTime: {
|
|
721
|
+
type: "string",
|
|
722
|
+
columnKey: "clockOutTime"
|
|
723
|
+
},
|
|
724
|
+
shiftHours: {
|
|
725
|
+
type: "fixedNumber",
|
|
726
|
+
columnKey: "shiftDurationHrs",
|
|
727
|
+
filteringAvailable: false
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
|
|
731
|
+
"locationName",
|
|
732
|
+
"businessDate",
|
|
733
|
+
"employeeName",
|
|
734
|
+
"isActive",
|
|
735
|
+
"lookup",
|
|
736
|
+
"payrollCode",
|
|
737
|
+
"jobName",
|
|
738
|
+
"startTime",
|
|
739
|
+
"endTime",
|
|
740
|
+
"shiftHours"
|
|
741
|
+
];
|
|
742
|
+
var EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS = EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS;
|
|
743
|
+
var employeeTimecardConfig = {
|
|
744
|
+
fields: FIELDS10,
|
|
745
|
+
availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
|
|
746
|
+
defaultVisibleColumns: EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
|
|
747
|
+
columnGroups: []
|
|
748
|
+
// No column groups for this report
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
// src/reports/salesByItemDetail.ts
|
|
752
|
+
var FIELDS11 = {
|
|
753
|
+
businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
|
|
754
|
+
ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
|
|
755
|
+
hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
|
|
756
|
+
daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
|
|
757
|
+
locationId: { type: "number", columnKey: "locationId", filteringAvailable: false },
|
|
758
|
+
locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
|
|
759
|
+
departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
|
|
760
|
+
itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
|
|
761
|
+
revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
|
|
762
|
+
revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
|
|
763
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
764
|
+
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
765
|
+
transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
|
|
766
|
+
guestsCount: { type: "number", columnKey: "guestCount" },
|
|
767
|
+
employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
|
|
768
|
+
orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
|
|
769
|
+
salesType: { type: "string", columnKey: "salePaymentType", filteringAvailable: false },
|
|
770
|
+
itemPrice: { type: "money", columnKey: "itemPrice" }
|
|
771
|
+
};
|
|
772
|
+
var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
|
|
773
|
+
"businessDate",
|
|
774
|
+
"ticketClosedAt",
|
|
775
|
+
"hourId",
|
|
776
|
+
"daypartName",
|
|
777
|
+
"locationId",
|
|
778
|
+
"locationName",
|
|
779
|
+
"departmentName",
|
|
780
|
+
"itemName",
|
|
781
|
+
"revenueCenterName",
|
|
782
|
+
"revenueClassName",
|
|
783
|
+
"salesAmountGross",
|
|
784
|
+
"itemsQuantity",
|
|
785
|
+
"transactionId",
|
|
786
|
+
"guestsCount",
|
|
787
|
+
"employeeName",
|
|
788
|
+
"orderTypeName",
|
|
789
|
+
"salesType",
|
|
790
|
+
"itemPrice"
|
|
791
|
+
];
|
|
792
|
+
var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
|
|
793
|
+
var salesByItemDetailConfig = {
|
|
794
|
+
fields: FIELDS11,
|
|
795
|
+
availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
|
|
796
|
+
defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
// src/report.ts
|
|
800
|
+
var Report = {
|
|
801
|
+
TICKET_LIVE: "ticket-live",
|
|
802
|
+
TICKET_ANALYTICS: "ticket-analytics",
|
|
803
|
+
SALES_SUMMARY: "sales-summary",
|
|
804
|
+
PRODUCT_MIX: "product-mix",
|
|
805
|
+
MODIFIER_MIX: "modifier-mix",
|
|
806
|
+
ITEM_TAX: "item-tax",
|
|
807
|
+
EMPLOYEE_TIMECARD: "employee-timecard",
|
|
808
|
+
EMPLOYEE_TIP: "employee-tip",
|
|
809
|
+
SALES_BY_ITEM: "sales-by-item"
|
|
810
|
+
};
|
|
811
|
+
var REPORT_CONFIG_MAP = {
|
|
812
|
+
"sales-summary": salesSummaryConfig,
|
|
813
|
+
"ticket-analytics": ticketSummaryConfig,
|
|
814
|
+
"ticket-live": ticketLiveConfig,
|
|
815
|
+
"product-mix": productMixConfig,
|
|
816
|
+
"modifier-mix": modifierMixConfig,
|
|
817
|
+
"item-tax": itemTaxConfig,
|
|
818
|
+
"employee-timecard": employeeTimecardConfig,
|
|
819
|
+
"employee-tip": null,
|
|
820
|
+
"sales-by-item": salesByItemDetailConfig
|
|
821
|
+
};
|
|
822
|
+
var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
|
|
823
|
+
|
|
824
|
+
// src/columns/index.ts
|
|
825
|
+
var COLUMN_REGISTRY = {
|
|
826
|
+
fifteenMinInterval: {
|
|
827
|
+
titleKey: "common.report-col.fifteen-min-interval",
|
|
828
|
+
shortTitleKey: "common.report-col.fifteen-min-interval.short",
|
|
829
|
+
infoTextKey: "common.report-col.fifteen-min-interval.info"
|
|
830
|
+
},
|
|
831
|
+
adjustedTips: {
|
|
832
|
+
titleKey: "common.report-col.adjusted-tips",
|
|
833
|
+
shortTitleKey: "common.report-col.adjusted-tips.short",
|
|
834
|
+
infoTextKey: "common.report-col.adjusted-tips.info"
|
|
835
|
+
},
|
|
836
|
+
advantageProgram: {
|
|
837
|
+
titleKey: "common.report-col.advantage-program",
|
|
838
|
+
shortTitleKey: "common.report-col.advantage-program.short",
|
|
839
|
+
infoTextKey: "common.report-col.advantage-program.info"
|
|
840
|
+
},
|
|
841
|
+
amex: {
|
|
842
|
+
titleKey: "common.report-col.amex",
|
|
843
|
+
shortTitleKey: "common.report-col.amex.short",
|
|
844
|
+
infoTextKey: "common.report-col.amex.info"
|
|
845
|
+
},
|
|
846
|
+
amexReturns: {
|
|
847
|
+
titleKey: "common.report-col.amex-returns",
|
|
848
|
+
shortTitleKey: "common.report-col.amex-returns.short",
|
|
849
|
+
infoTextKey: "common.report-col.amex-returns.info"
|
|
850
|
+
},
|
|
851
|
+
attachRate: {
|
|
852
|
+
titleKey: "common.report-col.attach-rate",
|
|
853
|
+
shortTitleKey: "common.report-col.attach-rate.short",
|
|
854
|
+
infoTextKey: "common.report-col.attach-rate.info"
|
|
855
|
+
},
|
|
856
|
+
autoGratuity: {
|
|
857
|
+
titleKey: "common.report-col.auto-gratuity",
|
|
858
|
+
shortTitleKey: "common.report-col.auto-gratuity.short",
|
|
859
|
+
infoTextKey: "common.report-col.auto-gratuity.info"
|
|
860
|
+
},
|
|
861
|
+
averageGrossPrice: {
|
|
862
|
+
titleKey: "common.report-col.average-gross-price",
|
|
863
|
+
shortTitleKey: "common.report-col.average-gross-price.short",
|
|
864
|
+
infoTextKey: "common.report-col.average-gross-price.info"
|
|
865
|
+
},
|
|
866
|
+
bankFees: {
|
|
867
|
+
titleKey: "common.report-col.bank-fees",
|
|
868
|
+
shortTitleKey: "common.report-col.bank-fees.short",
|
|
869
|
+
infoTextKey: "common.report-col.bank-fees.info"
|
|
870
|
+
},
|
|
871
|
+
batchAmount: {
|
|
872
|
+
titleKey: "common.report-col.batch-amount",
|
|
873
|
+
shortTitleKey: "common.report-col.batch-amount.short",
|
|
874
|
+
infoTextKey: "common.report-col.batch-amount.info"
|
|
875
|
+
},
|
|
876
|
+
batchDate: {
|
|
877
|
+
titleKey: "common.report-col.batch-date",
|
|
878
|
+
shortTitleKey: "common.report-col.batch-date.short",
|
|
879
|
+
infoTextKey: "common.report-col.batch-date.info"
|
|
880
|
+
},
|
|
881
|
+
batchNumber: {
|
|
882
|
+
titleKey: "common.report-col.batch-number",
|
|
883
|
+
shortTitleKey: "common.report-col.batch-number.short",
|
|
884
|
+
infoTextKey: "common.report-col.batch-number.info"
|
|
885
|
+
},
|
|
886
|
+
clockInTime: {
|
|
887
|
+
titleKey: "common.report-col.clock-in-time",
|
|
888
|
+
shortTitleKey: "common.report-col.clock-in-time.short",
|
|
889
|
+
infoTextKey: "common.report-col.clock-in-time.info"
|
|
890
|
+
},
|
|
891
|
+
clockOutTime: {
|
|
892
|
+
titleKey: "common.report-col.clock-out-time",
|
|
893
|
+
shortTitleKey: "common.report-col.clock-out-time.short",
|
|
894
|
+
infoTextKey: "common.report-col.clock-out-time.info"
|
|
895
|
+
},
|
|
896
|
+
country: {
|
|
897
|
+
titleKey: "common.report-col.country",
|
|
898
|
+
shortTitleKey: "common.report-col.country.short",
|
|
899
|
+
infoTextKey: "common.report-col.country.info"
|
|
900
|
+
},
|
|
901
|
+
customerName: {
|
|
902
|
+
titleKey: "common.report-col.customer-name",
|
|
903
|
+
shortTitleKey: "common.report-col.customer-name.short",
|
|
904
|
+
infoTextKey: "common.report-col.customer-name.info"
|
|
905
|
+
},
|
|
906
|
+
date: {
|
|
907
|
+
titleKey: "common.report-col.date",
|
|
908
|
+
shortTitleKey: "common.report-col.date.short",
|
|
909
|
+
infoTextKey: "common.report-col.date.info"
|
|
910
|
+
},
|
|
911
|
+
dateClose: {
|
|
912
|
+
titleKey: "common.report-col.date-close",
|
|
913
|
+
shortTitleKey: "common.report-col.date-close.short",
|
|
914
|
+
infoTextKey: "common.report-col.date-close.info"
|
|
915
|
+
},
|
|
916
|
+
daypart: {
|
|
917
|
+
titleKey: "common.report-col.daypart",
|
|
918
|
+
shortTitleKey: "common.report-col.daypart.short",
|
|
919
|
+
infoTextKey: "common.report-col.daypart.info"
|
|
920
|
+
},
|
|
921
|
+
debit: {
|
|
922
|
+
titleKey: "common.report-col.debit",
|
|
923
|
+
shortTitleKey: "common.report-col.debit.short",
|
|
924
|
+
infoTextKey: "common.report-col.debit.info"
|
|
925
|
+
},
|
|
926
|
+
debitReturns: {
|
|
927
|
+
titleKey: "common.report-col.debit-returns",
|
|
928
|
+
shortTitleKey: "common.report-col.debit-returns.short",
|
|
929
|
+
infoTextKey: "common.report-col.debit-returns.info"
|
|
930
|
+
},
|
|
931
|
+
declaredTips: {
|
|
932
|
+
titleKey: "common.report-col.declared-tips",
|
|
933
|
+
shortTitleKey: "common.report-col.declared-tips.short",
|
|
934
|
+
infoTextKey: "common.report-col.declared-tips.info"
|
|
935
|
+
},
|
|
936
|
+
department: {
|
|
937
|
+
titleKey: "common.report-col.department",
|
|
938
|
+
shortTitleKey: "common.report-col.department.short",
|
|
939
|
+
infoTextKey: "common.report-col.department.info"
|
|
940
|
+
},
|
|
941
|
+
depositCurrency: {
|
|
942
|
+
titleKey: "common.report-col.deposit-currency",
|
|
943
|
+
shortTitleKey: "common.report-col.deposit-currency.short",
|
|
944
|
+
infoTextKey: "common.report-col.deposit-currency.info"
|
|
945
|
+
},
|
|
946
|
+
depositDate: {
|
|
947
|
+
titleKey: "common.report-col.deposit-date",
|
|
948
|
+
shortTitleKey: "common.report-col.deposit-date.short",
|
|
949
|
+
infoTextKey: "common.report-col.deposit-date.info"
|
|
950
|
+
},
|
|
951
|
+
discountAmount: {
|
|
952
|
+
titleKey: "common.report-col.discount-amount",
|
|
953
|
+
shortTitleKey: "common.report-col.discount-amount.short",
|
|
954
|
+
infoTextKey: "common.report-col.discount-amount.info"
|
|
955
|
+
},
|
|
956
|
+
discountCount: {
|
|
957
|
+
titleKey: "common.report-col.discount-count",
|
|
958
|
+
shortTitleKey: "common.report-col.discount-count.short",
|
|
959
|
+
infoTextKey: "common.report-col.discount-count.info"
|
|
960
|
+
},
|
|
961
|
+
discover: {
|
|
962
|
+
titleKey: "common.report-col.discover",
|
|
963
|
+
shortTitleKey: "common.report-col.discover.short",
|
|
964
|
+
infoTextKey: "common.report-col.discover.info"
|
|
965
|
+
},
|
|
966
|
+
discoverReturns: {
|
|
967
|
+
titleKey: "common.report-col.discover-returns",
|
|
968
|
+
shortTitleKey: "common.report-col.discover-returns.short",
|
|
969
|
+
infoTextKey: "common.report-col.discover-returns.info"
|
|
970
|
+
},
|
|
971
|
+
ebt: {
|
|
972
|
+
titleKey: "common.report-col.ebt",
|
|
973
|
+
shortTitleKey: "common.report-col.ebt.short",
|
|
974
|
+
infoTextKey: "common.report-col.ebt.info"
|
|
975
|
+
},
|
|
976
|
+
ebtReturns: {
|
|
977
|
+
titleKey: "common.report-col.ebt-returns",
|
|
978
|
+
shortTitleKey: "common.report-col.ebt-returns.short",
|
|
979
|
+
infoTextKey: "common.report-col.ebt-returns.info"
|
|
980
|
+
},
|
|
981
|
+
employeeId: {
|
|
982
|
+
titleKey: "common.report-col.employee-id",
|
|
983
|
+
shortTitleKey: "common.report-col.employee-id.short",
|
|
984
|
+
infoTextKey: "common.report-col.employee-id.info"
|
|
249
985
|
},
|
|
250
986
|
employeeJob: {
|
|
251
987
|
titleKey: "common.report-col.employee-job",
|
|
@@ -522,879 +1258,293 @@ var COLUMN_REGISTRY = {
|
|
|
522
1258
|
shortTitleKey: "common.report-col.shift-duration-hrs.short",
|
|
523
1259
|
infoTextKey: "common.report-col.shift-duration-hrs.info"
|
|
524
1260
|
},
|
|
525
|
-
salePaymentType: {
|
|
526
|
-
titleKey: "common.report-col.sale-payment-type",
|
|
527
|
-
shortTitleKey: "common.report-col.sale-payment-type.short",
|
|
528
|
-
infoTextKey: "common.report-col.sale-payment-type.info"
|
|
529
|
-
},
|
|
530
|
-
status: {
|
|
531
|
-
titleKey: "common.report-col.status",
|
|
532
|
-
shortTitleKey: "common.report-col.status.short",
|
|
533
|
-
infoTextKey: "common.report-col.status.info"
|
|
534
|
-
},
|
|
535
|
-
subtotal: {
|
|
536
|
-
titleKey: "common.report-col.subtotal",
|
|
537
|
-
shortTitleKey: "common.report-col.subtotal.short",
|
|
538
|
-
infoTextKey: "common.report-col.subtotal.info"
|
|
539
|
-
},
|
|
540
|
-
taxCollected: {
|
|
541
|
-
titleKey: "common.report-col.tax-collected",
|
|
542
|
-
shortTitleKey: "common.report-col.tax-collected.short",
|
|
543
|
-
infoTextKey: "common.report-col.tax-collected.info"
|
|
544
|
-
},
|
|
545
|
-
taxName: {
|
|
546
|
-
titleKey: "common.report-col.tax-name",
|
|
547
|
-
shortTitleKey: "common.report-col.tax-name.short",
|
|
548
|
-
infoTextKey: "common.report-col.tax-name.info"
|
|
549
|
-
},
|
|
550
|
-
taxRate: {
|
|
551
|
-
titleKey: "common.report-col.tax-rate",
|
|
552
|
-
shortTitleKey: "common.report-col.tax-rate.short",
|
|
553
|
-
infoTextKey: "common.report-col.tax-rate.info"
|
|
554
|
-
},
|
|
555
|
-
taxableSales: {
|
|
556
|
-
titleKey: "common.report-col.taxable-sales",
|
|
557
|
-
shortTitleKey: "common.report-col.taxable-sales.short",
|
|
558
|
-
infoTextKey: "common.report-col.taxable-sales.info"
|
|
559
|
-
},
|
|
560
|
-
ticketClosed: {
|
|
561
|
-
titleKey: "common.report-col.ticket-closed",
|
|
562
|
-
shortTitleKey: "common.report-col.ticket-closed.short",
|
|
563
|
-
infoTextKey: "common.report-col.ticket-closed.info"
|
|
564
|
-
},
|
|
565
|
-
ticketFee: {
|
|
566
|
-
titleKey: "common.report-col.ticket-fee",
|
|
567
|
-
shortTitleKey: "common.report-col.ticket-fee.short",
|
|
568
|
-
infoTextKey: "common.report-col.ticket-fee.info"
|
|
569
|
-
},
|
|
570
|
-
ticketNumber: {
|
|
571
|
-
titleKey: "common.report-col.ticket-number",
|
|
572
|
-
shortTitleKey: "common.report-col.ticket-number.short",
|
|
573
|
-
infoTextKey: "common.report-col.ticket-number.info"
|
|
574
|
-
},
|
|
575
|
-
ticketOpen: {
|
|
576
|
-
titleKey: "common.report-col.ticket-open",
|
|
577
|
-
shortTitleKey: "common.report-col.ticket-open.short",
|
|
578
|
-
infoTextKey: "common.report-col.ticket-open.info"
|
|
579
|
-
},
|
|
580
|
-
ticketTotal: {
|
|
581
|
-
titleKey: "common.report-col.ticket-total",
|
|
582
|
-
shortTitleKey: "common.report-col.ticket-total.short",
|
|
583
|
-
infoTextKey: "common.report-col.ticket-total.info"
|
|
584
|
-
},
|
|
585
|
-
timeOpenMins: {
|
|
586
|
-
titleKey: "common.report-col.time-open-mins",
|
|
587
|
-
shortTitleKey: "common.report-col.time-open-mins.short",
|
|
588
|
-
infoTextKey: "common.report-col.time-open-mins.info"
|
|
589
|
-
},
|
|
590
|
-
tipPct: {
|
|
591
|
-
titleKey: "common.report-col.tip-pct",
|
|
592
|
-
shortTitleKey: "common.report-col.tip-pct.short",
|
|
593
|
-
infoTextKey: "common.report-col.tip-pct.info"
|
|
594
|
-
},
|
|
595
|
-
tipReduction: {
|
|
596
|
-
titleKey: "common.report-col.tip-reduction",
|
|
597
|
-
shortTitleKey: "common.report-col.tip-reduction.short",
|
|
598
|
-
infoTextKey: "common.report-col.tip-reduction.info"
|
|
599
|
-
},
|
|
600
|
-
tipShare: {
|
|
601
|
-
titleKey: "common.report-col.tip-share",
|
|
602
|
-
shortTitleKey: "common.report-col.tip-share.short",
|
|
603
|
-
infoTextKey: "common.report-col.tip-share.info"
|
|
604
|
-
},
|
|
605
|
-
tips: {
|
|
606
|
-
titleKey: "common.report-col.tips",
|
|
607
|
-
shortTitleKey: "common.report-col.tips.short",
|
|
608
|
-
infoTextKey: "common.report-col.tips.info"
|
|
609
|
-
},
|
|
610
|
-
tipsPerHour: {
|
|
611
|
-
titleKey: "common.report-col.tips-per-hour",
|
|
612
|
-
shortTitleKey: "common.report-col.tips-per-hour.short",
|
|
613
|
-
infoTextKey: "common.report-col.tips-per-hour.info"
|
|
614
|
-
},
|
|
615
|
-
totalCollected: {
|
|
616
|
-
titleKey: "common.report-col.total-collected",
|
|
617
|
-
shortTitleKey: "common.report-col.total-collected.short",
|
|
618
|
-
infoTextKey: "common.report-col.total-collected.info"
|
|
619
|
-
},
|
|
620
|
-
totalItemSales: {
|
|
621
|
-
titleKey: "common.report-col.total-item-sales",
|
|
622
|
-
shortTitleKey: "common.report-col.total-item-sales.short",
|
|
623
|
-
infoTextKey: "common.report-col.total-item-sales.info"
|
|
624
|
-
},
|
|
625
|
-
totalModifierSales: {
|
|
626
|
-
titleKey: "common.report-col.total-modifier-sales",
|
|
627
|
-
shortTitleKey: "common.report-col.total-modifier-sales.short",
|
|
628
|
-
infoTextKey: "common.report-col.total-modifier-sales.info"
|
|
629
|
-
},
|
|
630
|
-
totalReturns: {
|
|
631
|
-
titleKey: "common.report-col.total-returns",
|
|
632
|
-
shortTitleKey: "common.report-col.total-returns.short",
|
|
633
|
-
infoTextKey: "common.report-col.total-returns.info"
|
|
634
|
-
},
|
|
635
|
-
totalSales: {
|
|
636
|
-
titleKey: "common.report-col.total-sales",
|
|
637
|
-
shortTitleKey: "common.report-col.total-sales.short",
|
|
638
|
-
infoTextKey: "common.report-col.total-sales.info"
|
|
639
|
-
},
|
|
640
|
-
totalTips: {
|
|
641
|
-
titleKey: "common.report-col.total-tips",
|
|
642
|
-
shortTitleKey: "common.report-col.total-tips.short",
|
|
643
|
-
infoTextKey: "common.report-col.total-tips.info"
|
|
644
|
-
},
|
|
645
|
-
transactionDate: {
|
|
646
|
-
titleKey: "common.report-col.transaction-date",
|
|
647
|
-
shortTitleKey: "common.report-col.transaction-date.short",
|
|
648
|
-
infoTextKey: "common.report-col.transaction-date.info"
|
|
649
|
-
},
|
|
650
|
-
transactionType: {
|
|
651
|
-
titleKey: "common.report-col.transaction-type",
|
|
652
|
-
shortTitleKey: "common.report-col.transaction-type.short",
|
|
653
|
-
infoTextKey: "common.report-col.transaction-type.info"
|
|
654
|
-
},
|
|
655
|
-
untaxedSales: {
|
|
656
|
-
titleKey: "common.report-col.untaxed-sales",
|
|
657
|
-
shortTitleKey: "common.report-col.untaxed-sales.short",
|
|
658
|
-
infoTextKey: "common.report-col.untaxed-sales.info"
|
|
659
|
-
},
|
|
660
|
-
visa: {
|
|
661
|
-
titleKey: "common.report-col.visa",
|
|
662
|
-
shortTitleKey: "common.report-col.visa.short",
|
|
663
|
-
infoTextKey: "common.report-col.visa.info"
|
|
664
|
-
},
|
|
665
|
-
visaReturns: {
|
|
666
|
-
titleKey: "common.report-col.visa-returns",
|
|
667
|
-
shortTitleKey: "common.report-col.visa-returns.short",
|
|
668
|
-
infoTextKey: "common.report-col.visa-returns.info"
|
|
669
|
-
},
|
|
670
|
-
paymentsCount: {
|
|
671
|
-
titleKey: "common.report-col.payments-count",
|
|
672
|
-
shortTitleKey: "common.report-col.payments-count.short",
|
|
673
|
-
infoTextKey: "common.report-col.payments-count.info"
|
|
674
|
-
},
|
|
675
|
-
paymentsAmount: {
|
|
676
|
-
titleKey: "common.report-col.payments-amount",
|
|
677
|
-
shortTitleKey: "common.report-col.payments-amount.short",
|
|
678
|
-
infoTextKey: "common.report-col.payments-amount.info"
|
|
679
|
-
},
|
|
680
|
-
paymentsTotal: {
|
|
681
|
-
titleKey: "common.report-col.payments-total",
|
|
682
|
-
shortTitleKey: "common.report-col.payments-total.short",
|
|
683
|
-
infoTextKey: "common.report-col.payments-total.info"
|
|
684
|
-
},
|
|
685
|
-
refundVoidDescription: {
|
|
686
|
-
titleKey: "common.report-col.refund-void-description",
|
|
687
|
-
shortTitleKey: "common.report-col.refund-void-description.short",
|
|
688
|
-
infoTextKey: "common.report-col.refund-void-description.info"
|
|
689
|
-
},
|
|
690
|
-
refundVoidCount: {
|
|
691
|
-
titleKey: "common.report-col.refund-void-count",
|
|
692
|
-
shortTitleKey: "common.report-col.refund-void-count.short",
|
|
693
|
-
infoTextKey: "common.report-col.refund-void-count.info"
|
|
694
|
-
},
|
|
695
|
-
refundVoidAmount: {
|
|
696
|
-
titleKey: "common.report-col.refund-void-amount",
|
|
697
|
-
shortTitleKey: "common.report-col.refund-void-amount.short",
|
|
698
|
-
infoTextKey: "common.report-col.refund-void-amount.info"
|
|
699
|
-
},
|
|
700
|
-
refundVoidPctSales: {
|
|
701
|
-
titleKey: "common.report-col.refund-void-pct-sales",
|
|
702
|
-
shortTitleKey: "common.report-col.refund-void-pct-sales.short",
|
|
703
|
-
infoTextKey: "common.report-col.refund-void-pct-sales.info"
|
|
704
|
-
},
|
|
705
|
-
discountName: {
|
|
706
|
-
titleKey: "common.report-col.discount-name",
|
|
707
|
-
shortTitleKey: "common.report-col.discount-name.short",
|
|
708
|
-
infoTextKey: "common.report-col.discount-name.info"
|
|
709
|
-
},
|
|
710
|
-
tickets: {
|
|
711
|
-
titleKey: "common.report-col.tickets",
|
|
712
|
-
shortTitleKey: "common.report-col.tickets.short",
|
|
713
|
-
infoTextKey: "common.report-col.tickets.info"
|
|
714
|
-
},
|
|
715
|
-
guests: {
|
|
716
|
-
titleKey: "common.report-col.guests",
|
|
717
|
-
shortTitleKey: "common.report-col.guests.short",
|
|
718
|
-
infoTextKey: "common.report-col.guests.info"
|
|
719
|
-
},
|
|
720
|
-
ticketAverage: {
|
|
721
|
-
titleKey: "common.report-col.ticket-average",
|
|
722
|
-
shortTitleKey: "common.report-col.ticket-average.short",
|
|
723
|
-
infoTextKey: "common.report-col.ticket-average.info"
|
|
724
|
-
},
|
|
725
|
-
guestAverage: {
|
|
726
|
-
titleKey: "common.report-col.guest-average",
|
|
727
|
-
shortTitleKey: "common.report-col.guest-average.short",
|
|
728
|
-
infoTextKey: "common.report-col.guest-average.info"
|
|
1261
|
+
salePaymentType: {
|
|
1262
|
+
titleKey: "common.report-col.sale-payment-type",
|
|
1263
|
+
shortTitleKey: "common.report-col.sale-payment-type.short",
|
|
1264
|
+
infoTextKey: "common.report-col.sale-payment-type.info"
|
|
729
1265
|
},
|
|
730
|
-
|
|
731
|
-
titleKey: "common.report-col.
|
|
732
|
-
shortTitleKey: "common.report-col.
|
|
733
|
-
infoTextKey: "common.report-col.
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
function getColumnMetadata(key) {
|
|
737
|
-
return COLUMN_REGISTRY[key];
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// src/utils/alignment.ts
|
|
741
|
-
function getColumnAlignment(type) {
|
|
742
|
-
if (type === "string" || type === "date" || type === "time") {
|
|
743
|
-
return "left";
|
|
744
|
-
}
|
|
745
|
-
return "right";
|
|
746
|
-
}
|
|
747
|
-
function isNumericType(type) {
|
|
748
|
-
return type === "money" || type === "number" || type === "percent" || type === "fixedNumber";
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
// src/totals.ts
|
|
752
|
-
function calculateReportTotals(data, fieldConfig, opts) {
|
|
753
|
-
const rows = data;
|
|
754
|
-
const { labelField, label } = opts;
|
|
755
|
-
const fieldsToSum = /* @__PURE__ */ new Set();
|
|
756
|
-
const derivedFields = [];
|
|
757
|
-
for (const [field, config] of Object.entries(fieldConfig)) {
|
|
758
|
-
const { type, columnKey, footerCalculation: calc } = config;
|
|
759
|
-
if (!type || type === "string" || type === "date" || type === "time" || type === "boolean") {
|
|
760
|
-
continue;
|
|
761
|
-
}
|
|
762
|
-
if (calc?.type === "none") {
|
|
763
|
-
} else if (!calc || calc.type === "sum") {
|
|
764
|
-
if (columnKey || calc?.type === "sum") {
|
|
765
|
-
fieldsToSum.add(field);
|
|
766
|
-
}
|
|
767
|
-
} else {
|
|
768
|
-
derivedFields.push({ field, calc });
|
|
769
|
-
if (calc.numeratorField) fieldsToSum.add(calc.numeratorField);
|
|
770
|
-
if (calc.denominatorField) fieldsToSum.add(calc.denominatorField);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
const sums = {};
|
|
774
|
-
for (const field of fieldsToSum) {
|
|
775
|
-
sums[field] = rows.reduce((acc, row) => acc + (row[field] ?? 0), 0);
|
|
776
|
-
}
|
|
777
|
-
const derived = {};
|
|
778
|
-
for (const { field, calc } of derivedFields) {
|
|
779
|
-
const num = sums[calc.numeratorField ?? ""] ?? 0;
|
|
780
|
-
const den = sums[calc.denominatorField ?? ""] ?? 0;
|
|
781
|
-
if (calc.type === "percentChange") {
|
|
782
|
-
derived[field] = den ? (num - den) / den : 0;
|
|
783
|
-
} else if (calc.type === "average") {
|
|
784
|
-
derived[field] = den > 0 ? num / den : 0;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
const result = {};
|
|
788
|
-
for (const [field, config] of Object.entries(fieldConfig)) {
|
|
789
|
-
const { type } = config;
|
|
790
|
-
if (!type || type === "string" || type === "date" || type === "time") {
|
|
791
|
-
result[field] = "";
|
|
792
|
-
} else if (type === "boolean") {
|
|
793
|
-
result[field] = false;
|
|
794
|
-
} else {
|
|
795
|
-
result[field] = 0;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
result[labelField] = label;
|
|
799
|
-
for (const [field, value] of Object.entries(sums)) {
|
|
800
|
-
result[field] = value;
|
|
801
|
-
}
|
|
802
|
-
for (const [field, value] of Object.entries(derived)) {
|
|
803
|
-
result[field] = value;
|
|
804
|
-
}
|
|
805
|
-
return result;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
// src/reports/salesSummary.ts
|
|
809
|
-
var FIRST_COLUMN_WIDTH = 240;
|
|
810
|
-
var FIELDS = {
|
|
811
|
-
groupById: { type: "number" },
|
|
812
|
-
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
|
|
813
|
-
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
814
|
-
salesVarLW: { type: "money", columnKey: "salesVarLw" },
|
|
815
|
-
salesVarLY: { type: "money", columnKey: "salesVarLy" },
|
|
816
|
-
salesVarLWPct: {
|
|
817
|
-
type: "percent",
|
|
818
|
-
columnKey: "salesVarLwPct",
|
|
819
|
-
footerCalculation: {
|
|
820
|
-
type: "percentChange",
|
|
821
|
-
numeratorField: "salesAmountNet",
|
|
822
|
-
denominatorField: "salesAmountNetLastWeek"
|
|
823
|
-
}
|
|
1266
|
+
status: {
|
|
1267
|
+
titleKey: "common.report-col.status",
|
|
1268
|
+
shortTitleKey: "common.report-col.status.short",
|
|
1269
|
+
infoTextKey: "common.report-col.status.info"
|
|
824
1270
|
},
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
type: "percentChange",
|
|
830
|
-
numeratorField: "salesAmountNet",
|
|
831
|
-
denominatorField: "salesAmountNetLastYear"
|
|
832
|
-
}
|
|
1271
|
+
subtotal: {
|
|
1272
|
+
titleKey: "common.report-col.subtotal",
|
|
1273
|
+
shortTitleKey: "common.report-col.subtotal.short",
|
|
1274
|
+
infoTextKey: "common.report-col.subtotal.info"
|
|
833
1275
|
},
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
salesAmountGrossLastYear: { type: "money" },
|
|
839
|
-
ticketsCount: { type: "number" },
|
|
840
|
-
ticketsCountLastWeek: { type: "number" },
|
|
841
|
-
ticketsCountLastYear: { type: "number" },
|
|
842
|
-
guestsCount: { type: "number", columnKey: "guestCount" },
|
|
843
|
-
guestsVarLW: { type: "number", columnKey: "guestsVarLw" },
|
|
844
|
-
guestsVarLY: { type: "number", columnKey: "guestsVarLy" },
|
|
845
|
-
guestsVarLWPct: {
|
|
846
|
-
type: "percent",
|
|
847
|
-
columnKey: "guestsVarLwPct",
|
|
848
|
-
footerCalculation: {
|
|
849
|
-
type: "percentChange",
|
|
850
|
-
numeratorField: "guestsCount",
|
|
851
|
-
denominatorField: "guestsCountLastWeek"
|
|
852
|
-
}
|
|
1276
|
+
taxCollected: {
|
|
1277
|
+
titleKey: "common.report-col.tax-collected",
|
|
1278
|
+
shortTitleKey: "common.report-col.tax-collected.short",
|
|
1279
|
+
infoTextKey: "common.report-col.tax-collected.info"
|
|
853
1280
|
},
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
type: "percentChange",
|
|
859
|
-
numeratorField: "guestsCount",
|
|
860
|
-
denominatorField: "guestsCountLastYear"
|
|
861
|
-
}
|
|
1281
|
+
taxName: {
|
|
1282
|
+
titleKey: "common.report-col.tax-name",
|
|
1283
|
+
shortTitleKey: "common.report-col.tax-name.short",
|
|
1284
|
+
infoTextKey: "common.report-col.tax-name.info"
|
|
862
1285
|
},
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
columnKey: "salesPerGuest",
|
|
868
|
-
footerCalculation: {
|
|
869
|
-
type: "average",
|
|
870
|
-
numeratorField: "salesAmountNet",
|
|
871
|
-
denominatorField: "guestsCount"
|
|
872
|
-
}
|
|
1286
|
+
taxRate: {
|
|
1287
|
+
titleKey: "common.report-col.tax-rate",
|
|
1288
|
+
shortTitleKey: "common.report-col.tax-rate.short",
|
|
1289
|
+
infoTextKey: "common.report-col.tax-rate.info"
|
|
873
1290
|
},
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
type: "average",
|
|
879
|
-
numeratorField: "salesAmountNetLastWeek",
|
|
880
|
-
denominatorField: "guestsCountLastWeek"
|
|
881
|
-
}
|
|
1291
|
+
taxableSales: {
|
|
1292
|
+
titleKey: "common.report-col.taxable-sales",
|
|
1293
|
+
shortTitleKey: "common.report-col.taxable-sales.short",
|
|
1294
|
+
infoTextKey: "common.report-col.taxable-sales.info"
|
|
882
1295
|
},
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
type: "average",
|
|
888
|
-
numeratorField: "salesAmountNetLastYear",
|
|
889
|
-
denominatorField: "guestsCountLastYear"
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
var COLUMN_GROUPS = [
|
|
894
|
-
{
|
|
895
|
-
id: "sales",
|
|
896
|
-
headerTranslationKey: "table.groups.sales",
|
|
897
|
-
baseFields: ["salesAmountNet"],
|
|
898
|
-
lastWeekFields: ["salesVarLW", "salesVarLWPct"],
|
|
899
|
-
lastYearFields: ["salesVarLY", "salesVarLYPct"]
|
|
1296
|
+
ticketClosed: {
|
|
1297
|
+
titleKey: "common.report-col.ticket-closed",
|
|
1298
|
+
shortTitleKey: "common.report-col.ticket-closed.short",
|
|
1299
|
+
infoTextKey: "common.report-col.ticket-closed.info"
|
|
900
1300
|
},
|
|
901
|
-
{
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
lastWeekFields: ["guestsVarLW", "guestsVarLWPct"],
|
|
906
|
-
lastYearFields: ["guestsVarLY", "guestsVarLYPct"]
|
|
1301
|
+
ticketFee: {
|
|
1302
|
+
titleKey: "common.report-col.ticket-fee",
|
|
1303
|
+
shortTitleKey: "common.report-col.ticket-fee.short",
|
|
1304
|
+
infoTextKey: "common.report-col.ticket-fee.info"
|
|
907
1305
|
},
|
|
908
|
-
{
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
lastWeekFields: ["salesPerGuestLW"],
|
|
913
|
-
lastYearFields: ["salesPerGuestLY"]
|
|
914
|
-
}
|
|
915
|
-
];
|
|
916
|
-
var SALES_SUMMARY_AVAILABLE_COLUMNS = [
|
|
917
|
-
"salesAmountNet",
|
|
918
|
-
"salesVarLW",
|
|
919
|
-
"salesVarLWPct",
|
|
920
|
-
"salesVarLY",
|
|
921
|
-
"salesVarLYPct",
|
|
922
|
-
"guestsCount",
|
|
923
|
-
"guestsVarLW",
|
|
924
|
-
"guestsVarLWPct",
|
|
925
|
-
"guestsVarLY",
|
|
926
|
-
"guestsVarLYPct",
|
|
927
|
-
"salesPerGuestTY",
|
|
928
|
-
"salesPerGuestLW",
|
|
929
|
-
"salesPerGuestLY"
|
|
930
|
-
];
|
|
931
|
-
var SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS = [
|
|
932
|
-
"salesAmountNet",
|
|
933
|
-
"guestsCount",
|
|
934
|
-
"salesPerGuestTY"
|
|
935
|
-
];
|
|
936
|
-
var salesSummaryConfig = {
|
|
937
|
-
fields: FIELDS,
|
|
938
|
-
availableColumns: SALES_SUMMARY_AVAILABLE_COLUMNS,
|
|
939
|
-
defaultVisibleColumns: SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
|
|
940
|
-
columnGroups: COLUMN_GROUPS
|
|
941
|
-
};
|
|
942
|
-
|
|
943
|
-
// src/reports/ticketSummary.ts
|
|
944
|
-
var FIELDS2 = {
|
|
945
|
-
ticketId: { type: "string" },
|
|
946
|
-
locationId: { type: "number" },
|
|
947
|
-
orderName: { type: "string" },
|
|
948
|
-
revenueCenterName: { type: "string", columnKey: "revenueCenter" },
|
|
949
|
-
daypartName: { type: "string", columnKey: "daypart" },
|
|
950
|
-
inclusiveTaxesAmount: {
|
|
951
|
-
type: "money",
|
|
952
|
-
columnKey: "inclusiveTax",
|
|
953
|
-
footerCalculation: { type: "sum" }
|
|
1306
|
+
ticketNumber: {
|
|
1307
|
+
titleKey: "common.report-col.ticket-number",
|
|
1308
|
+
shortTitleKey: "common.report-col.ticket-number.short",
|
|
1309
|
+
infoTextKey: "common.report-col.ticket-number.info"
|
|
954
1310
|
},
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
ticketClosedAt: { type: "time", columnKey: "ticketClosed" },
|
|
960
|
-
ticketTime: { type: "number", columnKey: "timeOpenMins", enableSorting: false },
|
|
961
|
-
ticketSubtotal: {
|
|
962
|
-
type: "money",
|
|
963
|
-
columnKey: "subtotal",
|
|
964
|
-
footerCalculation: { type: "sum" }
|
|
1311
|
+
ticketOpen: {
|
|
1312
|
+
titleKey: "common.report-col.ticket-open",
|
|
1313
|
+
shortTitleKey: "common.report-col.ticket-open.short",
|
|
1314
|
+
infoTextKey: "common.report-col.ticket-open.info"
|
|
965
1315
|
},
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1316
|
+
ticketTotal: {
|
|
1317
|
+
titleKey: "common.report-col.ticket-total",
|
|
1318
|
+
shortTitleKey: "common.report-col.ticket-total.short",
|
|
1319
|
+
infoTextKey: "common.report-col.ticket-total.info"
|
|
970
1320
|
},
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1321
|
+
timeOpenMins: {
|
|
1322
|
+
titleKey: "common.report-col.time-open-mins",
|
|
1323
|
+
shortTitleKey: "common.report-col.time-open-mins.short",
|
|
1324
|
+
infoTextKey: "common.report-col.time-open-mins.info"
|
|
975
1325
|
},
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1326
|
+
tipPct: {
|
|
1327
|
+
titleKey: "common.report-col.tip-pct",
|
|
1328
|
+
shortTitleKey: "common.report-col.tip-pct.short",
|
|
1329
|
+
infoTextKey: "common.report-col.tip-pct.info"
|
|
980
1330
|
},
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1331
|
+
tipReduction: {
|
|
1332
|
+
titleKey: "common.report-col.tip-reduction",
|
|
1333
|
+
shortTitleKey: "common.report-col.tip-reduction.short",
|
|
1334
|
+
infoTextKey: "common.report-col.tip-reduction.info"
|
|
985
1335
|
},
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1336
|
+
tipShare: {
|
|
1337
|
+
titleKey: "common.report-col.tip-share",
|
|
1338
|
+
shortTitleKey: "common.report-col.tip-share.short",
|
|
1339
|
+
infoTextKey: "common.report-col.tip-share.info"
|
|
990
1340
|
},
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1341
|
+
tips: {
|
|
1342
|
+
titleKey: "common.report-col.tips",
|
|
1343
|
+
shortTitleKey: "common.report-col.tips.short",
|
|
1344
|
+
infoTextKey: "common.report-col.tips.info"
|
|
995
1345
|
},
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1346
|
+
tipsPerHour: {
|
|
1347
|
+
titleKey: "common.report-col.tips-per-hour",
|
|
1348
|
+
shortTitleKey: "common.report-col.tips-per-hour.short",
|
|
1349
|
+
infoTextKey: "common.report-col.tips-per-hour.info"
|
|
1000
1350
|
},
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
footerCalculation: { type: "sum" }
|
|
1351
|
+
totalCollected: {
|
|
1352
|
+
titleKey: "common.report-col.total-collected",
|
|
1353
|
+
shortTitleKey: "common.report-col.total-collected.short",
|
|
1354
|
+
infoTextKey: "common.report-col.total-collected.info"
|
|
1006
1355
|
},
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
"locationName",
|
|
1012
|
-
"orderNumber",
|
|
1013
|
-
"businessDate",
|
|
1014
|
-
"ticketOpenedAt",
|
|
1015
|
-
"ticketClosedAt",
|
|
1016
|
-
"ticketTime",
|
|
1017
|
-
"ticketSubtotal",
|
|
1018
|
-
"discountsAmount",
|
|
1019
|
-
"surchargesAmount",
|
|
1020
|
-
"taxesAmount",
|
|
1021
|
-
"ticketGrandTotal",
|
|
1022
|
-
"gratuitiesAmount",
|
|
1023
|
-
"tipAmount",
|
|
1024
|
-
"paymentsAmount",
|
|
1025
|
-
"paymentTypeName",
|
|
1026
|
-
"guestsCount",
|
|
1027
|
-
"employeeName",
|
|
1028
|
-
"orderTypeName"
|
|
1029
|
-
];
|
|
1030
|
-
var TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS = TICKET_SUMMARY_AVAILABLE_COLUMNS;
|
|
1031
|
-
var ticketSummaryConfig = {
|
|
1032
|
-
fields: FIELDS2,
|
|
1033
|
-
availableColumns: TICKET_SUMMARY_AVAILABLE_COLUMNS,
|
|
1034
|
-
defaultVisibleColumns: TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS
|
|
1035
|
-
};
|
|
1036
|
-
|
|
1037
|
-
// src/reports/ticketLive.ts
|
|
1038
|
-
var FIELDS3 = {
|
|
1039
|
-
locationName: { type: "string", columnKey: "locationName" },
|
|
1040
|
-
orderNumber: {
|
|
1041
|
-
type: "number",
|
|
1042
|
-
columnKey: "ticketNumber",
|
|
1043
|
-
footerCalculation: { type: "none" }
|
|
1356
|
+
totalItemSales: {
|
|
1357
|
+
titleKey: "common.report-col.total-item-sales",
|
|
1358
|
+
shortTitleKey: "common.report-col.total-item-sales.short",
|
|
1359
|
+
infoTextKey: "common.report-col.total-item-sales.info"
|
|
1044
1360
|
},
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
durationMinutes: { type: "number", columnKey: "timeOpenMins" },
|
|
1050
|
-
subtotal: { type: "money", columnKey: "subtotal" },
|
|
1051
|
-
discountTotal: { type: "money", columnKey: "discountAmount" },
|
|
1052
|
-
surchargeTotal: { type: "money", columnKey: "ticketFee" },
|
|
1053
|
-
taxTotal: { type: "money", columnKey: "taxCollected" },
|
|
1054
|
-
grandTotal: { type: "money", columnKey: "grandTotal" },
|
|
1055
|
-
gratuityTotal: { type: "money", columnKey: "autoGratuity" },
|
|
1056
|
-
totalTips: { type: "money", columnKey: "totalTips" },
|
|
1057
|
-
paymentsReceived: { type: "money", columnKey: "totalCollected" },
|
|
1058
|
-
paymentTypeName: { type: "string", columnKey: "paymentType" },
|
|
1059
|
-
guestCount: {
|
|
1060
|
-
type: "number",
|
|
1061
|
-
columnKey: "guestCount",
|
|
1062
|
-
footerCalculation: { type: "sum" }
|
|
1361
|
+
totalModifierSales: {
|
|
1362
|
+
titleKey: "common.report-col.total-modifier-sales",
|
|
1363
|
+
shortTitleKey: "common.report-col.total-modifier-sales.short",
|
|
1364
|
+
infoTextKey: "common.report-col.total-modifier-sales.info"
|
|
1063
1365
|
},
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
var TICKET_LIVE_AVAILABLE_COLUMNS = [
|
|
1069
|
-
"locationName",
|
|
1070
|
-
"orderNumber",
|
|
1071
|
-
"dateOpen",
|
|
1072
|
-
"timeOpen",
|
|
1073
|
-
"timeClose",
|
|
1074
|
-
"durationMinutes",
|
|
1075
|
-
"subtotal",
|
|
1076
|
-
"discountTotal",
|
|
1077
|
-
"surchargeTotal",
|
|
1078
|
-
"taxTotal",
|
|
1079
|
-
"grandTotal",
|
|
1080
|
-
"gratuityTotal",
|
|
1081
|
-
"totalTips",
|
|
1082
|
-
"paymentsReceived",
|
|
1083
|
-
"paymentTypeName",
|
|
1084
|
-
"guestCount",
|
|
1085
|
-
"employeeName",
|
|
1086
|
-
"orderType"
|
|
1087
|
-
];
|
|
1088
|
-
var TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS = TICKET_LIVE_AVAILABLE_COLUMNS;
|
|
1089
|
-
var ticketLiveConfig = {
|
|
1090
|
-
fields: FIELDS3,
|
|
1091
|
-
availableColumns: TICKET_LIVE_AVAILABLE_COLUMNS,
|
|
1092
|
-
defaultVisibleColumns: TICKET_LIVE_DEFAULT_VISIBLE_COLUMNS
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
// src/reports/productMix.ts
|
|
1096
|
-
var FIRST_COLUMN_WIDTH2 = 240;
|
|
1097
|
-
var FIELDS4 = {
|
|
1098
|
-
groupById: { type: "string" },
|
|
1099
|
-
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH2 },
|
|
1100
|
-
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1101
|
-
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
1102
|
-
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
1103
|
-
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
1104
|
-
itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
|
|
1105
|
-
avgPrice: {
|
|
1106
|
-
type: "fixedNumber",
|
|
1107
|
-
columnKey: "averageGrossPrice",
|
|
1108
|
-
footerCalculation: {
|
|
1109
|
-
type: "average",
|
|
1110
|
-
numeratorField: "salesAmountGross",
|
|
1111
|
-
denominatorField: "itemsQuantity"
|
|
1112
|
-
}
|
|
1366
|
+
totalReturns: {
|
|
1367
|
+
titleKey: "common.report-col.total-returns",
|
|
1368
|
+
shortTitleKey: "common.report-col.total-returns.short",
|
|
1369
|
+
infoTextKey: "common.report-col.total-returns.info"
|
|
1113
1370
|
},
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
defaultVisibleColumns: PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS
|
|
1139
|
-
};
|
|
1140
|
-
|
|
1141
|
-
// src/reports/modifierMix.ts
|
|
1142
|
-
var FIRST_COLUMN_WIDTH3 = 240;
|
|
1143
|
-
var FIELDS5 = {
|
|
1144
|
-
groupById: { type: "string", filteringAvailable: false },
|
|
1145
|
-
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH3, filteringAvailable: false },
|
|
1146
|
-
groupById2: { type: "string", filteringAvailable: false },
|
|
1147
|
-
groupByName2: { type: "string", size: FIRST_COLUMN_WIDTH3, filteringAvailable: false },
|
|
1148
|
-
modifiersSales: { type: "money", columnKey: "totalModifierSales" },
|
|
1149
|
-
modifiersQuantity: { type: "number", columnKey: "modifierQuantity" },
|
|
1150
|
-
itemsQuantity: {
|
|
1151
|
-
type: "number",
|
|
1152
|
-
columnKey: "quantity",
|
|
1153
|
-
filteringAvailable: false
|
|
1371
|
+
totalSales: {
|
|
1372
|
+
titleKey: "common.report-col.total-sales",
|
|
1373
|
+
shortTitleKey: "common.report-col.total-sales.short",
|
|
1374
|
+
infoTextKey: "common.report-col.total-sales.info"
|
|
1375
|
+
},
|
|
1376
|
+
totalTips: {
|
|
1377
|
+
titleKey: "common.report-col.total-tips",
|
|
1378
|
+
shortTitleKey: "common.report-col.total-tips.short",
|
|
1379
|
+
infoTextKey: "common.report-col.total-tips.info"
|
|
1380
|
+
},
|
|
1381
|
+
transactionDate: {
|
|
1382
|
+
titleKey: "common.report-col.transaction-date",
|
|
1383
|
+
shortTitleKey: "common.report-col.transaction-date.short",
|
|
1384
|
+
infoTextKey: "common.report-col.transaction-date.info"
|
|
1385
|
+
},
|
|
1386
|
+
transactionType: {
|
|
1387
|
+
titleKey: "common.report-col.transaction-type",
|
|
1388
|
+
shortTitleKey: "common.report-col.transaction-type.short",
|
|
1389
|
+
infoTextKey: "common.report-col.transaction-type.info"
|
|
1390
|
+
},
|
|
1391
|
+
untaxedSales: {
|
|
1392
|
+
titleKey: "common.report-col.untaxed-sales",
|
|
1393
|
+
shortTitleKey: "common.report-col.untaxed-sales.short",
|
|
1394
|
+
infoTextKey: "common.report-col.untaxed-sales.info"
|
|
1154
1395
|
},
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
type: "average",
|
|
1160
|
-
numeratorField: "modifiersSales",
|
|
1161
|
-
denominatorField: "modifiersQuantity"
|
|
1162
|
-
}
|
|
1396
|
+
visa: {
|
|
1397
|
+
titleKey: "common.report-col.visa",
|
|
1398
|
+
shortTitleKey: "common.report-col.visa.short",
|
|
1399
|
+
infoTextKey: "common.report-col.visa.info"
|
|
1163
1400
|
},
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
type: "average",
|
|
1169
|
-
numeratorField: "modifiersQuantity",
|
|
1170
|
-
denominatorField: "itemsQuantity"
|
|
1171
|
-
}
|
|
1401
|
+
visaReturns: {
|
|
1402
|
+
titleKey: "common.report-col.visa-returns",
|
|
1403
|
+
shortTitleKey: "common.report-col.visa-returns.short",
|
|
1404
|
+
infoTextKey: "common.report-col.visa-returns.info"
|
|
1172
1405
|
},
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
modifiersSalesVar: { type: "money", filteringAvailable: false },
|
|
1178
|
-
modifiersSalesVarPct: {
|
|
1179
|
-
type: "percent",
|
|
1180
|
-
filteringAvailable: false,
|
|
1181
|
-
footerCalculation: {
|
|
1182
|
-
type: "percentChange",
|
|
1183
|
-
numeratorField: "modifiersSales",
|
|
1184
|
-
denominatorField: "modifiersSalesComp"
|
|
1185
|
-
}
|
|
1406
|
+
paymentsCount: {
|
|
1407
|
+
titleKey: "common.report-col.payments-count",
|
|
1408
|
+
shortTitleKey: "common.report-col.payments-count.short",
|
|
1409
|
+
infoTextKey: "common.report-col.payments-count.info"
|
|
1186
1410
|
},
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
footerCalculation: {
|
|
1192
|
-
type: "percentChange",
|
|
1193
|
-
numeratorField: "modifiersQuantity",
|
|
1194
|
-
denominatorField: "modifiersQuantityComp"
|
|
1195
|
-
}
|
|
1411
|
+
paymentsAmount: {
|
|
1412
|
+
titleKey: "common.report-col.payments-amount",
|
|
1413
|
+
shortTitleKey: "common.report-col.payments-amount.short",
|
|
1414
|
+
infoTextKey: "common.report-col.payments-amount.info"
|
|
1196
1415
|
},
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
taxCollected: { type: "money", columnKey: "taxCollected" }
|
|
1237
|
-
};
|
|
1238
|
-
var ITEM_TAX_AVAILABLE_COLUMNS = [
|
|
1239
|
-
"merchantId",
|
|
1240
|
-
"locationName",
|
|
1241
|
-
"locationCity",
|
|
1242
|
-
"locationState",
|
|
1243
|
-
"itemName",
|
|
1244
|
-
"departmentName",
|
|
1245
|
-
"revenueClassName",
|
|
1246
|
-
"orderTypeName",
|
|
1247
|
-
"recordsCount",
|
|
1248
|
-
"itemPrice",
|
|
1249
|
-
"taxName",
|
|
1250
|
-
"taxRate",
|
|
1251
|
-
"taxableSales",
|
|
1252
|
-
"taxCollected"
|
|
1253
|
-
];
|
|
1254
|
-
var ITEM_TAX_DEFAULT_VISIBLE_COLUMNS = ITEM_TAX_AVAILABLE_COLUMNS;
|
|
1255
|
-
var itemTaxConfig = {
|
|
1256
|
-
fields: FIELDS6,
|
|
1257
|
-
availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
|
|
1258
|
-
defaultVisibleColumns: ITEM_TAX_DEFAULT_VISIBLE_COLUMNS
|
|
1259
|
-
};
|
|
1260
|
-
|
|
1261
|
-
// src/reports/dailySales.ts
|
|
1262
|
-
var FIRST_COLUMN_WIDTH4 = 240;
|
|
1263
|
-
var FIELDS7 = {
|
|
1264
|
-
groupById: { type: "string" },
|
|
1265
|
-
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH4 },
|
|
1266
|
-
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
1267
|
-
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1268
|
-
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
1269
|
-
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
1270
|
-
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
1271
|
-
salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
|
|
1272
|
-
avgPrice: {
|
|
1273
|
-
type: "fixedNumber",
|
|
1274
|
-
columnKey: "averageGrossPrice",
|
|
1275
|
-
footerCalculation: {
|
|
1276
|
-
type: "average",
|
|
1277
|
-
numeratorField: "salesAmountGross",
|
|
1278
|
-
denominatorField: "itemsQuantity"
|
|
1279
|
-
}
|
|
1416
|
+
paymentsTotal: {
|
|
1417
|
+
titleKey: "common.report-col.payments-total",
|
|
1418
|
+
shortTitleKey: "common.report-col.payments-total.short",
|
|
1419
|
+
infoTextKey: "common.report-col.payments-total.info"
|
|
1420
|
+
},
|
|
1421
|
+
refundVoidDescription: {
|
|
1422
|
+
titleKey: "common.report-col.refund-void-description",
|
|
1423
|
+
shortTitleKey: "common.report-col.refund-void-description.short",
|
|
1424
|
+
infoTextKey: "common.report-col.refund-void-description.info"
|
|
1425
|
+
},
|
|
1426
|
+
refundVoidCount: {
|
|
1427
|
+
titleKey: "common.report-col.refund-void-count",
|
|
1428
|
+
shortTitleKey: "common.report-col.refund-void-count.short",
|
|
1429
|
+
infoTextKey: "common.report-col.refund-void-count.info"
|
|
1430
|
+
},
|
|
1431
|
+
refundVoidAmount: {
|
|
1432
|
+
titleKey: "common.report-col.refund-void-amount",
|
|
1433
|
+
shortTitleKey: "common.report-col.refund-void-amount.short",
|
|
1434
|
+
infoTextKey: "common.report-col.refund-void-amount.info"
|
|
1435
|
+
},
|
|
1436
|
+
refundVoidPctSales: {
|
|
1437
|
+
titleKey: "common.report-col.refund-void-pct-sales",
|
|
1438
|
+
shortTitleKey: "common.report-col.refund-void-pct-sales.short",
|
|
1439
|
+
infoTextKey: "common.report-col.refund-void-pct-sales.info"
|
|
1440
|
+
},
|
|
1441
|
+
discountName: {
|
|
1442
|
+
titleKey: "common.report-col.discount-name",
|
|
1443
|
+
shortTitleKey: "common.report-col.discount-name.short",
|
|
1444
|
+
infoTextKey: "common.report-col.discount-name.info"
|
|
1445
|
+
},
|
|
1446
|
+
tickets: {
|
|
1447
|
+
titleKey: "common.report-col.tickets",
|
|
1448
|
+
shortTitleKey: "common.report-col.tickets.short",
|
|
1449
|
+
infoTextKey: "common.report-col.tickets.info"
|
|
1450
|
+
},
|
|
1451
|
+
guests: {
|
|
1452
|
+
titleKey: "common.report-col.guests",
|
|
1453
|
+
shortTitleKey: "common.report-col.guests.short",
|
|
1454
|
+
infoTextKey: "common.report-col.guests.info"
|
|
1280
1455
|
},
|
|
1281
|
-
ticketsCount: { type: "number", columnKey: "tickets" },
|
|
1282
|
-
guestsCount: { type: "number", columnKey: "guests" },
|
|
1283
1456
|
ticketAverage: {
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
type: "average",
|
|
1288
|
-
numeratorField: "salesAmountNet",
|
|
1289
|
-
denominatorField: "ticketsCount"
|
|
1290
|
-
}
|
|
1457
|
+
titleKey: "common.report-col.ticket-average",
|
|
1458
|
+
shortTitleKey: "common.report-col.ticket-average.short",
|
|
1459
|
+
infoTextKey: "common.report-col.ticket-average.info"
|
|
1291
1460
|
},
|
|
1292
1461
|
guestAverage: {
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
type: "average",
|
|
1297
|
-
numeratorField: "salesAmountNet",
|
|
1298
|
-
denominatorField: "guestsCount"
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
ticketAvg: {
|
|
1302
|
-
type: "money",
|
|
1303
|
-
columnKey: "ticketAverage",
|
|
1304
|
-
footerCalculation: {
|
|
1305
|
-
type: "average",
|
|
1306
|
-
numeratorField: "salesAmountNet",
|
|
1307
|
-
denominatorField: "ticketsCount"
|
|
1308
|
-
}
|
|
1462
|
+
titleKey: "common.report-col.guest-average",
|
|
1463
|
+
shortTitleKey: "common.report-col.guest-average.short",
|
|
1464
|
+
infoTextKey: "common.report-col.guest-average.info"
|
|
1309
1465
|
},
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
numeratorField: "salesAmountNet",
|
|
1316
|
-
denominatorField: "guestsCount"
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
};
|
|
1320
|
-
var DAILY_SALES_AVAILABLE_COLUMNS = [
|
|
1321
|
-
"itemsQuantity",
|
|
1322
|
-
"salesAmountGross",
|
|
1323
|
-
"discountsAmount",
|
|
1324
|
-
"inclusiveTaxesAmount",
|
|
1325
|
-
"salesAmountNet",
|
|
1326
|
-
"salesMixPct"
|
|
1327
|
-
];
|
|
1328
|
-
var DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS = [
|
|
1329
|
-
"ticketsCount",
|
|
1330
|
-
"guestsCount",
|
|
1331
|
-
"ticketAverage",
|
|
1332
|
-
"guestAverage",
|
|
1333
|
-
"salesAmountNet"
|
|
1334
|
-
];
|
|
1335
|
-
var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
|
|
1336
|
-
var dailySalesConfig = {
|
|
1337
|
-
fields: FIELDS7,
|
|
1338
|
-
availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
|
|
1339
|
-
defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
|
|
1340
|
-
};
|
|
1341
|
-
var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
|
|
1342
|
-
"ticketsCount",
|
|
1343
|
-
"guestsCount",
|
|
1344
|
-
"ticketAvg",
|
|
1345
|
-
"guestAvg",
|
|
1346
|
-
"salesAmountNet"
|
|
1347
|
-
];
|
|
1348
|
-
var dailySalesTrendsConfig = {
|
|
1349
|
-
fields: FIELDS7,
|
|
1350
|
-
availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
|
|
1351
|
-
defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS
|
|
1466
|
+
net: {
|
|
1467
|
+
titleKey: "common.report-col.net",
|
|
1468
|
+
shortTitleKey: "common.report-col.net.short",
|
|
1469
|
+
infoTextKey: "common.report-col.net.info"
|
|
1470
|
+
}
|
|
1352
1471
|
};
|
|
1472
|
+
function getColumnMetadata(key) {
|
|
1473
|
+
return COLUMN_REGISTRY[key];
|
|
1474
|
+
}
|
|
1353
1475
|
|
|
1354
|
-
// src/
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
"paymentsCount",
|
|
1365
|
-
"paymentsAmount",
|
|
1366
|
-
"tipsAmount",
|
|
1367
|
-
"totalSales"
|
|
1368
|
-
];
|
|
1369
|
-
var DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS;
|
|
1370
|
-
var dailySalesPaymentsConfig = {
|
|
1371
|
-
fields: FIELDS8,
|
|
1372
|
-
availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
1373
|
-
defaultVisibleColumns: DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS
|
|
1374
|
-
};
|
|
1476
|
+
// src/utils/alignment.ts
|
|
1477
|
+
function getColumnAlignment(type) {
|
|
1478
|
+
if (type === "string" || type === "date" || type === "time") {
|
|
1479
|
+
return "left";
|
|
1480
|
+
}
|
|
1481
|
+
return "right";
|
|
1482
|
+
}
|
|
1483
|
+
function isNumericType(type) {
|
|
1484
|
+
return type === "money" || type === "number" || type === "percent" || type === "fixedNumber";
|
|
1485
|
+
}
|
|
1375
1486
|
|
|
1376
|
-
// src/
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
}
|
|
1487
|
+
// src/totals.ts
|
|
1488
|
+
function calculateReportTotals(data, fieldConfig, opts) {
|
|
1489
|
+
const rows = data;
|
|
1490
|
+
const { labelField, label } = opts;
|
|
1491
|
+
const fieldsToSum = /* @__PURE__ */ new Set();
|
|
1492
|
+
const derivedFields = [];
|
|
1493
|
+
for (const [field, config] of Object.entries(fieldConfig)) {
|
|
1494
|
+
const { type, columnKey, footerCalculation: calc } = config;
|
|
1495
|
+
if (!type || type === "string" || type === "date" || type === "time" || type === "boolean") {
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
if (calc?.type === "none") {
|
|
1499
|
+
} else if (!calc || calc.type === "sum") {
|
|
1500
|
+
if (columnKey || calc?.type === "sum") {
|
|
1501
|
+
fieldsToSum.add(field);
|
|
1502
|
+
}
|
|
1503
|
+
} else {
|
|
1504
|
+
derivedFields.push({ field, calc });
|
|
1505
|
+
if (calc.numeratorField) fieldsToSum.add(calc.numeratorField);
|
|
1506
|
+
if (calc.denominatorField) fieldsToSum.add(calc.denominatorField);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
const sums = {};
|
|
1510
|
+
for (const field of fieldsToSum) {
|
|
1511
|
+
sums[field] = rows.reduce((acc, row) => acc + (row[field] ?? 0), 0);
|
|
1512
|
+
}
|
|
1513
|
+
const derived = {};
|
|
1514
|
+
for (const { field, calc } of derivedFields) {
|
|
1515
|
+
const num = sums[calc.numeratorField ?? ""] ?? 0;
|
|
1516
|
+
const den = sums[calc.denominatorField ?? ""] ?? 0;
|
|
1517
|
+
if (calc.type === "percentChange") {
|
|
1518
|
+
derived[field] = den ? (num - den) / den : 0;
|
|
1519
|
+
} else if (calc.type === "average") {
|
|
1520
|
+
derived[field] = den > 0 ? num / den : 0;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
const result = {};
|
|
1524
|
+
for (const [field, config] of Object.entries(fieldConfig)) {
|
|
1525
|
+
const { type } = config;
|
|
1526
|
+
if (!type || type === "string" || type === "date" || type === "time") {
|
|
1527
|
+
result[field] = "";
|
|
1528
|
+
} else if (type === "boolean") {
|
|
1529
|
+
result[field] = false;
|
|
1530
|
+
} else {
|
|
1531
|
+
result[field] = 0;
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
result[labelField] = label;
|
|
1535
|
+
for (const [field, value] of Object.entries(sums)) {
|
|
1536
|
+
result[field] = value;
|
|
1537
|
+
}
|
|
1538
|
+
for (const [field, value] of Object.entries(derived)) {
|
|
1539
|
+
result[field] = value;
|
|
1540
|
+
}
|
|
1541
|
+
return result;
|
|
1542
|
+
}
|
|
1393
1543
|
|
|
1394
1544
|
// src/reports/dailySalesRefundsVoids.ts
|
|
1395
|
-
var
|
|
1396
|
-
var
|
|
1397
|
-
description: { type: "string", columnKey: "refundVoidDescription", size:
|
|
1545
|
+
var FIRST_COLUMN_WIDTH8 = 240;
|
|
1546
|
+
var FIELDS12 = {
|
|
1547
|
+
description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH8 },
|
|
1398
1548
|
count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
|
|
1399
1549
|
amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
|
|
1400
1550
|
pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
|
|
@@ -1406,15 +1556,15 @@ var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
|
|
|
1406
1556
|
];
|
|
1407
1557
|
var DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS;
|
|
1408
1558
|
var dailySalesRefundsVoidsConfig = {
|
|
1409
|
-
fields:
|
|
1559
|
+
fields: FIELDS12,
|
|
1410
1560
|
availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
|
|
1411
1561
|
defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS
|
|
1412
1562
|
};
|
|
1413
1563
|
|
|
1414
1564
|
// src/reports/dailySalesTaxes.ts
|
|
1415
|
-
var
|
|
1416
|
-
var
|
|
1417
|
-
taxName: { type: "string", columnKey: "taxName", size:
|
|
1565
|
+
var FIRST_COLUMN_WIDTH9 = 240;
|
|
1566
|
+
var FIELDS13 = {
|
|
1567
|
+
taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH9 },
|
|
1418
1568
|
taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
|
|
1419
1569
|
taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
|
|
1420
1570
|
exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
|
|
@@ -1426,147 +1576,10 @@ var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
|
|
|
1426
1576
|
];
|
|
1427
1577
|
var DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_TAXES_AVAILABLE_COLUMNS;
|
|
1428
1578
|
var dailySalesTaxesConfig = {
|
|
1429
|
-
fields:
|
|
1579
|
+
fields: FIELDS13,
|
|
1430
1580
|
availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
|
|
1431
1581
|
defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
|
|
1432
1582
|
};
|
|
1433
|
-
|
|
1434
|
-
// src/reports/employeeTimecard.ts
|
|
1435
|
-
var FIRST_COLUMN_WIDTH9 = 240;
|
|
1436
|
-
var EMPLOYEE_NAME_WIDTH = 220;
|
|
1437
|
-
var STATUS_WIDTH = 140;
|
|
1438
|
-
var LOOKUP_WIDTH = 160;
|
|
1439
|
-
var PAYROLL_WIDTH = 160;
|
|
1440
|
-
var JOB_WIDTH = 200;
|
|
1441
|
-
var FIELDS12 = {
|
|
1442
|
-
locationId: {
|
|
1443
|
-
type: "number",
|
|
1444
|
-
enableSorting: false,
|
|
1445
|
-
filteringAvailable: false
|
|
1446
|
-
},
|
|
1447
|
-
locationName: {
|
|
1448
|
-
type: "string",
|
|
1449
|
-
size: FIRST_COLUMN_WIDTH9,
|
|
1450
|
-
columnKey: "locationName"
|
|
1451
|
-
},
|
|
1452
|
-
businessDate: {
|
|
1453
|
-
type: "date",
|
|
1454
|
-
columnKey: "date"
|
|
1455
|
-
},
|
|
1456
|
-
employeeName: {
|
|
1457
|
-
type: "string",
|
|
1458
|
-
size: EMPLOYEE_NAME_WIDTH,
|
|
1459
|
-
columnKey: "employeeName"
|
|
1460
|
-
},
|
|
1461
|
-
isActive: {
|
|
1462
|
-
type: "string",
|
|
1463
|
-
size: STATUS_WIDTH,
|
|
1464
|
-
columnKey: "status",
|
|
1465
|
-
enableSorting: false,
|
|
1466
|
-
filteringAvailable: false
|
|
1467
|
-
},
|
|
1468
|
-
lookup: {
|
|
1469
|
-
type: "string",
|
|
1470
|
-
size: LOOKUP_WIDTH,
|
|
1471
|
-
columnKey: "employeeId"
|
|
1472
|
-
},
|
|
1473
|
-
payrollCode: {
|
|
1474
|
-
type: "string",
|
|
1475
|
-
size: PAYROLL_WIDTH,
|
|
1476
|
-
columnKey: "payrollId"
|
|
1477
|
-
},
|
|
1478
|
-
jobName: {
|
|
1479
|
-
type: "string",
|
|
1480
|
-
size: JOB_WIDTH,
|
|
1481
|
-
columnKey: "employeeJob"
|
|
1482
|
-
},
|
|
1483
|
-
isBreak: {
|
|
1484
|
-
type: "string",
|
|
1485
|
-
enableSorting: false,
|
|
1486
|
-
filteringAvailable: false
|
|
1487
|
-
},
|
|
1488
|
-
startTime: {
|
|
1489
|
-
type: "string",
|
|
1490
|
-
columnKey: "clockInTime"
|
|
1491
|
-
},
|
|
1492
|
-
endTime: {
|
|
1493
|
-
type: "string",
|
|
1494
|
-
columnKey: "clockOutTime"
|
|
1495
|
-
},
|
|
1496
|
-
shiftHours: {
|
|
1497
|
-
type: "fixedNumber",
|
|
1498
|
-
columnKey: "shiftDurationHrs",
|
|
1499
|
-
filteringAvailable: false
|
|
1500
|
-
}
|
|
1501
|
-
};
|
|
1502
|
-
var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
|
|
1503
|
-
"locationName",
|
|
1504
|
-
"businessDate",
|
|
1505
|
-
"employeeName",
|
|
1506
|
-
"isActive",
|
|
1507
|
-
"lookup",
|
|
1508
|
-
"payrollCode",
|
|
1509
|
-
"jobName",
|
|
1510
|
-
"startTime",
|
|
1511
|
-
"endTime",
|
|
1512
|
-
"shiftHours"
|
|
1513
|
-
];
|
|
1514
|
-
var EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS = EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS;
|
|
1515
|
-
var employeeTimecardConfig = {
|
|
1516
|
-
fields: FIELDS12,
|
|
1517
|
-
availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
|
|
1518
|
-
defaultVisibleColumns: EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS,
|
|
1519
|
-
columnGroups: []
|
|
1520
|
-
// No column groups for this report
|
|
1521
|
-
};
|
|
1522
|
-
|
|
1523
|
-
// src/reports/salesByItemDetail.ts
|
|
1524
|
-
var FIELDS13 = {
|
|
1525
|
-
businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
|
|
1526
|
-
ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
|
|
1527
|
-
hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
|
|
1528
|
-
daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
|
|
1529
|
-
locationId: { type: "number", columnKey: "locationId", filteringAvailable: false },
|
|
1530
|
-
locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
|
|
1531
|
-
departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
|
|
1532
|
-
itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
|
|
1533
|
-
revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
|
|
1534
|
-
revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
|
|
1535
|
-
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1536
|
-
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
1537
|
-
transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
|
|
1538
|
-
guestsCount: { type: "number", columnKey: "guestCount" },
|
|
1539
|
-
employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
|
|
1540
|
-
orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
|
|
1541
|
-
salesType: { type: "string", columnKey: "salePaymentType", filteringAvailable: false },
|
|
1542
|
-
itemPrice: { type: "money", columnKey: "itemPrice" }
|
|
1543
|
-
};
|
|
1544
|
-
var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
|
|
1545
|
-
"businessDate",
|
|
1546
|
-
"ticketClosedAt",
|
|
1547
|
-
"hourId",
|
|
1548
|
-
"daypartName",
|
|
1549
|
-
"locationId",
|
|
1550
|
-
"locationName",
|
|
1551
|
-
"departmentName",
|
|
1552
|
-
"itemName",
|
|
1553
|
-
"revenueCenterName",
|
|
1554
|
-
"revenueClassName",
|
|
1555
|
-
"salesAmountGross",
|
|
1556
|
-
"itemsQuantity",
|
|
1557
|
-
"transactionId",
|
|
1558
|
-
"guestsCount",
|
|
1559
|
-
"employeeName",
|
|
1560
|
-
"orderTypeName",
|
|
1561
|
-
"salesType",
|
|
1562
|
-
"itemPrice"
|
|
1563
|
-
];
|
|
1564
|
-
var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
|
|
1565
|
-
var salesByItemDetailConfig = {
|
|
1566
|
-
fields: FIELDS13,
|
|
1567
|
-
availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
|
|
1568
|
-
defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
|
|
1569
|
-
};
|
|
1570
1583
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1571
1584
|
0 && (module.exports = {
|
|
1572
1585
|
COLUMN_REGISTRY,
|
|
@@ -1610,6 +1623,7 @@ var salesByItemDetailConfig = {
|
|
|
1610
1623
|
employeeTimecardConfig,
|
|
1611
1624
|
getColumnAlignment,
|
|
1612
1625
|
getColumnMetadata,
|
|
1626
|
+
getReportConfig,
|
|
1613
1627
|
isNumericType,
|
|
1614
1628
|
itemTaxConfig,
|
|
1615
1629
|
modifierMixConfig,
|