@harbortouch/skytab-analytics-report-utils 0.22.1 → 0.23.1

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.
@@ -588,11 +588,11 @@ var FIELDS8 = {
588
588
  filteringAvailable: false
589
589
  },
590
590
  startTime: {
591
- type: "string",
591
+ type: "time",
592
592
  columnKey: "clockInTime"
593
593
  },
594
594
  endTime: {
595
- type: "string",
595
+ type: "time",
596
596
  columnKey: "clockOutTime"
597
597
  },
598
598
  shiftHours: {
@@ -760,6 +760,7 @@ var FIELDS13 = {
760
760
  paymentTypeName: {
761
761
  type: "string",
762
762
  size: FIRST_COLUMN_WIDTH,
763
+ columnKey: "paymentType",
763
764
  footerCalculation: { type: "label", label: "table.total" }
764
765
  },
765
766
  paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
@@ -2222,11 +2222,11 @@ var FIELDS8 = {
2222
2222
  filteringAvailable: false
2223
2223
  },
2224
2224
  startTime: {
2225
- type: "string",
2225
+ type: "time",
2226
2226
  columnKey: "clockInTime"
2227
2227
  },
2228
2228
  endTime: {
2229
- type: "string",
2229
+ type: "time",
2230
2230
  columnKey: "clockOutTime"
2231
2231
  },
2232
2232
  shiftHours: {
@@ -2394,6 +2394,7 @@ var FIELDS13 = {
2394
2394
  paymentTypeName: {
2395
2395
  type: "string",
2396
2396
  size: FIRST_COLUMN_WIDTH,
2397
+ columnKey: "paymentType",
2397
2398
  footerCalculation: { type: "label", label: "table.total" }
2398
2399
  },
2399
2400
  paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
@@ -6,7 +6,7 @@ import {
6
6
  getReportConfig,
7
7
  getReportFormattingLocaleOptions,
8
8
  resolveTranslate
9
- } from "../chunk-SYR6AX24.js";
9
+ } from "../chunk-6CXSU5L4.js";
10
10
 
11
11
  // src/exporters/exportBuilder.ts
12
12
  import { format, isValid, parseISO } from "date-fns";
package/dist/index.cjs CHANGED
@@ -28,6 +28,7 @@ __export(index_exports, {
28
28
  TENDER_TYPE: () => TENDER_TYPE,
29
29
  buildDailySalesCashPayments: () => buildDailySalesCashPayments,
30
30
  buildDailySalesRevClassFooter: () => buildDailySalesRevClassFooter,
31
+ buildPaymentsSectionData: () => buildPaymentsSectionData,
31
32
  calculateReportTotals: () => calculateReportTotals,
32
33
  dailySalesCacheConfig: () => dailySalesCacheConfig,
33
34
  dailySalesConfig: () => dailySalesConfig,
@@ -659,11 +660,11 @@ var FIELDS8 = {
659
660
  filteringAvailable: false
660
661
  },
661
662
  startTime: {
662
- type: "string",
663
+ type: "time",
663
664
  columnKey: "clockInTime"
664
665
  },
665
666
  endTime: {
666
- type: "string",
667
+ type: "time",
667
668
  columnKey: "clockOutTime"
668
669
  },
669
670
  shiftHours: {
@@ -831,6 +832,7 @@ var FIELDS13 = {
831
832
  paymentTypeName: {
832
833
  type: "string",
833
834
  size: FIRST_COLUMN_WIDTH,
835
+ columnKey: "paymentType",
834
836
  footerCalculation: { type: "label", label: "table.total" }
835
837
  },
836
838
  paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
@@ -1995,6 +1997,9 @@ var buildDailySalesRevClassFooter = (inputs) => {
1995
1997
  { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
1996
1998
  ];
1997
1999
  };
2000
+ var buildPaymentsSectionData = (payments) => {
2001
+ return payments.filter((payment) => payment.paymentTypeName !== TENDER_TYPE.HOUSE_ACCOUNT);
2002
+ };
1998
2003
 
1999
2004
  // src/translations/crowdin/skytab-analytics-report-utils/en-GB.ts
2000
2005
  var enUS = {
@@ -3628,6 +3633,7 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
3628
3633
  TENDER_TYPE,
3629
3634
  buildDailySalesCashPayments,
3630
3635
  buildDailySalesRevClassFooter,
3636
+ buildPaymentsSectionData,
3631
3637
  calculateReportTotals,
3632
3638
  dailySalesCacheConfig,
3633
3639
  dailySalesConfig,
package/dist/index.d.cts CHANGED
@@ -142,6 +142,9 @@ declare const buildDailySalesRevClassFooter: (inputs: {
142
142
  groupByName: "common.report-section.rev-class-footer.total-accountable";
143
143
  salesAmountNet: number;
144
144
  })[];
145
+ declare const buildPaymentsSectionData: <T extends {
146
+ paymentTypeName: string;
147
+ }>(payments: T[]) => T[];
145
148
 
146
149
  type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
147
150
  declare const dailySalesRefundsVoidsConfig: {
@@ -303,4 +306,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
303
306
  }[]) => LocaleOption[];
304
307
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
305
308
 
306
- export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
309
+ export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, buildPaymentsSectionData, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
package/dist/index.d.ts CHANGED
@@ -142,6 +142,9 @@ declare const buildDailySalesRevClassFooter: (inputs: {
142
142
  groupByName: "common.report-section.rev-class-footer.total-accountable";
143
143
  salesAmountNet: number;
144
144
  })[];
145
+ declare const buildPaymentsSectionData: <T extends {
146
+ paymentTypeName: string;
147
+ }>(payments: T[]) => T[];
145
148
 
146
149
  type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
147
150
  declare const dailySalesRefundsVoidsConfig: {
@@ -303,4 +306,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
303
306
  }[]) => LocaleOption[];
304
307
  declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
305
308
 
306
- export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
309
+ export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, buildPaymentsSectionData, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  salesSummaryConfig,
38
38
  ticketLiveConfig,
39
39
  ticketSummaryConfig
40
- } from "./chunk-SYR6AX24.js";
40
+ } from "./chunk-6CXSU5L4.js";
41
41
 
42
42
  // src/utils/alignment.ts
43
43
  function getColumnAlignment(type) {
@@ -203,6 +203,9 @@ var buildDailySalesRevClassFooter = (inputs) => {
203
203
  { groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
204
204
  ];
205
205
  };
206
+ var buildPaymentsSectionData = (payments) => {
207
+ return payments.filter((payment) => payment.paymentTypeName !== TENDER_TYPE.HOUSE_ACCOUNT);
208
+ };
206
209
  export {
207
210
  COLUMN_REGISTRY,
208
211
  DAILY_SALES_CASH_ROW_LABELS,
@@ -212,6 +215,7 @@ export {
212
215
  TENDER_TYPE,
213
216
  buildDailySalesCashPayments,
214
217
  buildDailySalesRevClassFooter,
218
+ buildPaymentsSectionData,
215
219
  calculateReportTotals,
216
220
  dailySalesCacheConfig,
217
221
  dailySalesConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.22.1",
3
+ "version": "0.23.1",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",