@harbortouch/skytab-analytics-report-utils 0.14.5 → 0.15.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 CHANGED
@@ -21,6 +21,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  COLUMN_REGISTRY: () => COLUMN_REGISTRY,
24
+ DAILY_SALES_CASH_ROW_LABELS: () => DAILY_SALES_CASH_ROW_LABELS,
25
+ DAILY_SALES_REV_CLASS_FOOTER_LABELS: () => DAILY_SALES_REV_CLASS_FOOTER_LABELS,
26
+ REPORT_SECTION_CONFIGS: () => REPORT_SECTION_CONFIGS,
24
27
  Report: () => Report,
25
28
  calculateFieldTotal: () => calculateFieldTotal,
26
29
  calculateReportTotals: () => calculateReportTotals,
@@ -32,6 +35,7 @@ __export(index_exports, {
32
35
  dailySalesRefundsVoidsConfig: () => dailySalesRefundsVoidsConfig,
33
36
  dailySalesTaxesConfig: () => dailySalesTaxesConfig,
34
37
  dailySalesTrendsConfig: () => dailySalesTrendsConfig,
38
+ dailySalesTrendsOrderTypeConfig: () => dailySalesTrendsOrderTypeConfig,
35
39
  employeeTimecardConfig: () => employeeTimecardConfig,
36
40
  employeeTipConfig: () => employeeTipConfig,
37
41
  formatDate: () => formatDate,
@@ -720,38 +724,118 @@ var dailySalesConfig = {
720
724
  fields: FIELDS10,
721
725
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
722
726
  defaultVisibleColumns: DAILY_SALES_AVAILABLE_COLUMNS,
723
- hasFooter: true
727
+ hasFooter: true,
728
+ dataAccessKey: "salesByRevClass",
729
+ sectionName: "common.report-section.revenue-class",
730
+ extraFooterRowsKey: "salesByRevClassFooter"
724
731
  };
725
732
 
726
- // src/reports/dailySalesLive.ts
733
+ // src/reports/dailySalesCache.ts
727
734
  var FIELDS11 = {
728
- groupById: { type: "string" },
729
- groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
730
- itemsQuantity: { type: "number", columnKey: "quantity" },
731
- salesAmountGross: { type: "money", columnKey: "grossSales" },
732
- discountsAmount: { type: "money", columnKey: "discountAmount" },
733
- inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
734
- salesAmountNet: { type: "money", columnKey: "netSales" },
735
- salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
736
- guestsCount: { type: "number", columnKey: "guests" }
735
+ name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
736
+ amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
737
737
  };
738
- var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
739
- "itemsQuantity",
740
- "salesAmountGross",
741
- "discountsAmount",
742
- "inclusiveTaxesAmount",
743
- "salesAmountNet",
744
- "salesMixPct"
745
- ];
746
- var dailySalesLiveConfig = {
738
+ var dailySalesCacheConfig = {
747
739
  fields: FIELDS11,
748
- availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
749
- defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
750
- hasFooter: true
740
+ availableColumns: ["name", "amount"],
741
+ defaultVisibleColumns: ["name", "amount"],
742
+ hasFooter: true,
743
+ dataAccessKey: "cashPayments",
744
+ sectionName: "common.report-section.cash"
751
745
  };
752
746
 
753
- // src/reports/dailySalesTrends.ts
747
+ // src/reports/dailySalesDiscounts.ts
754
748
  var FIELDS12 = {
749
+ discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH },
750
+ ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
751
+ itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
752
+ discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
753
+ };
754
+ var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
755
+ "discountName",
756
+ "ticketCount",
757
+ "itemCount",
758
+ "discountsAmount"
759
+ ];
760
+ var dailySalesDiscountsConfig = {
761
+ fields: FIELDS12,
762
+ availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
763
+ defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
764
+ hasFooter: true,
765
+ dataAccessKey: "discounts",
766
+ sectionName: "common.report-section.discounts"
767
+ };
768
+
769
+ // src/reports/dailySalesPayments.ts
770
+ var FIELDS13 = {
771
+ paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH },
772
+ paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
773
+ paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
774
+ tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
775
+ totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
776
+ };
777
+ var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
778
+ "paymentTypeName",
779
+ "paymentsCount",
780
+ "paymentsAmount",
781
+ "tipsAmount",
782
+ "totalSales"
783
+ ];
784
+ var dailySalesPaymentsConfig = {
785
+ fields: FIELDS13,
786
+ availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
787
+ defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
788
+ hasFooter: true,
789
+ dataAccessKey: "payments",
790
+ sectionName: "common.report-section.payments"
791
+ };
792
+
793
+ // src/reports/dailySalesRefundsVoids.ts
794
+ var FIELDS14 = {
795
+ description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH },
796
+ count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
797
+ amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
798
+ pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
799
+ };
800
+ var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
801
+ "description",
802
+ "count",
803
+ "amount",
804
+ "pctSales"
805
+ ];
806
+ var dailySalesRefundsVoidsConfig = {
807
+ fields: FIELDS14,
808
+ availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
809
+ defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
810
+ hasFooter: true,
811
+ dataAccessKey: "refundsVoids",
812
+ sectionName: "common.report-section.refunds-voids"
813
+ };
814
+
815
+ // src/reports/dailySalesTaxes.ts
816
+ var FIELDS15 = {
817
+ taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH },
818
+ taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "none" } },
819
+ taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
820
+ exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
821
+ };
822
+ var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
823
+ "taxName",
824
+ "taxableSales",
825
+ "taxesAmount",
826
+ "exemptSales"
827
+ ];
828
+ var dailySalesTaxesConfig = {
829
+ fields: FIELDS15,
830
+ availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
831
+ defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
832
+ hasFooter: true,
833
+ dataAccessKey: "taxes",
834
+ sectionName: "common.report-section.taxes"
835
+ };
836
+
837
+ // src/reports/dailySalesTrends.ts
838
+ var FIELDS16 = {
755
839
  groupById: { type: "string" },
756
840
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
757
841
  salesAmountNet: { type: "money", columnKey: "netSales" },
@@ -784,10 +868,24 @@ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
784
868
  "salesAmountNet"
785
869
  ];
786
870
  var dailySalesTrendsConfig = {
787
- fields: FIELDS12,
871
+ fields: FIELDS16,
788
872
  availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
789
873
  defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
790
- hasFooter: true
874
+ hasFooter: true,
875
+ dataAccessKey: "trendsByDayPart",
876
+ sectionName: "common.report-section.sales-by-day-part",
877
+ totalsLabel: "common.report-section.trends-footer.total-sales",
878
+ extraFooterFields: ["salesAmountNet"]
879
+ };
880
+ var dailySalesTrendsOrderTypeConfig = {
881
+ fields: FIELDS16,
882
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
883
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
884
+ hasFooter: true,
885
+ dataAccessKey: "trendsByOrderType",
886
+ sectionName: "common.report-section.sales-by-order-type",
887
+ totalsLabel: "common.report-section.trends-footer.total-sales",
888
+ extraFooterFields: ["salesAmountNet"]
791
889
  };
