@harbortouch/skytab-analytics-report-utils 0.4.3 → 0.4.5

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.
@@ -1,4 +1,4 @@
1
- export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal';
1
+ export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net';
2
2
  export interface ColumnMetadata {
3
3
  titleKey: string;
4
4
  shortTitleKey: string;
package/dist/index.cjs CHANGED
@@ -22,6 +22,7 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  COLUMN_REGISTRY: () => COLUMN_REGISTRY,
24
24
  DAILY_SALES_AVAILABLE_COLUMNS: () => DAILY_SALES_AVAILABLE_COLUMNS,
25
+ DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: () => DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
25
26
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
26
27
  DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS: () => DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
27
28
  DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
@@ -31,6 +32,7 @@ __export(index_exports, {
31
32
  DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
32
33
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS: () => DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
33
34
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
35
+ DAILY_SALES_TRENDS_AVAILABLE_COLUMNS: () => DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
34
36
  ITEM_TAX_AVAILABLE_COLUMNS: () => ITEM_TAX_AVAILABLE_COLUMNS,
35
37
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: () => ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
36
38
  MODIFIER_MIX_AVAILABLE_COLUMNS: () => MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -50,6 +52,7 @@ __export(index_exports, {
50
52
  dailySalesPaymentsConfig: () => dailySalesPaymentsConfig,
51
53
  dailySalesRefundsVoidsConfig: () => dailySalesRefundsVoidsConfig,
52
54
  dailySalesTaxesConfig: () => dailySalesTaxesConfig,
55
+ dailySalesTrendsConfig: () => dailySalesTrendsConfig,
53
56
  getColumnAlignment: () => getColumnAlignment,
54
57
  getColumnMetadata: () => getColumnMetadata,
55
58
  isNumericType: () => isNumericType,
@@ -643,6 +646,56 @@ var COLUMN_REGISTRY = {
643
646
  titleKey: "common.report-col.payments-total",
644
647
  shortTitleKey: "common.report-col.payments-total.short",
645
648
  infoTextKey: "common.report-col.payments-total.info"
649
+ },
650
+ refundVoidDescription: {
651
+ titleKey: "common.report-col.refund-void-description",
652
+ shortTitleKey: "common.report-col.refund-void-description.short",
653
+ infoTextKey: "common.report-col.refund-void-description.info"
654
+ },
655
+ refundVoidCount: {
656
+ titleKey: "common.report-col.refund-void-count",
657
+ shortTitleKey: "common.report-col.refund-void-count.short",
658
+ infoTextKey: "common.report-col.refund-void-count.info"
659
+ },
660
+ refundVoidAmount: {
661
+ titleKey: "common.report-col.refund-void-amount",
662
+ shortTitleKey: "common.report-col.refund-void-amount.short",
663
+ infoTextKey: "common.report-col.refund-void-amount.info"
664
+ },
665
+ refundVoidPctSales: {
666
+ titleKey: "common.report-col.refund-void-pct-sales",
667
+ shortTitleKey: "common.report-col.refund-void-pct-sales.short",
668
+ infoTextKey: "common.report-col.refund-void-pct-sales.info"
669
+ },
670
+ discountName: {
671
+ titleKey: "common.report-col.discount-name",
672
+ shortTitleKey: "common.report-col.discount-name.short",
673
+ infoTextKey: "common.report-col.discount-name.info"
674
+ },
675
+ tickets: {
676
+ titleKey: "common.report-col.tickets",
677
+ shortTitleKey: "common.report-col.tickets.short",
678
+ infoTextKey: "common.report-col.tickets.info"
679
+ },
680
+ guests: {
681
+ titleKey: "common.report-col.guests",
682
+ shortTitleKey: "common.report-col.guests.short",
683
+ infoTextKey: "common.report-col.guests.info"
684
+ },
685
+ ticketAverage: {
686
+ titleKey: "common.report-col.ticket-average",
687
+ shortTitleKey: "common.report-col.ticket-average.short",
688
+ infoTextKey: "common.report-col.ticket-average.info"
689
+ },
690
+ guestAverage: {
691
+ titleKey: "common.report-col.guest-average",
692
+ shortTitleKey: "common.report-col.guest-average.short",
693
+ infoTextKey: "common.report-col.guest-average.info"
694
+ },
695
+ net: {
696
+ titleKey: "common.report-col.net",
697
+ shortTitleKey: "common.report-col.net.short",
698
+ infoTextKey: "common.report-col.net.info"
646
699
  }
647
700
  };
648
701
  function getColumnMetadata(key) {
@@ -1189,6 +1242,44 @@ var FIELDS7 = {
1189
1242
  numeratorField: "salesAmountGross",
1190
1243
  denominatorField: "itemsQuantity"
1191
1244
  }
1245
+ },
1246
+ ticketsCount: { type: "number", columnKey: "tickets" },
1247
+ guestsCount: { type: "number", columnKey: "guests" },
1248
+ ticketAverage: {
1249
+ type: "money",
1250
+ columnKey: "ticketAverage",
1251
+ footerCalculation: {
1252
+ type: "average",
1253
+ numeratorField: "salesAmountNet",
1254
+ denominatorField: "ticketsCount"
1255
+ }
1256
+ },
1257
+ guestAverage: {
1258
+ type: "money",
1259
+ columnKey: "guestAverage",
1260
+ footerCalculation: {
1261
+ type: "average",
1262
+ numeratorField: "salesAmountNet",
1263
+ denominatorField: "guestsCount"
1264
+ }
1265
+ },
1266
+ ticketAvg: {
1267
+ type: "money",
1268
+ columnKey: "ticketAverage",
1269
+ footerCalculation: {
1270
+ type: "average",
1271
+ numeratorField: "salesAmountNet",
1272
+ denominatorField: "ticketsCount"
1273
+ }
1274
+ },
1275
+ guestAvg: {
1276
+ type: "money",
1277
+ columnKey: "guestAverage",
1278
+ footerCalculation: {
1279
+ type: "average",
1280
+ numeratorField: "salesAmountNet",
1281
+ denominatorField: "guestsCount"
1282
+ }
1192
1283
  }
1193
1284
  };
1194
1285
  var DAILY_SALES_AVAILABLE_COLUMNS = [
@@ -1198,12 +1289,31 @@ var DAILY_SALES_AVAILABLE_COLUMNS = [
1198
1289
  "salesAmountNet",
1199
1290
  "salesMixPct"
1200
1291
  ];
1292
+ var DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS = [
1293
+ "ticketsCount",
1294
+ "guestsCount",
1295
+ "ticketAverage",
1296
+ "guestAverage",
1297
+ "salesAmountNet"
1298
+ ];
1201
1299
  var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
1202
1300
  var dailySalesConfig = {
1203
1301
  fields: FIELDS7,
1204
1302
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
1205
1303
  defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
1206
1304
  };
1305
+ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
1306
+ "ticketsCount",
1307
+ "guestsCount",
1308
+ "ticketAvg",
1309
+ "guestAvg",
1310
+ "salesAmountNet"
1311
+ ];
1312
+ var dailySalesTrendsConfig = {
1313
+ fields: FIELDS7,
1314
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1315
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS
1316
+ };
1207
1317
 
1208
1318
  // src/reports/dailySalesPayments.ts
1209
1319
  var FIRST_COLUMN_WIDTH5 = 240;
@@ -1230,7 +1340,7 @@ var dailySalesPaymentsConfig = {
1230
1340
  // src/reports/dailySalesDiscounts.ts
1231
1341
  var FIRST_COLUMN_WIDTH6 = 240;
1232
1342
  var FIELDS9 = {
1233
- discountName: { type: "string", size: FIRST_COLUMN_WIDTH6 },
1343
+ discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH6 },
1234
1344
  discountsCount: { type: "number", columnKey: "discountCount", footerCalculation: { type: "sum" } },
1235
1345
  discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
1236
1346
  };
@@ -1248,10 +1358,10 @@ var dailySalesDiscountsConfig = {
1248
1358
  // src/reports/dailySalesRefundsVoids.ts
1249
1359
  var FIRST_COLUMN_WIDTH7 = 240;
1250
1360
  var FIELDS10 = {
1251
- description: { type: "string", size: FIRST_COLUMN_WIDTH7 },
1252
- count: { type: "number", footerCalculation: { type: "sum" } },
1253
- amount: { type: "money", footerCalculation: { type: "sum" } },
1254
- pctSales: { type: "percent", footerCalculation: { type: "sum" } }
1361
+ description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH7 },
1362
+ count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1363
+ amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
1364
+ pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
1255
1365
  };
1256
1366
  var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
1257
1367
  "count",
@@ -1288,6 +1398,7 @@ var dailySalesTaxesConfig = {
1288
1398
  0 && (module.exports = {
1289
1399
  COLUMN_REGISTRY,
1290
1400
  DAILY_SALES_AVAILABLE_COLUMNS,
1401
+ DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
1291
1402
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
1292
1403
  DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1293
1404
  DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
@@ -1297,6 +1408,7 @@ var dailySalesTaxesConfig = {
1297
1408
  DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
1298
1409
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1299
1410
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
1411
+ DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1300
1412
  ITEM_TAX_AVAILABLE_COLUMNS,
1301
1413
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1302
1414
  MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -1316,6 +1428,7 @@ var dailySalesTaxesConfig = {
1316
1428
  dailySalesPaymentsConfig,
1317
1429
  dailySalesRefundsVoidsConfig,
1318
1430
  dailySalesTaxesConfig,
1431
+ dailySalesTrendsConfig,
1319
1432
  getColumnAlignment,
1320
1433
  getColumnMetadata,
1321
1434
  isNumericType,
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export { ticketLiveConfig, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VI
10
10
  export { productMixConfig, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, } from './reports/productMix';
11
11
  export { modifierMixConfig, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS, } from './reports/modifierMix';
12
12
  export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS } from './reports/itemTax';
13
- export { dailySalesConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySales';
13
+ export { dailySalesConfig, dailySalesTrendsConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS, DAILY_SALES_TRENDS_AVAILABLE_COLUMNS, } from './reports/dailySales';
14
14
  export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesPayments';
15
15
  export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesDiscounts';
16
16
  export { dailySalesRefundsVoidsConfig, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesRefundsVoids';
package/dist/index.js CHANGED
@@ -579,6 +579,56 @@ var COLUMN_REGISTRY = {
579
579
  titleKey: "common.report-col.payments-total",
580
580
  shortTitleKey: "common.report-col.payments-total.short",
581
581
  infoTextKey: "common.report-col.payments-total.info"
582
+ },
583
+ refundVoidDescription: {
584
+ titleKey: "common.report-col.refund-void-description",
585
+ shortTitleKey: "common.report-col.refund-void-description.short",
586
+ infoTextKey: "common.report-col.refund-void-description.info"
587
+ },
588
+ refundVoidCount: {
589
+ titleKey: "common.report-col.refund-void-count",
590
+ shortTitleKey: "common.report-col.refund-void-count.short",
591
+ infoTextKey: "common.report-col.refund-void-count.info"
592
+ },
593
+ refundVoidAmount: {
594
+ titleKey: "common.report-col.refund-void-amount",
595
+ shortTitleKey: "common.report-col.refund-void-amount.short",
596
+ infoTextKey: "common.report-col.refund-void-amount.info"
597
+ },
598
+ refundVoidPctSales: {
599
+ titleKey: "common.report-col.refund-void-pct-sales",
600
+ shortTitleKey: "common.report-col.refund-void-pct-sales.short",
601
+ infoTextKey: "common.report-col.refund-void-pct-sales.info"
602
+ },
603
+ discountName: {
604
+ titleKey: "common.report-col.discount-name",
605
+ shortTitleKey: "common.report-col.discount-name.short",
606
+ infoTextKey: "common.report-col.discount-name.info"
607
+ },
608
+ tickets: {
609
+ titleKey: "common.report-col.tickets",
610
+ shortTitleKey: "common.report-col.tickets.short",
611
+ infoTextKey: "common.report-col.tickets.info"
612
+ },
613
+ guests: {
614
+ titleKey: "common.report-col.guests",
615
+ shortTitleKey: "common.report-col.guests.short",
616
+ infoTextKey: "common.report-col.guests.info"
617
+ },
618
+ ticketAverage: {
619
+ titleKey: "common.report-col.ticket-average",
620
+ shortTitleKey: "common.report-col.ticket-average.short",
621
+ infoTextKey: "common.report-col.ticket-average.info"
622
+ },
623
+ guestAverage: {
624
+ titleKey: "common.report-col.guest-average",
625
+ shortTitleKey: "common.report-col.guest-average.short",
626
+ infoTextKey: "common.report-col.guest-average.info"
627
+ },
628
+ net: {
629
+ titleKey: "common.report-col.net",
630
+ shortTitleKey: "common.report-col.net.short",
631
+ infoTextKey: "common.report-col.net.info"
582
632
  }
583
633
  };
584
634
  function getColumnMetadata(key) {
@@ -1125,6 +1175,44 @@ var FIELDS7 = {
1125
1175
  numeratorField: "salesAmountGross",
1126
1176
  denominatorField: "itemsQuantity"
1127
1177
  }
1178
+ },
1179
+ ticketsCount: { type: "number", columnKey: "tickets" },
1180
+ guestsCount: { type: "number", columnKey: "guests" },
1181
+ ticketAverage: {
1182
+ type: "money",
1183
+ columnKey: "ticketAverage",
1184
+ footerCalculation: {
1185
+ type: "average",
1186
+ numeratorField: "salesAmountNet",
1187
+ denominatorField: "ticketsCount"
1188
+ }
1189
+ },
1190
+ guestAverage: {
1191
+ type: "money",
1192
+ columnKey: "guestAverage",
1193
+ footerCalculation: {
1194
+ type: "average",
1195
+ numeratorField: "salesAmountNet",
1196
+ denominatorField: "guestsCount"
1197
+ }
1198
+ },
1199
+ ticketAvg: {
1200
+ type: "money",
1201
+ columnKey: "ticketAverage",
1202
+ footerCalculation: {
1203
+ type: "average",
1204
+ numeratorField: "salesAmountNet",
1205
+ denominatorField: "ticketsCount"
1206
+ }
1207
+ },
1208
+ guestAvg: {
1209
+ type: "money",
1210
+ columnKey: "guestAverage",
1211
+ footerCalculation: {
1212
+ type: "average",
1213
+ numeratorField: "salesAmountNet",
1214
+ denominatorField: "guestsCount"
1215
+ }
1128
1216
  }
1129
1217
  };
1130
1218
  var DAILY_SALES_AVAILABLE_COLUMNS = [
@@ -1134,12 +1222,31 @@ var DAILY_SALES_AVAILABLE_COLUMNS = [
1134
1222
  "salesAmountNet",
1135
1223
  "salesMixPct"
1136
1224
  ];
1225
+ var DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS = [
1226
+ "ticketsCount",
1227
+ "guestsCount",
1228
+ "ticketAverage",
1229
+ "guestAverage",
1230
+ "salesAmountNet"
1231
+ ];
1137
1232
  var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
1138
1233
  var dailySalesConfig = {
1139
1234
  fields: FIELDS7,
1140
1235
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
1141
1236
  defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
1142
1237
  };
1238
+ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
1239
+ "ticketsCount",
1240
+ "guestsCount",
1241
+ "ticketAvg",
1242
+ "guestAvg",
1243
+ "salesAmountNet"
1244
+ ];
1245
+ var dailySalesTrendsConfig = {
1246
+ fields: FIELDS7,
1247
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1248
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS
1249
+ };
1143
1250
 
1144
1251
  // src/reports/dailySalesPayments.ts
1145
1252
  var FIRST_COLUMN_WIDTH5 = 240;
@@ -1166,7 +1273,7 @@ var dailySalesPaymentsConfig = {
1166
1273
  // src/reports/dailySalesDiscounts.ts
1167
1274
  var FIRST_COLUMN_WIDTH6 = 240;
1168
1275
  var FIELDS9 = {
1169
- discountName: { type: "string", size: FIRST_COLUMN_WIDTH6 },
1276
+ discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH6 },
1170
1277
  discountsCount: { type: "number", columnKey: "discountCount", footerCalculation: { type: "sum" } },
1171
1278
  discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
1172
1279
  };
@@ -1184,10 +1291,10 @@ var dailySalesDiscountsConfig = {
1184
1291
  // src/reports/dailySalesRefundsVoids.ts
1185
1292
  var FIRST_COLUMN_WIDTH7 = 240;
1186
1293
  var FIELDS10 = {
1187
- description: { type: "string", size: FIRST_COLUMN_WIDTH7 },
1188
- count: { type: "number", footerCalculation: { type: "sum" } },
1189
- amount: { type: "money", footerCalculation: { type: "sum" } },
1190
- pctSales: { type: "percent", footerCalculation: { type: "sum" } }
1294
+ description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH7 },
1295
+ count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1296
+ amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
1297
+ pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
1191
1298
  };
1192
1299
  var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
1193
1300
  "count",
@@ -1223,6 +1330,7 @@ var dailySalesTaxesConfig = {
1223
1330
  export {
1224
1331
  COLUMN_REGISTRY,
1225
1332
  DAILY_SALES_AVAILABLE_COLUMNS,
1333
+ DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
1226
1334
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
1227
1335
  DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1228
1336
  DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
@@ -1232,6 +1340,7 @@ export {
1232
1340
  DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
1233
1341
  DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1234
1342
  DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
1343
+ DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1235
1344
  ITEM_TAX_AVAILABLE_COLUMNS,
1236
1345
  ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
1237
1346
  MODIFIER_MIX_AVAILABLE_COLUMNS,
@@ -1251,6 +1360,7 @@ export {
1251
1360
  dailySalesPaymentsConfig,
1252
1361
  dailySalesRefundsVoidsConfig,
1253
1362
  dailySalesTaxesConfig,
1363
+ dailySalesTrendsConfig,
1254
1364
  getColumnAlignment,
1255
1365
  getColumnMetadata,
1256
1366
  isNumericType,
@@ -1,6 +1,9 @@
1
1
  import { type ReportConfig } from '../types';
2
- type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice';
2
+ type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice' | 'ticketsCount' | 'guestsCount' | 'ticketAverage' | 'guestAverage' | 'ticketAvg' | 'guestAvg';
3
3
  export declare const DAILY_SALES_AVAILABLE_COLUMNS: DailySalesField[];
4
+ export declare const DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: DailySalesField[];
4
5
  export declare const DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: DailySalesField[];
5
6
  export declare const dailySalesConfig: ReportConfig<DailySalesField>;
7
+ export declare const DAILY_SALES_TRENDS_AVAILABLE_COLUMNS: DailySalesField[];
8
+ export declare const dailySalesTrendsConfig: ReportConfig<DailySalesField>;
6
9
  export {};
@@ -4,6 +4,6 @@ export { ticketLiveConfig, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VI
4
4
  export { productMixConfig, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, } from './productMix';
5
5
  export { modifierMixConfig, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS } from './modifierMix';
6
6
  export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS } from './itemTax';
7
- export { dailySalesConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS } from './dailySales';
7
+ export { dailySalesConfig, dailySalesTrendsConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS, DAILY_SALES_TRENDS_AVAILABLE_COLUMNS, } from './dailySales';
8
8
  export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, } from './dailySalesPayments';
9
9
  export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, } from './dailySalesDiscounts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",