@harbortouch/skytab-analytics-report-utils 0.32.0 → 0.34.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
@@ -608,1530 +608,6 @@ var itemTaxConfig = {
608
608
  hasFooter: false
609
609
  };
610
610
 
611
- // src/reports/employeeTimecard.ts
612
- var EMPLOYEE_NAME_WIDTH = 220;
613
- var STATUS_WIDTH = 140;
614
- var LOOKUP_WIDTH = 160;
615
- var PAYROLL_WIDTH = 160;
616
- var JOB_WIDTH = 200;
617
- var FIELDS8 = {
618
- locationId: {
619
- type: "number",
620
- enableSorting: false,
621
- filteringAvailable: false
622
- },
623
- locationName: {
624
- type: "string",
625
- size: FIRST_COLUMN_WIDTH,
626
- columnKey: "locationName"
627
- },
628
- businessDate: {
629
- type: "date",
630
- columnKey: "date"
631
- },
632
- employeeName: {
633
- type: "string",
634
- size: EMPLOYEE_NAME_WIDTH,
635
- columnKey: "employeeName",
636
- footerCalculation: { type: "label", label: "table.total" }
637
- },
638
- isActive: {
639
- type: "string",
640
- size: STATUS_WIDTH,
641
- columnKey: "status",
642
- enableSorting: false,
643
- filteringAvailable: false
644
- },
645
- lookup: {
646
- type: "string",
647
- size: LOOKUP_WIDTH,
648
- columnKey: "employeeId"
649
- },
650
- payrollCode: {
651
- type: "string",
652
- size: PAYROLL_WIDTH,
653
- columnKey: "payrollId"
654
- },
655
- jobName: {
656
- type: "string",
657
- size: JOB_WIDTH,
658
- columnKey: "employeeJob"
659
- },
660
- isBreak: {
661
- type: "string",
662
- enableSorting: false,
663
- filteringAvailable: false
664
- },
665
- startTime: {
666
- type: "time",
667
- columnKey: "clockInTime"
668
- },
669
- endTime: {
670
- type: "time",
671
- columnKey: "clockOutTime"
672
- },
673
- shiftHours: {
674
- type: "fixedNumber",
675
- columnKey: "shiftDurationHrs",
676
- filteringAvailable: false
677
- }
678
- };
679
- var EMPLOYEE_TIMECARD_VISIBLE_COLUMNS = [
680
- "locationName",
681
- "businessDate",
682
- "isActive",
683
- "lookup",
684
- "payrollCode",
685
- "jobName",
686
- "startTime",
687
- "endTime",
688
- "shiftHours"
689
- ];
690
- var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
691
- "employeeName",
692
- ...EMPLOYEE_TIMECARD_VISIBLE_COLUMNS
693
- ];
694
- var employeeTimecardConfig = {
695
- fields: FIELDS8,
696
- availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
697
- defaultVisibleColumns: EMPLOYEE_TIMECARD_VISIBLE_COLUMNS,
698
- hasFooter: true
699
- };
700
-
701
- // src/reports/employeeTip.ts
702
- var FIELDS9 = {
703
- employeeName: {
704
- type: "string",
705
- size: 220,
706
- columnKey: "employeeName"
707
- },
708
- empId: {
709
- type: "string",
710
- size: 160,
711
- columnKey: "employeeId",
712
- footerCalculation: { type: "label", label: "table.total" }
713
- },
714
- payrollId: { type: "string", size: 160, columnKey: "payrollId" },
715
- locationName: { type: "string", size: 220, columnKey: "locationName" },
716
- status: { type: "string", size: 140, columnKey: "status" },
717
- grossSales: { type: "money", columnKey: "grossSales", footerCalculation: { type: "sum" } },
718
- grossCash: { type: "money", columnKey: "grossCashSales", footerCalculation: { type: "sum" } },
719
- grossCc: { type: "money", columnKey: "grossCreditSales", footerCalculation: { type: "sum" } },
720
- totalPayments: { type: "money", columnKey: "totalCollected", footerCalculation: { type: "sum" } },
721
- autoGratuity: { type: "money", columnKey: "autoGratuity", footerCalculation: { type: "sum" } },
722
- grossTips: { type: "money", columnKey: "grossTips", footerCalculation: { type: "sum" } },
723
- declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } },
724
- tipReduction: { type: "money", columnKey: "tipReduction", footerCalculation: { type: "sum" } },
725
- tipShare: { type: "money", columnKey: "tipShare", footerCalculation: { type: "sum" } },
726
- netTips: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
727
- tipPercentage: {
728
- type: "percent",
729
- columnKey: "tipPct",
730
- footerCalculation: { type: "average", numeratorField: "grossTips", denominatorField: "grossSales" }
731
- }
732
- };
733
- var VISIBLE_COLUMNS = [
734
- "employeeName",
735
- "payrollId",
736
- "locationName",
737
- "status",
738
- "grossSales",
739
- "grossCash",
740
- "grossCc",
741
- "totalPayments",
742
- "autoGratuity",
743
- "grossTips",
744
- "declaredTips",
745
- "tipReduction",
746
- "tipShare",
747
- "netTips",
748
- "tipPercentage"
749
- ];
750
- var AVAILABLE_COLUMNS = ["empId", ...VISIBLE_COLUMNS];
751
- var employeeTipConfig = {
752
- fields: FIELDS9,
753
- availableColumns: AVAILABLE_COLUMNS,
754
- defaultVisibleColumns: VISIBLE_COLUMNS,
755
- hasFooter: true
756
- };
757
-
758
- // src/reports/tipCashoutReconciliation.ts
759
- var FIELDS10 = {
760
- groupById: { type: "string" },
761
- groupByName: {
762
- type: "string",
763
- size: FIRST_COLUMN_WIDTH,
764
- footerCalculation: { type: "label", label: "table.total" }
765
- },
766
- locationName: { type: "string", size: 220, columnKey: "locationName" },
767
- employeeName: { type: "string", size: 220, columnKey: "employeeName" },
768
- empId: { type: "string", size: 160, columnKey: "employeeId" },
769
- payrollId: { type: "string", size: 160, columnKey: "payrollId" },
770
- netSales: { type: "money", columnKey: "netSales", footerCalculation: { type: "sum" } },
771
- cashCollected: { type: "money", columnKey: "cashCollected", footerCalculation: { type: "sum" } },
772
- grossTips: { type: "money", columnKey: "grossTips", footerCalculation: { type: "sum" } },
773
- autoGratuity: { type: "money", columnKey: "autoGratuity", footerCalculation: { type: "sum" } },
774
- tipReduction: { type: "money", columnKey: "tipReduction", footerCalculation: { type: "sum" } },
775
- tipShareContributed: { type: "money", columnKey: "tipShareContributed", footerCalculation: { type: "sum" } },
776
- declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } }
777
- };
778
- var VISIBLE_COLUMNS2 = [
779
- "groupByName",
780
- "locationName",
781
- "employeeName",
782
- "payrollId",
783
- "netSales",
784
- "cashCollected",
785
- "grossTips",
786
- "autoGratuity",
787
- "tipReduction",
788
- "tipShareContributed",
789
- "declaredTips"
790
- ];
791
- var AVAILABLE_COLUMNS2 = ["groupById", "empId", ...VISIBLE_COLUMNS2];
792
- var tipCashoutReconciliationConfig = {
793
- fields: FIELDS10,
794
- availableColumns: AVAILABLE_COLUMNS2,
795
- defaultVisibleColumns: VISIBLE_COLUMNS2,
796
- hasFooter: true
797
- };
798
-
799
- // src/reports/dailySales/dailySales.ts
800
- var FIELDS11 = {
801
- groupById: { type: "string" },
802
- groupByName: {
803
- type: "string",
804
- size: FIRST_COLUMN_WIDTH,
805
- columnKey: "revenueClass",
806
- footerCalculation: { type: "label", label: "table.total" }
807
- },
808
- itemsQuantity: { type: "number", columnKey: "quantity" },
809
- salesAmountGross: { type: "money", columnKey: "grossSales" },
810
- discountsAmount: { type: "money", columnKey: "discountAmount" },
811
- inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
812
- salesAmountNet: { type: "money", columnKey: "netSales" },
813
- salesMixPct: { type: "percent", columnKey: "salesMixByPct" }
814
- };
815
- var DAILY_SALES_AVAILABLE_COLUMNS = [
816
- "groupByName",
817
- "itemsQuantity",
818
- "salesAmountGross",
819
- "discountsAmount",
820
- "inclusiveTaxesAmount",
821
- "salesAmountNet",
822
- "salesMixPct"
823
- ];
824
- var dailySalesConfig = {
825
- fields: FIELDS11,
826
- availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
827
- defaultVisibleColumns: DAILY_SALES_AVAILABLE_COLUMNS,
828
- hasFooter: true,
829
- dataAccessKey: "salesByRevClass",
830
- sectionName: "common.report-section.revenue-class",
831
- extraFooterRowsKey: "salesByRevClassFooter"
832
- };
833
-
834
- // src/reports/dailySales/dailySalesCache.ts
835
- var FIELDS12 = {
836
- name: {
837
- type: "string",
838
- columnKey: "type",
839
- size: FIRST_COLUMN_WIDTH,
840
- footerCalculation: { type: "label", label: "table.total" }
841
- },
842
- amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
843
- };
844
- var dailySalesCacheConfig = {
845
- fields: FIELDS12,
846
- availableColumns: ["name", "amount"],
847
- defaultVisibleColumns: ["name", "amount"],
848
- hasFooter: true,
849
- dataAccessKey: "cashPayments",
850
- sectionName: "common.report-section.cash"
851
- };
852
-
853
- // src/reports/dailySales/dailySalesDiscounts.ts
854
- var FIELDS13 = {
855
- discountName: {
856
- type: "string",
857
- columnKey: "discountName",
858
- size: FIRST_COLUMN_WIDTH,
859
- footerCalculation: { type: "label", label: "table.total" }
860
- },
861
- ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
862
- itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
863
- discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
864
- };
865
- var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
866
- "discountName",
867
- "ticketCount",
868
- "itemCount",
869
- "discountsAmount"
870
- ];
871
- var dailySalesDiscountsConfig = {
872
- fields: FIELDS13,
873
- availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
874
- defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
875
- hasFooter: true,
876
- dataAccessKey: "discounts",
877
- sectionName: "common.report-section.discounts"
878
- };
879
-
880
- // src/reports/dailySales/dailySalesPayments.ts
881
- var FIELDS14 = {
882
- paymentTypeName: {
883
- type: "string",
884
- size: FIRST_COLUMN_WIDTH,
885
- columnKey: "paymentType",
886
- footerCalculation: { type: "label", label: "table.total" }
887
- },
888
- paymentsCount: { type: "number-empty", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
889
- paymentsAmount: { type: "money-empty", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
890
- tipsAmount: { type: "money-empty", columnKey: "tips", footerCalculation: { type: "sum" } },
891
- totalSales: { type: "money-empty", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
892
- };
893
- var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
894
- "paymentTypeName",
895
- "paymentsCount",
896
- "paymentsAmount",
897
- "tipsAmount",
898
- "totalSales"
899
- ];
900
- var dailySalesPaymentsConfig = {
901
- fields: FIELDS14,
902
- availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
903
- defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
904
- hasFooter: true,
905
- dataAccessKey: "payments",
906
- sectionName: "common.report-section.payments"
907
- };
908
-
909
- // src/reports/dailySales/dailySalesRefundsVoids.ts
910
- var FIELDS15 = {
911
- description: {
912
- type: "string",
913
- columnKey: "refundVoidDescription",
914
- size: FIRST_COLUMN_WIDTH,
915
- footerCalculation: { type: "label", label: "table.total" }
916
- },
917
- count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
918
- amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
919
- pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
920
- };
921
- var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
922
- "description",
923
- "count",
924
- "amount",
925
- "pctSales"
926
- ];
927
- var dailySalesRefundsVoidsConfig = {
928
- fields: FIELDS15,
929
- availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
930
- defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
931
- hasFooter: true,
932
- dataAccessKey: "refundsVoids",
933
- sectionName: "common.report-section.refunds-voids"
934
- };
935
-
936
- // src/reports/dailySales/dailySalesTaxes.ts
937
- var FIELDS16 = {
938
- taxName: {
939
- type: "string",
940
- columnKey: "taxName",
941
- size: FIRST_COLUMN_WIDTH,
942
- footerCalculation: { type: "label", label: "table.total" }
943
- },
944
- taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "none" } },
945
- taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
946
- exemptSales: { type: "money", columnKey: "exemptSales", footerCalculation: { type: "sum" } }
947
- };
948
- var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
949
- "taxName",
950
- "taxableSales",
951
- "taxesAmount",
952
- "exemptSales"
953
- ];
954
- var dailySalesTaxesConfig = {
955
- fields: FIELDS16,
956
- availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
957
- defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
958
- hasFooter: true,
959
- dataAccessKey: "taxes",
960
- sectionName: "common.report-section.taxes"
961
- };
962
-
963
- // src/reports/dailySales/dailySalesTrendsDayPart.ts
964
- var FIELDS17 = {
965
- groupById: { type: "string" },
966
- groupByName: {
967
- type: "string",
968
- columnKey: "daypart",
969
- size: FIRST_COLUMN_WIDTH,
970
- footerCalculation: { type: "label", label: "table.total" }
971
- },
972
- salesAmountNet: { type: "money", columnKey: "netSales" },
973
- ticketsCount: { type: "number", columnKey: "tickets" },
974
- guestsCount: { type: "number", columnKey: "guests" },
975
- ticketAvg: {
976
- type: "money",
977
- columnKey: "ticketAverage",
978
- footerCalculation: {
979
- type: "average",
980
- numeratorField: "salesAmountNet",
981
- denominatorField: "ticketsCount"
982
- }
983
- },
984
- guestAvg: {
985
- type: "money",
986
- columnKey: "guestAverage",
987
- footerCalculation: {
988
- type: "average",
989
- numeratorField: "salesAmountNet",
990
- denominatorField: "guestsCount"
991
- }
992
- }
993
- };
994
- var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
995
- "groupByName",
996
- "ticketsCount",
997
- "guestsCount",
998
- "ticketAvg",
999
- "guestAvg",
1000
- "salesAmountNet"
1001
- ];
1002
- var dailySalesTrendsDayPartConfig = {
1003
- fields: FIELDS17,
1004
- availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1005
- defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
1006
- hasFooter: true,
1007
- dataAccessKey: "trendsByDayPart",
1008
- sectionName: "common.report-section.sales-by-day-part",
1009
- extraFooterFields: ["salesAmountNet"]
1010
- };
1011
-
1012
- // src/reports/dailySales/dailySalesTrendsOrderType.ts
1013
- var FIELDS18 = {
1014
- groupById: { type: "string" },
1015
- groupByName: {
1016
- columnKey: "orderType",
1017
- type: "string",
1018
- size: FIRST_COLUMN_WIDTH,
1019
- footerCalculation: { type: "label", label: "table.total" }
1020
- },
1021
- salesAmountNet: { type: "money", columnKey: "netSales" },
1022
- ticketsCount: { type: "number", columnKey: "tickets" },
1023
- guestsCount: { type: "number", columnKey: "guests" },
1024
- ticketAvg: {
1025
- type: "money",
1026
- columnKey: "ticketAverage",
1027
- footerCalculation: {
1028
- type: "average",
1029
- numeratorField: "salesAmountNet",
1030
- denominatorField: "ticketsCount"
1031
- }
1032
- },
1033
- guestAvg: {
1034
- type: "money",
1035
- columnKey: "guestAverage",
1036
- footerCalculation: {
1037
- type: "average",
1038
- numeratorField: "salesAmountNet",
1039
- denominatorField: "guestsCount"
1040
- }
1041
- }
1042
- };
1043
- var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS2 = [
1044
- "groupByName",
1045
- "ticketsCount",
1046
- "guestsCount",
1047
- "ticketAvg",
1048
- "guestAvg",
1049
- "salesAmountNet"
1050
- ];
1051
- var dailySalesTrendsOrderTypeConfig = {
1052
- fields: FIELDS18,
1053
- availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS2,
1054
- defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS2,
1055
- hasFooter: true,
1056
- dataAccessKey: "trendsByOrderType",
1057
- sectionName: "common.report-section.sales-by-order-type",
1058
- extraFooterFields: ["salesAmountNet"]
1059
- };
1060
-
1061
- // src/report.ts
1062
- var Report = {
1063
- TICKET_LIVE: "ticket-live",
1064
- TICKET_ANALYTICS: "ticket-analytics",
1065
- SALES_SUMMARY: "sales-summary",
1066
- PRODUCT_MIX: "product-mix",
1067
- MODIFIER_MIX: "modifier-mix",
1068
- ITEM_TAX: "item-tax",
1069
- EMPLOYEE_TIMECARD: "employee-timecard",
1070
- EMPLOYEE_TIP: "employee-tip",
1071
- TIP_CASHOUT_RECONCILIATION: "tip-cashout-reconciliation",
1072
- SALES_BY_ITEM: "sales-by-item",
1073
- DAILY_SALES: "daily-sales",
1074
- DAILY_SALES_LIVE: "daily-sales-live"
1075
- };
1076
- var DAILY_SALES_SECTION_CONFIGS = [
1077
- dailySalesConfig,
1078
- dailySalesPaymentsConfig,
1079
- dailySalesCacheConfig,
1080
- dailySalesTaxesConfig,
1081
- dailySalesRefundsVoidsConfig,
1082
- dailySalesDiscountsConfig,
1083
- dailySalesTrendsDayPartConfig,
1084
- dailySalesTrendsOrderTypeConfig
1085
- ];
1086
- var REPORT_CONFIG_MAP = {
1087
- "sales-summary": salesSummaryConfig,
1088
- "ticket-analytics": ticketSummaryConfig,
1089
- "ticket-live": ticketLiveConfig,
1090
- "product-mix": productMixConfig,
1091
- "modifier-mix": modifierMixConfig,
1092
- "item-tax": itemTaxConfig,
1093
- "employee-timecard": employeeTimecardConfig,
1094
- "employee-tip": employeeTipConfig,
1095
- "tip-cashout-reconciliation": tipCashoutReconciliationConfig,
1096
- "sales-by-item": salesByItemDetailConfig,
1097
- "daily-sales": DAILY_SALES_SECTION_CONFIGS,
1098
- "daily-sales-live": DAILY_SALES_SECTION_CONFIGS
1099
- };
1100
- var REPORT_DEFAULT_NAME_MAP = {
1101
- "sales-summary": "Sales",
1102
- "ticket-analytics": "Tickets",
1103
- "ticket-live": "Tickets Live",
1104
- "product-mix": "Product Mix",
1105
- "modifier-mix": "Modifier Mix",
1106
- "item-tax": "Sales Tax by Item",
1107
- "employee-timecard": "Employee Timecard",
1108
- "employee-tip": "Employee Tip",
1109
- "tip-cashout-reconciliation": "Tip & Cashout Reconciliation",
1110
- "sales-by-item": "Sales by Item",
1111
- "daily-sales": "Daily Sales",
1112
- "daily-sales-live": "Daily Sales Live"
1113
- };
1114
- var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
1115
- var getFixedColumns = (config, parameters) => {
1116
- const visibleColumns = new Set(config.defaultVisibleColumns ?? []);
1117
- const fixedCols = config.availableColumns.filter((col) => !visibleColumns.has(col));
1118
- return fixedCols.filter((col) => {
1119
- if (col === "groupByName2") {
1120
- return !!parameters?.secondGroupBy;
1121
- }
1122
- return true;
1123
- });
1124
- };
1125
- var getReportExportFileName = ({
1126
- reportType,
1127
- startDate,
1128
- endDate,
1129
- format
1130
- }) => {
1131
- const formatDate2 = (date) => {
1132
- return [
1133
- date.getFullYear(),
1134
- String(date.getMonth() + 1).padStart(2, "0"),
1135
- String(date.getDate()).padStart(2, "0")
1136
- ].join("-");
1137
- };
1138
- const filename = REPORT_DEFAULT_NAME_MAP[reportType].replace(/\s+/g, "_") ?? "Report";
1139
- return `${filename}_${formatDate2(startDate)}_to_${formatDate2(endDate)}.${format}`.toLocaleLowerCase();
1140
- };
1141
-
1142
- // src/columns/index.ts
1143
- var COLUMN_REGISTRY = {
1144
- fifteenMinInterval: {
1145
- titleKey: "common.report-col.fifteen-min-interval",
1146
- shortTitleKey: "common.report-col.fifteen-min-interval.short",
1147
- infoTextKey: "common.report-col.fifteen-min-interval.info"
1148
- },
1149
- adjustedTips: {
1150
- titleKey: "common.report-col.adjusted-tips",
1151
- shortTitleKey: "common.report-col.adjusted-tips.short",
1152
- infoTextKey: "common.report-col.adjusted-tips.info"
1153
- },
1154
- advantageProgram: {
1155
- titleKey: "common.report-col.advantage-program",
1156
- shortTitleKey: "common.report-col.advantage-program.short",
1157
- infoTextKey: "common.report-col.advantage-program.info"
1158
- },
1159
- amex: {
1160
- titleKey: "common.report-col.amex",
1161
- shortTitleKey: "common.report-col.amex.short",
1162
- infoTextKey: "common.report-col.amex.info"
1163
- },
1164
- amexReturns: {
1165
- titleKey: "common.report-col.amex-returns",
1166
- shortTitleKey: "common.report-col.amex-returns.short",
1167
- infoTextKey: "common.report-col.amex-returns.info"
1168
- },
1169
- attachRate: {
1170
- titleKey: "common.report-col.attach-rate",
1171
- shortTitleKey: "common.report-col.attach-rate.short",
1172
- infoTextKey: "common.report-col.attach-rate.info"
1173
- },
1174
- autoGratuity: {
1175
- titleKey: "common.report-col.auto-gratuity",
1176
- shortTitleKey: "common.report-col.auto-gratuity.short",
1177
- infoTextKey: "common.report-col.auto-gratuity.info"
1178
- },
1179
- averageGrossPrice: {
1180
- titleKey: "common.report-col.average-gross-price",
1181
- shortTitleKey: "common.report-col.average-gross-price.short",
1182
- infoTextKey: "common.report-col.average-gross-price.info"
1183
- },
1184
- bankFees: {
1185
- titleKey: "common.report-col.bank-fees",
1186
- shortTitleKey: "common.report-col.bank-fees.short",
1187
- infoTextKey: "common.report-col.bank-fees.info"
1188
- },
1189
- batchAmount: {
1190
- titleKey: "common.report-col.batch-amount",
1191
- shortTitleKey: "common.report-col.batch-amount.short",
1192
- infoTextKey: "common.report-col.batch-amount.info"
1193
- },
1194
- batchDate: {
1195
- titleKey: "common.report-col.batch-date",
1196
- shortTitleKey: "common.report-col.batch-date.short",
1197
- infoTextKey: "common.report-col.batch-date.info"
1198
- },
1199
- batchNumber: {
1200
- titleKey: "common.report-col.batch-number",
1201
- shortTitleKey: "common.report-col.batch-number.short",
1202
- infoTextKey: "common.report-col.batch-number.info"
1203
- },
1204
- cashCollected: {
1205
- titleKey: "common.report-col.cash-collected",
1206
- shortTitleKey: "common.report-col.cash-collected.short",
1207
- infoTextKey: "common.report-col.cash-collected.info"
1208
- },
1209
- clockInTime: {
1210
- titleKey: "common.report-col.clock-in-time",
1211
- shortTitleKey: "common.report-col.clock-in-time.short",
1212
- infoTextKey: "common.report-col.clock-in-time.info"
1213
- },
1214
- clockOutTime: {
1215
- titleKey: "common.report-col.clock-out-time",
1216
- shortTitleKey: "common.report-col.clock-out-time.short",
1217
- infoTextKey: "common.report-col.clock-out-time.info"
1218
- },
1219
- country: {
1220
- titleKey: "common.report-col.country",
1221
- shortTitleKey: "common.report-col.country.short",
1222
- infoTextKey: "common.report-col.country.info"
1223
- },
1224
- customerName: {
1225
- titleKey: "common.report-col.customer-name",
1226
- shortTitleKey: "common.report-col.customer-name.short",
1227
- infoTextKey: "common.report-col.customer-name.info"
1228
- },
1229
- date: {
1230
- titleKey: "common.report-col.date",
1231
- shortTitleKey: "common.report-col.date.short",
1232
- infoTextKey: "common.report-col.date.info"
1233
- },
1234
- dateClose: {
1235
- titleKey: "common.report-col.date-close",
1236
- shortTitleKey: "common.report-col.date-close.short",
1237
- infoTextKey: "common.report-col.date-close.info"
1238
- },
1239
- daypart: {
1240
- titleKey: "common.report-col.daypart",
1241
- shortTitleKey: "common.report-col.daypart.short",
1242
- infoTextKey: "common.report-col.daypart.info"
1243
- },
1244
- debit: {
1245
- titleKey: "common.report-col.debit",
1246
- shortTitleKey: "common.report-col.debit.short",
1247
- infoTextKey: "common.report-col.debit.info"
1248
- },
1249
- debitReturns: {
1250
- titleKey: "common.report-col.debit-returns",
1251
- shortTitleKey: "common.report-col.debit-returns.short",
1252
- infoTextKey: "common.report-col.debit-returns.info"
1253
- },
1254
- declaredTips: {
1255
- titleKey: "common.report-col.declared-tips",
1256
- shortTitleKey: "common.report-col.declared-tips.short",
1257
- infoTextKey: "common.report-col.declared-tips.info"
1258
- },
1259
- department: {
1260
- titleKey: "common.report-col.department",
1261
- shortTitleKey: "common.report-col.department.short",
1262
- infoTextKey: "common.report-col.department.info"
1263
- },
1264
- depositCurrency: {
1265
- titleKey: "common.report-col.deposit-currency",
1266
- shortTitleKey: "common.report-col.deposit-currency.short",
1267
- infoTextKey: "common.report-col.deposit-currency.info"
1268
- },
1269
- depositDate: {
1270
- titleKey: "common.report-col.deposit-date",
1271
- shortTitleKey: "common.report-col.deposit-date.short",
1272
- infoTextKey: "common.report-col.deposit-date.info"
1273
- },
1274
- discountAmount: {
1275
- titleKey: "common.report-col.discount-amount",
1276
- shortTitleKey: "common.report-col.discount-amount.short",
1277
- infoTextKey: "common.report-col.discount-amount.info"
1278
- },
1279
- discountCount: {
1280
- titleKey: "common.report-col.discount-count",
1281
- shortTitleKey: "common.report-col.discount-count.short",
1282
- infoTextKey: "common.report-col.discount-count.info"
1283
- },
1284
- ticketCount: {
1285
- titleKey: "common.report-col.ticket-count",
1286
- shortTitleKey: "common.report-col.ticket-count.short",
1287
- infoTextKey: "common.report-col.ticket-count.info"
1288
- },
1289
- itemCount: {
1290
- titleKey: "common.report-col.item-count",
1291
- shortTitleKey: "common.report-col.item-count.short",
1292
- infoTextKey: "common.report-col.item-count.info"
1293
- },
1294
- discover: {
1295
- titleKey: "common.report-col.discover",
1296
- shortTitleKey: "common.report-col.discover.short",
1297
- infoTextKey: "common.report-col.discover.info"
1298
- },
1299
- discoverReturns: {
1300
- titleKey: "common.report-col.discover-returns",
1301
- shortTitleKey: "common.report-col.discover-returns.short",
1302
- infoTextKey: "common.report-col.discover-returns.info"
1303
- },
1304
- ebt: {
1305
- titleKey: "common.report-col.ebt",
1306
- shortTitleKey: "common.report-col.ebt.short",
1307
- infoTextKey: "common.report-col.ebt.info"
1308
- },
1309
- ebtReturns: {
1310
- titleKey: "common.report-col.ebt-returns",
1311
- shortTitleKey: "common.report-col.ebt-returns.short",
1312
- infoTextKey: "common.report-col.ebt-returns.info"
1313
- },
1314
- employeeId: {
1315
- titleKey: "common.report-col.employee-id",
1316
- shortTitleKey: "common.report-col.employee-id.short",
1317
- infoTextKey: "common.report-col.employee-id.info"
1318
- },
1319
- employeeJob: {
1320
- titleKey: "common.report-col.employee-job",
1321
- shortTitleKey: "common.report-col.employee-job.short",
1322
- infoTextKey: "common.report-col.employee-job.info"
1323
- },
1324
- employeeName: {
1325
- titleKey: "common.report-col.employee-name",
1326
- shortTitleKey: "common.report-col.employee-name.short",
1327
- infoTextKey: "common.report-col.employee-name.info"
1328
- },
1329
- exemptTaxes: {
1330
- titleKey: "common.report-col.exempt-taxes",
1331
- shortTitleKey: "common.report-col.exempt-taxes.short",
1332
- infoTextKey: "common.report-col.exempt-taxes.info"
1333
- },
1334
- exemptSales: {
1335
- titleKey: "common.report-col.exempt-sales",
1336
- shortTitleKey: "common.report-col.exempt-sales.short",
1337
- infoTextKey: "common.report-col.exempt-sales.info"
1338
- },
1339
- grandTotal: {
1340
- titleKey: "common.report-col.grand-total",
1341
- shortTitleKey: "common.report-col.grand-total.short",
1342
- infoTextKey: "common.report-col.grand-total.info"
1343
- },
1344
- grossCashSales: {
1345
- titleKey: "common.report-col.gross-cash-sales",
1346
- shortTitleKey: "common.report-col.gross-cash-sales.short",
1347
- infoTextKey: "common.report-col.gross-cash-sales.info"
1348
- },
1349
- grossCashTips: {
1350
- titleKey: "common.report-col.gross-cash-tips",
1351
- shortTitleKey: "common.report-col.gross-cash-tips.short",
1352
- infoTextKey: "common.report-col.gross-cash-tips.info"
1353
- },
1354
- grossCreditCardTips: {
1355
- titleKey: "common.report-col.gross-credit-card-tips",
1356
- shortTitleKey: "common.report-col.gross-credit-card-tips.short",
1357
- infoTextKey: "common.report-col.gross-credit-card-tips.info"
1358
- },
1359
- grossCreditSales: {
1360
- titleKey: "common.report-col.gross-credit-sales",
1361
- shortTitleKey: "common.report-col.gross-credit-sales.short",
1362
- infoTextKey: "common.report-col.gross-credit-sales.info"
1363
- },
1364
- grossSales: {
1365
- titleKey: "common.report-col.gross-sales",
1366
- shortTitleKey: "common.report-col.gross-sales.short",
1367
- infoTextKey: "common.report-col.gross-sales.info"
1368
- },
1369
- grossTips: {
1370
- titleKey: "common.report-col.gross-tips",
1371
- shortTitleKey: "common.report-col.gross-tips.short",
1372
- infoTextKey: "common.report-col.gross-tips.info"
1373
- },
1374
- guestCount: {
1375
- titleKey: "common.report-col.guest-count",
1376
- shortTitleKey: "common.report-col.guest-count.short",
1377
- infoTextKey: "common.report-col.guest-count.info"
1378
- },
1379
- guestsVarLw: {
1380
- titleKey: "common.report-col.guests-var-lw",
1381
- shortTitleKey: "common.report-col.guests-var-lw.short",
1382
- infoTextKey: "common.report-col.guests-var-lw.info"
1383
- },
1384
- guestsVarLwPct: {
1385
- titleKey: "common.report-col.guests-var-lw-pct",
1386
- shortTitleKey: "common.report-col.guests-var-lw-pct.short",
1387
- infoTextKey: "common.report-col.guests-var-lw-pct.info"
1388
- },
1389
- guestsVarLy: {
1390
- titleKey: "common.report-col.guests-var-ly",
1391
- shortTitleKey: "common.report-col.guests-var-ly.short",
1392
- infoTextKey: "common.report-col.guests-var-ly.info"
1393
- },
1394
- guestsVarLyPct: {
1395
- titleKey: "common.report-col.guests-var-ly-pct",
1396
- shortTitleKey: "common.report-col.guests-var-ly-pct.short",
1397
- infoTextKey: "common.report-col.guests-var-ly-pct.info"
1398
- },
1399
- hour: {
1400
- titleKey: "common.report-col.hour",
1401
- shortTitleKey: "common.report-col.hour.short",
1402
- infoTextKey: "common.report-col.hour.info"
1403
- },
1404
- hoursWorked: {
1405
- titleKey: "common.report-col.hours-worked",
1406
- shortTitleKey: "common.report-col.hours-worked.short",
1407
- infoTextKey: "common.report-col.hours-worked.info"
1408
- },
1409
- inclusiveTax: {
1410
- titleKey: "common.report-col.inclusive-tax",
1411
- shortTitleKey: "common.report-col.inclusive-tax.short",
1412
- infoTextKey: "common.report-col.inclusive-tax.info"
1413
- },
1414
- itemName: {
1415
- titleKey: "common.report-col.item-name",
1416
- shortTitleKey: "common.report-col.item-name.short",
1417
- infoTextKey: "common.report-col.item-name.info"
1418
- },
1419
- itemPrice: {
1420
- titleKey: "common.report-col.item-price",
1421
- shortTitleKey: "common.report-col.item-price.short",
1422
- infoTextKey: "common.report-col.item-price.info"
1423
- },
1424
- itemQuantity: {
1425
- titleKey: "common.report-col.item-quantity",
1426
- shortTitleKey: "common.report-col.item-quantity.short",
1427
- infoTextKey: "common.report-col.item-quantity.info"
1428
- },
1429
- locationCity: {
1430
- titleKey: "common.report-col.location-city",
1431
- shortTitleKey: "common.report-col.location-city.short",
1432
- infoTextKey: "common.report-col.location-city.info"
1433
- },
1434
- locationId: {
1435
- titleKey: "common.report-col.location-id",
1436
- shortTitleKey: "common.report-col.location-id.short",
1437
- infoTextKey: "common.report-col.location-id.info"
1438
- },
1439
- locationMid: {
1440
- titleKey: "common.report-col.location-mid",
1441
- shortTitleKey: "common.report-col.location-mid.short",
1442
- infoTextKey: "common.report-col.location-mid.info"
1443
- },
1444
- locationName: {
1445
- titleKey: "common.report-col.location-name",
1446
- shortTitleKey: "common.report-col.location-name.short",
1447
- infoTextKey: "common.report-col.location-name.info"
1448
- },
1449
- locationState: {
1450
- titleKey: "common.report-col.location-state",
1451
- shortTitleKey: "common.report-col.location-state.short",
1452
- infoTextKey: "common.report-col.location-state.info"
1453
- },
1454
- mastercard: {
1455
- titleKey: "common.report-col.mastercard",
1456
- shortTitleKey: "common.report-col.mastercard.short",
1457
- infoTextKey: "common.report-col.mastercard.info"
1458
- },
1459
- mcReturns: {
1460
- titleKey: "common.report-col.mc-returns",
1461
- shortTitleKey: "common.report-col.mc-returns.short",
1462
- infoTextKey: "common.report-col.mc-returns.info"
1463
- },
1464
- modifierName: {
1465
- titleKey: "common.report-col.modifier-name",
1466
- shortTitleKey: "common.report-col.modifier-name.short",
1467
- infoTextKey: "common.report-col.modifier-name.info"
1468
- },
1469
- modifierPrice: {
1470
- titleKey: "common.report-col.modifier-price",
1471
- shortTitleKey: "common.report-col.modifier-price.short",
1472
- infoTextKey: "common.report-col.modifier-price.info"
1473
- },
1474
- modifierQuantity: {
1475
- titleKey: "common.report-col.modifier-quantity",
1476
- shortTitleKey: "common.report-col.modifier-quantity.short",
1477
- infoTextKey: "common.report-col.modifier-quantity.info"
1478
- },
1479
- netSales: {
1480
- titleKey: "common.report-col.net-sales",
1481
- shortTitleKey: "common.report-col.net-sales.short",
1482
- infoTextKey: "common.report-col.net-sales.info"
1483
- },
1484
- netTaxCollected: {
1485
- titleKey: "common.report-col.net-tax-collected",
1486
- shortTitleKey: "common.report-col.net-tax-collected.short",
1487
- infoTextKey: "common.report-col.net-tax-collected.info"
1488
- },
1489
- netTips: {
1490
- titleKey: "common.report-col.net-tips",
1491
- shortTitleKey: "common.report-col.net-tips.short",
1492
- infoTextKey: "common.report-col.net-tips.info"
1493
- },
1494
- numberOfGuests: {
1495
- titleKey: "common.report-col.number-of-guests",
1496
- shortTitleKey: "common.report-col.number-of-guests.short",
1497
- infoTextKey: "common.report-col.number-of-guests.info"
1498
- },
1499
- orderType: {
1500
- titleKey: "common.report-col.order-type",
1501
- shortTitleKey: "common.report-col.order-type.short",
1502
- infoTextKey: "common.report-col.order-type.info"
1503
- },
1504
- paymentType: {
1505
- titleKey: "common.report-col.payment-type",
1506
- shortTitleKey: "common.report-col.payment-type.short",
1507
- infoTextKey: "common.report-col.payment-type.info"
1508
- },
1509
- payrollId: {
1510
- titleKey: "common.report-col.payroll-id",
1511
- shortTitleKey: "common.report-col.payroll-id.short",
1512
- infoTextKey: "common.report-col.payroll-id.info"
1513
- },
1514
- quantity: {
1515
- titleKey: "common.report-col.quantity",
1516
- shortTitleKey: "common.report-col.quantity.short",
1517
- infoTextKey: "common.report-col.quantity.info"
1518
- },
1519
- referenceNumber: {
1520
- titleKey: "common.report-col.reference-number",
1521
- shortTitleKey: "common.report-col.reference-number.short",
1522
- infoTextKey: "common.report-col.reference-number.info"
1523
- },
1524
- refundAmount: {
1525
- titleKey: "common.report-col.refund-amount",
1526
- shortTitleKey: "common.report-col.refund-amount.short",
1527
- infoTextKey: "common.report-col.refund-amount.info"
1528
- },
1529
- refundedTaxAmount: {
1530
- titleKey: "common.report-col.refunded-tax-amount",
1531
- shortTitleKey: "common.report-col.refunded-tax-amount.short",
1532
- infoTextKey: "common.report-col.refunded-tax-amount.info"
1533
- },
1534
- revenueCenter: {
1535
- titleKey: "common.report-col.revenue-center",
1536
- shortTitleKey: "common.report-col.revenue-center.short",
1537
- infoTextKey: "common.report-col.revenue-center.info"
1538
- },
1539
- revenueClass: {
1540
- titleKey: "common.report-col.revenue-class",
1541
- shortTitleKey: "common.report-col.revenue-class.short",
1542
- infoTextKey: "common.report-col.revenue-class.info"
1543
- },
1544
- salesVarLw: {
1545
- titleKey: "common.report-col.sales-var-lw",
1546
- shortTitleKey: "common.report-col.sales-var-lw.short",
1547
- infoTextKey: "common.report-col.sales-var-lw.info"
1548
- },
1549
- salesVarLwPct: {
1550
- titleKey: "common.report-col.sales-var-lw-pct",
1551
- shortTitleKey: "common.report-col.sales-var-lw-pct.short",
1552
- infoTextKey: "common.report-col.sales-var-lw-pct.info"
1553
- },
1554
- salesVarLy: {
1555
- titleKey: "common.report-col.sales-var-ly",
1556
- shortTitleKey: "common.report-col.sales-var-ly.short",
1557
- infoTextKey: "common.report-col.sales-var-ly.info"
1558
- },
1559
- salesVarLyPct: {
1560
- titleKey: "common.report-col.sales-var-ly-pct",
1561
- shortTitleKey: "common.report-col.sales-var-ly-pct.short",
1562
- infoTextKey: "common.report-col.sales-var-ly-pct.info"
1563
- },
1564
- salesMixByPct: {
1565
- titleKey: "common.report-col.sales-mix-by-pct",
1566
- shortTitleKey: "common.report-col.sales-mix-by-pct.short",
1567
- infoTextKey: "common.report-col.sales-mix-by-pct.info"
1568
- },
1569
- salesPerGuest: {
1570
- titleKey: "common.report-col.sales-per-guest",
1571
- shortTitleKey: "common.report-col.sales-per-guest.short",
1572
- infoTextKey: "common.report-col.sales-per-guest.info"
1573
- },
1574
- salesPerGuestLw: {
1575
- titleKey: "common.report-col.sales-per-guest-lw",
1576
- shortTitleKey: "common.report-col.sales-per-guest-lw.short",
1577
- infoTextKey: "common.report-col.sales-per-guest-lw.info"
1578
- },
1579
- salesPerGuestLy: {
1580
- titleKey: "common.report-col.sales-per-guest-ly",
1581
- shortTitleKey: "common.report-col.sales-per-guest-ly.short",
1582
- infoTextKey: "common.report-col.sales-per-guest-ly.info"
1583
- },
1584
- scheduledShiftEnd: {
1585
- titleKey: "common.report-col.scheduled-shift-end",
1586
- shortTitleKey: "common.report-col.scheduled-shift-end.short",
1587
- infoTextKey: "common.report-col.scheduled-shift-end.info"
1588
- },
1589
- scheduledShiftStart: {
1590
- titleKey: "common.report-col.scheduled-shift-start",
1591
- shortTitleKey: "common.report-col.scheduled-shift-start.short",
1592
- infoTextKey: "common.report-col.scheduled-shift-start.info"
1593
- },
1594
- settlementBatchDate: {
1595
- titleKey: "common.report-col.settlement-batch-date",
1596
- shortTitleKey: "common.report-col.settlement-batch-date.short",
1597
- infoTextKey: "common.report-col.settlement-batch-date.info"
1598
- },
1599
- shiftDurationHrs: {
1600
- titleKey: "common.report-col.shift-duration-hrs",
1601
- shortTitleKey: "common.report-col.shift-duration-hrs.short",
1602
- infoTextKey: "common.report-col.shift-duration-hrs.info"
1603
- },
1604
- salePaymentType: {
1605
- titleKey: "common.report-col.sale-payment-type",
1606
- shortTitleKey: "common.report-col.sale-payment-type.short",
1607
- infoTextKey: "common.report-col.sale-payment-type.info"
1608
- },
1609
- status: {
1610
- titleKey: "common.report-col.status",
1611
- shortTitleKey: "common.report-col.status.short",
1612
- infoTextKey: "common.report-col.status.info"
1613
- },
1614
- lastModified: {
1615
- titleKey: "common.report-col.last-modified",
1616
- shortTitleKey: "common.report-col.last-modified.short",
1617
- infoTextKey: "common.report-col.last-modified.info"
1618
- },
1619
- subtotal: {
1620
- titleKey: "common.report-col.subtotal",
1621
- shortTitleKey: "common.report-col.subtotal.short",
1622
- infoTextKey: "common.report-col.subtotal.info"
1623
- },
1624
- taxCollected: {
1625
- titleKey: "common.report-col.tax-collected",
1626
- shortTitleKey: "common.report-col.tax-collected.short",
1627
- infoTextKey: "common.report-col.tax-collected.info"
1628
- },
1629
- taxName: {
1630
- titleKey: "common.report-col.tax-name",
1631
- shortTitleKey: "common.report-col.tax-name.short",
1632
- infoTextKey: "common.report-col.tax-name.info"
1633
- },
1634
- taxRate: {
1635
- titleKey: "common.report-col.tax-rate",
1636
- shortTitleKey: "common.report-col.tax-rate.short",
1637
- infoTextKey: "common.report-col.tax-rate.info"
1638
- },
1639
- taxableSales: {
1640
- titleKey: "common.report-col.taxable-sales",
1641
- shortTitleKey: "common.report-col.taxable-sales.short",
1642
- infoTextKey: "common.report-col.taxable-sales.info"
1643
- },
1644
- ticketClosed: {
1645
- titleKey: "common.report-col.ticket-closed",
1646
- shortTitleKey: "common.report-col.ticket-closed.short",
1647
- infoTextKey: "common.report-col.ticket-closed.info"
1648
- },
1649
- ticketFee: {
1650
- titleKey: "common.report-col.ticket-fee",
1651
- shortTitleKey: "common.report-col.ticket-fee.short",
1652
- infoTextKey: "common.report-col.ticket-fee.info"
1653
- },
1654
- ticketNumber: {
1655
- titleKey: "common.report-col.ticket-number",
1656
- shortTitleKey: "common.report-col.ticket-number.short",
1657
- infoTextKey: "common.report-col.ticket-number.info"
1658
- },
1659
- ticketOpen: {
1660
- titleKey: "common.report-col.ticket-open",
1661
- shortTitleKey: "common.report-col.ticket-open.short",
1662
- infoTextKey: "common.report-col.ticket-open.info"
1663
- },
1664
- ticketTotal: {
1665
- titleKey: "common.report-col.ticket-total",
1666
- shortTitleKey: "common.report-col.ticket-total.short",
1667
- infoTextKey: "common.report-col.ticket-total.info"
1668
- },
1669
- timeOpenMins: {
1670
- titleKey: "common.report-col.time-open-mins",
1671
- shortTitleKey: "common.report-col.time-open-mins.short",
1672
- infoTextKey: "common.report-col.time-open-mins.info"
1673
- },
1674
- tipPct: {
1675
- titleKey: "common.report-col.tip-pct",
1676
- shortTitleKey: "common.report-col.tip-pct.short",
1677
- infoTextKey: "common.report-col.tip-pct.info"
1678
- },
1679
- tipReduction: {
1680
- titleKey: "common.report-col.tip-reduction",
1681
- shortTitleKey: "common.report-col.tip-reduction.short",
1682
- infoTextKey: "common.report-col.tip-reduction.info"
1683
- },
1684
- tipShare: {
1685
- titleKey: "common.report-col.tip-share",
1686
- shortTitleKey: "common.report-col.tip-share.short",
1687
- infoTextKey: "common.report-col.tip-share.info"
1688
- },
1689
- tipShareContributed: {
1690
- titleKey: "common.report-col.tip-share-contributed",
1691
- shortTitleKey: "common.report-col.tip-share-contributed.short",
1692
- infoTextKey: "common.report-col.tip-share-contributed.info"
1693
- },
1694
- tips: {
1695
- titleKey: "common.report-col.tips",
1696
- shortTitleKey: "common.report-col.tips.short",
1697
- infoTextKey: "common.report-col.tips.info"
1698
- },
1699
- tipsPerHour: {
1700
- titleKey: "common.report-col.tips-per-hour",
1701
- shortTitleKey: "common.report-col.tips-per-hour.short",
1702
- infoTextKey: "common.report-col.tips-per-hour.info"
1703
- },
1704
- totalCollected: {
1705
- titleKey: "common.report-col.total-collected",
1706
- shortTitleKey: "common.report-col.total-collected.short",
1707
- infoTextKey: "common.report-col.total-collected.info"
1708
- },
1709
- totalItemSales: {
1710
- titleKey: "common.report-col.total-item-sales",
1711
- shortTitleKey: "common.report-col.total-item-sales.short",
1712
- infoTextKey: "common.report-col.total-item-sales.info"
1713
- },
1714
- totalModifierSales: {
1715
- titleKey: "common.report-col.total-modifier-sales",
1716
- shortTitleKey: "common.report-col.total-modifier-sales.short",
1717
- infoTextKey: "common.report-col.total-modifier-sales.info"
1718
- },
1719
- totalModifierSalesComp: {
1720
- titleKey: "common.report-col.total-modifier-sales-comp",
1721
- shortTitleKey: "common.report-col.total-modifier-sales-comp.short",
1722
- infoTextKey: "common.report-col.total-modifier-sales-comp.info"
1723
- },
1724
- totalModifierSalesVar: {
1725
- titleKey: "common.report-col.total-modifier-sales-var",
1726
- shortTitleKey: "common.report-col.total-modifier-sales-var.short",
1727
- infoTextKey: "common.report-col.total-modifier-sales-var.info"
1728
- },
1729
- totalModifierSalesVarPct: {
1730
- titleKey: "common.report-col.total-modifier-sales-var-pct",
1731
- shortTitleKey: "common.report-col.total-modifier-sales-var-pct.short",
1732
- infoTextKey: "common.report-col.total-modifier-sales-var-pct.info"
1733
- },
1734
- modifierQuantityComp: {
1735
- titleKey: "common.report-col.modifier-quantity-comp",
1736
- shortTitleKey: "common.report-col.modifier-quantity-comp.short",
1737
- infoTextKey: "common.report-col.modifier-quantity-comp.info"
1738
- },
1739
- modifierQuantityVar: {
1740
- titleKey: "common.report-col.modifier-quantity-var",
1741
- shortTitleKey: "common.report-col.modifier-quantity-var.short",
1742
- infoTextKey: "common.report-col.modifier-quantity-var.info"
1743
- },
1744
- modifierQuantityVarPct: {
1745
- titleKey: "common.report-col.modifier-quantity-var-pct",
1746
- shortTitleKey: "common.report-col.modifier-quantity-var-pct.short",
1747
- infoTextKey: "common.report-col.modifier-quantity-var-pct.info"
1748
- },
1749
- itemQuantityComp: {
1750
- titleKey: "common.report-col.item-quantity-comp",
1751
- shortTitleKey: "common.report-col.item-quantity-comp.short",
1752
- infoTextKey: "common.report-col.item-quantity-comp.info"
1753
- },
1754
- attachRateComp: {
1755
- titleKey: "common.report-col.attach-rate-comp",
1756
- shortTitleKey: "common.report-col.attach-rate-comp.short",
1757
- infoTextKey: "common.report-col.attach-rate-comp.info"
1758
- },
1759
- attachRateVar: {
1760
- titleKey: "common.report-col.attach-rate-var",
1761
- shortTitleKey: "common.report-col.attach-rate-var.short",
1762
- infoTextKey: "common.report-col.attach-rate-var.info"
1763
- },
1764
- attachRateVarPct: {
1765
- titleKey: "common.report-col.attach-rate-var-pct",
1766
- shortTitleKey: "common.report-col.attach-rate-var-pct.short",
1767
- infoTextKey: "common.report-col.attach-rate-var-pct.info"
1768
- },
1769
- totalReturns: {
1770
- titleKey: "common.report-col.total-returns",
1771
- shortTitleKey: "common.report-col.total-returns.short",
1772
- infoTextKey: "common.report-col.total-returns.info"
1773
- },
1774
- totalSales: {
1775
- titleKey: "common.report-col.total-sales",
1776
- shortTitleKey: "common.report-col.total-sales.short",
1777
- infoTextKey: "common.report-col.total-sales.info"
1778
- },
1779
- totalTips: {
1780
- titleKey: "common.report-col.total-tips",
1781
- shortTitleKey: "common.report-col.total-tips.short",
1782
- infoTextKey: "common.report-col.total-tips.info"
1783
- },
1784
- transactionDate: {
1785
- titleKey: "common.report-col.transaction-date",
1786
- shortTitleKey: "common.report-col.transaction-date.short",
1787
- infoTextKey: "common.report-col.transaction-date.info"
1788
- },
1789
- transactionType: {
1790
- titleKey: "common.report-col.transaction-type",
1791
- shortTitleKey: "common.report-col.transaction-type.short",
1792
- infoTextKey: "common.report-col.transaction-type.info"
1793
- },
1794
- untaxedSales: {
1795
- titleKey: "common.report-col.untaxed-sales",
1796
- shortTitleKey: "common.report-col.untaxed-sales.short",
1797
- infoTextKey: "common.report-col.untaxed-sales.info"
1798
- },
1799
- visa: {
1800
- titleKey: "common.report-col.visa",
1801
- shortTitleKey: "common.report-col.visa.short",
1802
- infoTextKey: "common.report-col.visa.info"
1803
- },
1804
- visaReturns: {
1805
- titleKey: "common.report-col.visa-returns",
1806
- shortTitleKey: "common.report-col.visa-returns.short",
1807
- infoTextKey: "common.report-col.visa-returns.info"
1808
- },
1809
- paymentsCount: {
1810
- titleKey: "common.report-col.payments-count",
1811
- shortTitleKey: "common.report-col.payments-count.short",
1812
- infoTextKey: "common.report-col.payments-count.info"
1813
- },
1814
- paymentsAmount: {
1815
- titleKey: "common.report-col.payments-amount",
1816
- shortTitleKey: "common.report-col.payments-amount.short",
1817
- infoTextKey: "common.report-col.payments-amount.info"
1818
- },
1819
- paymentsTotal: {
1820
- titleKey: "common.report-col.payments-total",
1821
- shortTitleKey: "common.report-col.payments-total.short",
1822
- infoTextKey: "common.report-col.payments-total.info"
1823
- },
1824
- refundVoidDescription: {
1825
- titleKey: "common.report-col.refund-void-description",
1826
- shortTitleKey: "common.report-col.refund-void-description.short",
1827
- infoTextKey: "common.report-col.refund-void-description.info"
1828
- },
1829
- refundVoidCount: {
1830
- titleKey: "common.report-col.refund-void-count",
1831
- shortTitleKey: "common.report-col.refund-void-count.short",
1832
- infoTextKey: "common.report-col.refund-void-count.info"
1833
- },
1834
- refundVoidAmount: {
1835
- titleKey: "common.report-col.refund-void-amount",
1836
- shortTitleKey: "common.report-col.refund-void-amount.short",
1837
- infoTextKey: "common.report-col.refund-void-amount.info"
1838
- },
1839
- refundVoidPctSales: {
1840
- titleKey: "common.report-col.refund-void-pct-sales",
1841
- shortTitleKey: "common.report-col.refund-void-pct-sales.short",
1842
- infoTextKey: "common.report-col.refund-void-pct-sales.info"
1843
- },
1844
- discountName: {
1845
- titleKey: "common.report-col.discount-name",
1846
- shortTitleKey: "common.report-col.discount-name.short",
1847
- infoTextKey: "common.report-col.discount-name.info"
1848
- },
1849
- tickets: {
1850
- titleKey: "common.report-col.tickets",
1851
- shortTitleKey: "common.report-col.tickets.short",
1852
- infoTextKey: "common.report-col.tickets.info"
1853
- },
1854
- guests: {
1855
- titleKey: "common.report-col.guests",
1856
- shortTitleKey: "common.report-col.guests.short",
1857
- infoTextKey: "common.report-col.guests.info"
1858
- },
1859
- ticketAverage: {
1860
- titleKey: "common.report-col.ticket-average",
1861
- shortTitleKey: "common.report-col.ticket-average.short",
1862
- infoTextKey: "common.report-col.ticket-average.info"
1863
- },
1864
- guestAverage: {
1865
- titleKey: "common.report-col.guest-average",
1866
- shortTitleKey: "common.report-col.guest-average.short",
1867
- infoTextKey: "common.report-col.guest-average.info"
1868
- },
1869
- net: {
1870
- titleKey: "common.report-col.net",
1871
- shortTitleKey: "common.report-col.net.short",
1872
- infoTextKey: "common.report-col.net.info"
1873
- },
1874
- type: {
1875
- titleKey: "common.report-col.type",
1876
- shortTitleKey: "common.report-col.type.short",
1877
- infoTextKey: "common.report-col.type.info"
1878
- }
1879
- };
1880
- function getColumnMetadata(key) {
1881
- return COLUMN_REGISTRY[key];
1882
- }
1883
- function getColumnExportHeaderLabel(colTitle, groupTitle) {
1884
- if (groupTitle) {
1885
- return `${groupTitle}: ${colTitle}`;
1886
- }
1887
- return colTitle;
1888
- }
1889
-
1890
- // src/utils/alignment.ts
1891
- function getColumnAlignment(type) {
1892
- if (type === "string" || type === "date" || type === "time") {
1893
- return "left";
1894
- }
1895
- return "right";
1896
- }
1897
- function isNumericType(type) {
1898
- return type === "money" || type === "money-empty" || type === "number" || type === "number-empty" || type === "percent" || type === "fixedNumber";
1899
- }
1900
-
1901
- // src/totals.ts
1902
- var sumField = (rows, field) => rows.reduce((acc, row) => acc + (row[field] ?? 0), 0);
1903
- var getFooterValue = (rows, field, config) => {
1904
- const { type } = config;
1905
- if (!type || type === "date" || type === "time" || type === "boolean" || type === "conditional") {
1906
- return null;
1907
- }
1908
- const calc = config.footerCalculation;
1909
- if (type === "string") {
1910
- if (calc?.type === "label") {
1911
- return calc.label;
1912
- }
1913
- return null;
1914
- }
1915
- if (calc?.type === "none") {
1916
- return null;
1917
- }
1918
- if (calc?.type === "count") {
1919
- return rows.length;
1920
- }
1921
- if (!calc || calc.type === "sum") {
1922
- return config.columnKey || calc?.type === "sum" ? sumField(rows, field) : 0;
1923
- }
1924
- const { numeratorField, denominatorField } = calc;
1925
- if (!numeratorField || !denominatorField) {
1926
- return 0;
1927
- }
1928
- const num = sumField(rows, numeratorField);
1929
- const den = sumField(rows, denominatorField);
1930
- if (calc.type === "percentChange") {
1931
- return den ? (num - den) / den : 0;
1932
- }
1933
- if (calc.type === "variancePercent") {
1934
- const prior = den - num;
1935
- return prior ? num / prior : 0;
1936
- }
1937
- if (calc.type === "average") {
1938
- return den > 0 ? num / den : 0;
1939
- }
1940
- if (calc.type === "quotientOfDifferences") {
1941
- const { numeratorAdjustField, denominatorAdjustField } = calc;
1942
- const numAdj = numeratorAdjustField ? sumField(rows, numeratorAdjustField) : 0;
1943
- const denAdj = denominatorAdjustField ? sumField(rows, denominatorAdjustField) : 0;
1944
- const effectiveDen = den - denAdj;
1945
- return effectiveDen !== 0 ? (num - numAdj) / effectiveDen : 0;
1946
- }
1947
- return 0;
1948
- };
1949
- var calculateReportTotals = (data, fieldConfig) => {
1950
- const result = {};
1951
- for (const [field, config] of Object.entries(fieldConfig)) {
1952
- const total = getFooterValue(data, field, config);
1953
- result[field] = total ?? "";
1954
- }
1955
- return result;
1956
- };
1957
-
1958
- // src/reports/reportSection.ts
1959
- var DAILY_SALES_CASH_ROW_LABELS = {
1960
- cashPayments: "common.report-section.cash-row.cash-payments",
1961
- paidInOuts: "common.report-section.cash-row.paid-in-outs",
1962
- gratuitiesPaidOut: "common.report-section.cash-row.gratuities-paid-out",
1963
- ccTipsPaidOut: "common.report-section.cash-row.cc-tips-paid-out"
1964
- };
1965
- var DAILY_SALES_REV_CLASS_FOOTER_LABELS = {
1966
- taxTotal: "common.report-section.rev-class-footer.tax-total",
1967
- gratuities: "common.report-section.rev-class-footer.gratuities",
1968
- balancePayments: "common.report-section.rev-class-footer.balance-payments",
1969
- giftCardSales: "common.report-section.rev-class-footer.gift-card-sales",
1970
- nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue",
1971
- houseAccount: "common.report-section.rev-class-footer.house-account",
1972
- totalAccountable: "common.report-section.rev-class-footer.total-accountable"
1973
- };
1974
- var DAILY_SALES_SECTIONS = [
1975
- {
1976
- sectionLabel: "common.report-section.revenue-class",
1977
- config: dailySalesConfig,
1978
- columns: [
1979
- { fieldKey: "groupByName", columnKey: "revenueClass" },
1980
- { fieldKey: "itemsQuantity", columnKey: "quantity" },
1981
- { fieldKey: "salesAmountGross", columnKey: "grossSales" },
1982
- { fieldKey: "discountsAmount", columnKey: "discountAmount" },
1983
- { fieldKey: "inclusiveTaxesAmount", columnKey: "inclusiveTax" },
1984
- { fieldKey: "salesAmountNet", columnKey: "netSales" },
1985
- { fieldKey: "salesMixPct", columnKey: "salesMixByPct" }
1986
- ]
1987
- },
1988
- {
1989
- sectionLabel: "common.report-section.payments",
1990
- config: dailySalesPaymentsConfig,
1991
- columns: [
1992
- { fieldKey: "paymentTypeName", columnKey: "paymentType" },
1993
- { fieldKey: "paymentsCount", columnKey: "paymentsCount" },
1994
- { fieldKey: "paymentsAmount", columnKey: "paymentsAmount" },
1995
- { fieldKey: "tipsAmount", columnKey: "tips" },
1996
- { fieldKey: "totalSales", columnKey: "paymentsTotal" }
1997
- ]
1998
- },
1999
- {
2000
- sectionLabel: "common.report-section.cash",
2001
- config: dailySalesCacheConfig,
2002
- columns: [
2003
- { fieldKey: "name", columnKey: "type", isRowLabelKey: true },
2004
- { fieldKey: "amount", columnKey: "paymentsAmount" }
2005
- ]
2006
- },
2007
- {
2008
- sectionLabel: "common.report-section.taxes",
2009
- config: dailySalesTaxesConfig,
2010
- columns: [
2011
- { fieldKey: "taxName", columnKey: "taxName" },
2012
- { fieldKey: "taxableSales", columnKey: "taxableSales" },
2013
- { fieldKey: "taxesAmount", columnKey: "taxCollected" },
2014
- { fieldKey: "exemptSales", columnKey: "exemptSales" }
2015
- ]
2016
- },
2017
- {
2018
- sectionLabel: "common.report-section.refunds-voids",
2019
- config: dailySalesRefundsVoidsConfig,
2020
- columns: [
2021
- { fieldKey: "description", columnKey: "refundVoidDescription" },
2022
- { fieldKey: "count", columnKey: "refundVoidCount" },
2023
- { fieldKey: "amount", columnKey: "refundVoidAmount" },
2024
- { fieldKey: "pctSales", columnKey: "refundVoidPctSales" }
2025
- ]
2026
- },
2027
- {
2028
- sectionLabel: "common.report-section.discounts",
2029
- config: dailySalesDiscountsConfig,
2030
- columns: [
2031
- { fieldKey: "discountName", columnKey: "discountName" },
2032
- { fieldKey: "ticketCount", columnKey: "ticketCount" },
2033
- { fieldKey: "itemCount", columnKey: "itemCount" },
2034
- { fieldKey: "discountsAmount", columnKey: "discountAmount" }
2035
- ]
2036
- },
2037
- {
2038
- sectionLabel: "common.report-section.sales-by-day-part",
2039
- config: dailySalesTrendsDayPartConfig,
2040
- columns: [
2041
- { fieldKey: "groupByName", columnKey: "daypart" },
2042
- { fieldKey: "ticketsCount", columnKey: "tickets" },
2043
- { fieldKey: "guestsCount", columnKey: "guests" },
2044
- { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
2045
- { fieldKey: "guestAvg", columnKey: "guestAverage" },
2046
- { fieldKey: "salesAmountNet", columnKey: "netSales" }
2047
- ]
2048
- },
2049
- {
2050
- sectionLabel: "common.report-section.sales-by-order-type",
2051
- config: dailySalesTrendsOrderTypeConfig,
2052
- columns: [
2053
- { fieldKey: "groupByName", columnKey: "orderType" },
2054
- { fieldKey: "ticketsCount", columnKey: "tickets" },
2055
- { fieldKey: "guestsCount", columnKey: "guests" },
2056
- { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
2057
- { fieldKey: "guestAvg", columnKey: "guestAverage" },
2058
- { fieldKey: "salesAmountNet", columnKey: "netSales" }
2059
- ]
2060
- }
2061
- ];
2062
- var REPORT_SECTION_CONFIGS = {
2063
- [Report.DAILY_SALES]: DAILY_SALES_SECTIONS,
2064
- [Report.DAILY_SALES_LIVE]: DAILY_SALES_SECTIONS
2065
- };
2066
-
2067
- // src/constants.ts
2068
- var TENDER_TYPE = {
2069
- CASH: "Cash",
2070
- CHECK: "Check",
2071
- CREDIT: "Credit",
2072
- CRYPTO: "Crypto",
2073
- DEBIT: "Debit",
2074
- GIFT_CARD: "Gift Card",
2075
- GIFT_CERTIFICATE: "Gift Certificate",
2076
- HOUSE_ACCOUNT: "House Account",
2077
- VIRTUAL: "Virtual",
2078
- MOBILE_WALLET: "Digital Wallet",
2079
- PROPERTY_MANAGEMENT_SYSTEM: "PMS",
2080
- ROOM_CHARGE: "Room Charge",
2081
- WALK_OUT: "Walk Out",
2082
- CASH_REFUNDS: "Cash Refunds",
2083
- UNKNOWN: "Unknown"
2084
- };
2085
-
2086
- // src/reports/dailySales/dailySales.utils.ts
2087
- var buildDailySalesCashPayments = (payments, paidOutAmount, gratuitiesPaidOutAmount, tipsPaidOutAmount) => [
2088
- {
2089
- name: DAILY_SALES_CASH_ROW_LABELS.cashPayments,
2090
- amount: payments.filter((r) => r.paymentTypeName === TENDER_TYPE.CASH || r.paymentTypeName === TENDER_TYPE.CASH_REFUNDS).reduce((sum, r) => sum + r.paymentsAmount, 0)
2091
- },
2092
- { name: DAILY_SALES_CASH_ROW_LABELS.paidInOuts, amount: paidOutAmount },
2093
- { name: DAILY_SALES_CASH_ROW_LABELS.gratuitiesPaidOut, amount: gratuitiesPaidOutAmount },
2094
- { name: DAILY_SALES_CASH_ROW_LABELS.ccTipsPaidOut, amount: tipsPaidOutAmount }
2095
- ];
2096
- var buildDailySalesRevClassFooter = (inputs) => {
2097
- const totalAccountable = inputs.revClassNetSales + inputs.taxTotal + inputs.gratuitiesTotal + inputs.balancePaymentsTotal + inputs.giftCardSalesTotal + inputs.nonSalesTotal - inputs.houseAccountTotal;
2098
- return [
2099
- { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.taxTotal, salesAmountNet: inputs.taxTotal },
2100
- { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.gratuities, salesAmountNet: inputs.gratuitiesTotal },
2101
- {
2102
- groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.balancePayments,
2103
- salesAmountNet: inputs.balancePaymentsTotal
2104
- },
2105
- { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.giftCardSales, salesAmountNet: inputs.giftCardSalesTotal },
2106
- { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.nonSalesRevenue, salesAmountNet: inputs.nonSalesTotal },
2107
- { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.houseAccount, salesAmountNet: inputs.houseAccountTotal },
2108
- { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
2109
- ];
2110
- };
2111
- var buildPaymentsSectionData = (payments) => {
2112
- const filtered = payments.filter((payment) => payment.paymentTypeName !== TENDER_TYPE.HOUSE_ACCOUNT);
2113
- const seenParentCategories = /* @__PURE__ */ new Set();
2114
- const result = [];
2115
- for (const payment of filtered) {
2116
- if (payment.parentCategory !== null && !seenParentCategories.has(payment.parentCategory)) {
2117
- seenParentCategories.add(payment.parentCategory);
2118
- const headerRow = {
2119
- ...payment,
2120
- paymentTypeName: payment.parentCategory,
2121
- parentCategory: "",
2122
- paymentsCount: null,
2123
- paymentsAmount: null,
2124
- tipsAmount: null,
2125
- totalSales: null
2126
- };
2127
- result.push(headerRow);
2128
- }
2129
- const child = payment.parentCategory !== null ? { ...payment, paymentTypeName: ` ${payment.paymentTypeName}` } : payment;
2130
- result.push(child);
2131
- }
2132
- return result;
2133
- };
2134
-
2135
611
  // src/translations/crowdin/skytab-analytics-report-utils/en-GB.ts
2136
612
  var enUS = {
2137
613
  "common.report-col.fifteen-min-interval": false,
@@ -2620,7 +1096,10 @@ var enUS = {
2620
1096
  "table.groups.sales": false,
2621
1097
  "table.groups.net-sales": false,
2622
1098
  "table.groups.guests": false,
2623
- "table.groups.sales-per-guest": false
1099
+ "table.groups.sales-per-guest": false,
1100
+ "employee-timecard.status.active": false,
1101
+ "employee-timecard.status.inactive": false,
1102
+ "employee-timecard.job.break-suffix": false
2624
1103
  };
2625
1104
  var en_GB_default = enUS;
2626
1105
 
@@ -3112,7 +1591,10 @@ var enUS2 = {
3112
1591
  "table.groups.sales": false,
3113
1592
  "table.groups.net-sales": false,
3114
1593
  "table.groups.guests": false,
3115
- "table.groups.sales-per-guest": false
1594
+ "table.groups.sales-per-guest": false,
1595
+ "employee-timecard.status.active": false,
1596
+ "employee-timecard.status.inactive": false,
1597
+ "employee-timecard.job.break-suffix": false
3116
1598
  };
3117
1599
  var es_ES_default = enUS2;
3118
1600
 
@@ -3604,28 +2086,1567 @@ var enUS3 = {
3604
2086
  "table.groups.sales": "Sales",
3605
2087
  "table.groups.net-sales": "Net Sales",
3606
2088
  "table.groups.guests": "Guests",
3607
- "table.groups.sales-per-guest": "Sales / Guest"
2089
+ "table.groups.sales-per-guest": "Sales / Guest",
2090
+ "employee-timecard.status.active": "Active",
2091
+ "employee-timecard.status.inactive": "Inactive",
2092
+ "employee-timecard.job.break-suffix": " * break"
2093
+ };
2094
+ var en_US_default = enUS3;
2095
+
2096
+ // src/translations/index.ts
2097
+ var filterCrowdin = (messages) => Object.fromEntries(
2098
+ Object.entries(messages).filter((entry) => typeof entry[1] === "string")
2099
+ );
2100
+ var LOCALE_OVERRIDES = {
2101
+ "en-GB": filterCrowdin(en_GB_default),
2102
+ "es-ES": filterCrowdin(es_ES_default)
2103
+ };
2104
+ function resolveTranslate(key, locale) {
2105
+ const overrides = LOCALE_OVERRIDES[locale];
2106
+ if (overrides) {
2107
+ const override = overrides[key];
2108
+ if (override !== void 0) {
2109
+ return override;
2110
+ }
2111
+ }
2112
+ return en_US_default[key] ?? key;
2113
+ }
2114
+
2115
+ // src/reports/employeeTimecard.ts
2116
+ var EMPLOYEE_NAME_WIDTH = 220;
2117
+ var STATUS_WIDTH = 140;
2118
+ var LOOKUP_WIDTH = 160;
2119
+ var PAYROLL_WIDTH = 160;
2120
+ var JOB_WIDTH = 200;
2121
+ var FIELDS8 = {
2122
+ locationId: {
2123
+ type: "number",
2124
+ enableSorting: false,
2125
+ filteringAvailable: false
2126
+ },
2127
+ locationName: {
2128
+ type: "string",
2129
+ size: FIRST_COLUMN_WIDTH,
2130
+ columnKey: "locationName"
2131
+ },
2132
+ businessDate: {
2133
+ type: "date",
2134
+ columnKey: "date"
2135
+ },
2136
+ employeeName: {
2137
+ type: "string",
2138
+ size: EMPLOYEE_NAME_WIDTH,
2139
+ columnKey: "employeeName",
2140
+ footerCalculation: { type: "label", label: "table.total" }
2141
+ },
2142
+ isActive: {
2143
+ type: "custom",
2144
+ size: STATUS_WIDTH,
2145
+ columnKey: "status",
2146
+ enableSorting: false,
2147
+ filteringAvailable: false,
2148
+ customConfiguration: {
2149
+ customFormat: (value, _full, locale) => {
2150
+ const row = value;
2151
+ return row ? resolveTranslate("employee-timecard.status.active", locale) : resolveTranslate("employee-timecard.status.inactive", locale);
2152
+ }
2153
+ }
2154
+ },
2155
+ lookup: {
2156
+ type: "string",
2157
+ size: LOOKUP_WIDTH,
2158
+ columnKey: "employeeId"
2159
+ },
2160
+ payrollCode: {
2161
+ type: "string",
2162
+ size: PAYROLL_WIDTH,
2163
+ columnKey: "payrollId"
2164
+ },
2165
+ jobName: {
2166
+ type: "custom",
2167
+ size: JOB_WIDTH,
2168
+ columnKey: "employeeJob",
2169
+ customConfiguration: {
2170
+ customFormat: (value, original, locale) => {
2171
+ const job = typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value) : "";
2172
+ return original?.isBreak ? `${job}${resolveTranslate("employee-timecard.job.break-suffix", locale)}` : job;
2173
+ }
2174
+ }
2175
+ },
2176
+ isBreak: {
2177
+ type: "string",
2178
+ enableSorting: false,
2179
+ filteringAvailable: false
2180
+ },
2181
+ startTime: {
2182
+ type: "time-with-time-zone",
2183
+ columnKey: "clockInTime"
2184
+ },
2185
+ endTime: {
2186
+ type: "time-with-time-zone",
2187
+ columnKey: "clockOutTime"
2188
+ },
2189
+ shiftHours: {
2190
+ type: "fixedNumber",
2191
+ columnKey: "shiftDurationHrs",
2192
+ filteringAvailable: false
2193
+ }
2194
+ };
2195
+ var EMPLOYEE_TIMECARD_VISIBLE_COLUMNS = [
2196
+ "locationName",
2197
+ "businessDate",
2198
+ "isActive",
2199
+ "lookup",
2200
+ "payrollCode",
2201
+ "jobName",
2202
+ "startTime",
2203
+ "endTime",
2204
+ "shiftHours"
2205
+ ];
2206
+ var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
2207
+ "employeeName",
2208
+ ...EMPLOYEE_TIMECARD_VISIBLE_COLUMNS
2209
+ ];
2210
+ var employeeTimecardConfig = {
2211
+ fields: FIELDS8,
2212
+ availableColumns: EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS,
2213
+ defaultVisibleColumns: EMPLOYEE_TIMECARD_VISIBLE_COLUMNS,
2214
+ hasFooter: true
2215
+ };
2216
+
2217
+ // src/reports/employeeTip.ts
2218
+ var FIELDS9 = {
2219
+ employeeName: {
2220
+ type: "string",
2221
+ size: 220,
2222
+ columnKey: "employeeName"
2223
+ },
2224
+ empId: {
2225
+ type: "string",
2226
+ size: 160,
2227
+ columnKey: "employeeId",
2228
+ footerCalculation: { type: "label", label: "table.total" }
2229
+ },
2230
+ payrollId: { type: "string", size: 160, columnKey: "payrollId" },
2231
+ locationName: { type: "string", size: 220, columnKey: "locationName" },
2232
+ status: { type: "string", size: 140, columnKey: "status" },
2233
+ grossSales: { type: "money", columnKey: "grossSales", footerCalculation: { type: "sum" } },
2234
+ grossCash: { type: "money", columnKey: "grossCashSales", footerCalculation: { type: "sum" } },
2235
+ grossCc: { type: "money", columnKey: "grossCreditSales", footerCalculation: { type: "sum" } },
2236
+ totalPayments: { type: "money", columnKey: "totalCollected", footerCalculation: { type: "sum" } },
2237
+ autoGratuity: { type: "money", columnKey: "autoGratuity", footerCalculation: { type: "sum" } },
2238
+ grossTips: { type: "money", columnKey: "grossTips", footerCalculation: { type: "sum" } },
2239
+ declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } },
2240
+ tipReduction: { type: "money", columnKey: "tipReduction", footerCalculation: { type: "sum" } },
2241
+ tipShare: { type: "money", columnKey: "tipShare", footerCalculation: { type: "sum" } },
2242
+ netTips: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
2243
+ tipPercentage: {
2244
+ type: "percent",
2245
+ columnKey: "tipPct",
2246
+ footerCalculation: { type: "average", numeratorField: "grossTips", denominatorField: "grossSales" }
2247
+ }
2248
+ };
2249
+ var VISIBLE_COLUMNS = [
2250
+ "employeeName",
2251
+ "payrollId",
2252
+ "locationName",
2253
+ "status",
2254
+ "grossSales",
2255
+ "grossCash",
2256
+ "grossCc",
2257
+ "totalPayments",
2258
+ "autoGratuity",
2259
+ "grossTips",
2260
+ "declaredTips",
2261
+ "tipReduction",
2262
+ "tipShare",
2263
+ "netTips",
2264
+ "tipPercentage"
2265
+ ];
2266
+ var AVAILABLE_COLUMNS = ["empId", ...VISIBLE_COLUMNS];
2267
+ var employeeTipConfig = {
2268
+ fields: FIELDS9,
2269
+ availableColumns: AVAILABLE_COLUMNS,
2270
+ defaultVisibleColumns: VISIBLE_COLUMNS,
2271
+ hasFooter: true
2272
+ };
2273
+
2274
+ // src/reports/tipCashoutReconciliation.ts
2275
+ var FIELDS10 = {
2276
+ groupById: { type: "string" },
2277
+ groupByName: {
2278
+ type: "string",
2279
+ size: FIRST_COLUMN_WIDTH,
2280
+ footerCalculation: { type: "label", label: "table.total" }
2281
+ },
2282
+ locationName: { type: "string", size: 220, columnKey: "locationName" },
2283
+ employeeName: { type: "string", size: 220, columnKey: "employeeName" },
2284
+ empId: { type: "string", size: 160, columnKey: "employeeId" },
2285
+ payrollId: { type: "string", size: 160, columnKey: "payrollId" },
2286
+ netSales: { type: "money", columnKey: "netSales", footerCalculation: { type: "sum" } },
2287
+ cashCollected: { type: "money", columnKey: "cashCollected", footerCalculation: { type: "sum" } },
2288
+ grossTips: { type: "money", columnKey: "grossTips", footerCalculation: { type: "sum" } },
2289
+ autoGratuity: { type: "money", columnKey: "autoGratuity", footerCalculation: { type: "sum" } },
2290
+ tipReduction: { type: "money", columnKey: "tipReduction", footerCalculation: { type: "sum" } },
2291
+ tipShareContributed: { type: "money", columnKey: "tipShareContributed", footerCalculation: { type: "sum" } },
2292
+ declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } }
2293
+ };
2294
+ var VISIBLE_COLUMNS2 = [
2295
+ "groupByName",
2296
+ "locationName",
2297
+ "employeeName",
2298
+ "payrollId",
2299
+ "netSales",
2300
+ "cashCollected",
2301
+ "grossTips",
2302
+ "autoGratuity",
2303
+ "tipReduction",
2304
+ "tipShareContributed",
2305
+ "declaredTips"
2306
+ ];
2307
+ var AVAILABLE_COLUMNS2 = ["groupById", "empId", ...VISIBLE_COLUMNS2];
2308
+ var tipCashoutReconciliationConfig = {
2309
+ fields: FIELDS10,
2310
+ availableColumns: AVAILABLE_COLUMNS2,
2311
+ defaultVisibleColumns: VISIBLE_COLUMNS2,
2312
+ hasFooter: true
2313
+ };
2314
+
2315
+ // src/reports/dailySales/dailySales.ts
2316
+ var FIELDS11 = {
2317
+ groupById: { type: "string" },
2318
+ groupByName: {
2319
+ type: "string",
2320
+ size: FIRST_COLUMN_WIDTH,
2321
+ columnKey: "revenueClass",
2322
+ footerCalculation: { type: "label", label: "table.total" }
2323
+ },
2324
+ itemsQuantity: { type: "number", columnKey: "quantity" },
2325
+ salesAmountGross: { type: "money", columnKey: "grossSales" },
2326
+ discountsAmount: { type: "money", columnKey: "discountAmount" },
2327
+ inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
2328
+ salesAmountNet: { type: "money", columnKey: "netSales" },
2329
+ salesMixPct: { type: "percent", columnKey: "salesMixByPct" }
2330
+ };
2331
+ var DAILY_SALES_AVAILABLE_COLUMNS = [
2332
+ "groupByName",
2333
+ "itemsQuantity",
2334
+ "salesAmountGross",
2335
+ "discountsAmount",
2336
+ "inclusiveTaxesAmount",
2337
+ "salesAmountNet",
2338
+ "salesMixPct"
2339
+ ];
2340
+ var dailySalesConfig = {
2341
+ fields: FIELDS11,
2342
+ availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
2343
+ defaultVisibleColumns: DAILY_SALES_AVAILABLE_COLUMNS,
2344
+ hasFooter: true,
2345
+ dataAccessKey: "salesByRevClass",
2346
+ sectionName: "common.report-section.revenue-class",
2347
+ extraFooterRowsKey: "salesByRevClassFooter"
2348
+ };
2349
+
2350
+ // src/reports/dailySales/dailySalesCache.ts
2351
+ var FIELDS12 = {
2352
+ name: {
2353
+ type: "string",
2354
+ columnKey: "type",
2355
+ size: FIRST_COLUMN_WIDTH,
2356
+ footerCalculation: { type: "label", label: "table.total" }
2357
+ },
2358
+ amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
2359
+ };
2360
+ var dailySalesCacheConfig = {
2361
+ fields: FIELDS12,
2362
+ availableColumns: ["name", "amount"],
2363
+ defaultVisibleColumns: ["name", "amount"],
2364
+ hasFooter: true,
2365
+ dataAccessKey: "cashPayments",
2366
+ sectionName: "common.report-section.cash"
2367
+ };
2368
+
2369
+ // src/reports/dailySales/dailySalesDiscounts.ts
2370
+ var FIELDS13 = {
2371
+ discountName: {
2372
+ type: "string",
2373
+ columnKey: "discountName",
2374
+ size: FIRST_COLUMN_WIDTH,
2375
+ footerCalculation: { type: "label", label: "table.total" }
2376
+ },
2377
+ ticketCount: { type: "number", columnKey: "ticketCount", footerCalculation: { type: "sum" } },
2378
+ itemCount: { type: "number", columnKey: "itemCount", footerCalculation: { type: "sum" } },
2379
+ discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
2380
+ };
2381
+ var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
2382
+ "discountName",
2383
+ "ticketCount",
2384
+ "itemCount",
2385
+ "discountsAmount"
2386
+ ];
2387
+ var dailySalesDiscountsConfig = {
2388
+ fields: FIELDS13,
2389
+ availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
2390
+ defaultVisibleColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
2391
+ hasFooter: true,
2392
+ dataAccessKey: "discounts",
2393
+ sectionName: "common.report-section.discounts"
2394
+ };
2395
+
2396
+ // src/reports/dailySales/dailySalesPayments.ts
2397
+ var FIELDS14 = {
2398
+ paymentTypeName: {
2399
+ type: "string",
2400
+ size: FIRST_COLUMN_WIDTH,
2401
+ columnKey: "paymentType",
2402
+ footerCalculation: { type: "label", label: "table.total" }
2403
+ },
2404
+ paymentsCount: { type: "number-empty", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
2405
+ paymentsAmount: { type: "money-empty", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
2406
+ tipsAmount: { type: "money-empty", columnKey: "tips", footerCalculation: { type: "sum" } },
2407
+ totalSales: { type: "money-empty", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
2408
+ };
2409
+ var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
2410
+ "paymentTypeName",
2411
+ "paymentsCount",
2412
+ "paymentsAmount",
2413
+ "tipsAmount",
2414
+ "totalSales"
2415
+ ];
2416
+ var dailySalesPaymentsConfig = {
2417
+ fields: FIELDS14,
2418
+ availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
2419
+ defaultVisibleColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
2420
+ hasFooter: true,
2421
+ dataAccessKey: "payments",
2422
+ sectionName: "common.report-section.payments"
2423
+ };
2424
+
2425
+ // src/reports/dailySales/dailySalesRefundsVoids.ts
2426
+ var FIELDS15 = {
2427
+ description: {
2428
+ type: "string",
2429
+ columnKey: "refundVoidDescription",
2430
+ size: FIRST_COLUMN_WIDTH,
2431
+ footerCalculation: { type: "label", label: "table.total" }
2432
+ },
2433
+ count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
2434
+ amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
2435
+ pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
2436
+ };
2437
+ var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
2438
+ "description",
2439
+ "count",
2440
+ "amount",
2441
+ "pctSales"
2442
+ ];
2443
+ var dailySalesRefundsVoidsConfig = {
2444
+ fields: FIELDS15,
2445
+ availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
2446
+ defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
2447
+ hasFooter: true,
2448
+ dataAccessKey: "refundsVoids",
2449
+ sectionName: "common.report-section.refunds-voids"
2450
+ };
2451
+
2452
+ // src/reports/dailySales/dailySalesTaxes.ts
2453
+ var FIELDS16 = {
2454
+ taxName: {
2455
+ type: "string",
2456
+ columnKey: "taxName",
2457
+ size: FIRST_COLUMN_WIDTH,
2458
+ footerCalculation: { type: "label", label: "table.total" }
2459
+ },
2460
+ taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "none" } },
2461
+ taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
2462
+ exemptSales: { type: "money", columnKey: "exemptSales", footerCalculation: { type: "sum" } }
2463
+ };
2464
+ var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
2465
+ "taxName",
2466
+ "taxableSales",
2467
+ "taxesAmount",
2468
+ "exemptSales"
2469
+ ];
2470
+ var dailySalesTaxesConfig = {
2471
+ fields: FIELDS16,
2472
+ availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
2473
+ defaultVisibleColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
2474
+ hasFooter: true,
2475
+ dataAccessKey: "taxes",
2476
+ sectionName: "common.report-section.taxes"
2477
+ };
2478
+
2479
+ // src/reports/dailySales/dailySalesTrendsDayPart.ts
2480
+ var FIELDS17 = {
2481
+ groupById: { type: "string" },
2482
+ groupByName: {
2483
+ type: "string",
2484
+ columnKey: "daypart",
2485
+ size: FIRST_COLUMN_WIDTH,
2486
+ footerCalculation: { type: "label", label: "table.total" }
2487
+ },
2488
+ salesAmountNet: { type: "money", columnKey: "netSales" },
2489
+ ticketsCount: { type: "number", columnKey: "tickets" },
2490
+ guestsCount: { type: "number", columnKey: "guests" },
2491
+ ticketAvg: {
2492
+ type: "money",
2493
+ columnKey: "ticketAverage",
2494
+ footerCalculation: {
2495
+ type: "average",
2496
+ numeratorField: "salesAmountNet",
2497
+ denominatorField: "ticketsCount"
2498
+ }
2499
+ },
2500
+ guestAvg: {
2501
+ type: "money",
2502
+ columnKey: "guestAverage",
2503
+ footerCalculation: {
2504
+ type: "average",
2505
+ numeratorField: "salesAmountNet",
2506
+ denominatorField: "guestsCount"
2507
+ }
2508
+ }
2509
+ };
2510
+ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS = [
2511
+ "groupByName",
2512
+ "ticketsCount",
2513
+ "guestsCount",
2514
+ "ticketAvg",
2515
+ "guestAvg",
2516
+ "salesAmountNet"
2517
+ ];
2518
+ var dailySalesTrendsDayPartConfig = {
2519
+ fields: FIELDS17,
2520
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
2521
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS,
2522
+ hasFooter: true,
2523
+ dataAccessKey: "trendsByDayPart",
2524
+ sectionName: "common.report-section.sales-by-day-part",
2525
+ extraFooterFields: ["salesAmountNet"]
2526
+ };
2527
+
2528
+ // src/reports/dailySales/dailySalesTrendsOrderType.ts
2529
+ var FIELDS18 = {
2530
+ groupById: { type: "string" },
2531
+ groupByName: {
2532
+ columnKey: "orderType",
2533
+ type: "string",
2534
+ size: FIRST_COLUMN_WIDTH,
2535
+ footerCalculation: { type: "label", label: "table.total" }
2536
+ },
2537
+ salesAmountNet: { type: "money", columnKey: "netSales" },
2538
+ ticketsCount: { type: "number", columnKey: "tickets" },
2539
+ guestsCount: { type: "number", columnKey: "guests" },
2540
+ ticketAvg: {
2541
+ type: "money",
2542
+ columnKey: "ticketAverage",
2543
+ footerCalculation: {
2544
+ type: "average",
2545
+ numeratorField: "salesAmountNet",
2546
+ denominatorField: "ticketsCount"
2547
+ }
2548
+ },
2549
+ guestAvg: {
2550
+ type: "money",
2551
+ columnKey: "guestAverage",
2552
+ footerCalculation: {
2553
+ type: "average",
2554
+ numeratorField: "salesAmountNet",
2555
+ denominatorField: "guestsCount"
2556
+ }
2557
+ }
2558
+ };
2559
+ var DAILY_SALES_TRENDS_AVAILABLE_COLUMNS2 = [
2560
+ "groupByName",
2561
+ "ticketsCount",
2562
+ "guestsCount",
2563
+ "ticketAvg",
2564
+ "guestAvg",
2565
+ "salesAmountNet"
2566
+ ];
2567
+ var dailySalesTrendsOrderTypeConfig = {
2568
+ fields: FIELDS18,
2569
+ availableColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS2,
2570
+ defaultVisibleColumns: DAILY_SALES_TRENDS_AVAILABLE_COLUMNS2,
2571
+ hasFooter: true,
2572
+ dataAccessKey: "trendsByOrderType",
2573
+ sectionName: "common.report-section.sales-by-order-type",
2574
+ extraFooterFields: ["salesAmountNet"]
2575
+ };
2576
+
2577
+ // src/report.ts
2578
+ var Report = {
2579
+ TICKET_LIVE: "ticket-live",
2580
+ TICKET_ANALYTICS: "ticket-analytics",
2581
+ SALES_SUMMARY: "sales-summary",
2582
+ PRODUCT_MIX: "product-mix",
2583
+ MODIFIER_MIX: "modifier-mix",
2584
+ ITEM_TAX: "item-tax",
2585
+ EMPLOYEE_TIMECARD: "employee-timecard",
2586
+ EMPLOYEE_TIP: "employee-tip",
2587
+ TIP_CASHOUT_RECONCILIATION: "tip-cashout-reconciliation",
2588
+ SALES_BY_ITEM: "sales-by-item",
2589
+ DAILY_SALES: "daily-sales",
2590
+ DAILY_SALES_LIVE: "daily-sales-live"
2591
+ };
2592
+ var DAILY_SALES_SECTION_CONFIGS = [
2593
+ dailySalesConfig,
2594
+ dailySalesPaymentsConfig,
2595
+ dailySalesCacheConfig,
2596
+ dailySalesTaxesConfig,
2597
+ dailySalesRefundsVoidsConfig,
2598
+ dailySalesDiscountsConfig,
2599
+ dailySalesTrendsDayPartConfig,
2600
+ dailySalesTrendsOrderTypeConfig
2601
+ ];
2602
+ var REPORT_CONFIG_MAP = {
2603
+ "sales-summary": salesSummaryConfig,
2604
+ "ticket-analytics": ticketSummaryConfig,
2605
+ "ticket-live": ticketLiveConfig,
2606
+ "product-mix": productMixConfig,
2607
+ "modifier-mix": modifierMixConfig,
2608
+ "item-tax": itemTaxConfig,
2609
+ "employee-timecard": employeeTimecardConfig,
2610
+ "employee-tip": employeeTipConfig,
2611
+ "tip-cashout-reconciliation": tipCashoutReconciliationConfig,
2612
+ "sales-by-item": salesByItemDetailConfig,
2613
+ "daily-sales": DAILY_SALES_SECTION_CONFIGS,
2614
+ "daily-sales-live": DAILY_SALES_SECTION_CONFIGS
2615
+ };
2616
+ var REPORT_DEFAULT_NAME_MAP = {
2617
+ "sales-summary": "Sales",
2618
+ "ticket-analytics": "Tickets",
2619
+ "ticket-live": "Tickets Live",
2620
+ "product-mix": "Product Mix",
2621
+ "modifier-mix": "Modifier Mix",
2622
+ "item-tax": "Sales Tax by Item",
2623
+ "employee-timecard": "Employee Timecard",
2624
+ "employee-tip": "Employee Tip",
2625
+ "tip-cashout-reconciliation": "Tip & Cashout Reconciliation",
2626
+ "sales-by-item": "Sales by Item",
2627
+ "daily-sales": "Daily Sales",
2628
+ "daily-sales-live": "Daily Sales Live"
2629
+ };
2630
+ var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
2631
+ var getFixedColumns = (config, parameters) => {
2632
+ const visibleColumns = new Set(config.defaultVisibleColumns ?? []);
2633
+ const fixedCols = config.availableColumns.filter((col) => !visibleColumns.has(col));
2634
+ return fixedCols.filter((col) => {
2635
+ if (col === "groupByName2") {
2636
+ return !!parameters?.secondGroupBy;
2637
+ }
2638
+ return true;
2639
+ });
2640
+ };
2641
+ var getReportExportFileName = ({
2642
+ reportType,
2643
+ startDate,
2644
+ endDate,
2645
+ format
2646
+ }) => {
2647
+ const formatDate2 = (date) => {
2648
+ return [
2649
+ date.getFullYear(),
2650
+ String(date.getMonth() + 1).padStart(2, "0"),
2651
+ String(date.getDate()).padStart(2, "0")
2652
+ ].join("-");
2653
+ };
2654
+ const filename = REPORT_DEFAULT_NAME_MAP[reportType].replace(/\s+/g, "_") ?? "Report";
2655
+ return `${filename}_${formatDate2(startDate)}_to_${formatDate2(endDate)}.${format}`.toLocaleLowerCase();
2656
+ };
2657
+
2658
+ // src/columns/index.ts
2659
+ var COLUMN_REGISTRY = {
2660
+ fifteenMinInterval: {
2661
+ titleKey: "common.report-col.fifteen-min-interval",
2662
+ shortTitleKey: "common.report-col.fifteen-min-interval.short",
2663
+ infoTextKey: "common.report-col.fifteen-min-interval.info"
2664
+ },
2665
+ adjustedTips: {
2666
+ titleKey: "common.report-col.adjusted-tips",
2667
+ shortTitleKey: "common.report-col.adjusted-tips.short",
2668
+ infoTextKey: "common.report-col.adjusted-tips.info"
2669
+ },
2670
+ advantageProgram: {
2671
+ titleKey: "common.report-col.advantage-program",
2672
+ shortTitleKey: "common.report-col.advantage-program.short",
2673
+ infoTextKey: "common.report-col.advantage-program.info"
2674
+ },
2675
+ amex: {
2676
+ titleKey: "common.report-col.amex",
2677
+ shortTitleKey: "common.report-col.amex.short",
2678
+ infoTextKey: "common.report-col.amex.info"
2679
+ },
2680
+ amexReturns: {
2681
+ titleKey: "common.report-col.amex-returns",
2682
+ shortTitleKey: "common.report-col.amex-returns.short",
2683
+ infoTextKey: "common.report-col.amex-returns.info"
2684
+ },
2685
+ attachRate: {
2686
+ titleKey: "common.report-col.attach-rate",
2687
+ shortTitleKey: "common.report-col.attach-rate.short",
2688
+ infoTextKey: "common.report-col.attach-rate.info"
2689
+ },
2690
+ autoGratuity: {
2691
+ titleKey: "common.report-col.auto-gratuity",
2692
+ shortTitleKey: "common.report-col.auto-gratuity.short",
2693
+ infoTextKey: "common.report-col.auto-gratuity.info"
2694
+ },
2695
+ averageGrossPrice: {
2696
+ titleKey: "common.report-col.average-gross-price",
2697
+ shortTitleKey: "common.report-col.average-gross-price.short",
2698
+ infoTextKey: "common.report-col.average-gross-price.info"
2699
+ },
2700
+ bankFees: {
2701
+ titleKey: "common.report-col.bank-fees",
2702
+ shortTitleKey: "common.report-col.bank-fees.short",
2703
+ infoTextKey: "common.report-col.bank-fees.info"
2704
+ },
2705
+ batchAmount: {
2706
+ titleKey: "common.report-col.batch-amount",
2707
+ shortTitleKey: "common.report-col.batch-amount.short",
2708
+ infoTextKey: "common.report-col.batch-amount.info"
2709
+ },
2710
+ batchDate: {
2711
+ titleKey: "common.report-col.batch-date",
2712
+ shortTitleKey: "common.report-col.batch-date.short",
2713
+ infoTextKey: "common.report-col.batch-date.info"
2714
+ },
2715
+ batchNumber: {
2716
+ titleKey: "common.report-col.batch-number",
2717
+ shortTitleKey: "common.report-col.batch-number.short",
2718
+ infoTextKey: "common.report-col.batch-number.info"
2719
+ },
2720
+ cashCollected: {
2721
+ titleKey: "common.report-col.cash-collected",
2722
+ shortTitleKey: "common.report-col.cash-collected.short",
2723
+ infoTextKey: "common.report-col.cash-collected.info"
2724
+ },
2725
+ clockInTime: {
2726
+ titleKey: "common.report-col.clock-in-time",
2727
+ shortTitleKey: "common.report-col.clock-in-time.short",
2728
+ infoTextKey: "common.report-col.clock-in-time.info"
2729
+ },
2730
+ clockOutTime: {
2731
+ titleKey: "common.report-col.clock-out-time",
2732
+ shortTitleKey: "common.report-col.clock-out-time.short",
2733
+ infoTextKey: "common.report-col.clock-out-time.info"
2734
+ },
2735
+ country: {
2736
+ titleKey: "common.report-col.country",
2737
+ shortTitleKey: "common.report-col.country.short",
2738
+ infoTextKey: "common.report-col.country.info"
2739
+ },
2740
+ customerName: {
2741
+ titleKey: "common.report-col.customer-name",
2742
+ shortTitleKey: "common.report-col.customer-name.short",
2743
+ infoTextKey: "common.report-col.customer-name.info"
2744
+ },
2745
+ date: {
2746
+ titleKey: "common.report-col.date",
2747
+ shortTitleKey: "common.report-col.date.short",
2748
+ infoTextKey: "common.report-col.date.info"
2749
+ },
2750
+ dateClose: {
2751
+ titleKey: "common.report-col.date-close",
2752
+ shortTitleKey: "common.report-col.date-close.short",
2753
+ infoTextKey: "common.report-col.date-close.info"
2754
+ },
2755
+ daypart: {
2756
+ titleKey: "common.report-col.daypart",
2757
+ shortTitleKey: "common.report-col.daypart.short",
2758
+ infoTextKey: "common.report-col.daypart.info"
2759
+ },
2760
+ debit: {
2761
+ titleKey: "common.report-col.debit",
2762
+ shortTitleKey: "common.report-col.debit.short",
2763
+ infoTextKey: "common.report-col.debit.info"
2764
+ },
2765
+ debitReturns: {
2766
+ titleKey: "common.report-col.debit-returns",
2767
+ shortTitleKey: "common.report-col.debit-returns.short",
2768
+ infoTextKey: "common.report-col.debit-returns.info"
2769
+ },
2770
+ declaredTips: {
2771
+ titleKey: "common.report-col.declared-tips",
2772
+ shortTitleKey: "common.report-col.declared-tips.short",
2773
+ infoTextKey: "common.report-col.declared-tips.info"
2774
+ },
2775
+ department: {
2776
+ titleKey: "common.report-col.department",
2777
+ shortTitleKey: "common.report-col.department.short",
2778
+ infoTextKey: "common.report-col.department.info"
2779
+ },
2780
+ depositCurrency: {
2781
+ titleKey: "common.report-col.deposit-currency",
2782
+ shortTitleKey: "common.report-col.deposit-currency.short",
2783
+ infoTextKey: "common.report-col.deposit-currency.info"
2784
+ },
2785
+ depositDate: {
2786
+ titleKey: "common.report-col.deposit-date",
2787
+ shortTitleKey: "common.report-col.deposit-date.short",
2788
+ infoTextKey: "common.report-col.deposit-date.info"
2789
+ },
2790
+ discountAmount: {
2791
+ titleKey: "common.report-col.discount-amount",
2792
+ shortTitleKey: "common.report-col.discount-amount.short",
2793
+ infoTextKey: "common.report-col.discount-amount.info"
2794
+ },
2795
+ discountCount: {
2796
+ titleKey: "common.report-col.discount-count",
2797
+ shortTitleKey: "common.report-col.discount-count.short",
2798
+ infoTextKey: "common.report-col.discount-count.info"
2799
+ },
2800
+ ticketCount: {
2801
+ titleKey: "common.report-col.ticket-count",
2802
+ shortTitleKey: "common.report-col.ticket-count.short",
2803
+ infoTextKey: "common.report-col.ticket-count.info"
2804
+ },
2805
+ itemCount: {
2806
+ titleKey: "common.report-col.item-count",
2807
+ shortTitleKey: "common.report-col.item-count.short",
2808
+ infoTextKey: "common.report-col.item-count.info"
2809
+ },
2810
+ discover: {
2811
+ titleKey: "common.report-col.discover",
2812
+ shortTitleKey: "common.report-col.discover.short",
2813
+ infoTextKey: "common.report-col.discover.info"
2814
+ },
2815
+ discoverReturns: {
2816
+ titleKey: "common.report-col.discover-returns",
2817
+ shortTitleKey: "common.report-col.discover-returns.short",
2818
+ infoTextKey: "common.report-col.discover-returns.info"
2819
+ },
2820
+ ebt: {
2821
+ titleKey: "common.report-col.ebt",
2822
+ shortTitleKey: "common.report-col.ebt.short",
2823
+ infoTextKey: "common.report-col.ebt.info"
2824
+ },
2825
+ ebtReturns: {
2826
+ titleKey: "common.report-col.ebt-returns",
2827
+ shortTitleKey: "common.report-col.ebt-returns.short",
2828
+ infoTextKey: "common.report-col.ebt-returns.info"
2829
+ },
2830
+ employeeId: {
2831
+ titleKey: "common.report-col.employee-id",
2832
+ shortTitleKey: "common.report-col.employee-id.short",
2833
+ infoTextKey: "common.report-col.employee-id.info"
2834
+ },
2835
+ employeeJob: {
2836
+ titleKey: "common.report-col.employee-job",
2837
+ shortTitleKey: "common.report-col.employee-job.short",
2838
+ infoTextKey: "common.report-col.employee-job.info"
2839
+ },
2840
+ employeeName: {
2841
+ titleKey: "common.report-col.employee-name",
2842
+ shortTitleKey: "common.report-col.employee-name.short",
2843
+ infoTextKey: "common.report-col.employee-name.info"
2844
+ },
2845
+ exemptTaxes: {
2846
+ titleKey: "common.report-col.exempt-taxes",
2847
+ shortTitleKey: "common.report-col.exempt-taxes.short",
2848
+ infoTextKey: "common.report-col.exempt-taxes.info"
2849
+ },
2850
+ exemptSales: {
2851
+ titleKey: "common.report-col.exempt-sales",
2852
+ shortTitleKey: "common.report-col.exempt-sales.short",
2853
+ infoTextKey: "common.report-col.exempt-sales.info"
2854
+ },
2855
+ grandTotal: {
2856
+ titleKey: "common.report-col.grand-total",
2857
+ shortTitleKey: "common.report-col.grand-total.short",
2858
+ infoTextKey: "common.report-col.grand-total.info"
2859
+ },
2860
+ grossCashSales: {
2861
+ titleKey: "common.report-col.gross-cash-sales",
2862
+ shortTitleKey: "common.report-col.gross-cash-sales.short",
2863
+ infoTextKey: "common.report-col.gross-cash-sales.info"
2864
+ },
2865
+ grossCashTips: {
2866
+ titleKey: "common.report-col.gross-cash-tips",
2867
+ shortTitleKey: "common.report-col.gross-cash-tips.short",
2868
+ infoTextKey: "common.report-col.gross-cash-tips.info"
2869
+ },
2870
+ grossCreditCardTips: {
2871
+ titleKey: "common.report-col.gross-credit-card-tips",
2872
+ shortTitleKey: "common.report-col.gross-credit-card-tips.short",
2873
+ infoTextKey: "common.report-col.gross-credit-card-tips.info"
2874
+ },
2875
+ grossCreditSales: {
2876
+ titleKey: "common.report-col.gross-credit-sales",
2877
+ shortTitleKey: "common.report-col.gross-credit-sales.short",
2878
+ infoTextKey: "common.report-col.gross-credit-sales.info"
2879
+ },
2880
+ grossSales: {
2881
+ titleKey: "common.report-col.gross-sales",
2882
+ shortTitleKey: "common.report-col.gross-sales.short",
2883
+ infoTextKey: "common.report-col.gross-sales.info"
2884
+ },
2885
+ grossTips: {
2886
+ titleKey: "common.report-col.gross-tips",
2887
+ shortTitleKey: "common.report-col.gross-tips.short",
2888
+ infoTextKey: "common.report-col.gross-tips.info"
2889
+ },
2890
+ guestCount: {
2891
+ titleKey: "common.report-col.guest-count",
2892
+ shortTitleKey: "common.report-col.guest-count.short",
2893
+ infoTextKey: "common.report-col.guest-count.info"
2894
+ },
2895
+ guestsVarLw: {
2896
+ titleKey: "common.report-col.guests-var-lw",
2897
+ shortTitleKey: "common.report-col.guests-var-lw.short",
2898
+ infoTextKey: "common.report-col.guests-var-lw.info"
2899
+ },
2900
+ guestsVarLwPct: {
2901
+ titleKey: "common.report-col.guests-var-lw-pct",
2902
+ shortTitleKey: "common.report-col.guests-var-lw-pct.short",
2903
+ infoTextKey: "common.report-col.guests-var-lw-pct.info"
2904
+ },
2905
+ guestsVarLy: {
2906
+ titleKey: "common.report-col.guests-var-ly",
2907
+ shortTitleKey: "common.report-col.guests-var-ly.short",
2908
+ infoTextKey: "common.report-col.guests-var-ly.info"
2909
+ },
2910
+ guestsVarLyPct: {
2911
+ titleKey: "common.report-col.guests-var-ly-pct",
2912
+ shortTitleKey: "common.report-col.guests-var-ly-pct.short",
2913
+ infoTextKey: "common.report-col.guests-var-ly-pct.info"
2914
+ },
2915
+ hour: {
2916
+ titleKey: "common.report-col.hour",
2917
+ shortTitleKey: "common.report-col.hour.short",
2918
+ infoTextKey: "common.report-col.hour.info"
2919
+ },
2920
+ hoursWorked: {
2921
+ titleKey: "common.report-col.hours-worked",
2922
+ shortTitleKey: "common.report-col.hours-worked.short",
2923
+ infoTextKey: "common.report-col.hours-worked.info"
2924
+ },
2925
+ inclusiveTax: {
2926
+ titleKey: "common.report-col.inclusive-tax",
2927
+ shortTitleKey: "common.report-col.inclusive-tax.short",
2928
+ infoTextKey: "common.report-col.inclusive-tax.info"
2929
+ },
2930
+ itemName: {
2931
+ titleKey: "common.report-col.item-name",
2932
+ shortTitleKey: "common.report-col.item-name.short",
2933
+ infoTextKey: "common.report-col.item-name.info"
2934
+ },
2935
+ itemPrice: {
2936
+ titleKey: "common.report-col.item-price",
2937
+ shortTitleKey: "common.report-col.item-price.short",
2938
+ infoTextKey: "common.report-col.item-price.info"
2939
+ },
2940
+ itemQuantity: {
2941
+ titleKey: "common.report-col.item-quantity",
2942
+ shortTitleKey: "common.report-col.item-quantity.short",
2943
+ infoTextKey: "common.report-col.item-quantity.info"
2944
+ },
2945
+ locationCity: {
2946
+ titleKey: "common.report-col.location-city",
2947
+ shortTitleKey: "common.report-col.location-city.short",
2948
+ infoTextKey: "common.report-col.location-city.info"
2949
+ },
2950
+ locationId: {
2951
+ titleKey: "common.report-col.location-id",
2952
+ shortTitleKey: "common.report-col.location-id.short",
2953
+ infoTextKey: "common.report-col.location-id.info"
2954
+ },
2955
+ locationMid: {
2956
+ titleKey: "common.report-col.location-mid",
2957
+ shortTitleKey: "common.report-col.location-mid.short",
2958
+ infoTextKey: "common.report-col.location-mid.info"
2959
+ },
2960
+ locationName: {
2961
+ titleKey: "common.report-col.location-name",
2962
+ shortTitleKey: "common.report-col.location-name.short",
2963
+ infoTextKey: "common.report-col.location-name.info"
2964
+ },
2965
+ locationState: {
2966
+ titleKey: "common.report-col.location-state",
2967
+ shortTitleKey: "common.report-col.location-state.short",
2968
+ infoTextKey: "common.report-col.location-state.info"
2969
+ },
2970
+ mastercard: {
2971
+ titleKey: "common.report-col.mastercard",
2972
+ shortTitleKey: "common.report-col.mastercard.short",
2973
+ infoTextKey: "common.report-col.mastercard.info"
2974
+ },
2975
+ mcReturns: {
2976
+ titleKey: "common.report-col.mc-returns",
2977
+ shortTitleKey: "common.report-col.mc-returns.short",
2978
+ infoTextKey: "common.report-col.mc-returns.info"
2979
+ },
2980
+ modifierName: {
2981
+ titleKey: "common.report-col.modifier-name",
2982
+ shortTitleKey: "common.report-col.modifier-name.short",
2983
+ infoTextKey: "common.report-col.modifier-name.info"
2984
+ },
2985
+ modifierPrice: {
2986
+ titleKey: "common.report-col.modifier-price",
2987
+ shortTitleKey: "common.report-col.modifier-price.short",
2988
+ infoTextKey: "common.report-col.modifier-price.info"
2989
+ },
2990
+ modifierQuantity: {
2991
+ titleKey: "common.report-col.modifier-quantity",
2992
+ shortTitleKey: "common.report-col.modifier-quantity.short",
2993
+ infoTextKey: "common.report-col.modifier-quantity.info"
2994
+ },
2995
+ netSales: {
2996
+ titleKey: "common.report-col.net-sales",
2997
+ shortTitleKey: "common.report-col.net-sales.short",
2998
+ infoTextKey: "common.report-col.net-sales.info"
2999
+ },
3000
+ netTaxCollected: {
3001
+ titleKey: "common.report-col.net-tax-collected",
3002
+ shortTitleKey: "common.report-col.net-tax-collected.short",
3003
+ infoTextKey: "common.report-col.net-tax-collected.info"
3004
+ },
3005
+ netTips: {
3006
+ titleKey: "common.report-col.net-tips",
3007
+ shortTitleKey: "common.report-col.net-tips.short",
3008
+ infoTextKey: "common.report-col.net-tips.info"
3009
+ },
3010
+ numberOfGuests: {
3011
+ titleKey: "common.report-col.number-of-guests",
3012
+ shortTitleKey: "common.report-col.number-of-guests.short",
3013
+ infoTextKey: "common.report-col.number-of-guests.info"
3014
+ },
3015
+ orderType: {
3016
+ titleKey: "common.report-col.order-type",
3017
+ shortTitleKey: "common.report-col.order-type.short",
3018
+ infoTextKey: "common.report-col.order-type.info"
3019
+ },
3020
+ paymentType: {
3021
+ titleKey: "common.report-col.payment-type",
3022
+ shortTitleKey: "common.report-col.payment-type.short",
3023
+ infoTextKey: "common.report-col.payment-type.info"
3024
+ },
3025
+ payrollId: {
3026
+ titleKey: "common.report-col.payroll-id",
3027
+ shortTitleKey: "common.report-col.payroll-id.short",
3028
+ infoTextKey: "common.report-col.payroll-id.info"
3029
+ },
3030
+ quantity: {
3031
+ titleKey: "common.report-col.quantity",
3032
+ shortTitleKey: "common.report-col.quantity.short",
3033
+ infoTextKey: "common.report-col.quantity.info"
3034
+ },
3035
+ referenceNumber: {
3036
+ titleKey: "common.report-col.reference-number",
3037
+ shortTitleKey: "common.report-col.reference-number.short",
3038
+ infoTextKey: "common.report-col.reference-number.info"
3039
+ },
3040
+ refundAmount: {
3041
+ titleKey: "common.report-col.refund-amount",
3042
+ shortTitleKey: "common.report-col.refund-amount.short",
3043
+ infoTextKey: "common.report-col.refund-amount.info"
3044
+ },
3045
+ refundedTaxAmount: {
3046
+ titleKey: "common.report-col.refunded-tax-amount",
3047
+ shortTitleKey: "common.report-col.refunded-tax-amount.short",
3048
+ infoTextKey: "common.report-col.refunded-tax-amount.info"
3049
+ },
3050
+ revenueCenter: {
3051
+ titleKey: "common.report-col.revenue-center",
3052
+ shortTitleKey: "common.report-col.revenue-center.short",
3053
+ infoTextKey: "common.report-col.revenue-center.info"
3054
+ },
3055
+ revenueClass: {
3056
+ titleKey: "common.report-col.revenue-class",
3057
+ shortTitleKey: "common.report-col.revenue-class.short",
3058
+ infoTextKey: "common.report-col.revenue-class.info"
3059
+ },
3060
+ salesVarLw: {
3061
+ titleKey: "common.report-col.sales-var-lw",
3062
+ shortTitleKey: "common.report-col.sales-var-lw.short",
3063
+ infoTextKey: "common.report-col.sales-var-lw.info"
3064
+ },
3065
+ salesVarLwPct: {
3066
+ titleKey: "common.report-col.sales-var-lw-pct",
3067
+ shortTitleKey: "common.report-col.sales-var-lw-pct.short",
3068
+ infoTextKey: "common.report-col.sales-var-lw-pct.info"
3069
+ },
3070
+ salesVarLy: {
3071
+ titleKey: "common.report-col.sales-var-ly",
3072
+ shortTitleKey: "common.report-col.sales-var-ly.short",
3073
+ infoTextKey: "common.report-col.sales-var-ly.info"
3074
+ },
3075
+ salesVarLyPct: {
3076
+ titleKey: "common.report-col.sales-var-ly-pct",
3077
+ shortTitleKey: "common.report-col.sales-var-ly-pct.short",
3078
+ infoTextKey: "common.report-col.sales-var-ly-pct.info"
3079
+ },
3080
+ salesMixByPct: {
3081
+ titleKey: "common.report-col.sales-mix-by-pct",
3082
+ shortTitleKey: "common.report-col.sales-mix-by-pct.short",
3083
+ infoTextKey: "common.report-col.sales-mix-by-pct.info"
3084
+ },
3085
+ salesPerGuest: {
3086
+ titleKey: "common.report-col.sales-per-guest",
3087
+ shortTitleKey: "common.report-col.sales-per-guest.short",
3088
+ infoTextKey: "common.report-col.sales-per-guest.info"
3089
+ },
3090
+ salesPerGuestLw: {
3091
+ titleKey: "common.report-col.sales-per-guest-lw",
3092
+ shortTitleKey: "common.report-col.sales-per-guest-lw.short",
3093
+ infoTextKey: "common.report-col.sales-per-guest-lw.info"
3094
+ },
3095
+ salesPerGuestLy: {
3096
+ titleKey: "common.report-col.sales-per-guest-ly",
3097
+ shortTitleKey: "common.report-col.sales-per-guest-ly.short",
3098
+ infoTextKey: "common.report-col.sales-per-guest-ly.info"
3099
+ },
3100
+ scheduledShiftEnd: {
3101
+ titleKey: "common.report-col.scheduled-shift-end",
3102
+ shortTitleKey: "common.report-col.scheduled-shift-end.short",
3103
+ infoTextKey: "common.report-col.scheduled-shift-end.info"
3104
+ },
3105
+ scheduledShiftStart: {
3106
+ titleKey: "common.report-col.scheduled-shift-start",
3107
+ shortTitleKey: "common.report-col.scheduled-shift-start.short",
3108
+ infoTextKey: "common.report-col.scheduled-shift-start.info"
3109
+ },
3110
+ settlementBatchDate: {
3111
+ titleKey: "common.report-col.settlement-batch-date",
3112
+ shortTitleKey: "common.report-col.settlement-batch-date.short",
3113
+ infoTextKey: "common.report-col.settlement-batch-date.info"
3114
+ },
3115
+ shiftDurationHrs: {
3116
+ titleKey: "common.report-col.shift-duration-hrs",
3117
+ shortTitleKey: "common.report-col.shift-duration-hrs.short",
3118
+ infoTextKey: "common.report-col.shift-duration-hrs.info"
3119
+ },
3120
+ salePaymentType: {
3121
+ titleKey: "common.report-col.sale-payment-type",
3122
+ shortTitleKey: "common.report-col.sale-payment-type.short",
3123
+ infoTextKey: "common.report-col.sale-payment-type.info"
3124
+ },
3125
+ status: {
3126
+ titleKey: "common.report-col.status",
3127
+ shortTitleKey: "common.report-col.status.short",
3128
+ infoTextKey: "common.report-col.status.info"
3129
+ },
3130
+ lastModified: {
3131
+ titleKey: "common.report-col.last-modified",
3132
+ shortTitleKey: "common.report-col.last-modified.short",
3133
+ infoTextKey: "common.report-col.last-modified.info"
3134
+ },
3135
+ subtotal: {
3136
+ titleKey: "common.report-col.subtotal",
3137
+ shortTitleKey: "common.report-col.subtotal.short",
3138
+ infoTextKey: "common.report-col.subtotal.info"
3139
+ },
3140
+ taxCollected: {
3141
+ titleKey: "common.report-col.tax-collected",
3142
+ shortTitleKey: "common.report-col.tax-collected.short",
3143
+ infoTextKey: "common.report-col.tax-collected.info"
3144
+ },
3145
+ taxName: {
3146
+ titleKey: "common.report-col.tax-name",
3147
+ shortTitleKey: "common.report-col.tax-name.short",
3148
+ infoTextKey: "common.report-col.tax-name.info"
3149
+ },
3150
+ taxRate: {
3151
+ titleKey: "common.report-col.tax-rate",
3152
+ shortTitleKey: "common.report-col.tax-rate.short",
3153
+ infoTextKey: "common.report-col.tax-rate.info"
3154
+ },
3155
+ taxableSales: {
3156
+ titleKey: "common.report-col.taxable-sales",
3157
+ shortTitleKey: "common.report-col.taxable-sales.short",
3158
+ infoTextKey: "common.report-col.taxable-sales.info"
3159
+ },
3160
+ ticketClosed: {
3161
+ titleKey: "common.report-col.ticket-closed",
3162
+ shortTitleKey: "common.report-col.ticket-closed.short",
3163
+ infoTextKey: "common.report-col.ticket-closed.info"
3164
+ },
3165
+ ticketFee: {
3166
+ titleKey: "common.report-col.ticket-fee",
3167
+ shortTitleKey: "common.report-col.ticket-fee.short",
3168
+ infoTextKey: "common.report-col.ticket-fee.info"
3169
+ },
3170
+ ticketNumber: {
3171
+ titleKey: "common.report-col.ticket-number",
3172
+ shortTitleKey: "common.report-col.ticket-number.short",
3173
+ infoTextKey: "common.report-col.ticket-number.info"
3174
+ },
3175
+ ticketOpen: {
3176
+ titleKey: "common.report-col.ticket-open",
3177
+ shortTitleKey: "common.report-col.ticket-open.short",
3178
+ infoTextKey: "common.report-col.ticket-open.info"
3179
+ },
3180
+ ticketTotal: {
3181
+ titleKey: "common.report-col.ticket-total",
3182
+ shortTitleKey: "common.report-col.ticket-total.short",
3183
+ infoTextKey: "common.report-col.ticket-total.info"
3184
+ },
3185
+ timeOpenMins: {
3186
+ titleKey: "common.report-col.time-open-mins",
3187
+ shortTitleKey: "common.report-col.time-open-mins.short",
3188
+ infoTextKey: "common.report-col.time-open-mins.info"
3189
+ },
3190
+ tipPct: {
3191
+ titleKey: "common.report-col.tip-pct",
3192
+ shortTitleKey: "common.report-col.tip-pct.short",
3193
+ infoTextKey: "common.report-col.tip-pct.info"
3194
+ },
3195
+ tipReduction: {
3196
+ titleKey: "common.report-col.tip-reduction",
3197
+ shortTitleKey: "common.report-col.tip-reduction.short",
3198
+ infoTextKey: "common.report-col.tip-reduction.info"
3199
+ },
3200
+ tipShare: {
3201
+ titleKey: "common.report-col.tip-share",
3202
+ shortTitleKey: "common.report-col.tip-share.short",
3203
+ infoTextKey: "common.report-col.tip-share.info"
3204
+ },
3205
+ tipShareContributed: {
3206
+ titleKey: "common.report-col.tip-share-contributed",
3207
+ shortTitleKey: "common.report-col.tip-share-contributed.short",
3208
+ infoTextKey: "common.report-col.tip-share-contributed.info"
3209
+ },
3210
+ tips: {
3211
+ titleKey: "common.report-col.tips",
3212
+ shortTitleKey: "common.report-col.tips.short",
3213
+ infoTextKey: "common.report-col.tips.info"
3214
+ },
3215
+ tipsPerHour: {
3216
+ titleKey: "common.report-col.tips-per-hour",
3217
+ shortTitleKey: "common.report-col.tips-per-hour.short",
3218
+ infoTextKey: "common.report-col.tips-per-hour.info"
3219
+ },
3220
+ totalCollected: {
3221
+ titleKey: "common.report-col.total-collected",
3222
+ shortTitleKey: "common.report-col.total-collected.short",
3223
+ infoTextKey: "common.report-col.total-collected.info"
3224
+ },
3225
+ totalItemSales: {
3226
+ titleKey: "common.report-col.total-item-sales",
3227
+ shortTitleKey: "common.report-col.total-item-sales.short",
3228
+ infoTextKey: "common.report-col.total-item-sales.info"
3229
+ },
3230
+ totalModifierSales: {
3231
+ titleKey: "common.report-col.total-modifier-sales",
3232
+ shortTitleKey: "common.report-col.total-modifier-sales.short",
3233
+ infoTextKey: "common.report-col.total-modifier-sales.info"
3234
+ },
3235
+ totalModifierSalesComp: {
3236
+ titleKey: "common.report-col.total-modifier-sales-comp",
3237
+ shortTitleKey: "common.report-col.total-modifier-sales-comp.short",
3238
+ infoTextKey: "common.report-col.total-modifier-sales-comp.info"
3239
+ },
3240
+ totalModifierSalesVar: {
3241
+ titleKey: "common.report-col.total-modifier-sales-var",
3242
+ shortTitleKey: "common.report-col.total-modifier-sales-var.short",
3243
+ infoTextKey: "common.report-col.total-modifier-sales-var.info"
3244
+ },
3245
+ totalModifierSalesVarPct: {
3246
+ titleKey: "common.report-col.total-modifier-sales-var-pct",
3247
+ shortTitleKey: "common.report-col.total-modifier-sales-var-pct.short",
3248
+ infoTextKey: "common.report-col.total-modifier-sales-var-pct.info"
3249
+ },
3250
+ modifierQuantityComp: {
3251
+ titleKey: "common.report-col.modifier-quantity-comp",
3252
+ shortTitleKey: "common.report-col.modifier-quantity-comp.short",
3253
+ infoTextKey: "common.report-col.modifier-quantity-comp.info"
3254
+ },
3255
+ modifierQuantityVar: {
3256
+ titleKey: "common.report-col.modifier-quantity-var",
3257
+ shortTitleKey: "common.report-col.modifier-quantity-var.short",
3258
+ infoTextKey: "common.report-col.modifier-quantity-var.info"
3259
+ },
3260
+ modifierQuantityVarPct: {
3261
+ titleKey: "common.report-col.modifier-quantity-var-pct",
3262
+ shortTitleKey: "common.report-col.modifier-quantity-var-pct.short",
3263
+ infoTextKey: "common.report-col.modifier-quantity-var-pct.info"
3264
+ },
3265
+ itemQuantityComp: {
3266
+ titleKey: "common.report-col.item-quantity-comp",
3267
+ shortTitleKey: "common.report-col.item-quantity-comp.short",
3268
+ infoTextKey: "common.report-col.item-quantity-comp.info"
3269
+ },
3270
+ attachRateComp: {
3271
+ titleKey: "common.report-col.attach-rate-comp",
3272
+ shortTitleKey: "common.report-col.attach-rate-comp.short",
3273
+ infoTextKey: "common.report-col.attach-rate-comp.info"
3274
+ },
3275
+ attachRateVar: {
3276
+ titleKey: "common.report-col.attach-rate-var",
3277
+ shortTitleKey: "common.report-col.attach-rate-var.short",
3278
+ infoTextKey: "common.report-col.attach-rate-var.info"
3279
+ },
3280
+ attachRateVarPct: {
3281
+ titleKey: "common.report-col.attach-rate-var-pct",
3282
+ shortTitleKey: "common.report-col.attach-rate-var-pct.short",
3283
+ infoTextKey: "common.report-col.attach-rate-var-pct.info"
3284
+ },
3285
+ totalReturns: {
3286
+ titleKey: "common.report-col.total-returns",
3287
+ shortTitleKey: "common.report-col.total-returns.short",
3288
+ infoTextKey: "common.report-col.total-returns.info"
3289
+ },
3290
+ totalSales: {
3291
+ titleKey: "common.report-col.total-sales",
3292
+ shortTitleKey: "common.report-col.total-sales.short",
3293
+ infoTextKey: "common.report-col.total-sales.info"
3294
+ },
3295
+ totalTips: {
3296
+ titleKey: "common.report-col.total-tips",
3297
+ shortTitleKey: "common.report-col.total-tips.short",
3298
+ infoTextKey: "common.report-col.total-tips.info"
3299
+ },
3300
+ transactionDate: {
3301
+ titleKey: "common.report-col.transaction-date",
3302
+ shortTitleKey: "common.report-col.transaction-date.short",
3303
+ infoTextKey: "common.report-col.transaction-date.info"
3304
+ },
3305
+ transactionType: {
3306
+ titleKey: "common.report-col.transaction-type",
3307
+ shortTitleKey: "common.report-col.transaction-type.short",
3308
+ infoTextKey: "common.report-col.transaction-type.info"
3309
+ },
3310
+ untaxedSales: {
3311
+ titleKey: "common.report-col.untaxed-sales",
3312
+ shortTitleKey: "common.report-col.untaxed-sales.short",
3313
+ infoTextKey: "common.report-col.untaxed-sales.info"
3314
+ },
3315
+ visa: {
3316
+ titleKey: "common.report-col.visa",
3317
+ shortTitleKey: "common.report-col.visa.short",
3318
+ infoTextKey: "common.report-col.visa.info"
3319
+ },
3320
+ visaReturns: {
3321
+ titleKey: "common.report-col.visa-returns",
3322
+ shortTitleKey: "common.report-col.visa-returns.short",
3323
+ infoTextKey: "common.report-col.visa-returns.info"
3324
+ },
3325
+ paymentsCount: {
3326
+ titleKey: "common.report-col.payments-count",
3327
+ shortTitleKey: "common.report-col.payments-count.short",
3328
+ infoTextKey: "common.report-col.payments-count.info"
3329
+ },
3330
+ paymentsAmount: {
3331
+ titleKey: "common.report-col.payments-amount",
3332
+ shortTitleKey: "common.report-col.payments-amount.short",
3333
+ infoTextKey: "common.report-col.payments-amount.info"
3334
+ },
3335
+ paymentsTotal: {
3336
+ titleKey: "common.report-col.payments-total",
3337
+ shortTitleKey: "common.report-col.payments-total.short",
3338
+ infoTextKey: "common.report-col.payments-total.info"
3339
+ },
3340
+ refundVoidDescription: {
3341
+ titleKey: "common.report-col.refund-void-description",
3342
+ shortTitleKey: "common.report-col.refund-void-description.short",
3343
+ infoTextKey: "common.report-col.refund-void-description.info"
3344
+ },
3345
+ refundVoidCount: {
3346
+ titleKey: "common.report-col.refund-void-count",
3347
+ shortTitleKey: "common.report-col.refund-void-count.short",
3348
+ infoTextKey: "common.report-col.refund-void-count.info"
3349
+ },
3350
+ refundVoidAmount: {
3351
+ titleKey: "common.report-col.refund-void-amount",
3352
+ shortTitleKey: "common.report-col.refund-void-amount.short",
3353
+ infoTextKey: "common.report-col.refund-void-amount.info"
3354
+ },
3355
+ refundVoidPctSales: {
3356
+ titleKey: "common.report-col.refund-void-pct-sales",
3357
+ shortTitleKey: "common.report-col.refund-void-pct-sales.short",
3358
+ infoTextKey: "common.report-col.refund-void-pct-sales.info"
3359
+ },
3360
+ discountName: {
3361
+ titleKey: "common.report-col.discount-name",
3362
+ shortTitleKey: "common.report-col.discount-name.short",
3363
+ infoTextKey: "common.report-col.discount-name.info"
3364
+ },
3365
+ tickets: {
3366
+ titleKey: "common.report-col.tickets",
3367
+ shortTitleKey: "common.report-col.tickets.short",
3368
+ infoTextKey: "common.report-col.tickets.info"
3369
+ },
3370
+ guests: {
3371
+ titleKey: "common.report-col.guests",
3372
+ shortTitleKey: "common.report-col.guests.short",
3373
+ infoTextKey: "common.report-col.guests.info"
3374
+ },
3375
+ ticketAverage: {
3376
+ titleKey: "common.report-col.ticket-average",
3377
+ shortTitleKey: "common.report-col.ticket-average.short",
3378
+ infoTextKey: "common.report-col.ticket-average.info"
3379
+ },
3380
+ guestAverage: {
3381
+ titleKey: "common.report-col.guest-average",
3382
+ shortTitleKey: "common.report-col.guest-average.short",
3383
+ infoTextKey: "common.report-col.guest-average.info"
3384
+ },
3385
+ net: {
3386
+ titleKey: "common.report-col.net",
3387
+ shortTitleKey: "common.report-col.net.short",
3388
+ infoTextKey: "common.report-col.net.info"
3389
+ },
3390
+ type: {
3391
+ titleKey: "common.report-col.type",
3392
+ shortTitleKey: "common.report-col.type.short",
3393
+ infoTextKey: "common.report-col.type.info"
3394
+ }
3395
+ };
3396
+ function getColumnMetadata(key) {
3397
+ return COLUMN_REGISTRY[key];
3398
+ }
3399
+ function getColumnExportHeaderLabel(colTitle, groupTitle) {
3400
+ if (groupTitle) {
3401
+ return `${groupTitle}: ${colTitle}`;
3402
+ }
3403
+ return colTitle;
3404
+ }
3405
+
3406
+ // src/utils/alignment.ts
3407
+ function getColumnAlignment(type) {
3408
+ if (type === "string" || type === "date" || type === "time") {
3409
+ return "left";
3410
+ }
3411
+ return "right";
3412
+ }
3413
+ function isNumericType(type) {
3414
+ return type === "money" || type === "money-empty" || type === "number" || type === "number-empty" || type === "percent" || type === "fixedNumber";
3415
+ }
3416
+
3417
+ // src/totals.ts
3418
+ var sumField = (rows, field) => rows.reduce((acc, row) => acc + (row[field] ?? 0), 0);
3419
+ var getFooterValue = (rows, field, config) => {
3420
+ const { type } = config;
3421
+ if (!type || type === "date" || type === "time" || type === "boolean" || type === "conditional" || type === "custom") {
3422
+ return null;
3423
+ }
3424
+ const calc = config.footerCalculation;
3425
+ if (type === "string") {
3426
+ if (calc?.type === "label") {
3427
+ return calc.label;
3428
+ }
3429
+ return null;
3430
+ }
3431
+ if (calc?.type === "none") {
3432
+ return null;
3433
+ }
3434
+ if (calc?.type === "count") {
3435
+ return rows.length;
3436
+ }
3437
+ if (!calc || calc.type === "sum") {
3438
+ return config.columnKey || calc?.type === "sum" ? sumField(rows, field) : 0;
3439
+ }
3440
+ const { numeratorField, denominatorField } = calc;
3441
+ if (!numeratorField || !denominatorField) {
3442
+ return 0;
3443
+ }
3444
+ const num = sumField(rows, numeratorField);
3445
+ const den = sumField(rows, denominatorField);
3446
+ if (calc.type === "percentChange") {
3447
+ return den ? (num - den) / den : 0;
3448
+ }
3449
+ if (calc.type === "variancePercent") {
3450
+ const prior = den - num;
3451
+ return prior ? num / prior : 0;
3452
+ }
3453
+ if (calc.type === "average") {
3454
+ return den > 0 ? num / den : 0;
3455
+ }
3456
+ if (calc.type === "quotientOfDifferences") {
3457
+ const { numeratorAdjustField, denominatorAdjustField } = calc;
3458
+ const numAdj = numeratorAdjustField ? sumField(rows, numeratorAdjustField) : 0;
3459
+ const denAdj = denominatorAdjustField ? sumField(rows, denominatorAdjustField) : 0;
3460
+ const effectiveDen = den - denAdj;
3461
+ return effectiveDen !== 0 ? (num - numAdj) / effectiveDen : 0;
3462
+ }
3463
+ return 0;
3464
+ };
3465
+ var calculateReportTotals = (data, fieldConfig) => {
3466
+ const result = {};
3467
+ for (const [field, config] of Object.entries(fieldConfig)) {
3468
+ const total = getFooterValue(data, field, config);
3469
+ result[field] = total ?? "";
3470
+ }
3471
+ return result;
3608
3472
  };