792
890
 
793
891
  // src/report.ts
@@ -805,6 +903,16 @@ var Report = {
805
903
  DAILY_SALES_LIVE: "daily-sales-live",
806
904
  DAILY_SALES_TRENDS: "daily-sales-trends"
807
905
  };
906
+ var DAILY_SALES_SECTION_CONFIGS = [
907
+ dailySalesConfig,
908
+ dailySalesPaymentsConfig,
909
+ dailySalesCacheConfig,
910
+ dailySalesTaxesConfig,
911
+ dailySalesRefundsVoidsConfig,
912
+ dailySalesDiscountsConfig,
913
+ dailySalesTrendsConfig,
914
+ dailySalesTrendsOrderTypeConfig
915
+ ];
808
916
  var REPORT_CONFIG_MAP = {
809
917
  "sales-summary": salesSummaryConfig,
810
918
  "ticket-analytics": ticketSummaryConfig,
@@ -815,9 +923,9 @@ var REPORT_CONFIG_MAP = {
815
923
  "employee-timecard": employeeTimecardConfig,
816
924
  "employee-tip": employeeTipConfig,
817
925
  "sales-by-item": salesByItemDetailConfig,
818
- "daily-sales": dailySalesConfig,
819
- "daily-sales-live": dailySalesLiveConfig,
820
- "daily-sales-trends": dailySalesTrendsConfig
926
+ "daily-sales": DAILY_SALES_SECTION_CONFIGS,
927
+ "daily-sales-live": DAILY_SALES_SECTION_CONFIGS,
928
+ "daily-sales-trends": null
821
929
  };
822
930
  var REPORT_DEFAULT_NAME_MAP = {
823
931
  "sales-summary": "Sales",
@@ -1582,86 +1690,139 @@ var calculateReportTotals = (data, fieldConfig, opts) => {
1582
1690
  return result;
1583
1691
  };
1584
1692
 
1585
- // src/reports/dailySalesPayments.ts
1586
- var FIELDS13 = {
1587
- paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH },
1588
- paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
1589
- paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
1590
- tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
1591
- totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
1592
- };
1593
- var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
1594
- "paymentsCount",
1595
- "paymentsAmount",
1596
- "tipsAmount",
1597
- "totalSales"
1598
- ];
1599
- var dailySalesPaymentsConfig = {
1600
- fields: FIELDS13,
1601
- availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1602
- defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1603
- hasFooter: true
1604
- };
1605
-
1606
- // src/reports/dailySalesDiscounts.ts
1607
- var FIELDS14 = {
1608
- discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH },
1609
- ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
1610
- itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
1611
- discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
1693
+ // src/reports/dailySalesLive.ts
1694
+ var FIELDS17 = {
1695
+ groupById: { type: "string" },
1696
+ groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
1697
+ itemsQuantity: { type: "number", columnKey: "quantity" },
1698
+ salesAmountGross: { type: "money", columnKey: "grossSales" },
1699
+ discountsAmount: { type: "money", columnKey: "discountAmount" },
1700
+ inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
1701
+ salesAmountNet: { type: "money", columnKey: "netSales" },
1702
+ salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
1703
+ guestsCount: { type: "number", columnKey: "guests" }
1612
1704
  };
1613
- var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
1614
- "ticketCount",
1615
- "itemCount",
1616
- "discountsAmount"
1705
+ var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
1706
+ "itemsQuantity",
1707
+ "salesAmountGross",
1708
+ "discountsAmount",
1709
+ "inclusiveTaxesAmount",
1710
+ "salesAmountNet",
1711
+ "salesMixPct"
1617
1712
  ];
