@harbortouch/skytab-analytics-report-utils 0.41.5 → 0.41.7
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/{chunk-Z36HJZOP.js → chunk-SJXEPN7Q.js} +7 -2
- package/dist/exporters/excel/index.cjs +42 -8
- package/dist/exporters/excel/index.d.cts +2 -2
- package/dist/exporters/excel/index.d.ts +2 -2
- package/dist/exporters/excel/index.js +42 -8
- package/dist/exporters/exportBuilder.cjs +13 -6
- package/dist/exporters/exportBuilder.d.cts +2 -2
- package/dist/exporters/exportBuilder.d.ts +2 -2
- package/dist/exporters/exportBuilder.js +7 -5
- package/dist/exporters/pdf/index.cjs +43 -38
- package/dist/exporters/pdf/index.d.cts +3 -3
- package/dist/exporters/pdf/index.d.ts +3 -3
- package/dist/exporters/pdf/index.js +43 -38
- package/dist/index.cjs +7 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{report-pbGeYM8Q.d.cts → report-BvHZIv0S.d.cts} +2 -0
- package/dist/{report-pbGeYM8Q.d.ts → report-BvHZIv0S.d.ts} +2 -0
- package/dist/{types-MalWTEdo.d.ts → types-JAEAu4KX.d.cts} +1 -2
- package/dist/{types-MalWTEdo.d.cts → types-JAEAu4KX.d.ts} +1 -2
- package/package.json +1 -1
|
@@ -772,12 +772,14 @@ var enUS = {
|
|
|
772
772
|
"scheduled-reports.period": false,
|
|
773
773
|
"scheduled-reports.generated-at": false,
|
|
774
774
|
"scheduled-reports.generated-by": false,
|
|
775
|
+
"scheduled-reports.applied-filters": false,
|
|
775
776
|
"components.form.field.group-by": false,
|
|
776
777
|
"components.form.field.last-week": false,
|
|
777
778
|
"components.form.field.last-year": false,
|
|
778
779
|
"common.labels.locations": false,
|
|
779
780
|
"common.labels.yes": false,
|
|
780
781
|
"common.labels.unassigned": false,
|
|
782
|
+
"common.labels.none": false,
|
|
781
783
|
// Analytic fields
|
|
782
784
|
"analytics.field.location_id": false,
|
|
783
785
|
"analytics.field.order_type_id": false,
|
|
@@ -1328,12 +1330,14 @@ var enUS2 = {
|
|
|
1328
1330
|
"scheduled-reports.period": false,
|
|
1329
1331
|
"scheduled-reports.generated-at": false,
|
|
1330
1332
|
"scheduled-reports.generated-by": false,
|
|
1333
|
+
"scheduled-reports.applied-filters": false,
|
|
1331
1334
|
"components.form.field.group-by": false,
|
|
1332
1335
|
"components.form.field.last-week": false,
|
|
1333
1336
|
"components.form.field.last-year": false,
|
|
1334
1337
|
"common.labels.locations": false,
|
|
1335
1338
|
"common.labels.yes": false,
|
|
1336
1339
|
"common.labels.unassigned": false,
|
|
1340
|
+
"common.labels.none": false,
|
|
1337
1341
|
// Analytic fields
|
|
1338
1342
|
"analytics.field.location_id": false,
|
|
1339
1343
|
"analytics.field.order_type_id": false,
|
|
@@ -1884,12 +1888,14 @@ var enUS3 = {
|
|
|
1884
1888
|
"scheduled-reports.period": "Period",
|
|
1885
1889
|
"scheduled-reports.generated-at": "Generated at",
|
|
1886
1890
|
"scheduled-reports.generated-by": "Generated by",
|
|
1891
|
+
"scheduled-reports.applied-filters": "Applied Filters",
|
|
1887
1892
|
"components.form.field.group-by": "Group By",
|
|
1888
1893
|
"components.form.field.last-week": "Compare to Last Week",
|
|
1889
1894
|
"components.form.field.last-year": "Compare to Last Year",
|
|
1890
1895
|
"common.labels.locations": "Locations",
|
|
1891
1896
|
"common.labels.yes": "Yes",
|
|
1892
1897
|
"common.labels.unassigned": "Unassigned",
|
|
1898
|
+
"common.labels.none": "None",
|
|
1893
1899
|
// Analytic fields
|
|
1894
1900
|
"analytics.field.location_id": "Location",
|
|
1895
1901
|
"analytics.field.order_type_id": "Order Types",
|
|
@@ -2492,7 +2498,6 @@ var FIELDS10 = {
|
|
|
2492
2498
|
declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } }
|
|
2493
2499
|
};
|
|
2494
2500
|
var VISIBLE_COLUMNS2 = [
|
|
2495
|
-
"groupByName",
|
|
2496
2501
|
"employeeName",
|
|
2497
2502
|
"netSales",
|
|
2498
2503
|
"cashCollected",
|
|
@@ -2502,7 +2507,7 @@ var VISIBLE_COLUMNS2 = [
|
|
|
2502
2507
|
"tipShareContributed",
|
|
2503
2508
|
"declaredTips"
|
|
2504
2509
|
];
|
|
2505
|
-
var AVAILABLE_COLUMNS2 = ["
|
|
2510
|
+
var AVAILABLE_COLUMNS2 = ["groupByName", ...VISIBLE_COLUMNS2];
|
|
2506
2511
|
var tipCashoutReconciliationConfig = {
|
|
2507
2512
|
fields: FIELDS10,
|
|
2508
2513
|
availableColumns: AVAILABLE_COLUMNS2,
|
|
@@ -65,15 +65,49 @@ var ExcelExporter = class {
|
|
|
65
65
|
}
|
|
66
66
|
usedNames.add(sheetName.toLowerCase());
|
|
67
67
|
const sheet = workbook.addWorksheet(sheetName);
|
|
68
|
-
if (section.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
if (section.metaData) {
|
|
69
|
+
let hasContent = false;
|
|
70
|
+
for (const [key, value] of Object.entries(section.metaData)) {
|
|
71
|
+
if (Array.isArray(value)) {
|
|
72
|
+
if (key === "") {
|
|
73
|
+
if (value.length > 0) {
|
|
74
|
+
for (const filter of value) {
|
|
75
|
+
const row = sheet.addRow([filter.label, filter.value]);
|
|
76
|
+
row.getCell(1).font = { bold: true };
|
|
77
|
+
}
|
|
78
|
+
hasContent = true;
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
if (hasContent) {
|
|
82
|
+
sheet.addRow([]);
|
|
83
|
+
}
|
|
84
|
+
const titleRow = sheet.addRow([key]);
|
|
85
|
+
titleRow.getCell(1).font = { bold: true };
|
|
86
|
+
titleRow.getCell(1).fill = GRAY_FILL;
|
|
87
|
+
if (value.length === 0) {
|
|
88
|
+
sheet.addRow([""]);
|
|
89
|
+
} else {
|
|
90
|
+
for (const filter of value) {
|
|
91
|
+
const row = sheet.addRow([filter.label, filter.value]);
|
|
92
|
+
row.getCell(1).font = { bold: true };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
hasContent = true;
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
if (hasContent) {
|
|
99
|
+
sheet.addRow([]);
|
|
100
|
+
}
|
|
101
|
+
const titleRow = sheet.addRow([key]);
|
|
102
|
+
titleRow.getCell(1).font = { bold: true };
|
|
103
|
+
titleRow.getCell(1).fill = GRAY_FILL;
|
|
104
|
+
sheet.addRow([value]);
|
|
105
|
+
hasContent = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (hasContent) {
|
|
109
|
+
sheet.addRow([]);
|
|
75
110
|
}
|
|
76
|
-
sheet.addRow([]);
|
|
77
111
|
}
|
|
78
112
|
if (section.table) {
|
|
79
113
|
const headerRow = sheet.addRow(section.table.columns.map((col) => col.header));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ExportSection } from '../../types-
|
|
2
|
-
export { E as XlsxFilter, b as XlsxTable, c as XlsxTableColumn } from '../../types-
|
|
1
|
+
import { a as ExportSection } from '../../types-JAEAu4KX.cjs';
|
|
2
|
+
export { E as XlsxFilter, b as XlsxTable, c as XlsxTableColumn } from '../../types-JAEAu4KX.cjs';
|
|
3
3
|
|
|
4
4
|
declare class ExcelExporter {
|
|
5
5
|
generate(content: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ExportSection } from '../../types-
|
|
2
|
-
export { E as XlsxFilter, b as XlsxTable, c as XlsxTableColumn } from '../../types-
|
|
1
|
+
import { a as ExportSection } from '../../types-JAEAu4KX.js';
|
|
2
|
+
export { E as XlsxFilter, b as XlsxTable, c as XlsxTableColumn } from '../../types-JAEAu4KX.js';
|
|
3
3
|
|
|
4
4
|
declare class ExcelExporter {
|
|
5
5
|
generate(content: {
|
|
@@ -31,15 +31,49 @@ var ExcelExporter = class {
|
|
|
31
31
|
}
|
|
32
32
|
usedNames.add(sheetName.toLowerCase());
|
|
33
33
|
const sheet = workbook.addWorksheet(sheetName);
|
|
34
|
-
if (section.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
if (section.metaData) {
|
|
35
|
+
let hasContent = false;
|
|
36
|
+
for (const [key, value] of Object.entries(section.metaData)) {
|
|
37
|
+
if (Array.isArray(value)) {
|
|
38
|
+
if (key === "") {
|
|
39
|
+
if (value.length > 0) {
|
|
40
|
+
for (const filter of value) {
|
|
41
|
+
const row = sheet.addRow([filter.label, filter.value]);
|
|
42
|
+
row.getCell(1).font = { bold: true };
|
|
43
|
+
}
|
|
44
|
+
hasContent = true;
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
if (hasContent) {
|
|
48
|
+
sheet.addRow([]);
|
|
49
|
+
}
|
|
50
|
+
const titleRow = sheet.addRow([key]);
|
|
51
|
+
titleRow.getCell(1).font = { bold: true };
|
|
52
|
+
titleRow.getCell(1).fill = GRAY_FILL;
|
|
53
|
+
if (value.length === 0) {
|
|
54
|
+
sheet.addRow([""]);
|
|
55
|
+
} else {
|
|
56
|
+
for (const filter of value) {
|
|
57
|
+
const row = sheet.addRow([filter.label, filter.value]);
|
|
58
|
+
row.getCell(1).font = { bold: true };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
hasContent = true;
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
if (hasContent) {
|
|
65
|
+
sheet.addRow([]);
|
|
66
|
+
}
|
|
67
|
+
const titleRow = sheet.addRow([key]);
|
|
68
|
+
titleRow.getCell(1).font = { bold: true };
|
|
69
|
+
titleRow.getCell(1).fill = GRAY_FILL;
|
|
70
|
+
sheet.addRow([value]);
|
|
71
|
+
hasContent = true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (hasContent) {
|
|
75
|
+
sheet.addRow([]);
|
|
41
76
|
}
|
|
42
|
-
sheet.addRow([]);
|
|
43
77
|
}
|
|
44
78
|
if (section.table) {
|
|
45
79
|
const headerRow = sheet.addRow(section.table.columns.map((col) => col.header));
|
|
@@ -545,12 +545,14 @@ var enUS = {
|
|
|
545
545
|
"scheduled-reports.period": "Period",
|
|
546
546
|
"scheduled-reports.generated-at": "Generated at",
|
|
547
547
|
"scheduled-reports.generated-by": "Generated by",
|
|
548
|
+
"scheduled-reports.applied-filters": "Applied Filters",
|
|
548
549
|
"components.form.field.group-by": "Group By",
|
|
549
550
|
"components.form.field.last-week": "Compare to Last Week",
|
|
550
551
|
"components.form.field.last-year": "Compare to Last Year",
|
|
551
552
|
"common.labels.locations": "Locations",
|
|
552
553
|
"common.labels.yes": "Yes",
|
|
553
554
|
"common.labels.unassigned": "Unassigned",
|
|
555
|
+
"common.labels.none": "None",
|
|
554
556
|
// Analytic fields
|
|
555
557
|
"analytics.field.location_id": "Location",
|
|
556
558
|
"analytics.field.order_type_id": "Order Types",
|
|
@@ -1101,12 +1103,14 @@ var enUS2 = {
|
|
|
1101
1103
|
"scheduled-reports.period": false,
|
|
1102
1104
|
"scheduled-reports.generated-at": false,
|
|
1103
1105
|
"scheduled-reports.generated-by": false,
|
|
1106
|
+
"scheduled-reports.applied-filters": false,
|
|
1104
1107
|
"components.form.field.group-by": false,
|
|
1105
1108
|
"components.form.field.last-week": false,
|
|
1106
1109
|
"components.form.field.last-year": false,
|
|
1107
1110
|
"common.labels.locations": false,
|
|
1108
1111
|
"common.labels.yes": false,
|
|
1109
1112
|
"common.labels.unassigned": false,
|
|
1113
|
+
"common.labels.none": false,
|
|
1110
1114
|
// Analytic fields
|
|
1111
1115
|
"analytics.field.location_id": false,
|
|
1112
1116
|
"analytics.field.order_type_id": false,
|
|
@@ -1657,12 +1661,14 @@ var enUS3 = {
|
|
|
1657
1661
|
"scheduled-reports.period": false,
|
|
1658
1662
|
"scheduled-reports.generated-at": false,
|
|
1659
1663
|
"scheduled-reports.generated-by": false,
|
|
1664
|
+
"scheduled-reports.applied-filters": false,
|
|
1660
1665
|
"components.form.field.group-by": false,
|
|
1661
1666
|
"components.form.field.last-week": false,
|
|
1662
1667
|
"components.form.field.last-year": false,
|
|
1663
1668
|
"common.labels.locations": false,
|
|
1664
1669
|
"common.labels.yes": false,
|
|
1665
1670
|
"common.labels.unassigned": false,
|
|
1671
|
+
"common.labels.none": false,
|
|
1666
1672
|
// Analytic fields
|
|
1667
1673
|
"analytics.field.location_id": false,
|
|
1668
1674
|
"analytics.field.order_type_id": false,
|
|
@@ -2659,7 +2665,6 @@ var FIELDS10 = {
|
|
|
2659
2665
|
declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } }
|
|
2660
2666
|
};
|
|
2661
2667
|
var VISIBLE_COLUMNS2 = [
|
|
2662
|
-
"groupByName",
|
|
2663
2668
|
"employeeName",
|
|
2664
2669
|
"netSales",
|
|
2665
2670
|
"cashCollected",
|
|
@@ -2669,7 +2674,7 @@ var VISIBLE_COLUMNS2 = [
|
|
|
2669
2674
|
"tipShareContributed",
|
|
2670
2675
|
"declaredTips"
|
|
2671
2676
|
];
|
|
2672
|
-
var AVAILABLE_COLUMNS2 = ["
|
|
2677
|
+
var AVAILABLE_COLUMNS2 = ["groupByName", ...VISIBLE_COLUMNS2];
|
|
2673
2678
|
var tipCashoutReconciliationConfig = {
|
|
2674
2679
|
fields: FIELDS10,
|
|
2675
2680
|
availableColumns: AVAILABLE_COLUMNS2,
|
|
@@ -4195,12 +4200,15 @@ var ExportBuilder = class {
|
|
|
4195
4200
|
}
|
|
4196
4201
|
const resolvedName = name ?? getReportName(this.reportType);
|
|
4197
4202
|
const metadataFilters = this.buildReportMetadataFilters(parameters, resolvedName, metadata);
|
|
4198
|
-
const
|
|
4203
|
+
const metaData = {
|
|
4204
|
+
[""]: metadataFilters,
|
|
4205
|
+
[this.translate("scheduled-reports.applied-filters")]: appliedFilters ?? this.translate("common.labels.none")
|
|
4206
|
+
};
|
|
4199
4207
|
let sections;
|
|
4200
4208
|
if (Array.isArray(rawConfig)) {
|
|
4201
4209
|
const sectionParameters = { ...parameters, cols: void 0 };
|
|
4202
4210
|
sections = [
|
|
4203
|
-
{ title: resolvedName,
|
|
4211
|
+
{ title: resolvedName, metaData },
|
|
4204
4212
|
...rawConfig.map((config) => ({
|
|
4205
4213
|
title: this.getConfigSectionName(config),
|
|
4206
4214
|
...this.renderTableContent(config, reportData, sectionParameters)
|
|
@@ -4210,8 +4218,7 @@ var ExportBuilder = class {
|
|
|
4210
4218
|
sections = [
|
|
4211
4219
|
{
|
|
4212
4220
|
title: resolvedName,
|
|
4213
|
-
|
|
4214
|
-
appliedFilters: resolvedAppliedFilters,
|
|
4221
|
+
metaData,
|
|
4215
4222
|
...this.renderTableContent(rawConfig, reportData, parameters)
|
|
4216
4223
|
}
|
|
4217
4224
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReportType, A as AnalyticsField } from '../report-
|
|
2
|
-
import { E as ExportFilter, R as ReportMetadata, a as ExportSection } from '../types-
|
|
1
|
+
import { R as ReportType, A as AnalyticsField } from '../report-BvHZIv0S.cjs';
|
|
2
|
+
import { E as ExportFilter, R as ReportMetadata, a as ExportSection } from '../types-JAEAu4KX.cjs';
|
|
3
3
|
|
|
4
4
|
declare function resolveRawFiltersToExportFilters(rawFilters: Record<string, (string | number)[] | undefined>, locale: string): ExportFilter[];
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReportType, A as AnalyticsField } from '../report-
|
|
2
|
-
import { E as ExportFilter, R as ReportMetadata, a as ExportSection } from '../types-
|
|
1
|
+
import { R as ReportType, A as AnalyticsField } from '../report-BvHZIv0S.js';
|
|
2
|
+
import { E as ExportFilter, R as ReportMetadata, a as ExportSection } from '../types-JAEAu4KX.js';
|
|
3
3
|
|
|
4
4
|
declare function resolveRawFiltersToExportFilters(rawFilters: Record<string, (string | number)[] | undefined>, locale: string): ExportFilter[];
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getReportFormattingLocaleOptions,
|
|
9
9
|
getReportName,
|
|
10
10
|
resolveTranslate
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-SJXEPN7Q.js";
|
|
12
12
|
|
|
13
13
|
// src/utils/filter-resolver.ts
|
|
14
14
|
var ANALYTICS_FIELDS = /* @__PURE__ */ new Set([
|
|
@@ -256,12 +256,15 @@ var ExportBuilder = class {
|
|
|
256
256
|
}
|
|
257
257
|
const resolvedName = name ?? getReportName(this.reportType);
|
|
258
258
|
const metadataFilters = this.buildReportMetadataFilters(parameters, resolvedName, metadata);
|
|
259
|
-
const
|
|
259
|
+
const metaData = {
|
|
260
|
+
[""]: metadataFilters,
|
|
261
|
+
[this.translate("scheduled-reports.applied-filters")]: appliedFilters ?? this.translate("common.labels.none")
|
|
262
|
+
};
|
|
260
263
|
let sections;
|
|
261
264
|
if (Array.isArray(rawConfig)) {
|
|
262
265
|
const sectionParameters = { ...parameters, cols: void 0 };
|
|
263
266
|
sections = [
|
|
264
|
-
{ title: resolvedName,
|
|
267
|
+
{ title: resolvedName, metaData },
|
|
265
268
|
...rawConfig.map((config) => ({
|
|
266
269
|
title: this.getConfigSectionName(config),
|
|
267
270
|
...this.renderTableContent(config, reportData, sectionParameters)
|
|
@@ -271,8 +274,7 @@ var ExportBuilder = class {
|
|
|
271
274
|
sections = [
|
|
272
275
|
{
|
|
273
276
|
title: resolvedName,
|
|
274
|
-
|
|
275
|
-
appliedFilters: resolvedAppliedFilters,
|
|
277
|
+
metaData,
|
|
276
278
|
...this.renderTableContent(rawConfig, reportData, parameters)
|
|
277
279
|
}
|
|
278
280
|
];
|
|
@@ -108,11 +108,8 @@ var PdfExporter = class {
|
|
|
108
108
|
currentY += SECTION_GAP;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
if (sanitized.
|
|
112
|
-
currentY = this.
|
|
113
|
-
}
|
|
114
|
-
if (sanitized.appliedFilters !== void 0) {
|
|
115
|
-
currentY = this.drawAppliedFilters(doc, sanitized.appliedFilters, currentY);
|
|
111
|
+
if (sanitized.metaData) {
|
|
112
|
+
currentY = this.drawMetaData(doc, sanitized.metaData, currentY);
|
|
116
113
|
}
|
|
117
114
|
if (sanitized.title && sanitized.table) {
|
|
118
115
|
currentY = this.drawSectionTitle(doc, sanitized.title, currentY);
|
|
@@ -129,17 +126,16 @@ var PdfExporter = class {
|
|
|
129
126
|
}
|
|
130
127
|
sanitizeSections(section) {
|
|
131
128
|
const sanitized = { title: sanitizePdfText(section.title) };
|
|
132
|
-
if (section.
|
|
133
|
-
sanitized.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}));
|
|
129
|
+
if (section.metaData) {
|
|
130
|
+
sanitized.metaData = Object.fromEntries(
|
|
131
|
+
Object.entries(section.metaData).map(([key, value]) => [
|
|
132
|
+
sanitizePdfText(key),
|
|
133
|
+
Array.isArray(value) ? value.map((filter) => ({
|
|
134
|
+
label: sanitizePdfText(filter.label),
|
|
135
|
+
value: sanitizePdfText(filter.value)
|
|
136
|
+
})) : sanitizePdfText(value)
|
|
137
|
+
])
|
|
138
|
+
);
|
|
143
139
|
}
|
|
144
140
|
if (section.table) {
|
|
145
141
|
sanitized.table = {
|
|
@@ -167,32 +163,41 @@ var PdfExporter = class {
|
|
|
167
163
|
doc.strokeColor(HEADER_RULE_COLOR).lineWidth(HEADER_RULE_WIDTH).moveTo(left, ruleY).lineTo(left + usableWidth, ruleY).stroke();
|
|
168
164
|
return ruleY + spacing;
|
|
169
165
|
}
|
|
170
|
-
|
|
166
|
+
drawMetaData(doc, metaData, startY) {
|
|
171
167
|
const left = doc.page.margins.left;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (
|
|
175
|
-
|
|
168
|
+
let currentY = startY;
|
|
169
|
+
for (const [key, value] of Object.entries(metaData)) {
|
|
170
|
+
if (key === "") {
|
|
171
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
172
|
+
doc.fillColor(DEFAULT_TEXT_COLOR).font(FONT_BOLD).fontSize(BODY_FONT_SIZE);
|
|
173
|
+
value.forEach((filter, i) => {
|
|
174
|
+
if (i === 0) {
|
|
175
|
+
doc.text(filter.label, left, currentY, { continued: true });
|
|
176
|
+
} else {
|
|
177
|
+
doc.font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(filter.label, { continued: true });
|
|
178
|
+
}
|
|
179
|
+
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
180
|
+
});
|
|
181
|
+
doc.moveDown(0.5);
|
|
182
|
+
currentY = doc.y;
|
|
183
|
+
}
|
|
176
184
|
} else {
|
|
177
|
-
|
|
185
|
+
const isEmptyFilters = Array.isArray(value) && value.length === 0;
|
|
186
|
+
doc.fillColor(DEFAULT_TEXT_COLOR).font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(`${key}:`, left, currentY, { continued: !isEmptyFilters && typeof value === "string" });
|
|
187
|
+
if (typeof value === "string") {
|
|
188
|
+
doc.font(FONT_REGULAR).text(` ${value}`);
|
|
189
|
+
} else if (isEmptyFilters) {
|
|
190
|
+
} else {
|
|
191
|
+
value.forEach((filter) => {
|
|
192
|
+
doc.font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(filter.label, { continued: true });
|
|
193
|
+
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
doc.moveDown(1);
|
|
197
|
+
currentY = doc.y;
|
|
178
198
|
}
|
|
179
|
-
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
180
|
-
});
|
|
181
|
-
doc.moveDown(0.5);
|
|
182
|
-
return doc.y;
|
|
183
|
-
}
|
|
184
|
-
drawAppliedFilters(doc, filters, startY) {
|
|
185
|
-
doc.fillColor(DEFAULT_TEXT_COLOR).font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text("Applied Filters:", doc.page.margins.left, startY, { continued: filters.length === 0 });
|
|
186
|
-
if (filters.length === 0) {
|
|
187
|
-
doc.font(FONT_REGULAR).text(" None");
|
|
188
|
-
} else {
|
|
189
|
-
filters.forEach((filter) => {
|
|
190
|
-
doc.font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(filter.label, { continued: true });
|
|
191
|
-
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
192
|
-
});
|
|
193
199
|
}
|
|
194
|
-
|
|
195
|
-
return doc.y;
|
|
200
|
+
return currentY;
|
|
196
201
|
}
|
|
197
202
|
drawTable(doc, table, startY) {
|
|
198
203
|
const columns = table.columns.length > 0 ? table.columns.map((c) => ({ ...c })) : [{ header: "No data", key: "no_data", width: 100 }];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as ExportSection, E as ExportFilter, b as ExportTable, c as ExportTableColumn } from '../../types-
|
|
1
|
+
import { a as ExportSection, E as ExportFilter, b as ExportTable, c as ExportTableColumn } from '../../types-JAEAu4KX.cjs';
|
|
2
2
|
|
|
3
|
+
type MetaDataValue = ExportFilter[] | string;
|
|
3
4
|
declare class PdfExporter {
|
|
4
5
|
registerFonts(doc: PDFKit.PDFDocument): void;
|
|
5
6
|
generate(content: {
|
|
@@ -7,8 +8,7 @@ declare class PdfExporter {
|
|
|
7
8
|
}): Promise<Buffer>;
|
|
8
9
|
private sanitizeSections;
|
|
9
10
|
drawSectionTitle(doc: PDFKit.PDFDocument, title: string, startY: number): number;
|
|
10
|
-
|
|
11
|
-
drawAppliedFilters(doc: PDFKit.PDFDocument, filters: ExportFilter[], startY: number): number;
|
|
11
|
+
drawMetaData(doc: PDFKit.PDFDocument, metaData: Record<string, MetaDataValue>, startY: number): number;
|
|
12
12
|
drawTable(doc: PDFKit.PDFDocument, table: ExportTable, startY: number): number;
|
|
13
13
|
drawHeader(doc: PDFKit.PDFDocument, columns: ExportTableColumn[], startY: number, tableWidth: number, headerHeight: number, cellPadding: number, headerFontSize: number, minColumnWidth: number): number;
|
|
14
14
|
drawRow(doc: PDFKit.PDFDocument, row: Record<string, unknown>, columns: ExportTableColumn[], currentY: number, rowHeight: number, cellPadding: number, dataFontSize: number, minColumnWidth: number, rowIndex?: number): number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as ExportSection, E as ExportFilter, b as ExportTable, c as ExportTableColumn } from '../../types-
|
|
1
|
+
import { a as ExportSection, E as ExportFilter, b as ExportTable, c as ExportTableColumn } from '../../types-JAEAu4KX.js';
|
|
2
2
|
|
|
3
|
+
type MetaDataValue = ExportFilter[] | string;
|
|
3
4
|
declare class PdfExporter {
|
|
4
5
|
registerFonts(doc: PDFKit.PDFDocument): void;
|
|
5
6
|
generate(content: {
|
|
@@ -7,8 +8,7 @@ declare class PdfExporter {
|
|
|
7
8
|
}): Promise<Buffer>;
|
|
8
9
|
private sanitizeSections;
|
|
9
10
|
drawSectionTitle(doc: PDFKit.PDFDocument, title: string, startY: number): number;
|
|
10
|
-
|
|
11
|
-
drawAppliedFilters(doc: PDFKit.PDFDocument, filters: ExportFilter[], startY: number): number;
|
|
11
|
+
drawMetaData(doc: PDFKit.PDFDocument, metaData: Record<string, MetaDataValue>, startY: number): number;
|
|
12
12
|
drawTable(doc: PDFKit.PDFDocument, table: ExportTable, startY: number): number;
|
|
13
13
|
drawHeader(doc: PDFKit.PDFDocument, columns: ExportTableColumn[], startY: number, tableWidth: number, headerHeight: number, cellPadding: number, headerFontSize: number, minColumnWidth: number): number;
|
|
14
14
|
drawRow(doc: PDFKit.PDFDocument, row: Record<string, unknown>, columns: ExportTableColumn[], currentY: number, rowHeight: number, cellPadding: number, dataFontSize: number, minColumnWidth: number, rowIndex?: number): number;
|
|
@@ -68,11 +68,8 @@ var PdfExporter = class {
|
|
|
68
68
|
currentY += SECTION_GAP;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
if (sanitized.
|
|
72
|
-
currentY = this.
|
|
73
|
-
}
|
|
74
|
-
if (sanitized.appliedFilters !== void 0) {
|
|
75
|
-
currentY = this.drawAppliedFilters(doc, sanitized.appliedFilters, currentY);
|
|
71
|
+
if (sanitized.metaData) {
|
|
72
|
+
currentY = this.drawMetaData(doc, sanitized.metaData, currentY);
|
|
76
73
|
}
|
|
77
74
|
if (sanitized.title && sanitized.table) {
|
|
78
75
|
currentY = this.drawSectionTitle(doc, sanitized.title, currentY);
|
|
@@ -89,17 +86,16 @@ var PdfExporter = class {
|
|
|
89
86
|
}
|
|
90
87
|
sanitizeSections(section) {
|
|
91
88
|
const sanitized = { title: sanitizePdfText(section.title) };
|
|
92
|
-
if (section.
|
|
93
|
-
sanitized.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}));
|
|
89
|
+
if (section.metaData) {
|
|
90
|
+
sanitized.metaData = Object.fromEntries(
|
|
91
|
+
Object.entries(section.metaData).map(([key, value]) => [
|
|
92
|
+
sanitizePdfText(key),
|
|
93
|
+
Array.isArray(value) ? value.map((filter) => ({
|
|
94
|
+
label: sanitizePdfText(filter.label),
|
|
95
|
+
value: sanitizePdfText(filter.value)
|
|
96
|
+
})) : sanitizePdfText(value)
|
|
97
|
+
])
|
|
98
|
+
);
|
|
103
99
|
}
|
|
104
100
|
if (section.table) {
|
|
105
101
|
sanitized.table = {
|
|
@@ -127,32 +123,41 @@ var PdfExporter = class {
|
|
|
127
123
|
doc.strokeColor(HEADER_RULE_COLOR).lineWidth(HEADER_RULE_WIDTH).moveTo(left, ruleY).lineTo(left + usableWidth, ruleY).stroke();
|
|
128
124
|
return ruleY + spacing;
|
|
129
125
|
}
|
|
130
|
-
|
|
126
|
+
drawMetaData(doc, metaData, startY) {
|
|
131
127
|
const left = doc.page.margins.left;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (
|
|
135
|
-
|
|
128
|
+
let currentY = startY;
|
|
129
|
+
for (const [key, value] of Object.entries(metaData)) {
|
|
130
|
+
if (key === "") {
|
|
131
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
132
|
+
doc.fillColor(DEFAULT_TEXT_COLOR).font(FONT_BOLD).fontSize(BODY_FONT_SIZE);
|
|
133
|
+
value.forEach((filter, i) => {
|
|
134
|
+
if (i === 0) {
|
|
135
|
+
doc.text(filter.label, left, currentY, { continued: true });
|
|
136
|
+
} else {
|
|
137
|
+
doc.font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(filter.label, { continued: true });
|
|
138
|
+
}
|
|
139
|
+
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
140
|
+
});
|
|
141
|
+
doc.moveDown(0.5);
|
|
142
|
+
currentY = doc.y;
|
|
143
|
+
}
|
|
136
144
|
} else {
|
|
137
|
-
|
|
145
|
+
const isEmptyFilters = Array.isArray(value) && value.length === 0;
|
|
146
|
+
doc.fillColor(DEFAULT_TEXT_COLOR).font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(`${key}:`, left, currentY, { continued: !isEmptyFilters && typeof value === "string" });
|
|
147
|
+
if (typeof value === "string") {
|
|
148
|
+
doc.font(FONT_REGULAR).text(` ${value}`);
|
|
149
|
+
} else if (isEmptyFilters) {
|
|
150
|
+
} else {
|
|
151
|
+
value.forEach((filter) => {
|
|
152
|
+
doc.font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(filter.label, { continued: true });
|
|
153
|
+
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
doc.moveDown(1);
|
|
157
|
+
currentY = doc.y;
|
|
138
158
|
}
|
|
139
|
-
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
140
|
-
});
|
|
141
|
-
doc.moveDown(0.5);
|
|
142
|
-
return doc.y;
|
|
143
|
-
}
|
|
144
|
-
drawAppliedFilters(doc, filters, startY) {
|
|
145
|
-
doc.fillColor(DEFAULT_TEXT_COLOR).font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text("Applied Filters:", doc.page.margins.left, startY, { continued: filters.length === 0 });
|
|
146
|
-
if (filters.length === 0) {
|
|
147
|
-
doc.font(FONT_REGULAR).text(" None");
|
|
148
|
-
} else {
|
|
149
|
-
filters.forEach((filter) => {
|
|
150
|
-
doc.font(FONT_BOLD).fontSize(BODY_FONT_SIZE).text(filter.label, { continued: true });
|
|
151
|
-
doc.font(FONT_REGULAR).text(`: ${filter.value}`);
|
|
152
|
-
});
|
|
153
159
|
}
|
|
154
|
-
|
|
155
|
-
return doc.y;
|
|
160
|
+
return currentY;
|
|
156
161
|
}
|
|
157
162
|
drawTable(doc, table, startY) {
|
|
158
163
|
const columns = table.columns.length > 0 ? table.columns.map((c) => ({ ...c })) : [{ header: "No data", key: "no_data", width: 100 }];
|
package/dist/index.cjs
CHANGED
|
@@ -847,12 +847,14 @@ var enUS = {
|
|
|
847
847
|
"scheduled-reports.period": false,
|
|
848
848
|
"scheduled-reports.generated-at": false,
|
|
849
849
|
"scheduled-reports.generated-by": false,
|
|
850
|
+
"scheduled-reports.applied-filters": false,
|
|
850
851
|
"components.form.field.group-by": false,
|
|
851
852
|
"components.form.field.last-week": false,
|
|
852
853
|
"components.form.field.last-year": false,
|
|
853
854
|
"common.labels.locations": false,
|
|
854
855
|
"common.labels.yes": false,
|
|
855
856
|
"common.labels.unassigned": false,
|
|
857
|
+
"common.labels.none": false,
|
|
856
858
|
// Analytic fields
|
|
857
859
|
"analytics.field.location_id": false,
|
|
858
860
|
"analytics.field.order_type_id": false,
|
|
@@ -1403,12 +1405,14 @@ var enUS2 = {
|
|
|
1403
1405
|
"scheduled-reports.period": false,
|
|
1404
1406
|
"scheduled-reports.generated-at": false,
|
|
1405
1407
|
"scheduled-reports.generated-by": false,
|
|
1408
|
+
"scheduled-reports.applied-filters": false,
|
|
1406
1409
|
"components.form.field.group-by": false,
|
|
1407
1410
|
"components.form.field.last-week": false,
|
|
1408
1411
|
"components.form.field.last-year": false,
|
|
1409
1412
|
"common.labels.locations": false,
|
|
1410
1413
|
"common.labels.yes": false,
|
|
1411
1414
|
"common.labels.unassigned": false,
|
|
1415
|
+
"common.labels.none": false,
|
|
1412
1416
|
// Analytic fields
|
|
1413
1417
|
"analytics.field.location_id": false,
|
|
1414
1418
|
"analytics.field.order_type_id": false,
|
|
@@ -1959,12 +1963,14 @@ var enUS3 = {
|
|
|
1959
1963
|
"scheduled-reports.period": "Period",
|
|
1960
1964
|
"scheduled-reports.generated-at": "Generated at",
|
|
1961
1965
|
"scheduled-reports.generated-by": "Generated by",
|
|
1966
|
+
"scheduled-reports.applied-filters": "Applied Filters",
|
|
1962
1967
|
"components.form.field.group-by": "Group By",
|
|
1963
1968
|
"components.form.field.last-week": "Compare to Last Week",
|
|
1964
1969
|
"components.form.field.last-year": "Compare to Last Year",
|
|
1965
1970
|
"common.labels.locations": "Locations",
|
|
1966
1971
|
"common.labels.yes": "Yes",
|
|
1967
1972
|
"common.labels.unassigned": "Unassigned",
|
|
1973
|
+
"common.labels.none": "None",
|
|
1968
1974
|
// Analytic fields
|
|
1969
1975
|
"analytics.field.location_id": "Location",
|
|
1970
1976
|
"analytics.field.order_type_id": "Order Types",
|
|
@@ -2567,7 +2573,6 @@ var FIELDS10 = {
|
|
|
2567
2573
|
declaredTips: { type: "money", columnKey: "declaredTips", footerCalculation: { type: "sum" } }
|
|
2568
2574
|
};
|
|
2569
2575
|
var VISIBLE_COLUMNS2 = [
|
|
2570
|
-
"groupByName",
|
|
2571
2576
|
"employeeName",
|
|
2572
2577
|
"netSales",
|
|
2573
2578
|
"cashCollected",
|
|
@@ -2577,7 +2582,7 @@ var VISIBLE_COLUMNS2 = [
|
|
|
2577
2582
|
"tipShareContributed",
|
|
2578
2583
|
"declaredTips"
|
|
2579
2584
|
];
|
|
2580
|
-
var AVAILABLE_COLUMNS2 = ["
|
|
2585
|
+
var AVAILABLE_COLUMNS2 = ["groupByName", ...VISIBLE_COLUMNS2];
|
|
2581
2586
|
var tipCashoutReconciliationConfig = {
|
|
2582
2587
|
fields: FIELDS10,
|
|
2583
2588
|
availableColumns: AVAILABLE_COLUMNS2,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MessageKey, F as FieldType, C as ColumnAlignment, a as ColumnPresentationConfig, b as ColumnGroupConfig, R as ReportType, c as ReportConfig, d as ReportColumnKey } from './report-
|
|
2
|
-
export { A as AnalyticsField, e as COLUMN_REGISTRY, f as ColumnMessageKey, g as ColumnMetadata, h as FooterCalculation, i as FooterCalculationType, j as Report, k as getColumnExportHeaderLabel, l as getColumnMetadata, m as getFixedColumns, n as getReportConfig, o as getReportExportFileName } from './report-
|
|
1
|
+
import { M as MessageKey, F as FieldType, C as ColumnAlignment, a as ColumnPresentationConfig, b as ColumnGroupConfig, R as ReportType, c as ReportConfig, d as ReportColumnKey } from './report-BvHZIv0S.cjs';
|
|
2
|
+
export { A as AnalyticsField, e as COLUMN_REGISTRY, f as ColumnMessageKey, g as ColumnMetadata, h as FooterCalculation, i as FooterCalculationType, j as Report, k as getColumnExportHeaderLabel, l as getColumnMetadata, m as getFixedColumns, n as getReportConfig, o as getReportExportFileName } from './report-BvHZIv0S.cjs';
|
|
3
3
|
import { LocaleCode } from '@harbortouch/locale-registry';
|
|
4
4
|
export { R as RenderedReport, a as ReportDocument, b as ReportFormat, c as ReportSection, d as ResolvedColumn, S as SummaryRow } from './ir-CUi0Z9hv.cjs';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ declare function resolveTranslate(key: MessageKey, locale: string): string;
|
|
|
9
9
|
declare function getColumnAlignment(type?: FieldType): ColumnAlignment;
|
|
10
10
|
declare function isNumericType(type?: FieldType): boolean;
|
|
11
11
|
|
|
12
|
-
declare const getFooterValue: <T>(rows: T[], field: keyof T, config: ColumnPresentationConfig) => number | "common.report-col.fifteen-min-interval" | "common.report-col.fifteen-min-interval.short" | "common.report-col.fifteen-min-interval.info" | "common.report-col.adjusted-tips" | "common.report-col.adjusted-tips.short" | "common.report-col.adjusted-tips.info" | "common.report-col.advantage-program" | "common.report-col.advantage-program.short" | "common.report-col.advantage-program.info" | "common.report-col.amex" | "common.report-col.amex.short" | "common.report-col.amex.info" | "common.report-col.amex-returns" | "common.report-col.amex-returns.short" | "common.report-col.amex-returns.info" | "common.report-col.attach-rate" | "common.report-col.attach-rate.short" | "common.report-col.attach-rate.info" | "common.report-col.auto-gratuity" | "common.report-col.auto-gratuity.short" | "common.report-col.auto-gratuity.info" | "common.report-col.average-gross-price" | "common.report-col.average-gross-price.short" | "common.report-col.average-gross-price.info" | "common.report-col.bank-fees" | "common.report-col.bank-fees.short" | "common.report-col.bank-fees.info" | "common.report-col.batch-amount" | "common.report-col.batch-amount.short" | "common.report-col.batch-amount.info" | "common.report-col.batch-date" | "common.report-col.batch-date.short" | "common.report-col.batch-date.info" | "common.report-col.batch-number" | "common.report-col.batch-number.short" | "common.report-col.batch-number.info" | "common.report-col.cash-collected" | "common.report-col.cash-collected.short" | "common.report-col.cash-collected.info" | "common.report-col.clock-in-time" | "common.report-col.clock-in-time.short" | "common.report-col.clock-in-time.info" | "common.report-col.clock-out-time" | "common.report-col.clock-out-time.short" | "common.report-col.clock-out-time.info" | "common.report-col.status" | "common.report-col.status.short" | "common.report-col.status.info" | "common.report-col.last-modified" | "common.report-col.last-modified.short" | "common.report-col.last-modified.info" | "common.report-col.country" | "common.report-col.country.short" | "common.report-col.country.info" | "common.report-col.customer-name" | "common.report-col.customer-name.short" | "common.report-col.customer-name.info" | "common.report-col.date" | "common.report-col.date.short" | "common.report-col.date.info" | "common.report-col.date-close" | "common.report-col.date-close.short" | "common.report-col.date-close.info" | "common.report-col.daypart" | "common.report-col.daypart.short" | "common.report-col.daypart.info" | "common.report-col.debit" | "common.report-col.debit.short" | "common.report-col.debit.info" | "common.report-col.debit-returns" | "common.report-col.debit-returns.short" | "common.report-col.debit-returns.info" | "common.report-col.declared-tips" | "common.report-col.declared-tips.short" | "common.report-col.declared-tips.info" | "common.report-col.department" | "common.report-col.department.short" | "common.report-col.department.info" | "common.report-col.deposit-currency" | "common.report-col.deposit-currency.short" | "common.report-col.deposit-currency.info" | "common.report-col.deposit-date" | "common.report-col.deposit-date.short" | "common.report-col.deposit-date.info" | "common.report-col.discount-amount" | "common.report-col.discount-amount.short" | "common.report-col.discount-amount.info" | "common.report-col.discount-count" | "common.report-col.discount-count.short" | "common.report-col.discount-count.info" | "common.report-col.ticket-count" | "common.report-col.ticket-count.short" | "common.report-col.ticket-count.info" | "common.report-col.item-count" | "common.report-col.item-count.short" | "common.report-col.item-count.info" | "common.report-col.discover" | "common.report-col.discover.short" | "common.report-col.discover.info" | "common.report-col.discover-returns" | "common.report-col.discover-returns.short" | "common.report-col.discover-returns.info" | "common.report-col.ebt" | "common.report-col.ebt.short" | "common.report-col.ebt.info" | "common.report-col.ebt-returns" | "common.report-col.ebt-returns.short" | "common.report-col.ebt-returns.info" | "common.report-col.employee-id" | "common.report-col.employee-id.short" | "common.report-col.employee-id.info" | "common.report-col.employee-job" | "common.report-col.employee-job.short" | "common.report-col.employee-job.info" | "common.report-col.employee-name" | "common.report-col.employee-name.short" | "common.report-col.employee-name.info" | "common.report-col.exempt-taxes" | "common.report-col.exempt-taxes.short" | "common.report-col.exempt-taxes.info" | "common.report-col.exempt-sales" | "common.report-col.exempt-sales.short" | "common.report-col.exempt-sales.info" | "common.report-col.grand-total" | "common.report-col.grand-total.short" | "common.report-col.grand-total.info" | "common.report-col.gross-cash-sales" | "common.report-col.gross-cash-sales.short" | "common.report-col.gross-cash-sales.info" | "common.report-col.gross-credit-sales" | "common.report-col.gross-credit-sales.short" | "common.report-col.gross-credit-sales.info" | "common.report-col.gross-sales" | "common.report-col.gross-sales.short" | "common.report-col.gross-sales.info" | "common.report-col.gross-sales-var-lw" | "common.report-col.gross-sales-var-lw.short" | "common.report-col.gross-sales-var-lw.info" | "common.report-col.gross-sales-var-lw-pct" | "common.report-col.gross-sales-var-lw-pct.short" | "common.report-col.gross-sales-var-lw-pct.info" | "common.report-col.gross-sales-var-ly" | "common.report-col.gross-sales-var-ly.short" | "common.report-col.gross-sales-var-ly.info" | "common.report-col.gross-sales-var-ly-pct" | "common.report-col.gross-sales-var-ly-pct.short" | "common.report-col.gross-sales-var-ly-pct.info" | "common.report-col.gross-tips" | "common.report-col.gross-tips.short" | "common.report-col.gross-tips.info" | "common.report-col.guest-count" | "common.report-col.guest-count.short" | "common.report-col.guest-count.info" | "common.report-col.guests-var-lw" | "common.report-col.guests-var-lw.short" | "common.report-col.guests-var-lw.info" | "common.report-col.guests-var-lw-pct" | "common.report-col.guests-var-lw-pct.short" | "common.report-col.guests-var-lw-pct.info" | "common.report-col.guests-var-ly" | "common.report-col.guests-var-ly.short" | "common.report-col.guests-var-ly.info" | "common.report-col.guests-var-ly-pct" | "common.report-col.guests-var-ly-pct.short" | "common.report-col.guests-var-ly-pct.info" | "common.report-col.hour" | "common.report-col.hour.short" | "common.report-col.hour.info" | "common.report-col.hours-worked" | "common.report-col.hours-worked.short" | "common.report-col.hours-worked.info" | "common.report-col.inclusive-tax" | "common.report-col.inclusive-tax.short" | "common.report-col.inclusive-tax.info" | "common.report-col.item-name" | "common.report-col.item-name.short" | "common.report-col.item-name.info" | "common.report-col.item-price" | "common.report-col.item-price.short" | "common.report-col.item-price.info" | "common.report-col.location-city" | "common.report-col.location-city.short" | "common.report-col.location-city.info" | "common.report-col.location-id" | "common.report-col.location-id.short" | "common.report-col.location-id.info" | "common.report-col.location-mid" | "common.report-col.location-mid.short" | "common.report-col.location-mid.info" | "common.report-col.location-name" | "common.report-col.location-name.short" | "common.report-col.location-name.info" | "common.report-col.location-state" | "common.report-col.location-state.short" | "common.report-col.location-state.info" | "common.report-col.mastercard" | "common.report-col.mastercard.short" | "common.report-col.mastercard.info" | "common.report-col.mc-returns" | "common.report-col.mc-returns.short" | "common.report-col.mc-returns.info" | "common.report-col.modifier-name" | "common.report-col.modifier-name.short" | "common.report-col.modifier-name.info" | "common.report-col.modifier-price" | "common.report-col.modifier-price.short" | "common.report-col.modifier-price.info" | "common.report-col.modifier-quantity" | "common.report-col.modifier-quantity.short" | "common.report-col.modifier-quantity.info" | "common.report-col.item-quantity" | "common.report-col.item-quantity.short" | "common.report-col.item-quantity.info" | "common.report-col.modifier-quantity-comp" | "common.report-col.modifier-quantity-comp.short" | "common.report-col.modifier-quantity-comp.info" | "common.report-col.item-quantity-comp" | "common.report-col.item-quantity-comp.short" | "common.report-col.item-quantity-comp.info" | "common.report-col.attach-rate-comp" | "common.report-col.attach-rate-comp.short" | "common.report-col.attach-rate-comp.info" | "common.report-col.total-modifier-sales-var" | "common.report-col.total-modifier-sales-var.short" | "common.report-col.total-modifier-sales-var.info" | "common.report-col.total-modifier-sales-var-pct" | "common.report-col.total-modifier-sales-var-pct.short" | "common.report-col.total-modifier-sales-var-pct.info" | "common.report-col.modifier-quantity-var" | "common.report-col.modifier-quantity-var.short" | "common.report-col.modifier-quantity-var.info" | "common.report-col.modifier-quantity-var-pct" | "common.report-col.modifier-quantity-var-pct.short" | "common.report-col.modifier-quantity-var-pct.info" | "common.report-col.attach-rate-var" | "common.report-col.attach-rate-var.short" | "common.report-col.attach-rate-var.info" | "common.report-col.attach-rate-var-pct" | "common.report-col.attach-rate-var-pct.short" | "common.report-col.attach-rate-var-pct.info" | "common.report-col.total-modifier-sales-comp" | "common.report-col.total-modifier-sales-comp.short" | "common.report-col.total-modifier-sales-comp.info" | "common.report-col.net-sales" | "common.report-col.net-sales.short" | "common.report-col.net-sales.info" | "common.report-col.net-tax-collected" | "common.report-col.net-tax-collected.short" | "common.report-col.net-tax-collected.info" | "common.report-col.net-tips" | "common.report-col.net-tips.short" | "common.report-col.net-tips.info" | "common.report-col.number-of-guests" | "common.report-col.number-of-guests.short" | "common.report-col.number-of-guests.info" | "common.report-col.order-type" | "common.report-col.order-type.short" | "common.report-col.order-type.info" | "common.report-col.payment-type" | "common.report-col.payment-type.short" | "common.report-col.payment-type.info" | "common.report-col.payroll-id" | "common.report-col.payroll-id.short" | "common.report-col.payroll-id.info" | "common.report-col.quantity" | "common.report-col.quantity.short" | "common.report-col.quantity.info" | "common.report-col.reference-number" | "common.report-col.reference-number.short" | "common.report-col.reference-number.info" | "common.report-col.refund-amount" | "common.report-col.refund-amount.short" | "common.report-col.refund-amount.info" | "common.report-col.refunded-tax-amount" | "common.report-col.refunded-tax-amount.short" | "common.report-col.refunded-tax-amount.info" | "common.report-col.revenue-center" | "common.report-col.revenue-center.short" | "common.report-col.revenue-center.info" | "common.report-col.revenue-class" | "common.report-col.revenue-class.short" | "common.report-col.revenue-class.info" | "common.report-col.sales-var-lw" | "common.report-col.sales-var-lw.short" | "common.report-col.sales-var-lw.info" | "common.report-col.sales-var-lw-pct" | "common.report-col.sales-var-lw-pct.short" | "common.report-col.sales-var-lw-pct.info" | "common.report-col.sales-var-ly" | "common.report-col.sales-var-ly.short" | "common.report-col.sales-var-ly.info" | "common.report-col.sales-var-ly-pct" | "common.report-col.sales-var-ly-pct.short" | "common.report-col.sales-var-ly-pct.info" | "common.report-col.sales-mix-by-pct" | "common.report-col.sales-mix-by-pct.short" | "common.report-col.sales-mix-by-pct.info" | "common.report-col.sales-per-guest" | "common.report-col.sales-per-guest.short" | "common.report-col.sales-per-guest.info" | "common.report-col.sales-per-guest-lw" | "common.report-col.sales-per-guest-lw.short" | "common.report-col.sales-per-guest-lw.info" | "common.report-col.sales-per-guest-ly" | "common.report-col.sales-per-guest-ly.short" | "common.report-col.sales-per-guest-ly.info" | "common.report-col.scheduled-shift-end" | "common.report-col.scheduled-shift-end.short" | "common.report-col.scheduled-shift-end.info" | "common.report-col.scheduled-shift-start" | "common.report-col.scheduled-shift-start.short" | "common.report-col.scheduled-shift-start.info" | "common.report-col.settlement-batch-date" | "common.report-col.settlement-batch-date.short" | "common.report-col.settlement-batch-date.info" | "common.report-col.shift-duration-hrs" | "common.report-col.shift-duration-hrs.short" | "common.report-col.shift-duration-hrs.info" | "common.report-col.subtotal" | "common.report-col.subtotal.short" | "common.report-col.subtotal.info" | "common.report-col.tax-collected" | "common.report-col.tax-collected.short" | "common.report-col.tax-collected.info" | "common.report-col.taxes-var-lw" | "common.report-col.taxes-var-lw.short" | "common.report-col.taxes-var-lw.info" | "common.report-col.taxes-var-lw-pct" | "common.report-col.taxes-var-lw-pct.short" | "common.report-col.taxes-var-lw-pct.info" | "common.report-col.taxes-var-ly" | "common.report-col.taxes-var-ly.short" | "common.report-col.taxes-var-ly.info" | "common.report-col.taxes-var-ly-pct" | "common.report-col.taxes-var-ly-pct.short" | "common.report-col.taxes-var-ly-pct.info" | "common.report-col.tax-name" | "common.report-col.tax-name.short" | "common.report-col.tax-name.info" | "common.report-col.tax-rate" | "common.report-col.tax-rate.short" | "common.report-col.tax-rate.info" | "common.report-col.taxable-sales" | "common.report-col.taxable-sales.short" | "common.report-col.taxable-sales.info" | "common.report-col.ticket-closed" | "common.report-col.ticket-closed.short" | "common.report-col.ticket-closed.info" | "common.report-col.ticket-fee" | "common.report-col.ticket-fee.short" | "common.report-col.ticket-fee.info" | "common.report-col.ticket-number" | "common.report-col.ticket-number.short" | "common.report-col.ticket-number.info" | "common.report-col.ticket-open" | "common.report-col.ticket-open.short" | "common.report-col.ticket-open.info" | "common.report-col.ticket-total" | "common.report-col.ticket-total.short" | "common.report-col.ticket-total.info" | "common.report-col.time-open-mins" | "common.report-col.time-open-mins.short" | "common.report-col.time-open-mins.info" | "common.report-col.tip-pct" | "common.report-col.tip-pct.short" | "common.report-col.tip-pct.info" | "common.report-col.tip-reduction" | "common.report-col.tip-reduction.short" | "common.report-col.tip-reduction.info" | "common.report-col.tip-share" | "common.report-col.tip-share.short" | "common.report-col.tip-share.info" | "common.report-col.tip-share-contributed" | "common.report-col.tip-share-contributed.short" | "common.report-col.tip-share-contributed.info" | "common.report-col.tips" | "common.report-col.tips.short" | "common.report-col.tips.info" | "common.report-col.tips-per-hour" | "common.report-col.tips-per-hour.short" | "common.report-col.tips-per-hour.info" | "common.report-col.total-collected" | "common.report-col.total-collected.short" | "common.report-col.total-collected.info" | "common.report-col.total-item-sales" | "common.report-col.total-item-sales.short" | "common.report-col.total-item-sales.info" | "common.report-col.total-modifier-sales" | "common.report-col.total-modifier-sales.short" | "common.report-col.total-modifier-sales.info" | "common.report-col.total-returns" | "common.report-col.total-returns.short" | "common.report-col.total-returns.info" | "common.report-col.total-sales" | "common.report-col.total-sales.short" | "common.report-col.total-sales.info" | "common.report-col.total-tips" | "common.report-col.total-tips.short" | "common.report-col.total-tips.info" | "common.report-col.transaction-date" | "common.report-col.transaction-date.short" | "common.report-col.transaction-date.info" | "common.report-col.sale-payment-type" | "common.report-col.sale-payment-type.short" | "common.report-col.sale-payment-type.info" | "common.report-col.transaction-type" | "common.report-col.transaction-type.short" | "common.report-col.transaction-type.info" | "common.report-col.untaxed-sales" | "common.report-col.untaxed-sales.short" | "common.report-col.untaxed-sales.info" | "common.report-col.visa" | "common.report-col.visa.short" | "common.report-col.visa.info" | "common.report-col.visa-returns" | "common.report-col.visa-returns.short" | "common.report-col.visa-returns.info" | "common.report-col.payments-count" | "common.report-col.payments-count.short" | "common.report-col.payments-count.info" | "common.report-col.payments-amount" | "common.report-col.payments-amount.short" | "common.report-col.payments-amount.info" | "common.report-col.payments-total" | "common.report-col.payments-total.short" | "common.report-col.payments-total.info" | "common.report-col.refund-void-description" | "common.report-col.refund-void-description.short" | "common.report-col.refund-void-description.info" | "common.report-col.refund-void-count" | "common.report-col.refund-void-count.short" | "common.report-col.refund-void-count.info" | "common.report-col.refund-void-amount" | "common.report-col.refund-void-amount.short" | "common.report-col.refund-void-amount.info" | "common.report-col.refund-void-pct-sales" | "common.report-col.refund-void-pct-sales.short" | "common.report-col.refund-void-pct-sales.info" | "common.report-col.discount-name" | "common.report-col.discount-name.short" | "common.report-col.discount-name.info" | "common.report-col.tickets" | "common.report-col.tickets.short" | "common.report-col.tickets.info" | "common.report-col.guests" | "common.report-col.guests.short" | "common.report-col.guests.info" | "common.report-col.ticket-average" | "common.report-col.ticket-average.short" | "common.report-col.ticket-average.info" | "common.report-col.guest-average" | "common.report-col.guest-average.short" | "common.report-col.guest-average.info" | "common.report-col.net" | "common.report-col.net.short" | "common.report-col.net.info" | "common.report-col.gross-cash-tips" | "common.report-col.gross-cash-tips.short" | "common.report-col.gross-cash-tips.info" | "common.report-col.gross-credit-card-tips" | "common.report-col.gross-credit-card-tips.short" | "common.report-col.gross-credit-card-tips.info" | "common.report-col.type" | "common.report-col.type.short" | "common.report-col.type.info" | "common.report-col.paid-normal-hours" | "common.report-col.paid-normal-hours.short" | "common.report-col.paid-normal-hours.info" | "common.report-col.normal-pay" | "common.report-col.normal-pay.short" | "common.report-col.normal-pay.info" | "common.report-col.overtime-pay" | "common.report-col.overtime-pay.short" | "common.report-col.overtime-pay.info" | "common.report-col.double-overtime-pay" | "common.report-col.double-overtime-pay.short" | "common.report-col.double-overtime-pay.info" | "common.report-col.gratuity" | "common.report-col.gratuity.short" | "common.report-col.gratuity.info" | "common.report-col.tip-paid-status" | "common.report-col.tip-paid-status.short" | "common.report-col.tip-paid-status.info" | "common.report-col.total-payments" | "common.report-col.total-payments.short" | "common.report-col.total-payments.info" | "common.report-col.minimum-wage-adjustment" | "common.report-col.minimum-wage-adjustment.short" | "common.report-col.minimum-wage-adjustment.info" | "common.report-col.total-pay" | "common.report-col.total-pay.short" | "common.report-col.total-pay.info" | "common.report-col.table-name" | "common.report-col.table-name.short" | "common.report-col.table-name.info" | "common.report-section.revenue-class" | "common.report-section.payments" | "common.report-section.cash" | "common.report-section.taxes" | "common.report-section.refunds-voids" | "common.report-section.discounts" | "common.report-section.sales-by-day-part" | "common.report-section.sales-by-order-type" | "common.report-section.cash-row.cash-payments" | "common.report-section.cash-row.paid-in-outs" | "common.report-section.cash-row.gratuities-paid-out" | "common.report-section.cash-row.cc-tips-paid-out" | "common.report-section.rev-class-footer.tax-total" | "common.report-section.rev-class-footer.gratuities" | "common.report-section.rev-class-footer.balance-payments" | "common.report-section.rev-class-footer.gift-card-sales" | "common.report-section.rev-class-footer.non-sales-revenue" | "common.report-section.rev-class-footer.house-account" | "common.report-section.rev-class-footer.total-accountable" | "scheduled-reports.report-name" | "scheduled-reports.period" | "scheduled-reports.generated-at" | "scheduled-reports.generated-by" | "components.form.field.group-by" | "components.form.field.last-week" | "components.form.field.last-year" | "common.labels.locations" | "common.labels.yes" | "common.labels.unassigned" | "analytics.field.location_id" | "analytics.field.order_type_id" | "analytics.field.revenue_center_id" | "analytics.field.revenue_center_id.all" | "analytics.field.hour_id" | "analytics.field.daypart_id" | "analytics.field.timeslot_id" | "analytics.field.employee_id" | "analytics.field.employee_name" | "analytics.field.payroll_id" | "analytics.field.intraday_period_group" | "analytics.field.item_id" | "analytics.field.department_id" | "analytics.field.revenue_class_id" | "analytics.field.modifier_id" | "table.total" | "table.groups.sales" | "table.groups.net-sales" | "table.groups.taxes" | "table.groups.gross-sales" | "table.groups.guests" | "table.groups.sales-per-guest" | "employee-timecard.status.active" | "employee-timecard.status.inactive" | "employee-timecard.job.break-suffix" | null;
|
|
12
|
+
declare const getFooterValue: <T>(rows: T[], field: keyof T, config: ColumnPresentationConfig) => number | "common.report-col.fifteen-min-interval" | "common.report-col.fifteen-min-interval.short" | "common.report-col.fifteen-min-interval.info" | "common.report-col.adjusted-tips" | "common.report-col.adjusted-tips.short" | "common.report-col.adjusted-tips.info" | "common.report-col.advantage-program" | "common.report-col.advantage-program.short" | "common.report-col.advantage-program.info" | "common.report-col.amex" | "common.report-col.amex.short" | "common.report-col.amex.info" | "common.report-col.amex-returns" | "common.report-col.amex-returns.short" | "common.report-col.amex-returns.info" | "common.report-col.attach-rate" | "common.report-col.attach-rate.short" | "common.report-col.attach-rate.info" | "common.report-col.auto-gratuity" | "common.report-col.auto-gratuity.short" | "common.report-col.auto-gratuity.info" | "common.report-col.average-gross-price" | "common.report-col.average-gross-price.short" | "common.report-col.average-gross-price.info" | "common.report-col.bank-fees" | "common.report-col.bank-fees.short" | "common.report-col.bank-fees.info" | "common.report-col.batch-amount" | "common.report-col.batch-amount.short" | "common.report-col.batch-amount.info" | "common.report-col.batch-date" | "common.report-col.batch-date.short" | "common.report-col.batch-date.info" | "common.report-col.batch-number" | "common.report-col.batch-number.short" | "common.report-col.batch-number.info" | "common.report-col.cash-collected" | "common.report-col.cash-collected.short" | "common.report-col.cash-collected.info" | "common.report-col.clock-in-time" | "common.report-col.clock-in-time.short" | "common.report-col.clock-in-time.info" | "common.report-col.clock-out-time" | "common.report-col.clock-out-time.short" | "common.report-col.clock-out-time.info" | "common.report-col.status" | "common.report-col.status.short" | "common.report-col.status.info" | "common.report-col.last-modified" | "common.report-col.last-modified.short" | "common.report-col.last-modified.info" | "common.report-col.country" | "common.report-col.country.short" | "common.report-col.country.info" | "common.report-col.customer-name" | "common.report-col.customer-name.short" | "common.report-col.customer-name.info" | "common.report-col.date" | "common.report-col.date.short" | "common.report-col.date.info" | "common.report-col.date-close" | "common.report-col.date-close.short" | "common.report-col.date-close.info" | "common.report-col.daypart" | "common.report-col.daypart.short" | "common.report-col.daypart.info" | "common.report-col.debit" | "common.report-col.debit.short" | "common.report-col.debit.info" | "common.report-col.debit-returns" | "common.report-col.debit-returns.short" | "common.report-col.debit-returns.info" | "common.report-col.declared-tips" | "common.report-col.declared-tips.short" | "common.report-col.declared-tips.info" | "common.report-col.department" | "common.report-col.department.short" | "common.report-col.department.info" | "common.report-col.deposit-currency" | "common.report-col.deposit-currency.short" | "common.report-col.deposit-currency.info" | "common.report-col.deposit-date" | "common.report-col.deposit-date.short" | "common.report-col.deposit-date.info" | "common.report-col.discount-amount" | "common.report-col.discount-amount.short" | "common.report-col.discount-amount.info" | "common.report-col.discount-count" | "common.report-col.discount-count.short" | "common.report-col.discount-count.info" | "common.report-col.ticket-count" | "common.report-col.ticket-count.short" | "common.report-col.ticket-count.info" | "common.report-col.item-count" | "common.report-col.item-count.short" | "common.report-col.item-count.info" | "common.report-col.discover" | "common.report-col.discover.short" | "common.report-col.discover.info" | "common.report-col.discover-returns" | "common.report-col.discover-returns.short" | "common.report-col.discover-returns.info" | "common.report-col.ebt" | "common.report-col.ebt.short" | "common.report-col.ebt.info" | "common.report-col.ebt-returns" | "common.report-col.ebt-returns.short" | "common.report-col.ebt-returns.info" | "common.report-col.employee-id" | "common.report-col.employee-id.short" | "common.report-col.employee-id.info" | "common.report-col.employee-job" | "common.report-col.employee-job.short" | "common.report-col.employee-job.info" | "common.report-col.employee-name" | "common.report-col.employee-name.short" | "common.report-col.employee-name.info" | "common.report-col.exempt-taxes" | "common.report-col.exempt-taxes.short" | "common.report-col.exempt-taxes.info" | "common.report-col.exempt-sales" | "common.report-col.exempt-sales.short" | "common.report-col.exempt-sales.info" | "common.report-col.grand-total" | "common.report-col.grand-total.short" | "common.report-col.grand-total.info" | "common.report-col.gross-cash-sales" | "common.report-col.gross-cash-sales.short" | "common.report-col.gross-cash-sales.info" | "common.report-col.gross-credit-sales" | "common.report-col.gross-credit-sales.short" | "common.report-col.gross-credit-sales.info" | "common.report-col.gross-sales" | "common.report-col.gross-sales.short" | "common.report-col.gross-sales.info" | "common.report-col.gross-sales-var-lw" | "common.report-col.gross-sales-var-lw.short" | "common.report-col.gross-sales-var-lw.info" | "common.report-col.gross-sales-var-lw-pct" | "common.report-col.gross-sales-var-lw-pct.short" | "common.report-col.gross-sales-var-lw-pct.info" | "common.report-col.gross-sales-var-ly" | "common.report-col.gross-sales-var-ly.short" | "common.report-col.gross-sales-var-ly.info" | "common.report-col.gross-sales-var-ly-pct" | "common.report-col.gross-sales-var-ly-pct.short" | "common.report-col.gross-sales-var-ly-pct.info" | "common.report-col.gross-tips" | "common.report-col.gross-tips.short" | "common.report-col.gross-tips.info" | "common.report-col.guest-count" | "common.report-col.guest-count.short" | "common.report-col.guest-count.info" | "common.report-col.guests-var-lw" | "common.report-col.guests-var-lw.short" | "common.report-col.guests-var-lw.info" | "common.report-col.guests-var-lw-pct" | "common.report-col.guests-var-lw-pct.short" | "common.report-col.guests-var-lw-pct.info" | "common.report-col.guests-var-ly" | "common.report-col.guests-var-ly.short" | "common.report-col.guests-var-ly.info" | "common.report-col.guests-var-ly-pct" | "common.report-col.guests-var-ly-pct.short" | "common.report-col.guests-var-ly-pct.info" | "common.report-col.hour" | "common.report-col.hour.short" | "common.report-col.hour.info" | "common.report-col.hours-worked" | "common.report-col.hours-worked.short" | "common.report-col.hours-worked.info" | "common.report-col.inclusive-tax" | "common.report-col.inclusive-tax.short" | "common.report-col.inclusive-tax.info" | "common.report-col.item-name" | "common.report-col.item-name.short" | "common.report-col.item-name.info" | "common.report-col.item-price" | "common.report-col.item-price.short" | "common.report-col.item-price.info" | "common.report-col.location-city" | "common.report-col.location-city.short" | "common.report-col.location-city.info" | "common.report-col.location-id" | "common.report-col.location-id.short" | "common.report-col.location-id.info" | "common.report-col.location-mid" | "common.report-col.location-mid.short" | "common.report-col.location-mid.info" | "common.report-col.location-name" | "common.report-col.location-name.short" | "common.report-col.location-name.info" | "common.report-col.location-state" | "common.report-col.location-state.short" | "common.report-col.location-state.info" | "common.report-col.mastercard" | "common.report-col.mastercard.short" | "common.report-col.mastercard.info" | "common.report-col.mc-returns" | "common.report-col.mc-returns.short" | "common.report-col.mc-returns.info" | "common.report-col.modifier-name" | "common.report-col.modifier-name.short" | "common.report-col.modifier-name.info" | "common.report-col.modifier-price" | "common.report-col.modifier-price.short" | "common.report-col.modifier-price.info" | "common.report-col.modifier-quantity" | "common.report-col.modifier-quantity.short" | "common.report-col.modifier-quantity.info" | "common.report-col.item-quantity" | "common.report-col.item-quantity.short" | "common.report-col.item-quantity.info" | "common.report-col.modifier-quantity-comp" | "common.report-col.modifier-quantity-comp.short" | "common.report-col.modifier-quantity-comp.info" | "common.report-col.item-quantity-comp" | "common.report-col.item-quantity-comp.short" | "common.report-col.item-quantity-comp.info" | "common.report-col.attach-rate-comp" | "common.report-col.attach-rate-comp.short" | "common.report-col.attach-rate-comp.info" | "common.report-col.total-modifier-sales-var" | "common.report-col.total-modifier-sales-var.short" | "common.report-col.total-modifier-sales-var.info" | "common.report-col.total-modifier-sales-var-pct" | "common.report-col.total-modifier-sales-var-pct.short" | "common.report-col.total-modifier-sales-var-pct.info" | "common.report-col.modifier-quantity-var" | "common.report-col.modifier-quantity-var.short" | "common.report-col.modifier-quantity-var.info" | "common.report-col.modifier-quantity-var-pct" | "common.report-col.modifier-quantity-var-pct.short" | "common.report-col.modifier-quantity-var-pct.info" | "common.report-col.attach-rate-var" | "common.report-col.attach-rate-var.short" | "common.report-col.attach-rate-var.info" | "common.report-col.attach-rate-var-pct" | "common.report-col.attach-rate-var-pct.short" | "common.report-col.attach-rate-var-pct.info" | "common.report-col.total-modifier-sales-comp" | "common.report-col.total-modifier-sales-comp.short" | "common.report-col.total-modifier-sales-comp.info" | "common.report-col.net-sales" | "common.report-col.net-sales.short" | "common.report-col.net-sales.info" | "common.report-col.net-tax-collected" | "common.report-col.net-tax-collected.short" | "common.report-col.net-tax-collected.info" | "common.report-col.net-tips" | "common.report-col.net-tips.short" | "common.report-col.net-tips.info" | "common.report-col.number-of-guests" | "common.report-col.number-of-guests.short" | "common.report-col.number-of-guests.info" | "common.report-col.order-type" | "common.report-col.order-type.short" | "common.report-col.order-type.info" | "common.report-col.payment-type" | "common.report-col.payment-type.short" | "common.report-col.payment-type.info" | "common.report-col.payroll-id" | "common.report-col.payroll-id.short" | "common.report-col.payroll-id.info" | "common.report-col.quantity" | "common.report-col.quantity.short" | "common.report-col.quantity.info" | "common.report-col.reference-number" | "common.report-col.reference-number.short" | "common.report-col.reference-number.info" | "common.report-col.refund-amount" | "common.report-col.refund-amount.short" | "common.report-col.refund-amount.info" | "common.report-col.refunded-tax-amount" | "common.report-col.refunded-tax-amount.short" | "common.report-col.refunded-tax-amount.info" | "common.report-col.revenue-center" | "common.report-col.revenue-center.short" | "common.report-col.revenue-center.info" | "common.report-col.revenue-class" | "common.report-col.revenue-class.short" | "common.report-col.revenue-class.info" | "common.report-col.sales-var-lw" | "common.report-col.sales-var-lw.short" | "common.report-col.sales-var-lw.info" | "common.report-col.sales-var-lw-pct" | "common.report-col.sales-var-lw-pct.short" | "common.report-col.sales-var-lw-pct.info" | "common.report-col.sales-var-ly" | "common.report-col.sales-var-ly.short" | "common.report-col.sales-var-ly.info" | "common.report-col.sales-var-ly-pct" | "common.report-col.sales-var-ly-pct.short" | "common.report-col.sales-var-ly-pct.info" | "common.report-col.sales-mix-by-pct" | "common.report-col.sales-mix-by-pct.short" | "common.report-col.sales-mix-by-pct.info" | "common.report-col.sales-per-guest" | "common.report-col.sales-per-guest.short" | "common.report-col.sales-per-guest.info" | "common.report-col.sales-per-guest-lw" | "common.report-col.sales-per-guest-lw.short" | "common.report-col.sales-per-guest-lw.info" | "common.report-col.sales-per-guest-ly" | "common.report-col.sales-per-guest-ly.short" | "common.report-col.sales-per-guest-ly.info" | "common.report-col.scheduled-shift-end" | "common.report-col.scheduled-shift-end.short" | "common.report-col.scheduled-shift-end.info" | "common.report-col.scheduled-shift-start" | "common.report-col.scheduled-shift-start.short" | "common.report-col.scheduled-shift-start.info" | "common.report-col.settlement-batch-date" | "common.report-col.settlement-batch-date.short" | "common.report-col.settlement-batch-date.info" | "common.report-col.shift-duration-hrs" | "common.report-col.shift-duration-hrs.short" | "common.report-col.shift-duration-hrs.info" | "common.report-col.subtotal" | "common.report-col.subtotal.short" | "common.report-col.subtotal.info" | "common.report-col.tax-collected" | "common.report-col.tax-collected.short" | "common.report-col.tax-collected.info" | "common.report-col.taxes-var-lw" | "common.report-col.taxes-var-lw.short" | "common.report-col.taxes-var-lw.info" | "common.report-col.taxes-var-lw-pct" | "common.report-col.taxes-var-lw-pct.short" | "common.report-col.taxes-var-lw-pct.info" | "common.report-col.taxes-var-ly" | "common.report-col.taxes-var-ly.short" | "common.report-col.taxes-var-ly.info" | "common.report-col.taxes-var-ly-pct" | "common.report-col.taxes-var-ly-pct.short" | "common.report-col.taxes-var-ly-pct.info" | "common.report-col.tax-name" | "common.report-col.tax-name.short" | "common.report-col.tax-name.info" | "common.report-col.tax-rate" | "common.report-col.tax-rate.short" | "common.report-col.tax-rate.info" | "common.report-col.taxable-sales" | "common.report-col.taxable-sales.short" | "common.report-col.taxable-sales.info" | "common.report-col.ticket-closed" | "common.report-col.ticket-closed.short" | "common.report-col.ticket-closed.info" | "common.report-col.ticket-fee" | "common.report-col.ticket-fee.short" | "common.report-col.ticket-fee.info" | "common.report-col.ticket-number" | "common.report-col.ticket-number.short" | "common.report-col.ticket-number.info" | "common.report-col.ticket-open" | "common.report-col.ticket-open.short" | "common.report-col.ticket-open.info" | "common.report-col.ticket-total" | "common.report-col.ticket-total.short" | "common.report-col.ticket-total.info" | "common.report-col.time-open-mins" | "common.report-col.time-open-mins.short" | "common.report-col.time-open-mins.info" | "common.report-col.tip-pct" | "common.report-col.tip-pct.short" | "common.report-col.tip-pct.info" | "common.report-col.tip-reduction" | "common.report-col.tip-reduction.short" | "common.report-col.tip-reduction.info" | "common.report-col.tip-share" | "common.report-col.tip-share.short" | "common.report-col.tip-share.info" | "common.report-col.tip-share-contributed" | "common.report-col.tip-share-contributed.short" | "common.report-col.tip-share-contributed.info" | "common.report-col.tips" | "common.report-col.tips.short" | "common.report-col.tips.info" | "common.report-col.tips-per-hour" | "common.report-col.tips-per-hour.short" | "common.report-col.tips-per-hour.info" | "common.report-col.total-collected" | "common.report-col.total-collected.short" | "common.report-col.total-collected.info" | "common.report-col.total-item-sales" | "common.report-col.total-item-sales.short" | "common.report-col.total-item-sales.info" | "common.report-col.total-modifier-sales" | "common.report-col.total-modifier-sales.short" | "common.report-col.total-modifier-sales.info" | "common.report-col.total-returns" | "common.report-col.total-returns.short" | "common.report-col.total-returns.info" | "common.report-col.total-sales" | "common.report-col.total-sales.short" | "common.report-col.total-sales.info" | "common.report-col.total-tips" | "common.report-col.total-tips.short" | "common.report-col.total-tips.info" | "common.report-col.transaction-date" | "common.report-col.transaction-date.short" | "common.report-col.transaction-date.info" | "common.report-col.sale-payment-type" | "common.report-col.sale-payment-type.short" | "common.report-col.sale-payment-type.info" | "common.report-col.transaction-type" | "common.report-col.transaction-type.short" | "common.report-col.transaction-type.info" | "common.report-col.untaxed-sales" | "common.report-col.untaxed-sales.short" | "common.report-col.untaxed-sales.info" | "common.report-col.visa" | "common.report-col.visa.short" | "common.report-col.visa.info" | "common.report-col.visa-returns" | "common.report-col.visa-returns.short" | "common.report-col.visa-returns.info" | "common.report-col.payments-count" | "common.report-col.payments-count.short" | "common.report-col.payments-count.info" | "common.report-col.payments-amount" | "common.report-col.payments-amount.short" | "common.report-col.payments-amount.info" | "common.report-col.payments-total" | "common.report-col.payments-total.short" | "common.report-col.payments-total.info" | "common.report-col.refund-void-description" | "common.report-col.refund-void-description.short" | "common.report-col.refund-void-description.info" | "common.report-col.refund-void-count" | "common.report-col.refund-void-count.short" | "common.report-col.refund-void-count.info" | "common.report-col.refund-void-amount" | "common.report-col.refund-void-amount.short" | "common.report-col.refund-void-amount.info" | "common.report-col.refund-void-pct-sales" | "common.report-col.refund-void-pct-sales.short" | "common.report-col.refund-void-pct-sales.info" | "common.report-col.discount-name" | "common.report-col.discount-name.short" | "common.report-col.discount-name.info" | "common.report-col.tickets" | "common.report-col.tickets.short" | "common.report-col.tickets.info" | "common.report-col.guests" | "common.report-col.guests.short" | "common.report-col.guests.info" | "common.report-col.ticket-average" | "common.report-col.ticket-average.short" | "common.report-col.ticket-average.info" | "common.report-col.guest-average" | "common.report-col.guest-average.short" | "common.report-col.guest-average.info" | "common.report-col.net" | "common.report-col.net.short" | "common.report-col.net.info" | "common.report-col.gross-cash-tips" | "common.report-col.gross-cash-tips.short" | "common.report-col.gross-cash-tips.info" | "common.report-col.gross-credit-card-tips" | "common.report-col.gross-credit-card-tips.short" | "common.report-col.gross-credit-card-tips.info" | "common.report-col.type" | "common.report-col.type.short" | "common.report-col.type.info" | "common.report-col.paid-normal-hours" | "common.report-col.paid-normal-hours.short" | "common.report-col.paid-normal-hours.info" | "common.report-col.normal-pay" | "common.report-col.normal-pay.short" | "common.report-col.normal-pay.info" | "common.report-col.overtime-pay" | "common.report-col.overtime-pay.short" | "common.report-col.overtime-pay.info" | "common.report-col.double-overtime-pay" | "common.report-col.double-overtime-pay.short" | "common.report-col.double-overtime-pay.info" | "common.report-col.gratuity" | "common.report-col.gratuity.short" | "common.report-col.gratuity.info" | "common.report-col.tip-paid-status" | "common.report-col.tip-paid-status.short" | "common.report-col.tip-paid-status.info" | "common.report-col.total-payments" | "common.report-col.total-payments.short" | "common.report-col.total-payments.info" | "common.report-col.minimum-wage-adjustment" | "common.report-col.minimum-wage-adjustment.short" | "common.report-col.minimum-wage-adjustment.info" | "common.report-col.total-pay" | "common.report-col.total-pay.short" | "common.report-col.total-pay.info" | "common.report-col.table-name" | "common.report-col.table-name.short" | "common.report-col.table-name.info" | "common.report-section.revenue-class" | "common.report-section.payments" | "common.report-section.cash" | "common.report-section.taxes" | "common.report-section.refunds-voids" | "common.report-section.discounts" | "common.report-section.sales-by-day-part" | "common.report-section.sales-by-order-type" | "common.report-section.cash-row.cash-payments" | "common.report-section.cash-row.paid-in-outs" | "common.report-section.cash-row.gratuities-paid-out" | "common.report-section.cash-row.cc-tips-paid-out" | "common.report-section.rev-class-footer.tax-total" | "common.report-section.rev-class-footer.gratuities" | "common.report-section.rev-class-footer.balance-payments" | "common.report-section.rev-class-footer.gift-card-sales" | "common.report-section.rev-class-footer.non-sales-revenue" | "common.report-section.rev-class-footer.house-account" | "common.report-section.rev-class-footer.total-accountable" | "scheduled-reports.report-name" | "scheduled-reports.period" | "scheduled-reports.generated-at" | "scheduled-reports.generated-by" | "scheduled-reports.applied-filters" | "components.form.field.group-by" | "components.form.field.last-week" | "components.form.field.last-year" | "common.labels.locations" | "common.labels.yes" | "common.labels.unassigned" | "common.labels.none" | "analytics.field.location_id" | "analytics.field.order_type_id" | "analytics.field.revenue_center_id" | "analytics.field.revenue_center_id.all" | "analytics.field.hour_id" | "analytics.field.daypart_id" | "analytics.field.timeslot_id" | "analytics.field.employee_id" | "analytics.field.employee_name" | "analytics.field.payroll_id" | "analytics.field.intraday_period_group" | "analytics.field.item_id" | "analytics.field.department_id" | "analytics.field.revenue_class_id" | "analytics.field.modifier_id" | "table.total" | "table.groups.sales" | "table.groups.net-sales" | "table.groups.taxes" | "table.groups.gross-sales" | "table.groups.guests" | "table.groups.sales-per-guest" | "employee-timecard.status.active" | "employee-timecard.status.inactive" | "employee-timecard.job.break-suffix" | null;
|
|
13
13
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>) => T;
|
|
14
14
|
|
|
15
15
|
type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'grossVarLW' | 'grossVarLY' | 'grossVarLWPct' | 'grossVarLYPct' | 'taxesAmount' | 'taxesAmountLastWeek' | 'taxesAmountLastYear' | 'taxesVarLW' | 'taxesVarLY' | 'taxesVarLWPct' | 'taxesVarLYPct' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MessageKey, F as FieldType, C as ColumnAlignment, a as ColumnPresentationConfig, b as ColumnGroupConfig, R as ReportType, c as ReportConfig, d as ReportColumnKey } from './report-
|
|
2
|
-
export { A as AnalyticsField, e as COLUMN_REGISTRY, f as ColumnMessageKey, g as ColumnMetadata, h as FooterCalculation, i as FooterCalculationType, j as Report, k as getColumnExportHeaderLabel, l as getColumnMetadata, m as getFixedColumns, n as getReportConfig, o as getReportExportFileName } from './report-
|
|
1
|
+
import { M as MessageKey, F as FieldType, C as ColumnAlignment, a as ColumnPresentationConfig, b as ColumnGroupConfig, R as ReportType, c as ReportConfig, d as ReportColumnKey } from './report-BvHZIv0S.js';
|
|
2
|
+
export { A as AnalyticsField, e as COLUMN_REGISTRY, f as ColumnMessageKey, g as ColumnMetadata, h as FooterCalculation, i as FooterCalculationType, j as Report, k as getColumnExportHeaderLabel, l as getColumnMetadata, m as getFixedColumns, n as getReportConfig, o as getReportExportFileName } from './report-BvHZIv0S.js';
|
|
3
3
|
import { LocaleCode } from '@harbortouch/locale-registry';
|
|
4
4
|
export { R as RenderedReport, a as ReportDocument, b as ReportFormat, c as ReportSection, d as ResolvedColumn, S as SummaryRow } from './ir-CUi0Z9hv.js';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ declare function resolveTranslate(key: MessageKey, locale: string): string;
|
|
|
9
9
|
declare function getColumnAlignment(type?: FieldType): ColumnAlignment;
|
|
10
10
|
declare function isNumericType(type?: FieldType): boolean;
|
|
11
11
|
|
|
12
|
-
declare const getFooterValue: <T>(rows: T[], field: keyof T, config: ColumnPresentationConfig) => number | "common.report-col.fifteen-min-interval" | "common.report-col.fifteen-min-interval.short" | "common.report-col.fifteen-min-interval.info" | "common.report-col.adjusted-tips" | "common.report-col.adjusted-tips.short" | "common.report-col.adjusted-tips.info" | "common.report-col.advantage-program" | "common.report-col.advantage-program.short" | "common.report-col.advantage-program.info" | "common.report-col.amex" | "common.report-col.amex.short" | "common.report-col.amex.info" | "common.report-col.amex-returns" | "common.report-col.amex-returns.short" | "common.report-col.amex-returns.info" | "common.report-col.attach-rate" | "common.report-col.attach-rate.short" | "common.report-col.attach-rate.info" | "common.report-col.auto-gratuity" | "common.report-col.auto-gratuity.short" | "common.report-col.auto-gratuity.info" | "common.report-col.average-gross-price" | "common.report-col.average-gross-price.short" | "common.report-col.average-gross-price.info" | "common.report-col.bank-fees" | "common.report-col.bank-fees.short" | "common.report-col.bank-fees.info" | "common.report-col.batch-amount" | "common.report-col.batch-amount.short" | "common.report-col.batch-amount.info" | "common.report-col.batch-date" | "common.report-col.batch-date.short" | "common.report-col.batch-date.info" | "common.report-col.batch-number" | "common.report-col.batch-number.short" | "common.report-col.batch-number.info" | "common.report-col.cash-collected" | "common.report-col.cash-collected.short" | "common.report-col.cash-collected.info" | "common.report-col.clock-in-time" | "common.report-col.clock-in-time.short" | "common.report-col.clock-in-time.info" | "common.report-col.clock-out-time" | "common.report-col.clock-out-time.short" | "common.report-col.clock-out-time.info" | "common.report-col.status" | "common.report-col.status.short" | "common.report-col.status.info" | "common.report-col.last-modified" | "common.report-col.last-modified.short" | "common.report-col.last-modified.info" | "common.report-col.country" | "common.report-col.country.short" | "common.report-col.country.info" | "common.report-col.customer-name" | "common.report-col.customer-name.short" | "common.report-col.customer-name.info" | "common.report-col.date" | "common.report-col.date.short" | "common.report-col.date.info" | "common.report-col.date-close" | "common.report-col.date-close.short" | "common.report-col.date-close.info" | "common.report-col.daypart" | "common.report-col.daypart.short" | "common.report-col.daypart.info" | "common.report-col.debit" | "common.report-col.debit.short" | "common.report-col.debit.info" | "common.report-col.debit-returns" | "common.report-col.debit-returns.short" | "common.report-col.debit-returns.info" | "common.report-col.declared-tips" | "common.report-col.declared-tips.short" | "common.report-col.declared-tips.info" | "common.report-col.department" | "common.report-col.department.short" | "common.report-col.department.info" | "common.report-col.deposit-currency" | "common.report-col.deposit-currency.short" | "common.report-col.deposit-currency.info" | "common.report-col.deposit-date" | "common.report-col.deposit-date.short" | "common.report-col.deposit-date.info" | "common.report-col.discount-amount" | "common.report-col.discount-amount.short" | "common.report-col.discount-amount.info" | "common.report-col.discount-count" | "common.report-col.discount-count.short" | "common.report-col.discount-count.info" | "common.report-col.ticket-count" | "common.report-col.ticket-count.short" | "common.report-col.ticket-count.info" | "common.report-col.item-count" | "common.report-col.item-count.short" | "common.report-col.item-count.info" | "common.report-col.discover" | "common.report-col.discover.short" | "common.report-col.discover.info" | "common.report-col.discover-returns" | "common.report-col.discover-returns.short" | "common.report-col.discover-returns.info" | "common.report-col.ebt" | "common.report-col.ebt.short" | "common.report-col.ebt.info" | "common.report-col.ebt-returns" | "common.report-col.ebt-returns.short" | "common.report-col.ebt-returns.info" | "common.report-col.employee-id" | "common.report-col.employee-id.short" | "common.report-col.employee-id.info" | "common.report-col.employee-job" | "common.report-col.employee-job.short" | "common.report-col.employee-job.info" | "common.report-col.employee-name" | "common.report-col.employee-name.short" | "common.report-col.employee-name.info" | "common.report-col.exempt-taxes" | "common.report-col.exempt-taxes.short" | "common.report-col.exempt-taxes.info" | "common.report-col.exempt-sales" | "common.report-col.exempt-sales.short" | "common.report-col.exempt-sales.info" | "common.report-col.grand-total" | "common.report-col.grand-total.short" | "common.report-col.grand-total.info" | "common.report-col.gross-cash-sales" | "common.report-col.gross-cash-sales.short" | "common.report-col.gross-cash-sales.info" | "common.report-col.gross-credit-sales" | "common.report-col.gross-credit-sales.short" | "common.report-col.gross-credit-sales.info" | "common.report-col.gross-sales" | "common.report-col.gross-sales.short" | "common.report-col.gross-sales.info" | "common.report-col.gross-sales-var-lw" | "common.report-col.gross-sales-var-lw.short" | "common.report-col.gross-sales-var-lw.info" | "common.report-col.gross-sales-var-lw-pct" | "common.report-col.gross-sales-var-lw-pct.short" | "common.report-col.gross-sales-var-lw-pct.info" | "common.report-col.gross-sales-var-ly" | "common.report-col.gross-sales-var-ly.short" | "common.report-col.gross-sales-var-ly.info" | "common.report-col.gross-sales-var-ly-pct" | "common.report-col.gross-sales-var-ly-pct.short" | "common.report-col.gross-sales-var-ly-pct.info" | "common.report-col.gross-tips" | "common.report-col.gross-tips.short" | "common.report-col.gross-tips.info" | "common.report-col.guest-count" | "common.report-col.guest-count.short" | "common.report-col.guest-count.info" | "common.report-col.guests-var-lw" | "common.report-col.guests-var-lw.short" | "common.report-col.guests-var-lw.info" | "common.report-col.guests-var-lw-pct" | "common.report-col.guests-var-lw-pct.short" | "common.report-col.guests-var-lw-pct.info" | "common.report-col.guests-var-ly" | "common.report-col.guests-var-ly.short" | "common.report-col.guests-var-ly.info" | "common.report-col.guests-var-ly-pct" | "common.report-col.guests-var-ly-pct.short" | "common.report-col.guests-var-ly-pct.info" | "common.report-col.hour" | "common.report-col.hour.short" | "common.report-col.hour.info" | "common.report-col.hours-worked" | "common.report-col.hours-worked.short" | "common.report-col.hours-worked.info" | "common.report-col.inclusive-tax" | "common.report-col.inclusive-tax.short" | "common.report-col.inclusive-tax.info" | "common.report-col.item-name" | "common.report-col.item-name.short" | "common.report-col.item-name.info" | "common.report-col.item-price" | "common.report-col.item-price.short" | "common.report-col.item-price.info" | "common.report-col.location-city" | "common.report-col.location-city.short" | "common.report-col.location-city.info" | "common.report-col.location-id" | "common.report-col.location-id.short" | "common.report-col.location-id.info" | "common.report-col.location-mid" | "common.report-col.location-mid.short" | "common.report-col.location-mid.info" | "common.report-col.location-name" | "common.report-col.location-name.short" | "common.report-col.location-name.info" | "common.report-col.location-state" | "common.report-col.location-state.short" | "common.report-col.location-state.info" | "common.report-col.mastercard" | "common.report-col.mastercard.short" | "common.report-col.mastercard.info" | "common.report-col.mc-returns" | "common.report-col.mc-returns.short" | "common.report-col.mc-returns.info" | "common.report-col.modifier-name" | "common.report-col.modifier-name.short" | "common.report-col.modifier-name.info" | "common.report-col.modifier-price" | "common.report-col.modifier-price.short" | "common.report-col.modifier-price.info" | "common.report-col.modifier-quantity" | "common.report-col.modifier-quantity.short" | "common.report-col.modifier-quantity.info" | "common.report-col.item-quantity" | "common.report-col.item-quantity.short" | "common.report-col.item-quantity.info" | "common.report-col.modifier-quantity-comp" | "common.report-col.modifier-quantity-comp.short" | "common.report-col.modifier-quantity-comp.info" | "common.report-col.item-quantity-comp" | "common.report-col.item-quantity-comp.short" | "common.report-col.item-quantity-comp.info" | "common.report-col.attach-rate-comp" | "common.report-col.attach-rate-comp.short" | "common.report-col.attach-rate-comp.info" | "common.report-col.total-modifier-sales-var" | "common.report-col.total-modifier-sales-var.short" | "common.report-col.total-modifier-sales-var.info" | "common.report-col.total-modifier-sales-var-pct" | "common.report-col.total-modifier-sales-var-pct.short" | "common.report-col.total-modifier-sales-var-pct.info" | "common.report-col.modifier-quantity-var" | "common.report-col.modifier-quantity-var.short" | "common.report-col.modifier-quantity-var.info" | "common.report-col.modifier-quantity-var-pct" | "common.report-col.modifier-quantity-var-pct.short" | "common.report-col.modifier-quantity-var-pct.info" | "common.report-col.attach-rate-var" | "common.report-col.attach-rate-var.short" | "common.report-col.attach-rate-var.info" | "common.report-col.attach-rate-var-pct" | "common.report-col.attach-rate-var-pct.short" | "common.report-col.attach-rate-var-pct.info" | "common.report-col.total-modifier-sales-comp" | "common.report-col.total-modifier-sales-comp.short" | "common.report-col.total-modifier-sales-comp.info" | "common.report-col.net-sales" | "common.report-col.net-sales.short" | "common.report-col.net-sales.info" | "common.report-col.net-tax-collected" | "common.report-col.net-tax-collected.short" | "common.report-col.net-tax-collected.info" | "common.report-col.net-tips" | "common.report-col.net-tips.short" | "common.report-col.net-tips.info" | "common.report-col.number-of-guests" | "common.report-col.number-of-guests.short" | "common.report-col.number-of-guests.info" | "common.report-col.order-type" | "common.report-col.order-type.short" | "common.report-col.order-type.info" | "common.report-col.payment-type" | "common.report-col.payment-type.short" | "common.report-col.payment-type.info" | "common.report-col.payroll-id" | "common.report-col.payroll-id.short" | "common.report-col.payroll-id.info" | "common.report-col.quantity" | "common.report-col.quantity.short" | "common.report-col.quantity.info" | "common.report-col.reference-number" | "common.report-col.reference-number.short" | "common.report-col.reference-number.info" | "common.report-col.refund-amount" | "common.report-col.refund-amount.short" | "common.report-col.refund-amount.info" | "common.report-col.refunded-tax-amount" | "common.report-col.refunded-tax-amount.short" | "common.report-col.refunded-tax-amount.info" | "common.report-col.revenue-center" | "common.report-col.revenue-center.short" | "common.report-col.revenue-center.info" | "common.report-col.revenue-class" | "common.report-col.revenue-class.short" | "common.report-col.revenue-class.info" | "common.report-col.sales-var-lw" | "common.report-col.sales-var-lw.short" | "common.report-col.sales-var-lw.info" | "common.report-col.sales-var-lw-pct" | "common.report-col.sales-var-lw-pct.short" | "common.report-col.sales-var-lw-pct.info" | "common.report-col.sales-var-ly" | "common.report-col.sales-var-ly.short" | "common.report-col.sales-var-ly.info" | "common.report-col.sales-var-ly-pct" | "common.report-col.sales-var-ly-pct.short" | "common.report-col.sales-var-ly-pct.info" | "common.report-col.sales-mix-by-pct" | "common.report-col.sales-mix-by-pct.short" | "common.report-col.sales-mix-by-pct.info" | "common.report-col.sales-per-guest" | "common.report-col.sales-per-guest.short" | "common.report-col.sales-per-guest.info" | "common.report-col.sales-per-guest-lw" | "common.report-col.sales-per-guest-lw.short" | "common.report-col.sales-per-guest-lw.info" | "common.report-col.sales-per-guest-ly" | "common.report-col.sales-per-guest-ly.short" | "common.report-col.sales-per-guest-ly.info" | "common.report-col.scheduled-shift-end" | "common.report-col.scheduled-shift-end.short" | "common.report-col.scheduled-shift-end.info" | "common.report-col.scheduled-shift-start" | "common.report-col.scheduled-shift-start.short" | "common.report-col.scheduled-shift-start.info" | "common.report-col.settlement-batch-date" | "common.report-col.settlement-batch-date.short" | "common.report-col.settlement-batch-date.info" | "common.report-col.shift-duration-hrs" | "common.report-col.shift-duration-hrs.short" | "common.report-col.shift-duration-hrs.info" | "common.report-col.subtotal" | "common.report-col.subtotal.short" | "common.report-col.subtotal.info" | "common.report-col.tax-collected" | "common.report-col.tax-collected.short" | "common.report-col.tax-collected.info" | "common.report-col.taxes-var-lw" | "common.report-col.taxes-var-lw.short" | "common.report-col.taxes-var-lw.info" | "common.report-col.taxes-var-lw-pct" | "common.report-col.taxes-var-lw-pct.short" | "common.report-col.taxes-var-lw-pct.info" | "common.report-col.taxes-var-ly" | "common.report-col.taxes-var-ly.short" | "common.report-col.taxes-var-ly.info" | "common.report-col.taxes-var-ly-pct" | "common.report-col.taxes-var-ly-pct.short" | "common.report-col.taxes-var-ly-pct.info" | "common.report-col.tax-name" | "common.report-col.tax-name.short" | "common.report-col.tax-name.info" | "common.report-col.tax-rate" | "common.report-col.tax-rate.short" | "common.report-col.tax-rate.info" | "common.report-col.taxable-sales" | "common.report-col.taxable-sales.short" | "common.report-col.taxable-sales.info" | "common.report-col.ticket-closed" | "common.report-col.ticket-closed.short" | "common.report-col.ticket-closed.info" | "common.report-col.ticket-fee" | "common.report-col.ticket-fee.short" | "common.report-col.ticket-fee.info" | "common.report-col.ticket-number" | "common.report-col.ticket-number.short" | "common.report-col.ticket-number.info" | "common.report-col.ticket-open" | "common.report-col.ticket-open.short" | "common.report-col.ticket-open.info" | "common.report-col.ticket-total" | "common.report-col.ticket-total.short" | "common.report-col.ticket-total.info" | "common.report-col.time-open-mins" | "common.report-col.time-open-mins.short" | "common.report-col.time-open-mins.info" | "common.report-col.tip-pct" | "common.report-col.tip-pct.short" | "common.report-col.tip-pct.info" | "common.report-col.tip-reduction" | "common.report-col.tip-reduction.short" | "common.report-col.tip-reduction.info" | "common.report-col.tip-share" | "common.report-col.tip-share.short" | "common.report-col.tip-share.info" | "common.report-col.tip-share-contributed" | "common.report-col.tip-share-contributed.short" | "common.report-col.tip-share-contributed.info" | "common.report-col.tips" | "common.report-col.tips.short" | "common.report-col.tips.info" | "common.report-col.tips-per-hour" | "common.report-col.tips-per-hour.short" | "common.report-col.tips-per-hour.info" | "common.report-col.total-collected" | "common.report-col.total-collected.short" | "common.report-col.total-collected.info" | "common.report-col.total-item-sales" | "common.report-col.total-item-sales.short" | "common.report-col.total-item-sales.info" | "common.report-col.total-modifier-sales" | "common.report-col.total-modifier-sales.short" | "common.report-col.total-modifier-sales.info" | "common.report-col.total-returns" | "common.report-col.total-returns.short" | "common.report-col.total-returns.info" | "common.report-col.total-sales" | "common.report-col.total-sales.short" | "common.report-col.total-sales.info" | "common.report-col.total-tips" | "common.report-col.total-tips.short" | "common.report-col.total-tips.info" | "common.report-col.transaction-date" | "common.report-col.transaction-date.short" | "common.report-col.transaction-date.info" | "common.report-col.sale-payment-type" | "common.report-col.sale-payment-type.short" | "common.report-col.sale-payment-type.info" | "common.report-col.transaction-type" | "common.report-col.transaction-type.short" | "common.report-col.transaction-type.info" | "common.report-col.untaxed-sales" | "common.report-col.untaxed-sales.short" | "common.report-col.untaxed-sales.info" | "common.report-col.visa" | "common.report-col.visa.short" | "common.report-col.visa.info" | "common.report-col.visa-returns" | "common.report-col.visa-returns.short" | "common.report-col.visa-returns.info" | "common.report-col.payments-count" | "common.report-col.payments-count.short" | "common.report-col.payments-count.info" | "common.report-col.payments-amount" | "common.report-col.payments-amount.short" | "common.report-col.payments-amount.info" | "common.report-col.payments-total" | "common.report-col.payments-total.short" | "common.report-col.payments-total.info" | "common.report-col.refund-void-description" | "common.report-col.refund-void-description.short" | "common.report-col.refund-void-description.info" | "common.report-col.refund-void-count" | "common.report-col.refund-void-count.short" | "common.report-col.refund-void-count.info" | "common.report-col.refund-void-amount" | "common.report-col.refund-void-amount.short" | "common.report-col.refund-void-amount.info" | "common.report-col.refund-void-pct-sales" | "common.report-col.refund-void-pct-sales.short" | "common.report-col.refund-void-pct-sales.info" | "common.report-col.discount-name" | "common.report-col.discount-name.short" | "common.report-col.discount-name.info" | "common.report-col.tickets" | "common.report-col.tickets.short" | "common.report-col.tickets.info" | "common.report-col.guests" | "common.report-col.guests.short" | "common.report-col.guests.info" | "common.report-col.ticket-average" | "common.report-col.ticket-average.short" | "common.report-col.ticket-average.info" | "common.report-col.guest-average" | "common.report-col.guest-average.short" | "common.report-col.guest-average.info" | "common.report-col.net" | "common.report-col.net.short" | "common.report-col.net.info" | "common.report-col.gross-cash-tips" | "common.report-col.gross-cash-tips.short" | "common.report-col.gross-cash-tips.info" | "common.report-col.gross-credit-card-tips" | "common.report-col.gross-credit-card-tips.short" | "common.report-col.gross-credit-card-tips.info" | "common.report-col.type" | "common.report-col.type.short" | "common.report-col.type.info" | "common.report-col.paid-normal-hours" | "common.report-col.paid-normal-hours.short" | "common.report-col.paid-normal-hours.info" | "common.report-col.normal-pay" | "common.report-col.normal-pay.short" | "common.report-col.normal-pay.info" | "common.report-col.overtime-pay" | "common.report-col.overtime-pay.short" | "common.report-col.overtime-pay.info" | "common.report-col.double-overtime-pay" | "common.report-col.double-overtime-pay.short" | "common.report-col.double-overtime-pay.info" | "common.report-col.gratuity" | "common.report-col.gratuity.short" | "common.report-col.gratuity.info" | "common.report-col.tip-paid-status" | "common.report-col.tip-paid-status.short" | "common.report-col.tip-paid-status.info" | "common.report-col.total-payments" | "common.report-col.total-payments.short" | "common.report-col.total-payments.info" | "common.report-col.minimum-wage-adjustment" | "common.report-col.minimum-wage-adjustment.short" | "common.report-col.minimum-wage-adjustment.info" | "common.report-col.total-pay" | "common.report-col.total-pay.short" | "common.report-col.total-pay.info" | "common.report-col.table-name" | "common.report-col.table-name.short" | "common.report-col.table-name.info" | "common.report-section.revenue-class" | "common.report-section.payments" | "common.report-section.cash" | "common.report-section.taxes" | "common.report-section.refunds-voids" | "common.report-section.discounts" | "common.report-section.sales-by-day-part" | "common.report-section.sales-by-order-type" | "common.report-section.cash-row.cash-payments" | "common.report-section.cash-row.paid-in-outs" | "common.report-section.cash-row.gratuities-paid-out" | "common.report-section.cash-row.cc-tips-paid-out" | "common.report-section.rev-class-footer.tax-total" | "common.report-section.rev-class-footer.gratuities" | "common.report-section.rev-class-footer.balance-payments" | "common.report-section.rev-class-footer.gift-card-sales" | "common.report-section.rev-class-footer.non-sales-revenue" | "common.report-section.rev-class-footer.house-account" | "common.report-section.rev-class-footer.total-accountable" | "scheduled-reports.report-name" | "scheduled-reports.period" | "scheduled-reports.generated-at" | "scheduled-reports.generated-by" | "components.form.field.group-by" | "components.form.field.last-week" | "components.form.field.last-year" | "common.labels.locations" | "common.labels.yes" | "common.labels.unassigned" | "analytics.field.location_id" | "analytics.field.order_type_id" | "analytics.field.revenue_center_id" | "analytics.field.revenue_center_id.all" | "analytics.field.hour_id" | "analytics.field.daypart_id" | "analytics.field.timeslot_id" | "analytics.field.employee_id" | "analytics.field.employee_name" | "analytics.field.payroll_id" | "analytics.field.intraday_period_group" | "analytics.field.item_id" | "analytics.field.department_id" | "analytics.field.revenue_class_id" | "analytics.field.modifier_id" | "table.total" | "table.groups.sales" | "table.groups.net-sales" | "table.groups.taxes" | "table.groups.gross-sales" | "table.groups.guests" | "table.groups.sales-per-guest" | "employee-timecard.status.active" | "employee-timecard.status.inactive" | "employee-timecard.job.break-suffix" | null;
|
|
12
|
+
declare const getFooterValue: <T>(rows: T[], field: keyof T, config: ColumnPresentationConfig) => number | "common.report-col.fifteen-min-interval" | "common.report-col.fifteen-min-interval.short" | "common.report-col.fifteen-min-interval.info" | "common.report-col.adjusted-tips" | "common.report-col.adjusted-tips.short" | "common.report-col.adjusted-tips.info" | "common.report-col.advantage-program" | "common.report-col.advantage-program.short" | "common.report-col.advantage-program.info" | "common.report-col.amex" | "common.report-col.amex.short" | "common.report-col.amex.info" | "common.report-col.amex-returns" | "common.report-col.amex-returns.short" | "common.report-col.amex-returns.info" | "common.report-col.attach-rate" | "common.report-col.attach-rate.short" | "common.report-col.attach-rate.info" | "common.report-col.auto-gratuity" | "common.report-col.auto-gratuity.short" | "common.report-col.auto-gratuity.info" | "common.report-col.average-gross-price" | "common.report-col.average-gross-price.short" | "common.report-col.average-gross-price.info" | "common.report-col.bank-fees" | "common.report-col.bank-fees.short" | "common.report-col.bank-fees.info" | "common.report-col.batch-amount" | "common.report-col.batch-amount.short" | "common.report-col.batch-amount.info" | "common.report-col.batch-date" | "common.report-col.batch-date.short" | "common.report-col.batch-date.info" | "common.report-col.batch-number" | "common.report-col.batch-number.short" | "common.report-col.batch-number.info" | "common.report-col.cash-collected" | "common.report-col.cash-collected.short" | "common.report-col.cash-collected.info" | "common.report-col.clock-in-time" | "common.report-col.clock-in-time.short" | "common.report-col.clock-in-time.info" | "common.report-col.clock-out-time" | "common.report-col.clock-out-time.short" | "common.report-col.clock-out-time.info" | "common.report-col.status" | "common.report-col.status.short" | "common.report-col.status.info" | "common.report-col.last-modified" | "common.report-col.last-modified.short" | "common.report-col.last-modified.info" | "common.report-col.country" | "common.report-col.country.short" | "common.report-col.country.info" | "common.report-col.customer-name" | "common.report-col.customer-name.short" | "common.report-col.customer-name.info" | "common.report-col.date" | "common.report-col.date.short" | "common.report-col.date.info" | "common.report-col.date-close" | "common.report-col.date-close.short" | "common.report-col.date-close.info" | "common.report-col.daypart" | "common.report-col.daypart.short" | "common.report-col.daypart.info" | "common.report-col.debit" | "common.report-col.debit.short" | "common.report-col.debit.info" | "common.report-col.debit-returns" | "common.report-col.debit-returns.short" | "common.report-col.debit-returns.info" | "common.report-col.declared-tips" | "common.report-col.declared-tips.short" | "common.report-col.declared-tips.info" | "common.report-col.department" | "common.report-col.department.short" | "common.report-col.department.info" | "common.report-col.deposit-currency" | "common.report-col.deposit-currency.short" | "common.report-col.deposit-currency.info" | "common.report-col.deposit-date" | "common.report-col.deposit-date.short" | "common.report-col.deposit-date.info" | "common.report-col.discount-amount" | "common.report-col.discount-amount.short" | "common.report-col.discount-amount.info" | "common.report-col.discount-count" | "common.report-col.discount-count.short" | "common.report-col.discount-count.info" | "common.report-col.ticket-count" | "common.report-col.ticket-count.short" | "common.report-col.ticket-count.info" | "common.report-col.item-count" | "common.report-col.item-count.short" | "common.report-col.item-count.info" | "common.report-col.discover" | "common.report-col.discover.short" | "common.report-col.discover.info" | "common.report-col.discover-returns" | "common.report-col.discover-returns.short" | "common.report-col.discover-returns.info" | "common.report-col.ebt" | "common.report-col.ebt.short" | "common.report-col.ebt.info" | "common.report-col.ebt-returns" | "common.report-col.ebt-returns.short" | "common.report-col.ebt-returns.info" | "common.report-col.employee-id" | "common.report-col.employee-id.short" | "common.report-col.employee-id.info" | "common.report-col.employee-job" | "common.report-col.employee-job.short" | "common.report-col.employee-job.info" | "common.report-col.employee-name" | "common.report-col.employee-name.short" | "common.report-col.employee-name.info" | "common.report-col.exempt-taxes" | "common.report-col.exempt-taxes.short" | "common.report-col.exempt-taxes.info" | "common.report-col.exempt-sales" | "common.report-col.exempt-sales.short" | "common.report-col.exempt-sales.info" | "common.report-col.grand-total" | "common.report-col.grand-total.short" | "common.report-col.grand-total.info" | "common.report-col.gross-cash-sales" | "common.report-col.gross-cash-sales.short" | "common.report-col.gross-cash-sales.info" | "common.report-col.gross-credit-sales" | "common.report-col.gross-credit-sales.short" | "common.report-col.gross-credit-sales.info" | "common.report-col.gross-sales" | "common.report-col.gross-sales.short" | "common.report-col.gross-sales.info" | "common.report-col.gross-sales-var-lw" | "common.report-col.gross-sales-var-lw.short" | "common.report-col.gross-sales-var-lw.info" | "common.report-col.gross-sales-var-lw-pct" | "common.report-col.gross-sales-var-lw-pct.short" | "common.report-col.gross-sales-var-lw-pct.info" | "common.report-col.gross-sales-var-ly" | "common.report-col.gross-sales-var-ly.short" | "common.report-col.gross-sales-var-ly.info" | "common.report-col.gross-sales-var-ly-pct" | "common.report-col.gross-sales-var-ly-pct.short" | "common.report-col.gross-sales-var-ly-pct.info" | "common.report-col.gross-tips" | "common.report-col.gross-tips.short" | "common.report-col.gross-tips.info" | "common.report-col.guest-count" | "common.report-col.guest-count.short" | "common.report-col.guest-count.info" | "common.report-col.guests-var-lw" | "common.report-col.guests-var-lw.short" | "common.report-col.guests-var-lw.info" | "common.report-col.guests-var-lw-pct" | "common.report-col.guests-var-lw-pct.short" | "common.report-col.guests-var-lw-pct.info" | "common.report-col.guests-var-ly" | "common.report-col.guests-var-ly.short" | "common.report-col.guests-var-ly.info" | "common.report-col.guests-var-ly-pct" | "common.report-col.guests-var-ly-pct.short" | "common.report-col.guests-var-ly-pct.info" | "common.report-col.hour" | "common.report-col.hour.short" | "common.report-col.hour.info" | "common.report-col.hours-worked" | "common.report-col.hours-worked.short" | "common.report-col.hours-worked.info" | "common.report-col.inclusive-tax" | "common.report-col.inclusive-tax.short" | "common.report-col.inclusive-tax.info" | "common.report-col.item-name" | "common.report-col.item-name.short" | "common.report-col.item-name.info" | "common.report-col.item-price" | "common.report-col.item-price.short" | "common.report-col.item-price.info" | "common.report-col.location-city" | "common.report-col.location-city.short" | "common.report-col.location-city.info" | "common.report-col.location-id" | "common.report-col.location-id.short" | "common.report-col.location-id.info" | "common.report-col.location-mid" | "common.report-col.location-mid.short" | "common.report-col.location-mid.info" | "common.report-col.location-name" | "common.report-col.location-name.short" | "common.report-col.location-name.info" | "common.report-col.location-state" | "common.report-col.location-state.short" | "common.report-col.location-state.info" | "common.report-col.mastercard" | "common.report-col.mastercard.short" | "common.report-col.mastercard.info" | "common.report-col.mc-returns" | "common.report-col.mc-returns.short" | "common.report-col.mc-returns.info" | "common.report-col.modifier-name" | "common.report-col.modifier-name.short" | "common.report-col.modifier-name.info" | "common.report-col.modifier-price" | "common.report-col.modifier-price.short" | "common.report-col.modifier-price.info" | "common.report-col.modifier-quantity" | "common.report-col.modifier-quantity.short" | "common.report-col.modifier-quantity.info" | "common.report-col.item-quantity" | "common.report-col.item-quantity.short" | "common.report-col.item-quantity.info" | "common.report-col.modifier-quantity-comp" | "common.report-col.modifier-quantity-comp.short" | "common.report-col.modifier-quantity-comp.info" | "common.report-col.item-quantity-comp" | "common.report-col.item-quantity-comp.short" | "common.report-col.item-quantity-comp.info" | "common.report-col.attach-rate-comp" | "common.report-col.attach-rate-comp.short" | "common.report-col.attach-rate-comp.info" | "common.report-col.total-modifier-sales-var" | "common.report-col.total-modifier-sales-var.short" | "common.report-col.total-modifier-sales-var.info" | "common.report-col.total-modifier-sales-var-pct" | "common.report-col.total-modifier-sales-var-pct.short" | "common.report-col.total-modifier-sales-var-pct.info" | "common.report-col.modifier-quantity-var" | "common.report-col.modifier-quantity-var.short" | "common.report-col.modifier-quantity-var.info" | "common.report-col.modifier-quantity-var-pct" | "common.report-col.modifier-quantity-var-pct.short" | "common.report-col.modifier-quantity-var-pct.info" | "common.report-col.attach-rate-var" | "common.report-col.attach-rate-var.short" | "common.report-col.attach-rate-var.info" | "common.report-col.attach-rate-var-pct" | "common.report-col.attach-rate-var-pct.short" | "common.report-col.attach-rate-var-pct.info" | "common.report-col.total-modifier-sales-comp" | "common.report-col.total-modifier-sales-comp.short" | "common.report-col.total-modifier-sales-comp.info" | "common.report-col.net-sales" | "common.report-col.net-sales.short" | "common.report-col.net-sales.info" | "common.report-col.net-tax-collected" | "common.report-col.net-tax-collected.short" | "common.report-col.net-tax-collected.info" | "common.report-col.net-tips" | "common.report-col.net-tips.short" | "common.report-col.net-tips.info" | "common.report-col.number-of-guests" | "common.report-col.number-of-guests.short" | "common.report-col.number-of-guests.info" | "common.report-col.order-type" | "common.report-col.order-type.short" | "common.report-col.order-type.info" | "common.report-col.payment-type" | "common.report-col.payment-type.short" | "common.report-col.payment-type.info" | "common.report-col.payroll-id" | "common.report-col.payroll-id.short" | "common.report-col.payroll-id.info" | "common.report-col.quantity" | "common.report-col.quantity.short" | "common.report-col.quantity.info" | "common.report-col.reference-number" | "common.report-col.reference-number.short" | "common.report-col.reference-number.info" | "common.report-col.refund-amount" | "common.report-col.refund-amount.short" | "common.report-col.refund-amount.info" | "common.report-col.refunded-tax-amount" | "common.report-col.refunded-tax-amount.short" | "common.report-col.refunded-tax-amount.info" | "common.report-col.revenue-center" | "common.report-col.revenue-center.short" | "common.report-col.revenue-center.info" | "common.report-col.revenue-class" | "common.report-col.revenue-class.short" | "common.report-col.revenue-class.info" | "common.report-col.sales-var-lw" | "common.report-col.sales-var-lw.short" | "common.report-col.sales-var-lw.info" | "common.report-col.sales-var-lw-pct" | "common.report-col.sales-var-lw-pct.short" | "common.report-col.sales-var-lw-pct.info" | "common.report-col.sales-var-ly" | "common.report-col.sales-var-ly.short" | "common.report-col.sales-var-ly.info" | "common.report-col.sales-var-ly-pct" | "common.report-col.sales-var-ly-pct.short" | "common.report-col.sales-var-ly-pct.info" | "common.report-col.sales-mix-by-pct" | "common.report-col.sales-mix-by-pct.short" | "common.report-col.sales-mix-by-pct.info" | "common.report-col.sales-per-guest" | "common.report-col.sales-per-guest.short" | "common.report-col.sales-per-guest.info" | "common.report-col.sales-per-guest-lw" | "common.report-col.sales-per-guest-lw.short" | "common.report-col.sales-per-guest-lw.info" | "common.report-col.sales-per-guest-ly" | "common.report-col.sales-per-guest-ly.short" | "common.report-col.sales-per-guest-ly.info" | "common.report-col.scheduled-shift-end" | "common.report-col.scheduled-shift-end.short" | "common.report-col.scheduled-shift-end.info" | "common.report-col.scheduled-shift-start" | "common.report-col.scheduled-shift-start.short" | "common.report-col.scheduled-shift-start.info" | "common.report-col.settlement-batch-date" | "common.report-col.settlement-batch-date.short" | "common.report-col.settlement-batch-date.info" | "common.report-col.shift-duration-hrs" | "common.report-col.shift-duration-hrs.short" | "common.report-col.shift-duration-hrs.info" | "common.report-col.subtotal" | "common.report-col.subtotal.short" | "common.report-col.subtotal.info" | "common.report-col.tax-collected" | "common.report-col.tax-collected.short" | "common.report-col.tax-collected.info" | "common.report-col.taxes-var-lw" | "common.report-col.taxes-var-lw.short" | "common.report-col.taxes-var-lw.info" | "common.report-col.taxes-var-lw-pct" | "common.report-col.taxes-var-lw-pct.short" | "common.report-col.taxes-var-lw-pct.info" | "common.report-col.taxes-var-ly" | "common.report-col.taxes-var-ly.short" | "common.report-col.taxes-var-ly.info" | "common.report-col.taxes-var-ly-pct" | "common.report-col.taxes-var-ly-pct.short" | "common.report-col.taxes-var-ly-pct.info" | "common.report-col.tax-name" | "common.report-col.tax-name.short" | "common.report-col.tax-name.info" | "common.report-col.tax-rate" | "common.report-col.tax-rate.short" | "common.report-col.tax-rate.info" | "common.report-col.taxable-sales" | "common.report-col.taxable-sales.short" | "common.report-col.taxable-sales.info" | "common.report-col.ticket-closed" | "common.report-col.ticket-closed.short" | "common.report-col.ticket-closed.info" | "common.report-col.ticket-fee" | "common.report-col.ticket-fee.short" | "common.report-col.ticket-fee.info" | "common.report-col.ticket-number" | "common.report-col.ticket-number.short" | "common.report-col.ticket-number.info" | "common.report-col.ticket-open" | "common.report-col.ticket-open.short" | "common.report-col.ticket-open.info" | "common.report-col.ticket-total" | "common.report-col.ticket-total.short" | "common.report-col.ticket-total.info" | "common.report-col.time-open-mins" | "common.report-col.time-open-mins.short" | "common.report-col.time-open-mins.info" | "common.report-col.tip-pct" | "common.report-col.tip-pct.short" | "common.report-col.tip-pct.info" | "common.report-col.tip-reduction" | "common.report-col.tip-reduction.short" | "common.report-col.tip-reduction.info" | "common.report-col.tip-share" | "common.report-col.tip-share.short" | "common.report-col.tip-share.info" | "common.report-col.tip-share-contributed" | "common.report-col.tip-share-contributed.short" | "common.report-col.tip-share-contributed.info" | "common.report-col.tips" | "common.report-col.tips.short" | "common.report-col.tips.info" | "common.report-col.tips-per-hour" | "common.report-col.tips-per-hour.short" | "common.report-col.tips-per-hour.info" | "common.report-col.total-collected" | "common.report-col.total-collected.short" | "common.report-col.total-collected.info" | "common.report-col.total-item-sales" | "common.report-col.total-item-sales.short" | "common.report-col.total-item-sales.info" | "common.report-col.total-modifier-sales" | "common.report-col.total-modifier-sales.short" | "common.report-col.total-modifier-sales.info" | "common.report-col.total-returns" | "common.report-col.total-returns.short" | "common.report-col.total-returns.info" | "common.report-col.total-sales" | "common.report-col.total-sales.short" | "common.report-col.total-sales.info" | "common.report-col.total-tips" | "common.report-col.total-tips.short" | "common.report-col.total-tips.info" | "common.report-col.transaction-date" | "common.report-col.transaction-date.short" | "common.report-col.transaction-date.info" | "common.report-col.sale-payment-type" | "common.report-col.sale-payment-type.short" | "common.report-col.sale-payment-type.info" | "common.report-col.transaction-type" | "common.report-col.transaction-type.short" | "common.report-col.transaction-type.info" | "common.report-col.untaxed-sales" | "common.report-col.untaxed-sales.short" | "common.report-col.untaxed-sales.info" | "common.report-col.visa" | "common.report-col.visa.short" | "common.report-col.visa.info" | "common.report-col.visa-returns" | "common.report-col.visa-returns.short" | "common.report-col.visa-returns.info" | "common.report-col.payments-count" | "common.report-col.payments-count.short" | "common.report-col.payments-count.info" | "common.report-col.payments-amount" | "common.report-col.payments-amount.short" | "common.report-col.payments-amount.info" | "common.report-col.payments-total" | "common.report-col.payments-total.short" | "common.report-col.payments-total.info" | "common.report-col.refund-void-description" | "common.report-col.refund-void-description.short" | "common.report-col.refund-void-description.info" | "common.report-col.refund-void-count" | "common.report-col.refund-void-count.short" | "common.report-col.refund-void-count.info" | "common.report-col.refund-void-amount" | "common.report-col.refund-void-amount.short" | "common.report-col.refund-void-amount.info" | "common.report-col.refund-void-pct-sales" | "common.report-col.refund-void-pct-sales.short" | "common.report-col.refund-void-pct-sales.info" | "common.report-col.discount-name" | "common.report-col.discount-name.short" | "common.report-col.discount-name.info" | "common.report-col.tickets" | "common.report-col.tickets.short" | "common.report-col.tickets.info" | "common.report-col.guests" | "common.report-col.guests.short" | "common.report-col.guests.info" | "common.report-col.ticket-average" | "common.report-col.ticket-average.short" | "common.report-col.ticket-average.info" | "common.report-col.guest-average" | "common.report-col.guest-average.short" | "common.report-col.guest-average.info" | "common.report-col.net" | "common.report-col.net.short" | "common.report-col.net.info" | "common.report-col.gross-cash-tips" | "common.report-col.gross-cash-tips.short" | "common.report-col.gross-cash-tips.info" | "common.report-col.gross-credit-card-tips" | "common.report-col.gross-credit-card-tips.short" | "common.report-col.gross-credit-card-tips.info" | "common.report-col.type" | "common.report-col.type.short" | "common.report-col.type.info" | "common.report-col.paid-normal-hours" | "common.report-col.paid-normal-hours.short" | "common.report-col.paid-normal-hours.info" | "common.report-col.normal-pay" | "common.report-col.normal-pay.short" | "common.report-col.normal-pay.info" | "common.report-col.overtime-pay" | "common.report-col.overtime-pay.short" | "common.report-col.overtime-pay.info" | "common.report-col.double-overtime-pay" | "common.report-col.double-overtime-pay.short" | "common.report-col.double-overtime-pay.info" | "common.report-col.gratuity" | "common.report-col.gratuity.short" | "common.report-col.gratuity.info" | "common.report-col.tip-paid-status" | "common.report-col.tip-paid-status.short" | "common.report-col.tip-paid-status.info" | "common.report-col.total-payments" | "common.report-col.total-payments.short" | "common.report-col.total-payments.info" | "common.report-col.minimum-wage-adjustment" | "common.report-col.minimum-wage-adjustment.short" | "common.report-col.minimum-wage-adjustment.info" | "common.report-col.total-pay" | "common.report-col.total-pay.short" | "common.report-col.total-pay.info" | "common.report-col.table-name" | "common.report-col.table-name.short" | "common.report-col.table-name.info" | "common.report-section.revenue-class" | "common.report-section.payments" | "common.report-section.cash" | "common.report-section.taxes" | "common.report-section.refunds-voids" | "common.report-section.discounts" | "common.report-section.sales-by-day-part" | "common.report-section.sales-by-order-type" | "common.report-section.cash-row.cash-payments" | "common.report-section.cash-row.paid-in-outs" | "common.report-section.cash-row.gratuities-paid-out" | "common.report-section.cash-row.cc-tips-paid-out" | "common.report-section.rev-class-footer.tax-total" | "common.report-section.rev-class-footer.gratuities" | "common.report-section.rev-class-footer.balance-payments" | "common.report-section.rev-class-footer.gift-card-sales" | "common.report-section.rev-class-footer.non-sales-revenue" | "common.report-section.rev-class-footer.house-account" | "common.report-section.rev-class-footer.total-accountable" | "scheduled-reports.report-name" | "scheduled-reports.period" | "scheduled-reports.generated-at" | "scheduled-reports.generated-by" | "scheduled-reports.applied-filters" | "components.form.field.group-by" | "components.form.field.last-week" | "components.form.field.last-year" | "common.labels.locations" | "common.labels.yes" | "common.labels.unassigned" | "common.labels.none" | "analytics.field.location_id" | "analytics.field.order_type_id" | "analytics.field.revenue_center_id" | "analytics.field.revenue_center_id.all" | "analytics.field.hour_id" | "analytics.field.daypart_id" | "analytics.field.timeslot_id" | "analytics.field.employee_id" | "analytics.field.employee_name" | "analytics.field.payroll_id" | "analytics.field.intraday_period_group" | "analytics.field.item_id" | "analytics.field.department_id" | "analytics.field.revenue_class_id" | "analytics.field.modifier_id" | "table.total" | "table.groups.sales" | "table.groups.net-sales" | "table.groups.taxes" | "table.groups.gross-sales" | "table.groups.guests" | "table.groups.sales-per-guest" | "employee-timecard.status.active" | "employee-timecard.status.inactive" | "employee-timecard.job.break-suffix" | null;
|
|
13
13
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>) => T;
|
|
14
14
|
|
|
15
15
|
type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'grossVarLW' | 'grossVarLY' | 'grossVarLWPct' | 'grossVarLYPct' | 'taxesAmount' | 'taxesAmountLastWeek' | 'taxesAmountLastYear' | 'taxesVarLW' | 'taxesVarLY' | 'taxesVarLWPct' | 'taxesVarLYPct' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
|
package/dist/index.js
CHANGED
|
@@ -1352,12 +1352,14 @@ declare const enUS: {
|
|
|
1352
1352
|
readonly 'scheduled-reports.period': "Period";
|
|
1353
1353
|
readonly 'scheduled-reports.generated-at': "Generated at";
|
|
1354
1354
|
readonly 'scheduled-reports.generated-by': "Generated by";
|
|
1355
|
+
readonly 'scheduled-reports.applied-filters': "Applied Filters";
|
|
1355
1356
|
readonly 'components.form.field.group-by': "Group By";
|
|
1356
1357
|
readonly 'components.form.field.last-week': "Compare to Last Week";
|
|
1357
1358
|
readonly 'components.form.field.last-year': "Compare to Last Year";
|
|
1358
1359
|
readonly 'common.labels.locations': "Locations";
|
|
1359
1360
|
readonly 'common.labels.yes': "Yes";
|
|
1360
1361
|
readonly 'common.labels.unassigned': "Unassigned";
|
|
1362
|
+
readonly 'common.labels.none': "None";
|
|
1361
1363
|
readonly 'analytics.field.location_id': "Location";
|
|
1362
1364
|
readonly 'analytics.field.order_type_id': "Order Types";
|
|
1363
1365
|
readonly 'analytics.field.revenue_center_id': "Revenue Centers";
|
|
@@ -1352,12 +1352,14 @@ declare const enUS: {
|
|
|
1352
1352
|
readonly 'scheduled-reports.period': "Period";
|
|
1353
1353
|
readonly 'scheduled-reports.generated-at': "Generated at";
|
|
1354
1354
|
readonly 'scheduled-reports.generated-by': "Generated by";
|
|
1355
|
+
readonly 'scheduled-reports.applied-filters': "Applied Filters";
|
|
1355
1356
|
readonly 'components.form.field.group-by': "Group By";
|
|
1356
1357
|
readonly 'components.form.field.last-week': "Compare to Last Week";
|
|
1357
1358
|
readonly 'components.form.field.last-year': "Compare to Last Year";
|
|
1358
1359
|
readonly 'common.labels.locations': "Locations";
|
|
1359
1360
|
readonly 'common.labels.yes': "Yes";
|
|
1360
1361
|
readonly 'common.labels.unassigned': "Unassigned";
|
|
1362
|
+
readonly 'common.labels.none': "None";
|
|
1361
1363
|
readonly 'analytics.field.location_id': "Location";
|
|
1362
1364
|
readonly 'analytics.field.order_type_id': "Order Types";
|
|
1363
1365
|
readonly 'analytics.field.revenue_center_id': "Revenue Centers";
|
|
@@ -14,8 +14,7 @@ interface ExportFilter {
|
|
|
14
14
|
interface ExportSection {
|
|
15
15
|
title: string;
|
|
16
16
|
table?: ExportTable;
|
|
17
|
-
|
|
18
|
-
appliedFilters?: ExportFilter[];
|
|
17
|
+
metaData?: Record<string, ExportFilter[] | string>;
|
|
19
18
|
}
|
|
20
19
|
interface ReportMetadata {
|
|
21
20
|
generatedAt: Date | null;
|
|
@@ -14,8 +14,7 @@ interface ExportFilter {
|
|
|
14
14
|
interface ExportSection {
|
|
15
15
|
title: string;
|
|
16
16
|
table?: ExportTable;
|
|
17
|
-
|
|
18
|
-
appliedFilters?: ExportFilter[];
|
|
17
|
+
metaData?: Record<string, ExportFilter[] | string>;
|
|
19
18
|
}
|
|
20
19
|
interface ReportMetadata {
|
|
21
20
|
generatedAt: Date | null;
|