3609
- var en_US_default = enUS3;
3610
3473
 
3611
- // src/translations/index.ts
3612
- var filterCrowdin = (messages) => Object.fromEntries(
3613
- Object.entries(messages).filter((entry) => typeof entry[1] === "string")
3614
- );
3615
- var LOCALE_OVERRIDES = {
3616
- "en-GB": filterCrowdin(en_GB_default),
3617
- "es-ES": filterCrowdin(es_ES_default)
3474
+ // src/reports/reportSection.ts
3475
+ var DAILY_SALES_CASH_ROW_LABELS = {
3476
+ cashPayments: "common.report-section.cash-row.cash-payments",
3477
+ paidInOuts: "common.report-section.cash-row.paid-in-outs",
3478
+ gratuitiesPaidOut: "common.report-section.cash-row.gratuities-paid-out",
3479
+ ccTipsPaidOut: "common.report-section.cash-row.cc-tips-paid-out"
3618
3480
  };
3619
- function resolveTranslate(key, locale) {
3620
- const overrides = LOCALE_OVERRIDES[locale];
3621
- if (overrides) {
3622
- const override = overrides[key];
3623
- if (override !== void 0) {
3624
- return override;
3481
+ var DAILY_SALES_REV_CLASS_FOOTER_LABELS = {
3482
+ taxTotal: "common.report-section.rev-class-footer.tax-total",
3483
+ gratuities: "common.report-section.rev-class-footer.gratuities",
3484
+ balancePayments: "common.report-section.rev-class-footer.balance-payments",
3485
+ giftCardSales: "common.report-section.rev-class-footer.gift-card-sales",
3486
+ nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue",
3487
+ houseAccount: "common.report-section.rev-class-footer.house-account",
3488
+ totalAccountable: "common.report-section.rev-class-footer.total-accountable"
3489
+ };
3490
+ var DAILY_SALES_SECTIONS = [
3491
+ {
3492
+ sectionLabel: "common.report-section.revenue-class",
3493
+ config: dailySalesConfig,
3494
+ columns: [
3495
+ { fieldKey: "groupByName", columnKey: "revenueClass" },
3496
+ { fieldKey: "itemsQuantity", columnKey: "quantity" },
3497
+ { fieldKey: "salesAmountGross", columnKey: "grossSales" },
3498
+ { fieldKey: "discountsAmount", columnKey: "discountAmount" },
3499
+ { fieldKey: "inclusiveTaxesAmount", columnKey: "inclusiveTax" },
3500
+ { fieldKey: "salesAmountNet", columnKey: "netSales" },
3501
+ { fieldKey: "salesMixPct", columnKey: "salesMixByPct" }
3502
+ ]
3503
+ },
3504
+ {
3505
+ sectionLabel: "common.report-section.payments",
3506
+ config: dailySalesPaymentsConfig,
3507
+ columns: [
3508
+ { fieldKey: "paymentTypeName", columnKey: "paymentType" },
3509
+ { fieldKey: "paymentsCount", columnKey: "paymentsCount" },
3510
+ { fieldKey: "paymentsAmount", columnKey: "paymentsAmount" },
3511
+ { fieldKey: "tipsAmount", columnKey: "tips" },
3512
+ { fieldKey: "totalSales", columnKey: "paymentsTotal" }
3513
+ ]
3514
+ },
3515
+ {
3516
+ sectionLabel: "common.report-section.cash",
3517
+ config: dailySalesCacheConfig,
3518
+ columns: [
3519
+ { fieldKey: "name", columnKey: "type", isRowLabelKey: true },
3520
+ { fieldKey: "amount", columnKey: "paymentsAmount" }
3521
+ ]
3522
+ },
3523
+ {
3524
+ sectionLabel: "common.report-section.taxes",
3525
+ config: dailySalesTaxesConfig,
3526
+ columns: [
3527
+ { fieldKey: "taxName", columnKey: "taxName" },
3528
+ { fieldKey: "taxableSales", columnKey: "taxableSales" },
3529
+ { fieldKey: "taxesAmount", columnKey: "taxCollected" },
3530
+ { fieldKey: "exemptSales", columnKey: "exemptSales" }
3531
+ ]
3532
+ },
3533
+ {
3534
+ sectionLabel: "common.report-section.refunds-voids",
3535
+ config: dailySalesRefundsVoidsConfig,
3536
+ columns: [
3537
+ { fieldKey: "description", columnKey: "refundVoidDescription" },
3538
+ { fieldKey: "count", columnKey: "refundVoidCount" },
3539
+ { fieldKey: "amount", columnKey: "refundVoidAmount" },
3540
+ { fieldKey: "pctSales", columnKey: "refundVoidPctSales" }
3541
+ ]
3542
+ },
3543
+ {
3544
+ sectionLabel: "common.report-section.discounts",
3545
+ config: dailySalesDiscountsConfig,
3546
+ columns: [
3547
+ { fieldKey: "discountName", columnKey: "discountName" },
3548
+ { fieldKey: "ticketCount", columnKey: "ticketCount" },
3549
+ { fieldKey: "itemCount", columnKey: "itemCount" },
3550
+ { fieldKey: "discountsAmount", columnKey: "discountAmount" }
3551
+ ]
3552
+ },
3553
+ {
3554
+ sectionLabel: "common.report-section.sales-by-day-part",
3555
+ config: dailySalesTrendsDayPartConfig,
3556
+ columns: [
3557
+ { fieldKey: "groupByName", columnKey: "daypart" },
3558
+ { fieldKey: "ticketsCount", columnKey: "tickets" },
3559
+ { fieldKey: "guestsCount", columnKey: "guests" },
3560
+ { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
3561
+ { fieldKey: "guestAvg", columnKey: "guestAverage" },
3562
+ { fieldKey: "salesAmountNet", columnKey: "netSales" }
3563
+ ]
3564
+ },
3565
+ {
3566
+ sectionLabel: "common.report-section.sales-by-order-type",
3567
+ config: dailySalesTrendsOrderTypeConfig,
3568
+ columns: [
3569
+ { fieldKey: "groupByName", columnKey: "orderType" },
3570
+ { fieldKey: "ticketsCount", columnKey: "tickets" },
3571
+ { fieldKey: "guestsCount", columnKey: "guests" },
3572
+ { fieldKey: "ticketAvg", columnKey: "ticketAverage" },
3573
+ { fieldKey: "guestAvg", columnKey: "guestAverage" },
3574
+ { fieldKey: "salesAmountNet", columnKey: "netSales" }
3575
+ ]
3576
+ }
3577
+ ];
3578
+ var REPORT_SECTION_CONFIGS = {
3579
+ [Report.DAILY_SALES]: DAILY_SALES_SECTIONS,
3580
+ [Report.DAILY_SALES_LIVE]: DAILY_SALES_SECTIONS
3581
+ };
3582
+
3583
+ // src/constants.ts
3584
+ var TENDER_TYPE = {
3585
+ CASH: "Cash",
3586
+ CHECK: "Check",
3587
+ CREDIT: "Credit",
3588
+ CRYPTO: "Crypto",
3589
+ DEBIT: "Debit",
3590
+ GIFT_CARD: "Gift Card",
3591
+ GIFT_CERTIFICATE: "Gift Certificate",
3592
+ HOUSE_ACCOUNT: "House Account",
3593
+ VIRTUAL: "Virtual",
3594
+ MOBILE_WALLET: "Digital Wallet",
3595
+ PROPERTY_MANAGEMENT_SYSTEM: "PMS",
3596
+ ROOM_CHARGE: "Room Charge",
3597
+ WALK_OUT: "Walk Out",
3598
+ CASH_REFUNDS: "Cash Refunds",
3599
+ UNKNOWN: "Unknown"
3600
+ };
3601
+
3602
+ // src/reports/dailySales/dailySales.utils.ts
3603
+ var buildDailySalesCashPayments = (payments, paidOutAmount, gratuitiesPaidOutAmount, tipsPaidOutAmount) => [
3604
+ {
3605
+ name: DAILY_SALES_CASH_ROW_LABELS.cashPayments,
3606
+ amount: payments.filter((r) => r.paymentTypeName === TENDER_TYPE.CASH || r.paymentTypeName === TENDER_TYPE.CASH_REFUNDS).reduce((sum, r) => sum + r.paymentsAmount, 0)
3607
+ },
3608
+ { name: DAILY_SALES_CASH_ROW_LABELS.paidInOuts, amount: paidOutAmount },
3609
+ { name: DAILY_SALES_CASH_ROW_LABELS.gratuitiesPaidOut, amount: gratuitiesPaidOutAmount },
3610
+ { name: DAILY_SALES_CASH_ROW_LABELS.ccTipsPaidOut, amount: tipsPaidOutAmount }
3611
+ ];
3612
+ var buildDailySalesRevClassFooter = (inputs) => {
3613
+ const totalAccountable = inputs.revClassNetSales + inputs.taxTotal + inputs.gratuitiesTotal + inputs.balancePaymentsTotal + inputs.giftCardSalesTotal + inputs.nonSalesTotal - inputs.houseAccountTotal;
3614
+ return [
3615
+ { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.taxTotal, salesAmountNet: inputs.taxTotal },
3616
+ { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.gratuities, salesAmountNet: inputs.gratuitiesTotal },
3617
+ {
3618
+ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.balancePayments,
3619
+ salesAmountNet: inputs.balancePaymentsTotal
3620
+ },
3621
+ { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.giftCardSales, salesAmountNet: inputs.giftCardSalesTotal },
3622
+ { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.nonSalesRevenue, salesAmountNet: inputs.nonSalesTotal },
3623
+ { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.houseAccount, salesAmountNet: inputs.houseAccountTotal },
3624
+ { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
3625
+ ];
3626
+ };
3627
+ var buildPaymentsSectionData = (payments) => {
3628
+ const filtered = payments.filter((payment) => payment.paymentTypeName !== TENDER_TYPE.HOUSE_ACCOUNT);
3629
+ const seenParentCategories = /* @__PURE__ */ new Set();
3630
+ const result = [];
3631
+ for (const payment of filtered) {
3632
+ if (payment.parentCategory !== null && !seenParentCategories.has(payment.parentCategory)) {
3633
+ seenParentCategories.add(payment.parentCategory);
3634
+ const headerRow = {
3635
+ ...payment,
3636
+ paymentTypeName: payment.parentCategory,
3637
+ parentCategory: "",
3638
+ paymentsCount: null,
3639
+ paymentsAmount: null,
3640
+ tipsAmount: null,
3641
+ totalSales: null
3642
+ };
3643
+ result.push(headerRow);
3625
3644
  }
3645
+ const child = payment.parentCategory !== null ? { ...payment, paymentTypeName: ` ${payment.paymentTypeName}` } : payment;
3646
+ result.push(child);
3626
3647
  }
3627
- return en_US_default[key] ?? key;
3628
- }
3648
+ return result;
3649
+ };
3629
3650
 
3630
3651
  // src/formatting.ts
3631
3652
  var dateFormatterCache = /* @__PURE__ */ new Map();
@@ -3737,16 +3758,20 @@ var getReportFormattingLocaleOptions = (locations) => {
3737
3758
  );
3738
3759
  };
3739
3760
  var DEFAULT_FIELD_CONFIG = { type: "string" };
3740
- var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DEFAULT_FIELD_CONFIG) => {
3761
+ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DEFAULT_FIELD_CONFIG, timezone, translationLocale) => {
3741
3762
  const { currency, locale } = localeOptions;
3742
3763
  switch (type) {
3764
+ case "custom": {
3765
+ const customConfig = fieldConfig.customConfiguration;
3766
+ return customConfig.customFormat(value, fullRecord ?? null, translationLocale);
3767
+ }
3743
3768
  case "conditional": {
3744
3769
  if (!fullRecord) {
3745
3770
  return formatString(value, localeOptions);
3746
3771
  }
3747
3772
  const conditionalConfig = fieldConfig.conditionalConfiguration;
3748
3773
  const configType = conditionalConfig.conditionalFormat(fullRecord[conditionalConfig.conditionalField]);
3749
- return formatFieldValue(value, configType, localeOptions, fullRecord, fieldConfig);
3774
+ return formatFieldValue(value, configType, localeOptions, fullRecord, fieldConfig, timezone, translationLocale);
3750
3775
  }
3751
3776
  case "string":
3752
3777
  return formatString(value, localeOptions);
@@ -3766,6 +3791,10 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
3766
3791
  const d = getDateToFormat(value);
3767
3792
  return d ? formatTime(d, { locale, format: "00:00:00" }) : "";
3768
3793
  }
3794
+ case "time-with-time-zone": {
3795
+ const d = getDateToFormat(value);
3796
+ return d ? formatTime(d, { locale, format: "00:00:00", timeZone: timezone }) : "";
3797
+ }
3769
3798
  case "number-empty":
3770
3799
  return value != null ? String(getNumberToFormat(value)) : "";
3771
3800
  case "number":