1618
- var dailySalesDiscountsConfig = {
1619
- fields: FIELDS14,
1620
- availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1621
- defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1622
- hasFooter: true
1623
- };
1624
-
1625
- // src/reports/dailySalesRefundsVoids.ts
1626
- var FIELDS15 = {
1627
- description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH },
1628
- count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1629
- amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
1630
- pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
1631
- };
1632
- var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = ["count", "amount", "pctSales"];
1633
- var dailySalesRefundsVoidsConfig = {
1634
- fields: FIELDS15,
1635
- availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1636
- defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1713
+ var dailySalesLiveConfig = {
1714
+ fields: FIELDS17,
1715
+ availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
1716
+ defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
1637
1717
  hasFooter: true
1638
1718
  };
1639
1719
 
1640
- // src/reports/dailySalesTaxes.ts
1641
- var FIELDS16 = {
1642
- taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH },
1643
- taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "none" } },
1644
- taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
1645
- exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
1646
- };
1647
- var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = ["taxableSales", "taxesAmount", "exemptSales"];
1648
- var dailySalesTaxesConfig = {
1649
- fields: FIELDS16,
1650
- availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1651
- defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1652
- hasFooter: true
1720
+ // src/reports/reportSection.ts
1721
+ var DAILY_SALES_CASH_ROW_LABELS = {
1722
+ cashPayments: "common.report-section.cash-row.cash-payments",
1723
+ paidInOuts: "common.report-section.cash-row.paid-in-outs",
1724
+ gratuitiesPaidOut: "common.report-section.cash-row.gratuities-paid-out",
1725
+ ccTipsPaidOut: "common.report-section.cash-row.cc-tips-paid-out"
1653
1726
  };
1654
-
1655
- // src/reports/dailySalesCache.ts
1656
- var FIELDS17 = {
1657
- name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
1658
- amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
1727
+ var DAILY_SALES_REV_CLASS_FOOTER_LABELS = {
1728
+ taxTotal: "common.report-section.rev-class-footer.tax-total",
1729
+ gratuities: "common.report-section.rev-class-footer.gratuities",
1730
+ balancePayments: "common.report-section.rev-class-footer.balance-payments",
1731
+ giftCardSales: "common.report-section.rev-class-footer.gift-card-sales",
1732
+ nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue",
1733
+ totalAccountable: "common.report-section.rev-class-footer.total-accountable"
1659
1734
  };
1660
- var dailySalesCacheConfig = {
1661
- fields: FIELDS17,
1662
- availableColumns: ["name", "amount"],
1663
- defaultVisibleColumns: ["name", "amount"],
1664
- hasFooter: true
1735
+ var DAILY_SALES_SECTIONS = [
1736
+ {
1737
+ sectionLabel: "common.report-section.revenue-class",
1738
+ config: dailySalesConfig,
1739
+ columns: [
1740
+ { fieldKey: "groupByName", columnKey: "revenueClass" },
1741
+ { fieldKey: "itemsQuantity", columnKey: "quantity" },
1742
+ { fieldKey: "salesAmountGross", columnKey: "grossSales" },
1743
+ { fieldKey: "discountsAmount", columnKey: "discountAmount" },
1744
+ { fieldKey: "inclusiveTaxesAmount", columnKey: "inclusiveTax" },
1745
+ { fieldKey: "salesAmountNet", columnKey: "netSales" },
1746
+ { fieldKey: "salesMixPct", columnKey: "salesMixByPct" }
1747
+ ]
1748
+ },
1749
+ {
1750
+ sectionLabel: "common.report-section.payments",
1751
+ config: dailySalesPaymentsConfig,
1752
+ columns: [
1753
+ { fieldKey: "paymentTypeName", columnKey: "paymentType" },
1754
+ { fieldKey: "paymentsCount", columnKey: "paymentsCount" },
1755
+ { fieldKey: "paymentsAmount", columnKey: "paymentsAmount" },
1756
+ { fieldKey: "tipsAmount", columnKey: "tips" },
1757
+ { fieldKey: "totalSales", columnKey: "paymentsTotal" }
1758
+ ]
1759
+ },
1760
+ {
1761
+ sectionLabel: "common.report-section.cash",
1762
+ config: dailySalesCacheConfig,
1763
+ columns: [
1764
+ { fieldKey: "name", columnKey: "type", isRowLabelKey: true },
1765
+ { fieldKey: "amount", columnKey: "paymentsAmount" }
1766
+ ]
1767
+ },
1768
+ {
1769
+ sectionLabel: "common.report-section.taxes",
1770
+ config: dailySalesTaxesConfig,
1771
+ columns: [
1772
+ { fieldKey: "taxName", columnKey: "taxName" },
1773
+ { fieldKey: "taxableSales", columnKey: "taxableSales" },
1774
+ { fieldKey: "taxesAmount", columnKey: "taxCollected" },
1775
+ { fieldKey: "exemptSales", columnKey: "exemptTaxes" }
1776
+ ]
1777
+ },
1778
+ {
1779
+ sectionLabel: "common.report-section.refunds-voids",
1780
+ config: dailySalesRefundsVoidsConfig,
1781
+ columns: [
1782
+ { fieldKey: "description", columnKey: "refundVoidDescription" },
1783
+ { fieldKey: "count", columnKey: "refundVoidCount" },
1784
+ { fieldKey: "amount", columnKey: "refundVoidAmount" },
1785
+ { fieldKey: "pctSales", columnKey: "refundVoidPctSales" }
1786
+ ]
1787
+ },
1788
+ {
1789
+ sectionLabel: "common.report-section.discounts",
1790
+ config: dailySalesDiscountsConfig,
1791
+ columns: [
1792
+ { fieldKey: "discountName", columnKey: "discountName" },
1793
+ { fieldKey: "ticketCount", columnKey: "ticketCount" },
1794
+ { fieldKey: "itemCount", columnKey: "itemCount" },
1795
+ { fieldKey: "discountsAmount", columnKey: "discountAmount" }
1796
+ ]
1797
+ },
1798
+ {
1799
+ sectionLabel: "common.report-section.sales-by-day-part",
1800
+ config: dailySalesTrendsConfig,
1801
+ columns: [
1802
+ { fieldKey: "groupByName", columnKey: "daypart" },
1803
+ { fieldKey: "ticketsCount", columnKey: "tickets" },
1804
+ { fieldKey: "guestsCount", columnKey: "guests" },
1805
+ { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
1806
+ { fieldKey: "guestAvg", columnKey: "guestAverage" },
1807
+ { fieldKey: "salesAmountNet", columnKey: "netSales" }
1808
+ ]
1809
+ },
1810
+ {
1811
+ sectionLabel: "common.report-section.sales-by-order-type",
1812
+ config: dailySalesTrendsOrderTypeConfig,
1813
+ columns: [
1814
+ { fieldKey: "groupByName", columnKey: "orderType" },
1815
+ { fieldKey: "ticketsCount", columnKey: "tickets" },
1816
+ { fieldKey: "guestsCount", columnKey: "guests" },
1817
+ { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
1818
+ { fieldKey: "guestAvg", columnKey: "guestAverage" },
1819
+ { fieldKey: "salesAmountNet", columnKey: "netSales" }
1820
+ ]
1821
+ }
1822
+ ];
1823
+ var REPORT_SECTION_CONFIGS = {
1824
+ [Report.DAILY_SALES]: DAILY_SALES_SECTIONS,
1825
+ [Report.DAILY_SALES_LIVE]: DAILY_SALES_SECTIONS
1665
1826
  };
1666
1827
 
1667
1828
  // src/formatting.ts
@@ -1805,6 +1966,9 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
1805
1966
  // Annotate the CommonJS export names for ESM import in node:
1806
1967
  0 && (module.exports = {
1807
1968
  COLUMN_REGISTRY,
1969
+ DAILY_SALES_CASH_ROW_LABELS,
1970
+ DAILY_SALES_REV_CLASS_FOOTER_LABELS,
1971
+ REPORT_SECTION_CONFIGS,
1808
1972
  Report,
1809
1973
  calculateFieldTotal,
1810
1974
  calculateReportTotals,
@@ -1816,6 +1980,7 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
1816
1980
  dailySalesRefundsVoidsConfig,
1817
1981
  dailySalesTaxesConfig,
1818
1982
  dailySalesTrendsConfig,
1983
+ dailySalesTrendsOrderTypeConfig,
1819
1984
  employeeTimecardConfig,
1820
1985
  employeeTipConfig,
1821
1986
  formatDate,
package/dist/index.d.cts CHANGED
@@ -1221,6 +1221,7 @@ interface ColumnGroupConfig {
1221
1221
  lastWeekFields?: string[];
1222
1222
  lastYearFields?: string[];
1223
1223
  }
1224
+ type ReportSectionName = 'common.report-section.revenue-class' | 'common.report-section.payments' | 'common.report-section.cash' | 'common.report-section.taxes' | 'common.report-section.refunds-voids' | 'common.report-section.discounts' | 'common.report-section.sales-by-day-part' | 'common.report-section.sales-by-order-type';
1224
1225
  interface ReportConfig<TField extends string = string> {
1225
1226
  fields: Record<TField, ColumnPresentationConfig<TField>>;
1226
1227
  availableColumns: TField[];
@@ -1228,6 +1229,11 @@ interface ReportConfig<TField extends string = string> {
1228
1229
  columnGroups?: ColumnGroupConfig[];
1229
1230
  chartFields?: TField[];
1230
1231
  hasFooter: boolean;
1232
+ dataAccessKey?: string;
1233
+ sectionName?: ReportSectionName;
1234
+ totalsLabel?: string;
1235
+ extraFooterRowsKey?: string;
1236
+ extraFooterFields?: string[];
1231
1237
  }
1232
1238
 
1233
1239
  declare const Report: {
@@ -1245,7 +1251,7 @@ declare const Report: {
1245
1251
  readonly DAILY_SALES_TRENDS: "daily-sales-trends";
1246
1252
  };
1247
1253
  type ReportType = (typeof Report)[keyof typeof Report];
1248
- declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
1254
+ declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | ReportConfig<string>[] | null;
1249
1255
  declare const getReportExportFileName: ({ reportType, startDate, endDate, format, }: {
1250
1256
  reportType: ReportType;
1251
1257
  startDate: Date;
@@ -1319,6 +1325,9 @@ declare const dailySalesConfig: {
1319
1325
  readonly availableColumns: DailySalesField[];
1320
1326
  readonly defaultVisibleColumns: DailySalesField[];
1321
1327
  readonly hasFooter: true;
1328
+ readonly dataAccessKey: "salesByRevClass";
1329
+ readonly sectionName: "common.report-section.revenue-class";
1330
+ readonly extraFooterRowsKey: "salesByRevClassFooter";
1322
1331
  };
1323
1332
 
1324
1333
  type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
@@ -1335,6 +1344,8 @@ declare const dailySalesPaymentsConfig: {
1335
1344
  readonly availableColumns: DailySalesPaymentsField[];
1336
1345
  readonly defaultVisibleColumns: DailySalesPaymentsField[];
1337
1346
  readonly hasFooter: true;
1347
+ readonly dataAccessKey: "payments";
1348
+ readonly sectionName: "common.report-section.payments";
1338
1349
  };
1339
1350
 
1340
1351
  type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
@@ -1343,6 +1354,8 @@ declare const dailySalesDiscountsConfig: {
1343
1354
  readonly availableColumns: DailySalesDiscountsField[];
1344
1355
  readonly defaultVisibleColumns: DailySalesDiscountsField[];
1345
1356
  readonly hasFooter: true;
1357
+ readonly dataAccessKey: "discounts";
1358
+ readonly sectionName: "common.report-section.discounts";
1346
1359
  };
1347
1360
 
1348
1361
  type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
@@ -1351,6 +1364,8 @@ declare const dailySalesRefundsVoidsConfig: {
1351
1364
  readonly availableColumns: DailySalesRefundsVoidsField[];
1352
1365
  readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
1353
1366
  readonly hasFooter: true;
1367
+ readonly dataAccessKey: "refundsVoids";
1368
+ readonly sectionName: "common.report-section.refunds-voids";
1354
1369
  };
1355
1370
 
1356
1371
  type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
@@ -1359,6 +1374,8 @@ declare const dailySalesTaxesConfig: {
1359
1374
  readonly availableColumns: DailySalesTaxesField[];
1360
1375
  readonly defaultVisibleColumns: DailySalesTaxesField[];
1361
1376
  readonly hasFooter: true;
1377
+ readonly dataAccessKey: "taxes";
1378
+ readonly sectionName: "common.report-section.taxes";
1362
1379
  };
1363
1380
 
1364
1381
  type DailySalesCacheField = 'name' | 'amount';
@@ -1367,6 +1384,8 @@ declare const dailySalesCacheConfig: {
1367
1384
  readonly availableColumns: ["name", "amount"];
1368
1385
  readonly defaultVisibleColumns: ["name", "amount"];
1369
1386
  readonly hasFooter: true;
1387
+ readonly dataAccessKey: "cashPayments";
1388
+ readonly sectionName: "common.report-section.cash";
1370
1389
  };
1371
1390
 
1372
1391
  type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
@@ -1399,7 +1418,47 @@ declare const dailySalesTrendsConfig: {
1399
1418
  readonly availableColumns: DailySalesTrendsField[];
1400
1419
  readonly defaultVisibleColumns: DailySalesTrendsField[];
1401
1420
  readonly hasFooter: true;
1421
+ readonly dataAccessKey: "trendsByDayPart";
1422
+ readonly sectionName: "common.report-section.sales-by-day-part";
1423
+ readonly totalsLabel: "common.report-section.trends-footer.total-sales";
1424
+ readonly extraFooterFields: ["salesAmountNet"];
1402
1425
  };
1426
+ declare const dailySalesTrendsOrderTypeConfig: {
1427
+ readonly fields: Record<DailySalesTrendsField, ColumnPresentationConfig<DailySalesTrendsField>>;
1428
+ readonly availableColumns: DailySalesTrendsField[];
1429
+ readonly defaultVisibleColumns: DailySalesTrendsField[];
1430
+ readonly hasFooter: true;
1431
+ readonly dataAccessKey: "trendsByOrderType";
1432
+ readonly sectionName: "common.report-section.sales-by-order-type";
1433
+ readonly totalsLabel: "common.report-section.trends-footer.total-sales";
1434
+ readonly extraFooterFields: ["salesAmountNet"];
1435
+ };
1436
+
1437
+ interface ReportSectionColumnDef {
1438
+ fieldKey: string;
1439
+ columnKey: ReportColumnKey;
1440
+ isRowLabelKey?: boolean;
1441
+ }
1442
+ interface ReportSectionDefinition {
1443
+ sectionLabel: string;
1444
+ config: ReportConfig;
1445
+ columns: ReportSectionColumnDef[];
1446
+ }
1447
+ declare const DAILY_SALES_CASH_ROW_LABELS: {
1448
+ readonly cashPayments: "common.report-section.cash-row.cash-payments";
1449
+ readonly paidInOuts: "common.report-section.cash-row.paid-in-outs";
1450
+ readonly gratuitiesPaidOut: "common.report-section.cash-row.gratuities-paid-out";
1451
+ readonly ccTipsPaidOut: "common.report-section.cash-row.cc-tips-paid-out";
1452
+ };
1453
+ declare const DAILY_SALES_REV_CLASS_FOOTER_LABELS: {
1454
+ readonly taxTotal: "common.report-section.rev-class-footer.tax-total";
1455
+ readonly gratuities: "common.report-section.rev-class-footer.gratuities";
1456
+ readonly balancePayments: "common.report-section.rev-class-footer.balance-payments";
1457
+ readonly giftCardSales: "common.report-section.rev-class-footer.gift-card-sales";
1458
+ readonly nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue";
1459
+ readonly totalAccountable: "common.report-section.rev-class-footer.total-accountable";
1460
+ };
1461
+ declare const REPORT_SECTION_CONFIGS: Partial<Record<ReportType, ReportSectionDefinition[]>>;
1403
1462
 
1404
1463
  type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
1405
1464
  interface LocaleOption {
@@ -1442,4 +1501,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
1442
1501
  }[]) => LocaleOption[];
1443
1502
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
1444
1503
 
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 };
1504
+ export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, 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_SECTION_CONFIGS, Report, type ReportColumnKey, type ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, type ReportSectionName, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, 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
@@ -1221,6 +1221,7 @@ interface ColumnGroupConfig {
1221
1221
  lastWeekFields?: string[];
1222
1222
  lastYearFields?: string[];
1223
1223
  }
1224
+ type ReportSectionName = 'common.report-section.revenue-class' | 'common.report-section.payments' | 'common.report-section.cash' | 'common.report-section.taxes' | 'common.report-section.refunds-voids' | 'common.report-section.discounts' | 'common.report-section.sales-by-day-part' | 'common.report-section.sales-by-order-type';
1224
1225
  interface ReportConfig<TField extends string = string> {
1225
1226
  fields: Record<TField, ColumnPresentationConfig<TField>>;
1226
1227
  availableColumns: TField[];
@@ -1228,6 +1229,11 @@ interface ReportConfig<TField extends string = string> {
1228
1229
  columnGroups?: ColumnGroupConfig[];
1229
1230
  chartFields?: TField[];
1230
1231
  hasFooter: boolean;
1232
+ dataAccessKey?: string;
1233
+ sectionName?: ReportSectionName;
1234
+ totalsLabel?: string;
1235
+ extraFooterRowsKey?: string;
1236
+ extraFooterFields?: string[];
1231
1237
  }
1232
1238
 
1233
1239
  declare const Report: {
@@ -1245,7 +1251,7 @@ declare const Report: {
1245
1251
  readonly DAILY_SALES_TRENDS: "daily-sales-trends";
1246
1252
  };
1247
1253
  type ReportType = (typeof Report)[keyof typeof Report];
1248
- declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
1254
+ declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | ReportConfig<string>[] | null;
1249
1255
  declare const getReportExportFileName: ({ reportType, startDate, endDate, format, }: {
1250
1256
  reportType: ReportType;
1251
1257
  startDate: Date;
@@ -1319,6 +1325,9 @@ declare const dailySalesConfig: {
1319
1325
  readonly availableColumns: DailySalesField[];
1320
1326
  readonly defaultVisibleColumns: DailySalesField[];
1321
1327
  readonly hasFooter: true;
1328
+ readonly dataAccessKey: "salesByRevClass";
1329
+ readonly sectionName: "common.report-section.revenue-class";
1330
+ readonly extraFooterRowsKey: "salesByRevClassFooter";
1322
1331
  };
1323
1332
 
1324
1333
  type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
@@ -1335,6 +1344,8 @@ declare const dailySalesPaymentsConfig: {
1335
1344
  readonly availableColumns: DailySalesPaymentsField[];
1336
1345
  readonly defaultVisibleColumns: DailySalesPaymentsField[];
1337
1346
  readonly hasFooter: true;
1347
+ readonly dataAccessKey: "payments";
1348
+ readonly sectionName: "common.report-section.payments";
1338
1349
  };
1339
1350
 
1340
1351
  type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
@@ -1343,6 +1354,8 @@ declare const dailySalesDiscountsConfig: {
1343
1354
  readonly availableColumns: DailySalesDiscountsField[];
1344
1355
  readonly defaultVisibleColumns: DailySalesDiscountsField[];
1345
1356
  readonly hasFooter: true;
1357
+ readonly dataAccessKey: "discounts";
1358
+ readonly sectionName: "common.report-section.discounts";
1346
1359
  };
1347
1360
 
1348
1361
  type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
@@ -1351,6 +1364,8 @@ declare const dailySalesRefundsVoidsConfig: {
1351
1364
  readonly availableColumns: DailySalesRefundsVoidsField[];
1352
1365
  readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
1353
1366
  readonly hasFooter: true;
1367
+ readonly dataAccessKey: "refundsVoids";
1368
+ readonly sectionName: "common.report-section.refunds-voids";
1354
1369
  };
1355
1370
 
1356
1371
  type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
@@ -1359,6 +1374,8 @@ declare const dailySalesTaxesConfig: {
1359
1374
  readonly availableColumns: DailySalesTaxesField[];
1360
1375
  readonly defaultVisibleColumns: DailySalesTaxesField[];
1361
1376
  readonly hasFooter: true;
1377
+ readonly dataAccessKey: "taxes";
1378
+ readonly sectionName: "common.report-section.taxes";
1362
1379
  };
1363
1380
 
1364
1381
  type DailySalesCacheField = 'name' | 'amount';
@@ -1367,6 +1384,8 @@ declare const dailySalesCacheConfig: {
1367
1384
  readonly availableColumns: ["name", "amount"];
1368
1385
  readonly defaultVisibleColumns: ["name", "amount"];
1369
1386
  readonly hasFooter: true;
1387
+ readonly dataAccessKey: "cashPayments";
1388
+ readonly sectionName: "common.report-section.cash";
1370
1389
  };
1371
1390
 
1372
1391
  type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
@@ -1399,7 +1418,47 @@ declare const dailySalesTrendsConfig: {
1399
1418
  readonly availableColumns: DailySalesTrendsField[];
1400
1419
  readonly defaultVisibleColumns: DailySalesTrendsField[];
1401
1420
  readonly hasFooter: true;
1421
+ readonly dataAccessKey: "trendsByDayPart";
1422
+ readonly sectionName: "common.report-section.sales-by-day-part";
1423
+ readonly totalsLabel: "common.report-section.trends-footer.total-sales";
1424
+ readonly extraFooterFields: ["salesAmountNet"];
1402
1425
  };
1426
+ declare const dailySalesTrendsOrderTypeConfig: {
1427
+ readonly fields: Record<DailySalesTrendsField, ColumnPresentationConfig<DailySalesTrendsField>>;
1428
+ readonly availableColumns: DailySalesTrendsField[];
1429
+ readonly defaultVisibleColumns: DailySalesTrendsField[];
1430
+ readonly hasFooter: true;
1431
+ readonly dataAccessKey: "trendsByOrderType";
1432
+ readonly sectionName: "common.report-section.sales-by-order-type";
1433
+ readonly totalsLabel: "common.report-section.trends-footer.total-sales";
1434
+ readonly extraFooterFields: ["salesAmountNet"];
1435
+ };
1436
+
1437
+ interface ReportSectionColumnDef {
1438
+ fieldKey: string;
1439
+ columnKey: ReportColumnKey;
1440
+ isRowLabelKey?: boolean;
1441
+ }
1442
+ interface ReportSectionDefinition {
1443
+ sectionLabel: string;
1444
+ config: ReportConfig;
1445
+ columns: ReportSectionColumnDef[];
1446
+ }
1447
+ declare const DAILY_SALES_CASH_ROW_LABELS: {
1448
+ readonly cashPayments: "common.report-section.cash-row.cash-payments";
1449
+ readonly paidInOuts: "common.report-section.cash-row.paid-in-outs";
1450
+ readonly gratuitiesPaidOut: "common.report-section.cash-row.gratuities-paid-out";
1451
+ readonly ccTipsPaidOut: "common.report-section.cash-row.cc-tips-paid-out";
1452
+ };
1453
+ declare const DAILY_SALES_REV_CLASS_FOOTER_LABELS: {
1454
+ readonly taxTotal: "common.report-section.rev-class-footer.tax-total";
1455
+ readonly gratuities: "common.report-section.rev-class-footer.gratuities";
1456
+ readonly balancePayments: "common.report-section.rev-class-footer.balance-payments";
1457
+ readonly giftCardSales: "common.report-section.rev-class-footer.gift-card-sales";
1458
+ readonly nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue";
1459
+ readonly totalAccountable: "common.report-section.rev-class-footer.total-accountable";
1460
+ };
1461
+ declare const REPORT_SECTION_CONFIGS: Partial<Record<ReportType, ReportSectionDefinition[]>>;
1403
1462
 
1404
1463
  type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
1405
1464
  interface LocaleOption {
@@ -1442,4 +1501,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
1442
1501
  }[]) => LocaleOption[];
1443
1502
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
1444
1503
 
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 };
1504
+ export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, 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_SECTION_CONFIGS, Report, type ReportColumnKey, type ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, type ReportSectionName, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, 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
@@ -656,38 +656,118 @@ var dailySalesConfig = {
656
656
  fields: FIELDS10,
657
657
  availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
658
658
  defaultVisibleColumns: DAILY_SALES_AVAILABLE_COLUMNS,
659
- hasFooter: true
659
+ hasFooter: true,
660
+ dataAccessKey: "salesByRevClass",
661
+ sectionName: "common.report-section.revenue-class",
662
+ extraFooterRowsKey: "salesByRevClassFooter"
660
663
  };
661
664
 
662
- // src/reports/dailySalesLive.ts
665
+ // src/reports/dailySalesCache.ts
663
666
  var FIELDS11 = {
664
- groupById: { type: "string" },
665
- groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
666
- itemsQuantity: { type: "number", columnKey: "quantity" },
667
- salesAmountGross: { type: "money", columnKey: "grossSales" },
668
- discountsAmount: { type: "money", columnKey: "discountAmount" },
669
- inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
670
- salesAmountNet: { type: "money", columnKey: "netSales" },
671
- salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
672
- guestsCount: { type: "number", columnKey: "guests" }
667
+ name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
668
+ amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
673
669
  };
674
- var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
675
- "itemsQuantity",
676
- "salesAmountGross",
677
- "discountsAmount",
678
- "inclusiveTaxesAmount",
679
- "salesAmountNet",
680
- "salesMixPct"
681
- ];
682
- var dailySalesLiveConfig = {
670
+ var dailySalesCacheConfig = {
683
671
  fields: FIELDS11,
684
- availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
685
- defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
686
- hasFooter: true
672
+ availableColumns: ["name", "amount"],
673
+ defaultVisibleColumns: ["name", "amount"],
674
+ hasFooter: true,
675
+ dataAccessKey: "cashPayments",
676
+ sectionName: "common.report-section.cash"
687
677
  };
688
678
 
689
- // src/reports/dailySalesTrends.ts
679
+ // src/reports/dailySalesDiscounts.ts
690
680
  var FIELDS12 = {
681
+ discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH },
682
+ ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
683
+ itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
684
+ discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
685
+ };
686
+ var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
687
+ "discountName",
688
+ "ticketCount",
689
+ "itemCount",
690
+ "discountsAmount"
691
+ ];
692
+ var dailySalesDiscountsConfig = {
693
+ fields: FIELDS12,
694
+ availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
695
+ defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
696
+ hasFooter: true,
697
+ dataAccessKey: "discounts",
698
+ sectionName: "common.report-section.discounts"
699
+ };
700
+
701
+ // src/reports/dailySalesPayments.ts
702
+ var FIELDS13 = {
703
+ paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH },
704
+ paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
705
+ paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
706
+ tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
707
+ totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
708
+ };
709
+ var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
710
+ "paymentTypeName",
711
+ "paymentsCount",
712
+ "paymentsAmount",
713
+ "tipsAmount",
714
+ "totalSales"
715
+ ];
716
+ var dailySalesPaymentsConfig = {
717
+ fields: FIELDS13,
718
+ availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
719
+ defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
720
+ hasFooter: true,
721
+ dataAccessKey: "payments",
722
+ sectionName: "common.report-section.payments"
723
+ };
724
+
725
+ // src/reports/dailySalesRefundsVoids.ts
726
+ var FIELDS14 = {
727
+ description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH },
728
+ count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
729
+ amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
730
+ pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
731
+ };
732
+ var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
733
+ "description",
734
+ "count",
735
+ "amount",
736
+ "pctSales"
737
+ ];
738
+ var dailySalesRefundsVoidsConfig = {
739
+ fields: FIELDS14,
740
+ availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
741
+ defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
742
+ hasFooter: true,
743
+ dataAccessKey: "refundsVoids",
744
+ sectionName: "common.report-section.refunds-voids"
745
+ };
746
+
747
+ // src/reports/dailySalesTaxes.ts
748
+ var FIELDS15 = {
749
+ taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH },
750
+ taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "none" } },
751
+ taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
752
+ exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
753
+ };
754
+ var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
755
+ "taxName",
756
+ "taxableSales",
757
+ "taxesAmount",
758
+ "exemptSales"
759
+ ];
760
+ var dailySalesTaxesConfig = {
761
+ fields: FIELDS15,
762
+ availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
763
+ defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
764
+ hasFooter: true,
765
+ dataAccessKey: "taxes",
766
+ sectionName: "common.report-section.taxes"
767
+ };
768
+
769
+ // src/reports/dailySalesTrends.ts
770
+ var FIELDS16 = {
691
771
  groupById: { type: "string" },
692
772
  groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
693
773
  salesAmountNet: { type: "money", columnKey: "netSales" },
@@ -720,10 +800,24 @@ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
720
800
  "salesAmountNet"
721
801
  ];
722
802
  var dailySalesTrendsConfig = {
723
- fields: FIELDS12,
803
+ fields: FIELDS16,
724
804
  availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
725
805
  defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
726
- hasFooter: true
806
+ hasFooter: true,
807
+ dataAccessKey: "trendsByDayPart",
808
+ sectionName: "common.report-section.sales-by-day-part",
809
+ totalsLabel: "common.report-section.trends-footer.total-sales",
810
+ extraFooterFields: ["salesAmountNet"]
811
+ };
812
+ var dailySalesTrendsOrderTypeConfig = {
813
+ fields: FIELDS16,
814
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
815
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
816
+ hasFooter: true,
817
+ dataAccessKey: "trendsByOrderType",
818
+ sectionName: "common.report-section.sales-by-order-type",
819
+ totalsLabel: "common.report-section.trends-footer.total-sales",
820
+ extraFooterFields: ["salesAmountNet"]
727
821
  };
728
822
 
729
823
  // src/report.ts
@@ -741,6 +835,16 @@ var Report = {
741
835
  DAILY_SALES_LIVE: "daily-sales-live",
742
836
  DAILY_SALES_TRENDS: "daily-sales-trends"
743
837
  };
838
+ var DAILY_SALES_SECTION_CONFIGS = [
839
+ dailySalesConfig,
840
+ dailySalesPaymentsConfig,
841
+ dailySalesCacheConfig,
842
+ dailySalesTaxesConfig,
843
+ dailySalesRefundsVoidsConfig,
844
+ dailySalesDiscountsConfig,
845
+ dailySalesTrendsConfig,
846
+ dailySalesTrendsOrderTypeConfig
847
+ ];
744
848
  var REPORT_CONFIG_MAP = {
745
849
  "sales-summary": salesSummaryConfig,
746
850
  "ticket-analytics": ticketSummaryConfig,
@@ -751,9 +855,9 @@ var REPORT_CONFIG_MAP = {
751
855
  "employee-timecard": employeeTimecardConfig,
752
856
  "employee-tip": employeeTipConfig,
753
857
  "sales-by-item": salesByItemDetailConfig,
754
- "daily-sales": dailySalesConfig,
755
- "daily-sales-live": dailySalesLiveConfig,
756
- "daily-sales-trends": dailySalesTrendsConfig
858
+ "daily-sales": DAILY_SALES_SECTION_CONFIGS,
859
+ "daily-sales-live": DAILY_SALES_SECTION_CONFIGS,
860
+ "daily-sales-trends": null
757
861
  };
758
862
  var REPORT_DEFAULT_NAME_MAP = {
759
863
  "sales-summary": "Sales",
@@ -1518,86 +1622,139 @@ var calculateReportTotals = (data, fieldConfig, opts) => {
1518
1622
  return result;
1519
1623
  };
1520
1624
 
1521
- // src/reports/dailySalesPayments.ts
1522
- var FIELDS13 = {
1523
- paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH },
1524
- paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
1525
- paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
1526
- tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
1527
- totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
1528
- };
1529
- var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
1530
- "paymentsCount",
1531
- "paymentsAmount",
1532
- "tipsAmount",
1533
- "totalSales"
1534
- ];
1535
- var dailySalesPaymentsConfig = {
1536
- fields: FIELDS13,
1537
- availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1538
- defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
1539
- hasFooter: true
1540
- };
1541
-
1542
- // src/reports/dailySalesDiscounts.ts
1543
- var FIELDS14 = {
1544
- discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH },
1545
- ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
1546
- itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
1547
- discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
1625
+ // src/reports/dailySalesLive.ts
1626
+ var FIELDS17 = {
1627
+ groupById: { type: "string" },
1628
+ groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
1629
+ itemsQuantity: { type: "number", columnKey: "quantity" },
1630
+ salesAmountGross: { type: "money", columnKey: "grossSales" },
1631
+ discountsAmount: { type: "money", columnKey: "discountAmount" },
1632
+ inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
1633
+ salesAmountNet: { type: "money", columnKey: "netSales" },
1634
+ salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
1635
+ guestsCount: { type: "number", columnKey: "guests" }
1548
1636
  };
1549
- var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
1550
- "ticketCount",
1551
- "itemCount",
1552
- "discountsAmount"
1637
+ var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
1638
+ "itemsQuantity",
1639
+ "salesAmountGross",
1640
+ "discountsAmount",
1641
+ "inclusiveTaxesAmount",
1642
+ "salesAmountNet",
1643
+ "salesMixPct"
1553
1644
  ];
