@harbortouch/skytab-analytics-report-utils 0.4.6 → 0.4.8

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' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'status';
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' | 'locationId' | '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' | 'salePaymentType' | 'status';
2
2
  export interface ColumnMetadata {
3
3
  titleKey: string;
4
4
  shortTitleKey: string;
package/dist/index.cjs CHANGED
@@ -42,6 +42,8 @@ __export(index_exports, {
42
42
  PRODUCT_MIX_AVAILABLE_COLUMNS: () => PRODUCT_MIX_AVAILABLE_COLUMNS,
43
43
  PRODUCT_MIX_CHART_FIELDS: () => PRODUCT_MIX_CHART_FIELDS,
44
44
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS: () => PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
45
+ SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
46
+ SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
45
47
  SALES_SUMMARY_AVAILABLE_COLUMNS: () => SALES_SUMMARY_AVAILABLE_COLUMNS,
46
48
  SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS: () => SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
47
49
  TICKET_LIVE_AVAILABLE_COLUMNS: () => TICKET_LIVE_AVAILABLE_COLUMNS,
@@ -62,6 +64,7 @@ __export(index_exports, {
62
64
  itemTaxConfig: () => itemTaxConfig,
63
65
  modifierMixConfig: () => modifierMixConfig,
64
66
  productMixConfig: () => productMixConfig,
67
+ salesByItemDetailConfig: () => salesByItemDetailConfig,
65
68
  salesSummaryConfig: () => salesSummaryConfig,
66
69
  ticketLiveConfig: () => ticketLiveConfig,
67
70
  ticketSummaryConfig: () => ticketSummaryConfig
@@ -335,6 +338,11 @@ var COLUMN_REGISTRY = {
335
338
  shortTitleKey: "common.report-col.location-city.short",
336
339
  infoTextKey: "common.report-col.location-city.info"
337
340
  },
341
+ locationId: {
342
+ titleKey: "common.report-col.location-id",
343
+ shortTitleKey: "common.report-col.location-id.short",
344
+ infoTextKey: "common.report-col.location-id.info"
345
+ },
338
346
  locationMid: {
339
347
  titleKey: "common.report-col.location-mid",
340
348
  shortTitleKey: "common.report-col.location-mid.short",
@@ -500,6 +508,11 @@ var COLUMN_REGISTRY = {
500
508
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
501
509
  infoTextKey: "common.report-col.shift-duration-hrs.info"
502
510
  },
511
+ salePaymentType: {
512
+ titleKey: "common.report-col.sale-payment-type",
513
+ shortTitleKey: "common.report-col.sale-payment-type.short",
514
+ infoTextKey: "common.report-col.sale-payment-type.info"
515
+ },
503
516
  status: {
504
517
  titleKey: "common.report-col.status",
505
518
  shortTitleKey: "common.report-col.status.short",
@@ -1074,7 +1087,7 @@ var FIELDS4 = {
1074
1087
  discountsAmount: { type: "money", columnKey: "discountAmount" },
1075
1088
  inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
1076
1089
  salesAmountNet: { type: "money", columnKey: "netSales" },
1077
- itemsQuantity: { type: "number", columnKey: "quantity" },
1090
+ itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
1078
1091
  avgPrice: {
1079
1092
  type: "fixedNumber",
1080
1093
  columnKey: "averageGrossPrice",
@@ -1491,6 +1504,54 @@ var employeeTimecardConfig = {
1491
1504
  columnGroups: []
1492
1505
  // No column groups for this report
1493
1506
  };
1507
+
1508
+ // src/reports/salesByItemDetail.ts
1509
+ var FIELDS13 = {
1510
+ businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
1511
+ ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1512
+ hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
1513
+ daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
1514
+ locationId: { type: "number", columnKey: "locationId", filteringAvailable: false },
1515
+ locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
1516
+ departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
1517
+ itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
1518
+ revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
1519
+ revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
1520
+ salesAmountNet: { type: "money", columnKey: "netSales" },
1521
+ itemsQuantity: { type: "number", columnKey: "quantity" },
1522
+ transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
1523
+ guestsCount: { type: "number", columnKey: "guestCount" },
1524
+ employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1525
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1526
+ salesType: { type: "string", columnKey: "salePaymentType", filteringAvailable: false },
1527
+ itemPrice: { type: "money", columnKey: "itemPrice" }
1528
+ };
1529
+ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
1530
+ "businessDate",
1531
+ "ticketClosedAt",
1532
+ "hourId",
1533
+ "daypartName",
1534
+ "locationId",
1535
+ "locationName",
1536
+ "departmentName",
1537
+ "itemName",
1538
+ "revenueCenterName",
1539
+ "revenueClassName",
1540
+ "salesAmountNet",
1541
+ "itemsQuantity",
1542
+ "transactionId",
1543
+ "guestsCount",
1544
+ "employeeName",
1545
+ "orderTypeName",
1546
+ "salesType",
1547
+ "itemPrice"
1548
+ ];
1549
+ var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
1550
+ var salesByItemDetailConfig = {
1551
+ fields: FIELDS13,
1552
+ availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1553
+ defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
1554
+ };
1494
1555
  // Annotate the CommonJS export names for ESM import in node:
1495
1556
  0 && (module.exports = {
1496
1557
  COLUMN_REGISTRY,
@@ -1515,6 +1576,8 @@ var employeeTimecardConfig = {
1515
1576
  PRODUCT_MIX_AVAILABLE_COLUMNS,
1516
1577
  PRODUCT_MIX_CHART_FIELDS,
1517
1578
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1579
+ SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1580
+ SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
1518
1581
  SALES_SUMMARY_AVAILABLE_COLUMNS,
1519
1582
  SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
1520
1583
  TICKET_LIVE_AVAILABLE_COLUMNS,
@@ -1535,6 +1598,7 @@ var employeeTimecardConfig = {
1535
1598
  itemTaxConfig,
1536
1599
  modifierMixConfig,
1537
1600
  productMixConfig,
1601
+ salesByItemDetailConfig,
1538
1602
  salesSummaryConfig,
1539
1603
  ticketLiveConfig,
1540
1604
  ticketSummaryConfig
package/dist/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAI
16
16
  export { dailySalesRefundsVoidsConfig, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesRefundsVoids';
17
17
  export { dailySalesTaxesConfig, DAILY_SALES_TAXES_AVAILABLE_COLUMNS, DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesTaxes';
18
18
  export { employeeTimecardConfig, EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS, } from './reports/employeeTimecard';
19
+ export { salesByItemDetailConfig, SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS, SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS, } from './reports/salesByItemDetail';
package/dist/index.js CHANGED
@@ -265,6 +265,11 @@ var COLUMN_REGISTRY = {
265
265
  shortTitleKey: "common.report-col.location-city.short",
266
266
  infoTextKey: "common.report-col.location-city.info"
267
267
  },
268
+ locationId: {
269
+ titleKey: "common.report-col.location-id",
270
+ shortTitleKey: "common.report-col.location-id.short",
271
+ infoTextKey: "common.report-col.location-id.info"
272
+ },
268
273
  locationMid: {
269
274
  titleKey: "common.report-col.location-mid",
270
275
  shortTitleKey: "common.report-col.location-mid.short",
@@ -430,6 +435,11 @@ var COLUMN_REGISTRY = {
430
435
  shortTitleKey: "common.report-col.shift-duration-hrs.short",
431
436
  infoTextKey: "common.report-col.shift-duration-hrs.info"
432
437
  },
438
+ salePaymentType: {
439
+ titleKey: "common.report-col.sale-payment-type",
440
+ shortTitleKey: "common.report-col.sale-payment-type.short",
441
+ infoTextKey: "common.report-col.sale-payment-type.info"
442
+ },
433
443
  status: {
434
444
  titleKey: "common.report-col.status",
435
445
  shortTitleKey: "common.report-col.status.short",
@@ -1004,7 +1014,7 @@ var FIELDS4 = {
1004
1014
  discountsAmount: { type: "money", columnKey: "discountAmount" },
1005
1015
  inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
1006
1016
  salesAmountNet: { type: "money", columnKey: "netSales" },
1007
- itemsQuantity: { type: "number", columnKey: "quantity" },
1017
+ itemsQuantity: { type: "fixedNumber", columnKey: "quantity" },
1008
1018
  avgPrice: {
1009
1019
  type: "fixedNumber",
1010
1020
  columnKey: "averageGrossPrice",
@@ -1421,6 +1431,54 @@ var employeeTimecardConfig = {
1421
1431
  columnGroups: []
1422
1432
  // No column groups for this report
1423
1433
  };
1434
+
1435
+ // src/reports/salesByItemDetail.ts
1436
+ var FIELDS13 = {
1437
+ businessDate: { type: "date", columnKey: "date", filteringAvailable: false },
1438
+ ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1439
+ hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
1440
+ daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
1441
+ locationId: { type: "number", columnKey: "locationId", filteringAvailable: false },
1442
+ locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
1443
+ departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
1444
+ itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
1445
+ revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
1446
+ revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
1447
+ salesAmountNet: { type: "money", columnKey: "netSales" },
1448
+ itemsQuantity: { type: "number", columnKey: "quantity" },
1449
+ transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
1450
+ guestsCount: { type: "number", columnKey: "guestCount" },
1451
+ employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1452
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1453
+ salesType: { type: "string", columnKey: "salePaymentType", filteringAvailable: false },
1454
+ itemPrice: { type: "money", columnKey: "itemPrice" }
1455
+ };
1456
+ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
1457
+ "businessDate",
1458
+ "ticketClosedAt",
1459
+ "hourId",
1460
+ "daypartName",
1461
+ "locationId",
1462
+ "locationName",
1463
+ "departmentName",
1464
+ "itemName",
1465
+ "revenueCenterName",
1466
+ "revenueClassName",
1467
+ "salesAmountNet",
1468
+ "itemsQuantity",
1469
+ "transactionId",
1470
+ "guestsCount",
1471
+ "employeeName",
1472
+ "orderTypeName",
1473
+ "salesType",
1474
+ "itemPrice"
1475
+ ];
1476
+ var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
1477
+ var salesByItemDetailConfig = {
1478
+ fields: FIELDS13,
1479
+ availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1480
+ defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
1481
+ };
1424
1482
  export {
1425
1483
  COLUMN_REGISTRY,
1426
1484
  DAILY_SALES_AVAILABLE_COLUMNS,
@@ -1444,6 +1502,8 @@ export {
1444
1502
  PRODUCT_MIX_AVAILABLE_COLUMNS,
1445
1503
  PRODUCT_MIX_CHART_FIELDS,
1446
1504
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1505
+ SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1506
+ SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
1447
1507
  SALES_SUMMARY_AVAILABLE_COLUMNS,
1448
1508
  SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
1449
1509
  TICKET_LIVE_AVAILABLE_COLUMNS,
@@ -1464,6 +1524,7 @@ export {
1464
1524
  itemTaxConfig,
1465
1525
  modifierMixConfig,
1466
1526
  productMixConfig,
1527
+ salesByItemDetailConfig,
1467
1528
  salesSummaryConfig,
1468
1529
  ticketLiveConfig,
1469
1530
  ticketSummaryConfig
@@ -0,0 +1,6 @@
1
+ import { type ReportConfig } from '../types';
2
+ type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountNet' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
3
+ export declare const SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: SalesByItemDetailField[];
4
+ export declare const SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: SalesByItemDetailField[];
5
+ export declare const salesByItemDetailConfig: ReportConfig<SalesByItemDetailField>;
6
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",