@harbortouch/skytab-analytics-report-utils 0.22.1 → 0.23.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.
@@ -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" } },
@@ -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-SP2ZXKSZ.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,
@@ -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-SP2ZXKSZ.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.0",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",