1554
- var dailySalesDiscountsConfig = {
1555
- fields: FIELDS14,
1556
- availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1557
- defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
1558
- hasFooter: true
1559
- };
1560
-
1561
- // src/reports/dailySalesRefundsVoids.ts
1562
- var FIELDS15 = {
1563
- description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH },
1564
- count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
1565
- amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
1566
- pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
1567
- };
1568
- var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = ["count", "amount", "pctSales"];
1569
- var dailySalesRefundsVoidsConfig = {
1570
- fields: FIELDS15,
1571
- availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1572
- defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
1645
+ var dailySalesLiveConfig = {
1646
+ fields: FIELDS17,
1647
+ availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
1648
+ defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
1573
1649
  hasFooter: true
1574
1650
  };
1575
1651
 
1576
- // src/reports/dailySalesTaxes.ts
1577
- var FIELDS16 = {
1578
- taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH },
1579
- taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "none" } },
1580
- taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
1581
- exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
1582
- };
1583
- var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = ["taxableSales", "taxesAmount", "exemptSales"];
1584
- var dailySalesTaxesConfig = {
1585
- fields: FIELDS16,
1586
- availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1587
- defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
1588
- hasFooter: true
1652
+ // src/reports/reportSection.ts
1653
+ var DAILY_SALES_CASH_ROW_LABELS = {
1654
+ cashPayments: "common.report-section.cash-row.cash-payments",
1655
+ paidInOuts: "common.report-section.cash-row.paid-in-outs",
1656
+ gratuitiesPaidOut: "common.report-section.cash-row.gratuities-paid-out",
1657
+ ccTipsPaidOut: "common.report-section.cash-row.cc-tips-paid-out"
1589
1658
  };
1590
-
1591
- // src/reports/dailySalesCache.ts
1592
- var FIELDS17 = {
1593
- name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
1594
- amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
1659
+ var DAILY_SALES_REV_CLASS_FOOTER_LABELS = {
1660
+ taxTotal: "common.report-section.rev-class-footer.tax-total",
1661
+ gratuities: "common.report-section.rev-class-footer.gratuities",
1662
+ balancePayments: "common.report-section.rev-class-footer.balance-payments",
1663
+ giftCardSales: "common.report-section.rev-class-footer.gift-card-sales",
1664
+ nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue",
1665
+ totalAccountable: "common.report-section.rev-class-footer.total-accountable"
1595
1666
  };
1596
- var dailySalesCacheConfig = {
1597
- fields: FIELDS17,
1598
- availableColumns: ["name", "amount"],
1599
- defaultVisibleColumns: ["name", "amount"],
1600
- hasFooter: true
1667
+ var DAILY_SALES_SECTIONS = [
1668
+ {
1669
+ sectionLabel: "common.report-section.revenue-class",
1670
+ config: dailySalesConfig,
1671
+ columns: [
1672
+ { fieldKey: "groupByName", columnKey: "revenueClass" },
1673
+ { fieldKey: "itemsQuantity", columnKey: "quantity" },
1674
+ { fieldKey: "salesAmountGross", columnKey: "grossSales" },
1675
+ { fieldKey: "discountsAmount", columnKey: "discountAmount" },
1676
+ { fieldKey: "inclusiveTaxesAmount", columnKey: "inclusiveTax" },
1677
+ { fieldKey: "salesAmountNet", columnKey: "netSales" },
1678
+ { fieldKey: "salesMixPct", columnKey: "salesMixByPct" }
1679
+ ]
1680
+ },
1681
+ {
1682
+ sectionLabel: "common.report-section.payments",
1683
+ config: dailySalesPaymentsConfig,
1684
+ columns: [
1685
+ { fieldKey: "paymentTypeName", columnKey: "paymentType" },
1686
+ { fieldKey: "paymentsCount", columnKey: "paymentsCount" },
1687
+ { fieldKey: "paymentsAmount", columnKey: "paymentsAmount" },
1688
+ { fieldKey: "tipsAmount", columnKey: "tips" },
1689
+ { fieldKey: "totalSales", columnKey: "paymentsTotal" }
1690
+ ]
1691
+ },
1692
+ {
1693
+ sectionLabel: "common.report-section.cash",
1694
+ config: dailySalesCacheConfig,
1695
+ columns: [
1696
+ { fieldKey: "name", columnKey: "type", isRowLabelKey: true },
1697
+ { fieldKey: "amount", columnKey: "paymentsAmount" }
1698
+ ]
1699
+ },
1700
+ {
1701
+ sectionLabel: "common.report-section.taxes",
1702
+ config: dailySalesTaxesConfig,
1703
+ columns: [
1704
+ { fieldKey: "taxName", columnKey: "taxName" },
1705
+ { fieldKey: "taxableSales", columnKey: "taxableSales" },
1706
+ { fieldKey: "taxesAmount", columnKey: "taxCollected" },
1707
+ { fieldKey: "exemptSales", columnKey: "exemptTaxes" }
1708
+ ]
1709
+ },
1710
+ {
1711
+ sectionLabel: "common.report-section.refunds-voids",
1712
+ config: dailySalesRefundsVoidsConfig,
1713
+ columns: [
1714
+ { fieldKey: "description", columnKey: "refundVoidDescription" },
1715
+ { fieldKey: "count", columnKey: "refundVoidCount" },
1716
+ { fieldKey: "amount", columnKey: "refundVoidAmount" },
1717
+ { fieldKey: "pctSales", columnKey: "refundVoidPctSales" }
1718
+ ]
1719
+ },
1720
+ {
1721
+ sectionLabel: "common.report-section.discounts",
1722
+ config: dailySalesDiscountsConfig,
1723
+ columns: [
1724
+ { fieldKey: "discountName", columnKey: "discountName" },
1725
+ { fieldKey: "ticketCount", columnKey: "ticketCount" },
1726
+ { fieldKey: "itemCount", columnKey: "itemCount" },
1727
+ { fieldKey: "discountsAmount", columnKey: "discountAmount" }
1728
+ ]
1729
+ },
1730
+ {
1731
+ sectionLabel: "common.report-section.sales-by-day-part",
1732
+ config: dailySalesTrendsConfig,
1733
+ columns: [
1734
+ { fieldKey: "groupByName", columnKey: "daypart" },
1735
+ { fieldKey: "ticketsCount", columnKey: "tickets" },
1736
+ { fieldKey: "guestsCount", columnKey: "guests" },
1737
+ { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
1738
+ { fieldKey: "guestAvg", columnKey: "guestAverage" },
1739
+ { fieldKey: "salesAmountNet", columnKey: "netSales" }
1740
+ ]
1741
+ },
1742
+ {
1743
+ sectionLabel: "common.report-section.sales-by-order-type",
1744
+ config: dailySalesTrendsOrderTypeConfig,
1745
+ columns: [
1746
+ { fieldKey: "groupByName", columnKey: "orderType" },
1747
+ { fieldKey: "ticketsCount", columnKey: "tickets" },
1748
+ { fieldKey: "guestsCount", columnKey: "guests" },
1749
+ { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
1750
+ { fieldKey: "guestAvg", columnKey: "guestAverage" },
1751
+ { fieldKey: "salesAmountNet", columnKey: "netSales" }
1752
+ ]
1753
+ }
1754
+ ];
1755
+ var REPORT_SECTION_CONFIGS = {
1756
+ [Report.DAILY_SALES]: DAILY_SALES_SECTIONS,
1757
+ [Report.DAILY_SALES_LIVE]: DAILY_SALES_SECTIONS
1601
1758
  };
1602
1759
 
1603
1760
  // src/formatting.ts
@@ -1740,6 +1897,9 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
1740
1897
  };
1741
1898
  export {
1742
1899
  COLUMN_REGISTRY,
1900
+ DAILY_SALES_CASH_ROW_LABELS,
1901
+ DAILY_SALES_REV_CLASS_FOOTER_LABELS,
1902
+ REPORT_SECTION_CONFIGS,
1743
1903
  Report,
1744
1904
  calculateFieldTotal,
1745
1905
  calculateReportTotals,
@@ -1751,6 +1911,7 @@ export {
1751
1911
  dailySalesRefundsVoidsConfig,
1752
1912
  dailySalesTaxesConfig,
1753
1913
  dailySalesTrendsConfig,
1914
+ dailySalesTrendsOrderTypeConfig,
1754
1915
  employeeTimecardConfig,
1755
1916
  employeeTipConfig,
1756
1917
  formatDate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.14.5",
3
+ "version": "0.15.0",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",