@harbortouch/skytab-analytics-report-utils 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +18 -2
- package/dist/index.d.cts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +17 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
Report: () => Report,
|
|
25
25
|
calculateFieldTotal: () => calculateFieldTotal,
|
|
26
26
|
calculateReportTotals: () => calculateReportTotals,
|
|
27
|
+
dailySalesCacheConfig: () => dailySalesCacheConfig,
|
|
27
28
|
dailySalesConfig: () => dailySalesConfig,
|
|
28
29
|
dailySalesDiscountsConfig: () => dailySalesDiscountsConfig,
|
|
29
30
|
dailySalesLiveConfig: () => dailySalesLiveConfig,
|
|
@@ -314,7 +315,6 @@ var FIELDS3 = {
|
|
|
314
315
|
};
|
|
315
316
|
var TICKET_SUMMARY_AVAILABLE_COLUMNS = [
|
|
316
317
|
"locationName",
|
|
317
|
-
"orderNumber",
|
|
318
318
|
"businessDate",
|
|
319
319
|
"ticketOpenedAt",
|
|
320
320
|
"ticketClosedAt",
|
|
@@ -632,7 +632,6 @@ var FIELDS8 = {
|
|
|
632
632
|
var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
|
|
633
633
|
"locationName",
|
|
634
634
|
"businessDate",
|
|
635
|
-
"employeeName",
|
|
636
635
|
"isActive",
|
|
637
636
|
"lookup",
|
|
638
637
|
"payrollCode",
|
|
@@ -1423,6 +1422,10 @@ var COLUMN_REGISTRY = {
|
|
|
1423
1422
|
titleKey: "common.report-col.net",
|
|
1424
1423
|
shortTitleKey: "common.report-col.net.short",
|
|
1425
1424
|
infoTextKey: "common.report-col.net.info"
|
|
1425
|
+
},
|
|
1426
|
+
type: {
|
|
1427
|
+
titleKey: "common.report-col.type",
|
|
1428
|
+
shortTitleKey: "common.report-col.type.short"
|
|
1426
1429
|
}
|
|
1427
1430
|
};
|
|
1428
1431
|
function getColumnMetadata(key) {
|
|
@@ -1569,6 +1572,18 @@ var dailySalesTaxesConfig = {
|
|
|
1569
1572
|
hasFooter: true
|
|
1570
1573
|
};
|
|
1571
1574
|
|
|
1575
|
+
// src/reports/dailySalesCache.ts
|
|
1576
|
+
var FIELDS16 = {
|
|
1577
|
+
name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
|
|
1578
|
+
amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
|
|
1579
|
+
};
|
|
1580
|
+
var dailySalesCacheConfig = {
|
|
1581
|
+
fields: FIELDS16,
|
|
1582
|
+
availableColumns: ["name", "amount"],
|
|
1583
|
+
defaultVisibleColumns: ["name", "amount"],
|
|
1584
|
+
hasFooter: true
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1572
1587
|
// src/formatting.ts
|
|
1573
1588
|
var dateFormatterCache = /* @__PURE__ */ new Map();
|
|
1574
1589
|
var timeFormatterCache = /* @__PURE__ */ new Map();
|
|
@@ -1713,6 +1728,7 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
|
|
|
1713
1728
|
Report,
|
|
1714
1729
|
calculateFieldTotal,
|
|
1715
1730
|
calculateReportTotals,
|
|
1731
|
+
dailySalesCacheConfig,
|
|
1716
1732
|
dailySalesConfig,
|
|
1717
1733
|
dailySalesDiscountsConfig,
|
|
1718
1734
|
dailySalesLiveConfig,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'ticketCount' | 'itemCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'salePaymentType' | 'status';
|
|
1
|
+
type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'ticketCount' | 'itemCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'salePaymentType' | 'type' | 'status';
|
|
2
2
|
interface ColumnMetadata {
|
|
3
3
|
titleKey: string;
|
|
4
4
|
shortTitleKey: string;
|
|
5
|
-
infoTextKey
|
|
5
|
+
infoTextKey?: string;
|
|
6
6
|
}
|
|
7
7
|
declare const COLUMN_REGISTRY: {
|
|
8
8
|
readonly fifteenMinInterval: {
|
|
@@ -655,6 +655,10 @@ declare const COLUMN_REGISTRY: {
|
|
|
655
655
|
readonly shortTitleKey: "common.report-col.net.short";
|
|
656
656
|
readonly infoTextKey: "common.report-col.net.info";
|
|
657
657
|
};
|
|
658
|
+
readonly type: {
|
|
659
|
+
readonly titleKey: "common.report-col.type";
|
|
660
|
+
readonly shortTitleKey: "common.report-col.type.short";
|
|
661
|
+
};
|
|
658
662
|
};
|
|
659
663
|
declare function getColumnMetadata(key: ReportColumnKey): {
|
|
660
664
|
readonly titleKey: "common.report-col.fifteen-min-interval";
|
|
@@ -1176,6 +1180,9 @@ declare function getColumnMetadata(key: ReportColumnKey): {
|
|
|
1176
1180
|
readonly titleKey: "common.report-col.net";
|
|
1177
1181
|
readonly shortTitleKey: "common.report-col.net.short";
|
|
1178
1182
|
readonly infoTextKey: "common.report-col.net.info";
|
|
1183
|
+
} | {
|
|
1184
|
+
readonly titleKey: "common.report-col.type";
|
|
1185
|
+
readonly shortTitleKey: "common.report-col.type.short";
|
|
1179
1186
|
};
|
|
1180
1187
|
declare function getColumnExportHeaderLabel(colTitle: string, groupTitle: string | null): string;
|
|
1181
1188
|
|
|
@@ -1348,6 +1355,14 @@ declare const dailySalesTaxesConfig: {
|
|
|
1348
1355
|
readonly hasFooter: true;
|
|
1349
1356
|
};
|
|
1350
1357
|
|
|
1358
|
+
type DailySalesCacheField = 'name' | 'amount';
|
|
1359
|
+
declare const dailySalesCacheConfig: {
|
|
1360
|
+
readonly fields: Record<DailySalesCacheField, ColumnPresentationConfig<DailySalesCacheField>>;
|
|
1361
|
+
readonly availableColumns: ["name", "amount"];
|
|
1362
|
+
readonly defaultVisibleColumns: ["name", "amount"];
|
|
1363
|
+
readonly hasFooter: true;
|
|
1364
|
+
};
|
|
1365
|
+
|
|
1351
1366
|
type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
|
|
1352
1367
|
declare const employeeTimecardConfig: {
|
|
1353
1368
|
readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
|
|
@@ -1413,4 +1428,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
1413
1428
|
}[]) => LocaleOption[];
|
|
1414
1429
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
1415
1430
|
|
|
1416
|
-
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
|
1431
|
+
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'ticketCount' | 'itemCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'salePaymentType' | 'status';
|
|
1
|
+
type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'ticketCount' | 'itemCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'salePaymentType' | 'type' | 'status';
|
|
2
2
|
interface ColumnMetadata {
|
|
3
3
|
titleKey: string;
|
|
4
4
|
shortTitleKey: string;
|
|
5
|
-
infoTextKey
|
|
5
|
+
infoTextKey?: string;
|
|
6
6
|
}
|
|
7
7
|
declare const COLUMN_REGISTRY: {
|
|
8
8
|
readonly fifteenMinInterval: {
|
|
@@ -655,6 +655,10 @@ declare const COLUMN_REGISTRY: {
|
|
|
655
655
|
readonly shortTitleKey: "common.report-col.net.short";
|
|
656
656
|
readonly infoTextKey: "common.report-col.net.info";
|
|
657
657
|
};
|
|
658
|
+
readonly type: {
|
|
659
|
+
readonly titleKey: "common.report-col.type";
|
|
660
|
+
readonly shortTitleKey: "common.report-col.type.short";
|
|
661
|
+
};
|
|
658
662
|
};
|
|
659
663
|
declare function getColumnMetadata(key: ReportColumnKey): {
|
|
660
664
|
readonly titleKey: "common.report-col.fifteen-min-interval";
|
|
@@ -1176,6 +1180,9 @@ declare function getColumnMetadata(key: ReportColumnKey): {
|
|
|
1176
1180
|
readonly titleKey: "common.report-col.net";
|
|
1177
1181
|
readonly shortTitleKey: "common.report-col.net.short";
|
|
1178
1182
|
readonly infoTextKey: "common.report-col.net.info";
|
|
1183
|
+
} | {
|
|
1184
|
+
readonly titleKey: "common.report-col.type";
|
|
1185
|
+
readonly shortTitleKey: "common.report-col.type.short";
|
|
1179
1186
|
};
|
|
1180
1187
|
declare function getColumnExportHeaderLabel(colTitle: string, groupTitle: string | null): string;
|
|
1181
1188
|
|
|
@@ -1348,6 +1355,14 @@ declare const dailySalesTaxesConfig: {
|
|
|
1348
1355
|
readonly hasFooter: true;
|
|
1349
1356
|
};
|
|
1350
1357
|
|
|
1358
|
+
type DailySalesCacheField = 'name' | 'amount';
|
|
1359
|
+
declare const dailySalesCacheConfig: {
|
|
1360
|
+
readonly fields: Record<DailySalesCacheField, ColumnPresentationConfig<DailySalesCacheField>>;
|
|
1361
|
+
readonly availableColumns: ["name", "amount"];
|
|
1362
|
+
readonly defaultVisibleColumns: ["name", "amount"];
|
|
1363
|
+
readonly hasFooter: true;
|
|
1364
|
+
};
|
|
1365
|
+
|
|
1351
1366
|
type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
|
|
1352
1367
|
declare const employeeTimecardConfig: {
|
|
1353
1368
|
readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
|
|
@@ -1413,4 +1428,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
1413
1428
|
}[]) => LocaleOption[];
|
|
1414
1429
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
1415
1430
|
|
|
1416
|
-
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
|
1431
|
+
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
package/dist/index.js
CHANGED
|
@@ -253,7 +253,6 @@ var FIELDS3 = {
|
|
|
253
253
|
};
|
|
254
254
|
var TICKET_SUMMARY_AVAILABLE_COLUMNS = [
|
|
255
255
|
"locationName",
|
|
256
|
-
"orderNumber",
|
|
257
256
|
"businessDate",
|
|
258
257
|
"ticketOpenedAt",
|
|
259
258
|
"ticketClosedAt",
|
|
@@ -571,7 +570,6 @@ var FIELDS8 = {
|
|
|
571
570
|
var EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS = [
|
|
572
571
|
"locationName",
|
|
573
572
|
"businessDate",
|
|
574
|
-
"employeeName",
|
|
575
573
|
"isActive",
|
|
576
574
|
"lookup",
|
|
577
575
|
"payrollCode",
|
|
@@ -1362,6 +1360,10 @@ var COLUMN_REGISTRY = {
|
|
|
1362
1360
|
titleKey: "common.report-col.net",
|
|
1363
1361
|
shortTitleKey: "common.report-col.net.short",
|
|
1364
1362
|
infoTextKey: "common.report-col.net.info"
|
|
1363
|
+
},
|
|
1364
|
+
type: {
|
|
1365
|
+
titleKey: "common.report-col.type",
|
|
1366
|
+
shortTitleKey: "common.report-col.type.short"
|
|
1365
1367
|
}
|
|
1366
1368
|
};
|
|
1367
1369
|
function getColumnMetadata(key) {
|
|
@@ -1508,6 +1510,18 @@ var dailySalesTaxesConfig = {
|
|
|
1508
1510
|
hasFooter: true
|
|
1509
1511
|
};
|
|
1510
1512
|
|
|
1513
|
+
// src/reports/dailySalesCache.ts
|
|
1514
|
+
var FIELDS16 = {
|
|
1515
|
+
name: { type: "string", columnKey: "type", size: FIRST_COLUMN_WIDTH },
|
|
1516
|
+
amount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } }
|
|
1517
|
+
};
|
|
1518
|
+
var dailySalesCacheConfig = {
|
|
1519
|
+
fields: FIELDS16,
|
|
1520
|
+
availableColumns: ["name", "amount"],
|
|
1521
|
+
defaultVisibleColumns: ["name", "amount"],
|
|
1522
|
+
hasFooter: true
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1511
1525
|
// src/formatting.ts
|
|
1512
1526
|
var dateFormatterCache = /* @__PURE__ */ new Map();
|
|
1513
1527
|
var timeFormatterCache = /* @__PURE__ */ new Map();
|
|
@@ -1651,6 +1665,7 @@ export {
|
|
|
1651
1665
|
Report,
|
|
1652
1666
|
calculateFieldTotal,
|
|
1653
1667
|
calculateReportTotals,
|
|
1668
|
+
dailySalesCacheConfig,
|
|
1654
1669
|
dailySalesConfig,
|
|
1655
1670
|
dailySalesDiscountsConfig,
|
|
1656
1671
|
dailySalesLiveConfig,
|