@harbortouch/skytab-analytics-report-utils 0.14.1 → 0.14.2

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 CHANGED
@@ -33,6 +33,7 @@ __export(index_exports, {
33
33
  dailySalesTaxesConfig: () => dailySalesTaxesConfig,
34
34
  dailySalesTrendsConfig: () => dailySalesTrendsConfig,
35
35
  employeeTimecardConfig: () => employeeTimecardConfig,
36
+ employeeTipConfig: () => employeeTipConfig,
36
37
  formatDate: () => formatDate,
37
38
  formatFieldValue: () => formatFieldValue,
38
39
  formatFixedNumber: () => formatFixedNumber,
@@ -647,8 +648,56 @@ var employeeTimecardConfig = {
647
648
  hasFooter: true
648
649
  };
649
650
 
650
- // src/reports/dailySales.ts
651
+ // src/reports/employeeTip.ts
651
652
  var FIELDS9 = {
653
+ employeeName: { type: "string", size: 220, columnKey: "employeeName" },
654
+ empId: { type: "string", size: 160, columnKey: "employeeId" },
655
+ payrollId: { type: "string", size: 160, columnKey: "payrollId" },
656
+ locationName: { type: "string", size: 220, columnKey: "locationName" },
657
+ status: { type: "string", size: 140, columnKey: "status" },
658
+ grossSales: { type: "money", columnKey: "grossSales", footerCalculation: { type: "sum" } },
659
+ grossCash: { type: "money", columnKey: "grossCashSales", footerCalculation: { type: "sum" } },
660
+ grossCc: { type: "money", columnKey: "grossCreditSales", footerCalculation: { type: "sum" } },
661
+ totalPayments: { type: "money", columnKey: "totalCollected", footerCalculation: { type: "sum" } },
662
+ autoGratuity: { type: "money", columnKey: "autoGratuity", footerCalculation: { type: "sum" } },
663
+ grossTips: { type: "money", columnKey: "grossTips", footerCalculation: { type: "sum" } },
664
+ declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } },
665
+ tipReduction: { type: "money", columnKey: "tipReduction", footerCalculation: { type: "sum" } },
666
+ tipShare: { type: "money", columnKey: "tipShare", footerCalculation: { type: "sum" } },
667
+ netTips: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
668
+ tipPercentage: {
669
+ type: "percent",
670
+ columnKey: "tipPct",
671
+ footerCalculation: { type: "average", numeratorField: "grossTips", denominatorField: "grossSales" }
672
+ }
673
+ };
674
+ var AVAILABLE_COLUMNS = [
675
+ "employeeName",
676
+ "empId",
677
+ "payrollId",
678
+ "locationName",
679
+ "status",
680
+ "grossSales",
681
+ "grossCash",
682
+ "grossCc",
683
+ "totalPayments",
684
+ "autoGratuity",
685
+ "grossTips",
686
+ "declaredTips",
687
+ "tipReduction",
688
+ "tipShare",
689
+ "netTips",
690
+ "tipPercentage"
691
+ ];
692
+ var employeeTipConfig = {
693
+ fields: FIELDS9,
694
+ availableColumns: AVAILABLE_COLUMNS,
695
+ defaultVisibleColumns: AVAILABLE_COLUMNS,
696
+ hasFooter: true
697
+ };
698
+
699
+ // src/reports/dailySales.ts
700
+ var FIELDS10 = {
652
701
  groupById: { type: "string" },
653
702
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
654
703
  itemsQuantity: { type: "number", columnKey: "quantity" },
@@ -667,14 +716,14 @@ var DAILY_SALES_AVAILABLE_COLUMNS = [
667
716
  "salesMixPct"
668
717
  ];
669
718
  var dailySalesConfig = {
670
- fields: FIELDS9,
719
+ fields: FIELDS10,
671
720
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
672
721
  defaultVisibleColumns: DAILY_SALES_AVAILABLE_COLUMNS,
673
722
  hasFooter: true
674
723
  };
675
724
 
676
725
  // src/reports/dailySalesLive.ts
677
- var FIELDS10 = {
726
+ var FIELDS11 = {
678
727
  groupById: { type: "string" },
679
728
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
680
729
  itemsQuantity: { type: "number", columnKey: "quantity" },
@@ -694,14 +743,14 @@ var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
694
743
  "salesMixPct"
695
744
  ];
696
745
  var dailySalesLiveConfig = {
697
- fields: FIELDS10,
746
+ fields: FIELDS11,
698
747
  availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
699
748
  defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
700
749
  hasFooter: true
701
750
  };
702
751
 
703
752
  // src/reports/dailySalesTrends.ts
704
- var FIELDS11 = {
753
+ var FIELDS12 = {
705
754
  groupById: { type: "string" },
706
755
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
707
756
  salesAmountNet: { type: "money", columnKey: "netSales" },
@@ -734,7 +783,7 @@ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
734
783
  "salesAmountNet"
735
784
  ];
736
785
  var dailySalesTrendsConfig = {
737
- fields: FIELDS11,
786
+ fields: FIELDS12,
738
787
  availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
739
788
  defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
740
789
  hasFooter: true
@@ -763,7 +812,7 @@ var REPORT_CONFIG_MAP = {
763
812
  "modifier-mix": modifierMixConfig,
764
813
  "item-tax": itemTaxConfig,
765
814
  "employee-timecard": employeeTimecardConfig,
766
- "employee-tip": null,
815
+ "employee-tip": employeeTipConfig,
767
816
  "sales-by-item": salesByItemDetailConfig,
768
817
  "daily-sales": dailySalesConfig,
769
818
  "daily-sales-live": dailySalesLiveConfig,
@@ -1533,7 +1582,7 @@ var calculateReportTotals = (data, fieldConfig, opts) => {
1533
1582
  };
1534
1583
 
1535
1584
  // src/reports/dailySalesPayments.ts
1536
- var FIELDS12 = {
1585
+ var FIELDS13 = {
1537
1586
  paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH },
1538
1587
  paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
1539
1588
  paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
@@ -1547,14 +1596,14 @@ var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
1547
1596
  "totalSales"
1548
1597
  ];
1549
1598
  var dailySalesPaymentsConfig = {
1550
- fields: FIELDS12,
1599
+ fields: FIELDS13,
1551
1600
  availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1552
1601
  defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1553
1602
  hasFooter: true
1554
1603
  };
1555
1604
 
1556
1605
  // src/reports/dailySalesDiscounts.ts
1557
- var FIELDS13 = {
1606
+ var FIELDS14 = {
1558
1607
  discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH },
1559
1608
  ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
1560
1609
  itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
@@ -1566,14 +1615,14 @@ var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
1566
1615
  "discountsAmount"
1567
1616
  ];
1568
1617
  var dailySalesDiscountsConfig = {
1569
- fields: FIELDS13,
1618
+ fields: FIELDS14,
1570
1619
  availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1571
1620
  defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1572
1621
  hasFooter: true
1573
1622
  };
1574
1623
 
1575
1624
  // src/reports/dailySalesRefundsVoids.ts
1576
- var FIELDS14 = {
1625
+ var FIELDS15 = {
1577
1626
  description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH },
1578
1627
  count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1579
1628
  amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
@@ -1581,14 +1630,14 @@ var FIELDS14 = {
1581
1630
  };
1582
1631
  var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = ["count", "amount", "pctSales"];
1583
1632
  var dailySalesRefundsVoidsConfig = {
1584
- fields: FIELDS14,
1633
+ fields: FIELDS15,
1585
1634
  availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1586
1635
  defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1587
1636
  hasFooter: true
1588
1637
  };
1589
1638
 
1590
1639
  // src/reports/dailySalesTaxes.ts
1591
- var FIELDS15 = {
1640
+ var FIELDS16 = {
1592
1641
  taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH },
1593
1642
  taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
1594
1643
  taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
@@ -1596,19 +1645,19 @@ var FIELDS15 = {
1596
1645
  };
1597
1646
  var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = ["taxableSales", "taxesAmount", "exemptSales"];
1598
1647
  var dailySalesTaxesConfig = {
1599
- fields: FIELDS15,
1648
+ fields: FIELDS16,
1600
1649
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1601
1650
  defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1602
1651
  hasFooter: true
1603
1652
  };
1604
1653
 
1605
1654
  // src/reports/dailySalesCache.ts
1606
- var FIELDS16 = {
1655
+ var FIELDS17 = {
1607
1656
  name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
1608
1657
  amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
1609
1658
  };
1610
1659
  var dailySalesCacheConfig = {
1611
- fields: FIELDS16,
1660
+ fields: FIELDS17,
1612
1661
  availableColumns: ["name", "amount"],
1613
1662
  defaultVisibleColumns: ["name", "amount"],
1614
1663
  hasFooter: true
@@ -1767,6 +1816,7 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
1767
1816
  dailySalesTaxesConfig,
1768
1817
  dailySalesTrendsConfig,
1769
1818
  employeeTimecardConfig,
1819
+ employeeTipConfig,
1770
1820
  formatDate,
1771
1821
  formatFieldValue,
1772
1822
  formatFixedNumber,
package/dist/index.d.cts CHANGED
@@ -1377,6 +1377,14 @@ declare const employeeTimecardConfig: {
1377
1377
  readonly hasFooter: true;
1378
1378
  };
1379
1379
 
1380
+ type EmployeeTipField = 'employeeName' | 'empId' | 'payrollId' | 'locationName' | 'status' | 'grossSales' | 'grossCash' | 'grossCc' | 'totalPayments' | 'autoGratuity' | 'grossTips' | 'declaredTips' | 'tipReduction' | 'tipShare' | 'netTips' | 'tipPercentage';
1381
+ declare const employeeTipConfig: {
1382
+ readonly fields: Record<EmployeeTipField, ColumnPresentationConfig<EmployeeTipField>>;
1383
+ readonly availableColumns: EmployeeTipField[];
1384
+ readonly defaultVisibleColumns: EmployeeTipField[];
1385
+ readonly hasFooter: true;
1386
+ };
1387
+
1380
1388
  type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
1381
1389
  declare const salesByItemDetailConfig: {
1382
1390
  readonly fields: Record<SalesByItemDetailField, ColumnPresentationConfig<SalesByItemDetailField>>;
@@ -1434,4 +1442,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
1434
1442
  }[]) => LocaleOption[];
1435
1443
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
1436
1444
 
1437
- export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportExportFileName, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
1445
+ export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportExportFileName, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
package/dist/index.d.ts CHANGED
@@ -1377,6 +1377,14 @@ declare const employeeTimecardConfig: {
1377
1377
  readonly hasFooter: true;
1378
1378
  };
1379
1379
 
1380
+ type EmployeeTipField = 'employeeName' | 'empId' | 'payrollId' | 'locationName' | 'status' | 'grossSales' | 'grossCash' | 'grossCc' | 'totalPayments' | 'autoGratuity' | 'grossTips' | 'declaredTips' | 'tipReduction' | 'tipShare' | 'netTips' | 'tipPercentage';
1381
+ declare const employeeTipConfig: {
1382
+ readonly fields: Record<EmployeeTipField, ColumnPresentationConfig<EmployeeTipField>>;
1383
+ readonly availableColumns: EmployeeTipField[];
1384
+ readonly defaultVisibleColumns: EmployeeTipField[];
1385
+ readonly hasFooter: true;
1386
+ };
1387
+
1380
1388
  type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
1381
1389
  declare const salesByItemDetailConfig: {
1382
1390
  readonly fields: Record<SalesByItemDetailField, ColumnPresentationConfig<SalesByItemDetailField>>;
@@ -1434,4 +1442,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
1434
1442
  }[]) => LocaleOption[];
1435
1443
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
1436
1444
 
1437
- export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportExportFileName, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
1445
+ export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportExportFileName, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
package/dist/index.js CHANGED
@@ -584,8 +584,56 @@ var employeeTimecardConfig = {
584
584
  hasFooter: true
585
585
  };
586
586
 
587
- // src/reports/dailySales.ts
587
+ // src/reports/employeeTip.ts
588
588
  var FIELDS9 = {
589
+ employeeName: { type: "string", size: 220, columnKey: "employeeName" },
590
+ empId: { type: "string", size: 160, columnKey: "employeeId" },
591
+ payrollId: { type: "string", size: 160, columnKey: "payrollId" },
592
+ locationName: { type: "string", size: 220, columnKey: "locationName" },
593
+ status: { type: "string", size: 140, columnKey: "status" },
594
+ grossSales: { type: "money", columnKey: "grossSales", footerCalculation: { type: "sum" } },
595
+ grossCash: { type: "money", columnKey: "grossCashSales", footerCalculation: { type: "sum" } },
596
+ grossCc: { type: "money", columnKey: "grossCreditSales", footerCalculation: { type: "sum" } },
597
+ totalPayments: { type: "money", columnKey: "totalCollected", footerCalculation: { type: "sum" } },
598
+ autoGratuity: { type: "money", columnKey: "autoGratuity", footerCalculation: { type: "sum" } },
599
+ grossTips: { type: "money", columnKey: "grossTips", footerCalculation: { type: "sum" } },
600
+ declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } },
601
+ tipReduction: { type: "money", columnKey: "tipReduction", footerCalculation: { type: "sum" } },
602
+ tipShare: { type: "money", columnKey: "tipShare", footerCalculation: { type: "sum" } },
603
+ netTips: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
604
+ tipPercentage: {
605
+ type: "percent",
606
+ columnKey: "tipPct",
607
+ footerCalculation: { type: "average", numeratorField: "grossTips", denominatorField: "grossSales" }
608
+ }
609
+ };
610
+ var AVAILABLE_COLUMNS = [
611
+ "employeeName",
612
+ "empId",
613
+ "payrollId",
614
+ "locationName",
615
+ "status",
616
+ "grossSales",
617
+ "grossCash",
618
+ "grossCc",
619
+ "totalPayments",
620
+ "autoGratuity",
621
+ "grossTips",
622
+ "declaredTips",
623
+ "tipReduction",
624
+ "tipShare",
625
+ "netTips",
626
+ "tipPercentage"
627
+ ];
628
+ var employeeTipConfig = {
629
+ fields: FIELDS9,
630
+ availableColumns: AVAILABLE_COLUMNS,
631
+ defaultVisibleColumns: AVAILABLE_COLUMNS,
632
+ hasFooter: true
633
+ };
634
+
635
+ // src/reports/dailySales.ts
636
+ var FIELDS10 = {
589
637
  groupById: { type: "string" },
590
638
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
591
639
  itemsQuantity: { type: "number", columnKey: "quantity" },
@@ -604,14 +652,14 @@ var DAILY_SALES_AVAILABLE_COLUMNS = [
604
652
  "salesMixPct"
605
653
  ];
606
654
  var dailySalesConfig = {
607
- fields: FIELDS9,
655
+ fields: FIELDS10,
608
656
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
609
657
  defaultVisibleColumns: DAILY_SALES_AVAILABLE_COLUMNS,
610
658
  hasFooter: true
611
659
  };
612
660
 
613
661
  // src/reports/dailySalesLive.ts
614
- var FIELDS10 = {
662
+ var FIELDS11 = {
615
663
  groupById: { type: "string" },
616
664
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
617
665
  itemsQuantity: { type: "number", columnKey: "quantity" },
@@ -631,14 +679,14 @@ var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
631
679
  "salesMixPct"
632
680
  ];
633
681
  var dailySalesLiveConfig = {
634
- fields: FIELDS10,
682
+ fields: FIELDS11,
635
683
  availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
636
684
  defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
637
685
  hasFooter: true
638
686
  };
639
687
 
640
688
  // src/reports/dailySalesTrends.ts
641
- var FIELDS11 = {
689
+ var FIELDS12 = {
642
690
  groupById: { type: "string" },
643
691
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
644
692
  salesAmountNet: { type: "money", columnKey: "netSales" },
@@ -671,7 +719,7 @@ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
671
719
  "salesAmountNet"
672
720
  ];
673
721
  var dailySalesTrendsConfig = {
674
- fields: FIELDS11,
722
+ fields: FIELDS12,
675
723
  availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
676
724
  defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
677
725
  hasFooter: true
@@ -700,7 +748,7 @@ var REPORT_CONFIG_MAP = {
700
748
  "modifier-mix": modifierMixConfig,
701
749
  "item-tax": itemTaxConfig,
702
750
  "employee-timecard": employeeTimecardConfig,
703
- "employee-tip": null,
751
+ "employee-tip": employeeTipConfig,
704
752
  "sales-by-item": salesByItemDetailConfig,
705
753
  "daily-sales": dailySalesConfig,
706
754
  "daily-sales-live": dailySalesLiveConfig,
@@ -1470,7 +1518,7 @@ var calculateReportTotals = (data, fieldConfig, opts) => {
1470
1518
  };
1471
1519
 
1472
1520
  // src/reports/dailySalesPayments.ts
1473
- var FIELDS12 = {
1521
+ var FIELDS13 = {
1474
1522
  paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH },
1475
1523
  paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
1476
1524
  paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
@@ -1484,14 +1532,14 @@ var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
1484
1532
  "totalSales"
1485
1533
  ];
1486
1534
  var dailySalesPaymentsConfig = {
1487
- fields: FIELDS12,
1535
+ fields: FIELDS13,
1488
1536
  availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1489
1537
  defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1490
1538
  hasFooter: true
1491
1539
  };
1492
1540
 
1493
1541
  // src/reports/dailySalesDiscounts.ts
1494
- var FIELDS13 = {
1542
+ var FIELDS14 = {
1495
1543
  discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH },
1496
1544
  ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
1497
1545
  itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
@@ -1503,14 +1551,14 @@ var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
1503
1551
  "discountsAmount"
1504
1552
  ];
1505
1553
  var dailySalesDiscountsConfig = {
1506
- fields: FIELDS13,
1554
+ fields: FIELDS14,
1507
1555
  availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1508
1556
  defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1509
1557
  hasFooter: true
1510
1558
  };
1511
1559
 
1512
1560
  // src/reports/dailySalesRefundsVoids.ts
1513
- var FIELDS14 = {
1561
+ var FIELDS15 = {
1514
1562
  description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH },
1515
1563
  count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1516
1564
  amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
@@ -1518,14 +1566,14 @@ var FIELDS14 = {
1518
1566
  };
1519
1567
  var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = ["count", "amount", "pctSales"];
1520
1568
  var dailySalesRefundsVoidsConfig = {
1521
- fields: FIELDS14,
1569
+ fields: FIELDS15,
1522
1570
  availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1523
1571
  defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1524
1572
  hasFooter: true
1525
1573
  };
1526
1574
 
1527
1575
  // src/reports/dailySalesTaxes.ts
1528
- var FIELDS15 = {
1576
+ var FIELDS16 = {
1529
1577
  taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH },
1530
1578
  taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
1531
1579
  taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
@@ -1533,19 +1581,19 @@ var FIELDS15 = {
1533
1581
  };
1534
1582
  var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = ["taxableSales", "taxesAmount", "exemptSales"];
1535
1583
  var dailySalesTaxesConfig = {
1536
- fields: FIELDS15,
1584
+ fields: FIELDS16,
1537
1585
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1538
1586
  defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1539
1587
  hasFooter: true
1540
1588
  };
1541
1589
 
1542
1590
  // src/reports/dailySalesCache.ts
1543
- var FIELDS16 = {
1591
+ var FIELDS17 = {
1544
1592
  name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
1545
1593
  amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
1546
1594
  };
1547
1595
  var dailySalesCacheConfig = {
1548
- fields: FIELDS16,
1596
+ fields: FIELDS17,
1549
1597
  availableColumns: ["name", "amount"],
1550
1598
  defaultVisibleColumns: ["name", "amount"],
1551
1599
  hasFooter: true
@@ -1703,6 +1751,7 @@ export {
1703
1751
  dailySalesTaxesConfig,
1704
1752
  dailySalesTrendsConfig,
1705
1753
  employeeTimecardConfig,
1754
+ employeeTipConfig,
1706
1755
  formatDate,
1707
1756
  formatFieldValue,
1708
1757
  formatFixedNumber,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",