@harbortouch/skytab-analytics-report-utils 0.21.0 → 0.22.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/{chunk-7NXZJEGU.js → chunk-2UW4QVTT.js} +670 -584
- package/dist/exporters/exportBuilder.cjs +2865 -2779
- package/dist/exporters/exportBuilder.d.cts +1 -1
- package/dist/exporters/exportBuilder.d.ts +1 -1
- package/dist/exporters/exportBuilder.js +5 -8
- package/dist/index.cjs +178 -105
- package/dist/index.d.cts +22 -15
- package/dist/index.d.ts +22 -15
- package/dist/index.js +19 -34
- package/dist/{report-BOL9p86o.d.cts → report-DklnjPk7.d.cts} +13 -5
- package/dist/{report-BOL9p86o.d.ts → report-DklnjPk7.d.ts} +13 -5
- package/package.json +1 -1
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 { 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 getReportConfig, n 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-DklnjPk7.cjs';
|
|
2
|
+
export { 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 getReportConfig, n as getReportExportFileName } from './report-DklnjPk7.cjs';
|
|
3
3
|
|
|
4
4
|
type SupportedLocale = 'en-US' | 'en-GB' | 'es-ES';
|
|
5
5
|
declare function resolveTranslate(key: MessageKey, locale: string): string;
|
|
@@ -11,7 +11,7 @@ interface CalculateReportTotalsOptions {
|
|
|
11
11
|
labelField: string;
|
|
12
12
|
label: string;
|
|
13
13
|
}
|
|
14
|
-
declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: ColumnPresentationConfig) => number | null;
|
|
14
|
+
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.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-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.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.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-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.trends-footer.total-sales" | "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.period" | "components.form.field.group-by" | "components.form.field.last-week" | "components.form.field.last-year" | "common.labels.locations" | "common.labels.yes" | "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.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.guests" | "table.groups.sales-per-guest" | null;
|
|
15
15
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
|
|
16
16
|
|
|
17
17
|
type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
|
|
@@ -75,14 +75,6 @@ declare const dailySalesConfig: {
|
|
|
75
75
|
readonly extraFooterRowsKey: "salesByRevClassFooter";
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
|
|
79
|
-
declare const dailySalesLiveConfig: {
|
|
80
|
-
readonly fields: Record<DailySalesLiveField, ColumnPresentationConfig<DailySalesLiveField>>;
|
|
81
|
-
readonly availableColumns: DailySalesLiveField[];
|
|
82
|
-
readonly defaultVisibleColumns: DailySalesLiveField[];
|
|
83
|
-
readonly hasFooter: true;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
78
|
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
87
79
|
declare const dailySalesPaymentsConfig: {
|
|
88
80
|
readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
|
|
@@ -126,6 +118,7 @@ declare const buildDailySalesRevClassFooter: (inputs: {
|
|
|
126
118
|
giftCardSalesTotal: number;
|
|
127
119
|
balancePaymentsTotal: number;
|
|
128
120
|
nonSalesTotal: number;
|
|
121
|
+
houseAccountTotal: number;
|
|
129
122
|
}) => ({
|
|
130
123
|
groupByName: "common.report-section.rev-class-footer.tax-total";
|
|
131
124
|
salesAmountNet: number;
|
|
@@ -141,6 +134,9 @@ declare const buildDailySalesRevClassFooter: (inputs: {
|
|
|
141
134
|
} | {
|
|
142
135
|
groupByName: "common.report-section.rev-class-footer.non-sales-revenue";
|
|
143
136
|
salesAmountNet: number;
|
|
137
|
+
} | {
|
|
138
|
+
groupByName: "common.report-section.rev-class-footer.house-account";
|
|
139
|
+
salesAmountNet: number;
|
|
144
140
|
} | {
|
|
145
141
|
groupByName: "common.report-section.rev-class-footer.total-accountable";
|
|
146
142
|
salesAmountNet: number;
|
|
@@ -208,7 +204,6 @@ declare const dailySalesTrendsConfig: {
|
|
|
208
204
|
readonly hasFooter: true;
|
|
209
205
|
readonly dataAccessKey: "trendsByDayPart";
|
|
210
206
|
readonly sectionName: "common.report-section.sales-by-day-part";
|
|
211
|
-
readonly totalsLabel: "common.report-section.trends-footer.total-sales";
|
|
212
207
|
readonly extraFooterFields: ["salesAmountNet"];
|
|
213
208
|
};
|
|
214
209
|
declare const dailySalesTrendsOrderTypeConfig: {
|
|
@@ -218,7 +213,6 @@ declare const dailySalesTrendsOrderTypeConfig: {
|
|
|
218
213
|
readonly hasFooter: true;
|
|
219
214
|
readonly dataAccessKey: "trendsByOrderType";
|
|
220
215
|
readonly sectionName: "common.report-section.sales-by-order-type";
|
|
221
|
-
readonly totalsLabel: "common.report-section.trends-footer.total-sales";
|
|
222
216
|
readonly extraFooterFields: ["salesAmountNet"];
|
|
223
217
|
};
|
|
224
218
|
|
|
@@ -244,12 +238,25 @@ declare const DAILY_SALES_REV_CLASS_FOOTER_LABELS: {
|
|
|
244
238
|
readonly balancePayments: "common.report-section.rev-class-footer.balance-payments";
|
|
245
239
|
readonly giftCardSales: "common.report-section.rev-class-footer.gift-card-sales";
|
|
246
240
|
readonly nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue";
|
|
241
|
+
readonly houseAccount: "common.report-section.rev-class-footer.house-account";
|
|
247
242
|
readonly totalAccountable: "common.report-section.rev-class-footer.total-accountable";
|
|
248
243
|
};
|
|
249
244
|
declare const REPORT_SECTION_CONFIGS: Partial<Record<ReportType, ReportSectionDefinition[]>>;
|
|
250
245
|
|
|
251
246
|
declare const TENDER_TYPE: {
|
|
252
247
|
readonly CASH: "Cash";
|
|
248
|
+
readonly CHECK: "Check";
|
|
249
|
+
readonly CREDIT: "Credit";
|
|
250
|
+
readonly CRYPTO: "Crypto";
|
|
251
|
+
readonly DEBIT: "Debit";
|
|
252
|
+
readonly GIFT_CARD: "Gift Card";
|
|
253
|
+
readonly GIFT_CERTIFICATE: "Gift Certificate";
|
|
254
|
+
readonly HOUSE_ACCOUNT: "House Account";
|
|
255
|
+
readonly VIRTUAL: "Virtual";
|
|
256
|
+
readonly MOBILE_WALLET: "Digital Wallet";
|
|
257
|
+
readonly PROPERTY_MANAGEMENT_SYSTEM: "PMS";
|
|
258
|
+
readonly ROOM_CHARGE: "Room Charge";
|
|
259
|
+
readonly WALK_OUT: "Walk Out";
|
|
253
260
|
readonly CASH_REFUNDS: "Cash Refunds";
|
|
254
261
|
readonly UNKNOWN: "Unknown";
|
|
255
262
|
};
|
|
@@ -284,7 +291,7 @@ declare const formatMoney: (amount: number, options?: FormatMoneyOptions) => str
|
|
|
284
291
|
declare const formatPercent: (value: number, decimals?: number) => string;
|
|
285
292
|
declare const formatInteger: (value: number) => string;
|
|
286
293
|
declare const formatFixedNumber: (value: number, decimals?: number) => string;
|
|
287
|
-
declare const formatString: (value: unknown) => string;
|
|
294
|
+
declare const formatString: (value: unknown, localeOptions: LocaleOption) => string;
|
|
288
295
|
declare const getNumberToFormat: (value: unknown) => number;
|
|
289
296
|
declare const getDateToFormat: (value?: unknown) => Date | null;
|
|
290
297
|
declare const formatMoneyWithoutSymbol: (amount: number, options?: FormatNumberOptions) => string;
|
|
@@ -295,4 +302,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
295
302
|
}[]) => LocaleOption[];
|
|
296
303
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
297
304
|
|
|
298
|
-
export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type
|
|
305
|
+
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 };
|
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 { 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 getReportConfig, n 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-DklnjPk7.js';
|
|
2
|
+
export { 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 getReportConfig, n as getReportExportFileName } from './report-DklnjPk7.js';
|
|
3
3
|
|
|
4
4
|
type SupportedLocale = 'en-US' | 'en-GB' | 'es-ES';
|
|
5
5
|
declare function resolveTranslate(key: MessageKey, locale: string): string;
|
|
@@ -11,7 +11,7 @@ interface CalculateReportTotalsOptions {
|
|
|
11
11
|
labelField: string;
|
|
12
12
|
label: string;
|
|
13
13
|
}
|
|
14
|
-
declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: ColumnPresentationConfig) => number | null;
|
|
14
|
+
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.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-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.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.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-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.trends-footer.total-sales" | "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.period" | "components.form.field.group-by" | "components.form.field.last-week" | "components.form.field.last-year" | "common.labels.locations" | "common.labels.yes" | "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.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.guests" | "table.groups.sales-per-guest" | null;
|
|
15
15
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
|
|
16
16
|
|
|
17
17
|
type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
|
|
@@ -75,14 +75,6 @@ declare const dailySalesConfig: {
|
|
|
75
75
|
readonly extraFooterRowsKey: "salesByRevClassFooter";
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
|
|
79
|
-
declare const dailySalesLiveConfig: {
|
|
80
|
-
readonly fields: Record<DailySalesLiveField, ColumnPresentationConfig<DailySalesLiveField>>;
|
|
81
|
-
readonly availableColumns: DailySalesLiveField[];
|
|
82
|
-
readonly defaultVisibleColumns: DailySalesLiveField[];
|
|
83
|
-
readonly hasFooter: true;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
78
|
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
87
79
|
declare const dailySalesPaymentsConfig: {
|
|
88
80
|
readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
|
|
@@ -126,6 +118,7 @@ declare const buildDailySalesRevClassFooter: (inputs: {
|
|
|
126
118
|
giftCardSalesTotal: number;
|
|
127
119
|
balancePaymentsTotal: number;
|
|
128
120
|
nonSalesTotal: number;
|
|
121
|
+
houseAccountTotal: number;
|
|
129
122
|
}) => ({
|
|
130
123
|
groupByName: "common.report-section.rev-class-footer.tax-total";
|
|
131
124
|
salesAmountNet: number;
|
|
@@ -141,6 +134,9 @@ declare const buildDailySalesRevClassFooter: (inputs: {
|
|
|
141
134
|
} | {
|
|
142
135
|
groupByName: "common.report-section.rev-class-footer.non-sales-revenue";
|
|
143
136
|
salesAmountNet: number;
|
|
137
|
+
} | {
|
|
138
|
+
groupByName: "common.report-section.rev-class-footer.house-account";
|
|
139
|
+
salesAmountNet: number;
|
|
144
140
|
} | {
|
|
145
141
|
groupByName: "common.report-section.rev-class-footer.total-accountable";
|
|
146
142
|
salesAmountNet: number;
|
|
@@ -208,7 +204,6 @@ declare const dailySalesTrendsConfig: {
|
|
|
208
204
|
readonly hasFooter: true;
|
|
209
205
|
readonly dataAccessKey: "trendsByDayPart";
|
|
210
206
|
readonly sectionName: "common.report-section.sales-by-day-part";
|
|
211
|
-
readonly totalsLabel: "common.report-section.trends-footer.total-sales";
|
|
212
207
|
readonly extraFooterFields: ["salesAmountNet"];
|
|
213
208
|
};
|
|
214
209
|
declare const dailySalesTrendsOrderTypeConfig: {
|
|
@@ -218,7 +213,6 @@ declare const dailySalesTrendsOrderTypeConfig: {
|
|
|
218
213
|
readonly hasFooter: true;
|
|
219
214
|
readonly dataAccessKey: "trendsByOrderType";
|
|
220
215
|
readonly sectionName: "common.report-section.sales-by-order-type";
|
|
221
|
-
readonly totalsLabel: "common.report-section.trends-footer.total-sales";
|
|
222
216
|
readonly extraFooterFields: ["salesAmountNet"];
|
|
223
217
|
};
|
|
224
218
|
|
|
@@ -244,12 +238,25 @@ declare const DAILY_SALES_REV_CLASS_FOOTER_LABELS: {
|
|
|
244
238
|
readonly balancePayments: "common.report-section.rev-class-footer.balance-payments";
|
|
245
239
|
readonly giftCardSales: "common.report-section.rev-class-footer.gift-card-sales";
|
|
246
240
|
readonly nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue";
|
|
241
|
+
readonly houseAccount: "common.report-section.rev-class-footer.house-account";
|
|
247
242
|
readonly totalAccountable: "common.report-section.rev-class-footer.total-accountable";
|
|
248
243
|
};
|
|
249
244
|
declare const REPORT_SECTION_CONFIGS: Partial<Record<ReportType, ReportSectionDefinition[]>>;
|
|
250
245
|
|
|
251
246
|
declare const TENDER_TYPE: {
|
|
252
247
|
readonly CASH: "Cash";
|
|
248
|
+
readonly CHECK: "Check";
|
|
249
|
+
readonly CREDIT: "Credit";
|
|
250
|
+
readonly CRYPTO: "Crypto";
|
|
251
|
+
readonly DEBIT: "Debit";
|
|
252
|
+
readonly GIFT_CARD: "Gift Card";
|
|
253
|
+
readonly GIFT_CERTIFICATE: "Gift Certificate";
|
|
254
|
+
readonly HOUSE_ACCOUNT: "House Account";
|
|
255
|
+
readonly VIRTUAL: "Virtual";
|
|
256
|
+
readonly MOBILE_WALLET: "Digital Wallet";
|
|
257
|
+
readonly PROPERTY_MANAGEMENT_SYSTEM: "PMS";
|
|
258
|
+
readonly ROOM_CHARGE: "Room Charge";
|
|
259
|
+
readonly WALK_OUT: "Walk Out";
|
|
253
260
|
readonly CASH_REFUNDS: "Cash Refunds";
|
|
254
261
|
readonly UNKNOWN: "Unknown";
|
|
255
262
|
};
|
|
@@ -284,7 +291,7 @@ declare const formatMoney: (amount: number, options?: FormatMoneyOptions) => str
|
|
|
284
291
|
declare const formatPercent: (value: number, decimals?: number) => string;
|
|
285
292
|
declare const formatInteger: (value: number) => string;
|
|
286
293
|
declare const formatFixedNumber: (value: number, decimals?: number) => string;
|
|
287
|
-
declare const formatString: (value: unknown) => string;
|
|
294
|
+
declare const formatString: (value: unknown, localeOptions: LocaleOption) => string;
|
|
288
295
|
declare const getNumberToFormat: (value: unknown) => number;
|
|
289
296
|
declare const getDateToFormat: (value?: unknown) => Date | null;
|
|
290
297
|
declare const formatMoneyWithoutSymbol: (amount: number, options?: FormatNumberOptions) => string;
|
|
@@ -295,4 +302,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
295
302
|
}[]) => LocaleOption[];
|
|
296
303
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
297
304
|
|
|
298
|
-
export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type
|
|
305
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COLUMN_REGISTRY,
|
|
3
|
-
FIRST_COLUMN_WIDTH,
|
|
4
3
|
Report,
|
|
5
|
-
calculateFieldTotal,
|
|
6
4
|
calculateReportTotals,
|
|
7
5
|
dailySalesCacheConfig,
|
|
8
6
|
dailySalesConfig,
|
|
@@ -26,6 +24,7 @@ import {
|
|
|
26
24
|
getColumnExportHeaderLabel,
|
|
27
25
|
getColumnMetadata,
|
|
28
26
|
getDateToFormat,
|
|
27
|
+
getFooterValue,
|
|
29
28
|
getNumberToFormat,
|
|
30
29
|
getReportConfig,
|
|
31
30
|
getReportExportFileName,
|
|
@@ -38,7 +37,7 @@ import {
|
|
|
38
37
|
salesSummaryConfig,
|
|
39
38
|
ticketLiveConfig,
|
|
40
39
|
ticketSummaryConfig
|
|
41
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-2UW4QVTT.js";
|
|
42
41
|
|
|
43
42
|
// src/utils/alignment.ts
|
|
44
43
|
function getColumnAlignment(type) {
|
|
@@ -51,33 +50,6 @@ function isNumericType(type) {
|
|
|
51
50
|
return type === "money" || type === "number" || type === "percent" || type === "fixedNumber";
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
// src/reports/dailySalesLive.ts
|
|
55
|
-
var FIELDS = {
|
|
56
|
-
groupById: { type: "string" },
|
|
57
|
-
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH },
|
|
58
|
-
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
59
|
-
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
60
|
-
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
61
|
-
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
62
|
-
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
63
|
-
salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
|
|
64
|
-
guestsCount: { type: "number", columnKey: "guests" }
|
|
65
|
-
};
|
|
66
|
-
var DAILY_SALES_LIVE_AVAILABLE_COLUMNS = [
|
|
67
|
-
"itemsQuantity",
|
|
68
|
-
"salesAmountGross",
|
|
69
|
-
"discountsAmount",
|
|
70
|
-
"inclusiveTaxesAmount",
|
|
71
|
-
"salesAmountNet",
|
|
72
|
-
"salesMixPct"
|
|
73
|
-
];
|
|
74
|
-
var dailySalesLiveConfig = {
|
|
75
|
-
fields: FIELDS,
|
|
76
|
-
availableColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
|
|
77
|
-
defaultVisibleColumns: DAILY_SALES_LIVE_AVAILABLE_COLUMNS,
|
|
78
|
-
hasFooter: true
|
|
79
|
-
};
|
|
80
|
-
|
|
81
53
|
// src/reports/reportSection.ts
|
|
82
54
|
var DAILY_SALES_CASH_ROW_LABELS = {
|
|
83
55
|
cashPayments: "common.report-section.cash-row.cash-payments",
|
|
@@ -91,6 +63,7 @@ var DAILY_SALES_REV_CLASS_FOOTER_LABELS = {
|
|
|
91
63
|
balancePayments: "common.report-section.rev-class-footer.balance-payments",
|
|
92
64
|
giftCardSales: "common.report-section.rev-class-footer.gift-card-sales",
|
|
93
65
|
nonSalesRevenue: "common.report-section.rev-class-footer.non-sales-revenue",
|
|
66
|
+
houseAccount: "common.report-section.rev-class-footer.house-account",
|
|
94
67
|
totalAccountable: "common.report-section.rev-class-footer.total-accountable"
|
|
95
68
|
};
|
|
96
69
|
var DAILY_SALES_SECTIONS = [
|
|
@@ -189,11 +162,23 @@ var REPORT_SECTION_CONFIGS = {
|
|
|
189
162
|
// src/constants.ts
|
|
190
163
|
var TENDER_TYPE = {
|
|
191
164
|
CASH: "Cash",
|
|
165
|
+
CHECK: "Check",
|
|
166
|
+
CREDIT: "Credit",
|
|
167
|
+
CRYPTO: "Crypto",
|
|
168
|
+
DEBIT: "Debit",
|
|
169
|
+
GIFT_CARD: "Gift Card",
|
|
170
|
+
GIFT_CERTIFICATE: "Gift Certificate",
|
|
171
|
+
HOUSE_ACCOUNT: "House Account",
|
|
172
|
+
VIRTUAL: "Virtual",
|
|
173
|
+
MOBILE_WALLET: "Digital Wallet",
|
|
174
|
+
PROPERTY_MANAGEMENT_SYSTEM: "PMS",
|
|
175
|
+
ROOM_CHARGE: "Room Charge",
|
|
176
|
+
WALK_OUT: "Walk Out",
|
|
192
177
|
CASH_REFUNDS: "Cash Refunds",
|
|
193
178
|
UNKNOWN: "Unknown"
|
|
194
179
|
};
|
|
195
180
|
|
|
196
|
-
// src/reports/dailySales.utils.ts
|
|
181
|
+
// src/reports/dailySales/dailySales.utils.ts
|
|
197
182
|
var buildDailySalesCashPayments = (payments, paidOutAmount, gratuitiesPaidOutAmount, tipsPaidOutAmount) => [
|
|
198
183
|
{
|
|
199
184
|
name: DAILY_SALES_CASH_ROW_LABELS.cashPayments,
|
|
@@ -204,7 +189,7 @@ var buildDailySalesCashPayments = (payments, paidOutAmount, gratuitiesPaidOutAmo
|
|
|
204
189
|
{ name: DAILY_SALES_CASH_ROW_LABELS.ccTipsPaidOut, amount: tipsPaidOutAmount }
|
|
205
190
|
];
|
|
206
191
|
var buildDailySalesRevClassFooter = (inputs) => {
|
|
207
|
-
const totalAccountable = inputs.revClassNetSales + inputs.taxTotal + inputs.gratuitiesTotal + inputs.
|
|
192
|
+
const totalAccountable = inputs.revClassNetSales + inputs.taxTotal + inputs.gratuitiesTotal + inputs.balancePaymentsTotal + inputs.giftCardSalesTotal + inputs.nonSalesTotal - inputs.houseAccountTotal;
|
|
208
193
|
return [
|
|
209
194
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.taxTotal, salesAmountNet: inputs.taxTotal },
|
|
210
195
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.gratuities, salesAmountNet: inputs.gratuitiesTotal },
|
|
@@ -214,6 +199,7 @@ var buildDailySalesRevClassFooter = (inputs) => {
|
|
|
214
199
|
},
|
|
215
200
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.giftCardSales, salesAmountNet: inputs.giftCardSalesTotal },
|
|
216
201
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.nonSalesRevenue, salesAmountNet: inputs.nonSalesTotal },
|
|
202
|
+
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.houseAccount, salesAmountNet: inputs.houseAccountTotal },
|
|
217
203
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
|
|
218
204
|
];
|
|
219
205
|
};
|
|
@@ -226,12 +212,10 @@ export {
|
|
|
226
212
|
TENDER_TYPE,
|
|
227
213
|
buildDailySalesCashPayments,
|
|
228
214
|
buildDailySalesRevClassFooter,
|
|
229
|
-
calculateFieldTotal,
|
|
230
215
|
calculateReportTotals,
|
|
231
216
|
dailySalesCacheConfig,
|
|
232
217
|
dailySalesConfig,
|
|
233
218
|
dailySalesDiscountsConfig,
|
|
234
|
-
dailySalesLiveConfig,
|
|
235
219
|
dailySalesPaymentsConfig,
|
|
236
220
|
dailySalesRefundsVoidsConfig,
|
|
237
221
|
dailySalesTaxesConfig,
|
|
@@ -252,6 +236,7 @@ export {
|
|
|
252
236
|
getColumnExportHeaderLabel,
|
|
253
237
|
getColumnMetadata,
|
|
254
238
|
getDateToFormat,
|
|
239
|
+
getFooterValue,
|
|
255
240
|
getNumberToFormat,
|
|
256
241
|
getReportConfig,
|
|
257
242
|
getReportExportFileName,
|
|
@@ -1187,6 +1187,7 @@ declare const enUS: {
|
|
|
1187
1187
|
readonly 'common.report-section.rev-class-footer.balance-payments': "Balance Payments";
|
|
1188
1188
|
readonly 'common.report-section.rev-class-footer.gift-card-sales': "Gift Card Sales";
|
|
1189
1189
|
readonly 'common.report-section.rev-class-footer.non-sales-revenue': "Non-Sales Revenue";
|
|
1190
|
+
readonly 'common.report-section.rev-class-footer.house-account': "House Account";
|
|
1190
1191
|
readonly 'common.report-section.rev-class-footer.total-accountable': "Total Accountable";
|
|
1191
1192
|
readonly 'scheduled-reports.period': "Period";
|
|
1192
1193
|
readonly 'components.form.field.group-by': "Group By";
|
|
@@ -1218,14 +1219,22 @@ type MessageKey = keyof typeof enUS;
|
|
|
1218
1219
|
|
|
1219
1220
|
type FieldType = 'string' | 'money' | 'percent' | 'number' | 'fixedNumber' | 'date' | 'time' | 'boolean' | 'conditional';
|
|
1220
1221
|
type ColumnAlignment = 'left' | 'right';
|
|
1221
|
-
type FooterCalculationType = 'sum' | 'percentChange' | 'variancePercent' | 'average' | 'quotientOfDifferences' | 'count' | 'none';
|
|
1222
|
-
|
|
1223
|
-
type: FooterCalculationType
|
|
1222
|
+
type FooterCalculationType = 'sum' | 'percentChange' | 'variancePercent' | 'average' | 'quotientOfDifferences' | 'count' | 'label' | 'none';
|
|
1223
|
+
type FooterCalculation<TField = string> = {
|
|
1224
|
+
type: Exclude<FooterCalculationType, 'label'>;
|
|
1224
1225
|
numeratorField?: TField;
|
|
1225
1226
|
numeratorAdjustField?: string;
|
|
1226
1227
|
denominatorField?: TField;
|
|
1227
1228
|
denominatorAdjustField?: string;
|
|
1228
|
-
|
|
1229
|
+
label?: never;
|
|
1230
|
+
} | {
|
|
1231
|
+
type: 'label';
|
|
1232
|
+
label: MessageKey;
|
|
1233
|
+
numeratorField?: never;
|
|
1234
|
+
numeratorAdjustField?: never;
|
|
1235
|
+
denominatorField?: never;
|
|
1236
|
+
denominatorAdjustField?: never;
|
|
1237
|
+
};
|
|
1229
1238
|
interface ConditionalConfiguration<TField = string> {
|
|
1230
1239
|
conditionalField: TField;
|
|
1231
1240
|
conditionalFormat: (value: unknown) => Exclude<FieldType, 'conditional'>;
|
|
@@ -1260,7 +1269,6 @@ interface ReportConfig<TField extends string = string> {
|
|
|
1260
1269
|
hasFooter: boolean;
|
|
1261
1270
|
dataAccessKey?: string;
|
|
1262
1271
|
sectionName?: MessageKey;
|
|
1263
|
-
totalsLabel?: MessageKey;
|
|
1264
1272
|
extraFooterRowsKey?: string;
|
|
1265
1273
|
extraFooterFields?: string[];
|
|
1266
1274
|
}
|
|
@@ -1187,6 +1187,7 @@ declare const enUS: {
|
|
|
1187
1187
|
readonly 'common.report-section.rev-class-footer.balance-payments': "Balance Payments";
|
|
1188
1188
|
readonly 'common.report-section.rev-class-footer.gift-card-sales': "Gift Card Sales";
|
|
1189
1189
|
readonly 'common.report-section.rev-class-footer.non-sales-revenue': "Non-Sales Revenue";
|
|
1190
|
+
readonly 'common.report-section.rev-class-footer.house-account': "House Account";
|
|
1190
1191
|
readonly 'common.report-section.rev-class-footer.total-accountable': "Total Accountable";
|
|
1191
1192
|
readonly 'scheduled-reports.period': "Period";
|
|
1192
1193
|
readonly 'components.form.field.group-by': "Group By";
|
|
@@ -1218,14 +1219,22 @@ type MessageKey = keyof typeof enUS;
|
|
|
1218
1219
|
|
|
1219
1220
|
type FieldType = 'string' | 'money' | 'percent' | 'number' | 'fixedNumber' | 'date' | 'time' | 'boolean' | 'conditional';
|
|
1220
1221
|
type ColumnAlignment = 'left' | 'right';
|
|
1221
|
-
type FooterCalculationType = 'sum' | 'percentChange' | 'variancePercent' | 'average' | 'quotientOfDifferences' | 'count' | 'none';
|
|
1222
|
-
|
|
1223
|
-
type: FooterCalculationType
|
|
1222
|
+
type FooterCalculationType = 'sum' | 'percentChange' | 'variancePercent' | 'average' | 'quotientOfDifferences' | 'count' | 'label' | 'none';
|
|
1223
|
+
type FooterCalculation<TField = string> = {
|
|
1224
|
+
type: Exclude<FooterCalculationType, 'label'>;
|
|
1224
1225
|
numeratorField?: TField;
|
|
1225
1226
|
numeratorAdjustField?: string;
|
|
1226
1227
|
denominatorField?: TField;
|
|
1227
1228
|
denominatorAdjustField?: string;
|
|
1228
|
-
|
|
1229
|
+
label?: never;
|
|
1230
|
+
} | {
|
|
1231
|
+
type: 'label';
|
|
1232
|
+
label: MessageKey;
|
|
1233
|
+
numeratorField?: never;
|
|
1234
|
+
numeratorAdjustField?: never;
|
|
1235
|
+
denominatorField?: never;
|
|
1236
|
+
denominatorAdjustField?: never;
|
|
1237
|
+
};
|
|
1229
1238
|
interface ConditionalConfiguration<TField = string> {
|
|
1230
1239
|
conditionalField: TField;
|
|
1231
1240
|
conditionalFormat: (value: unknown) => Exclude<FieldType, 'conditional'>;
|
|
@@ -1260,7 +1269,6 @@ interface ReportConfig<TField extends string = string> {
|
|
|
1260
1269
|
hasFooter: boolean;
|
|
1261
1270
|
dataAccessKey?: string;
|
|
1262
1271
|
sectionName?: MessageKey;
|
|
1263
|
-
totalsLabel?: MessageKey;
|
|
1264
1272
|
extraFooterRowsKey?: string;
|
|
1265
1273
|
extraFooterFields?: string[];
|
|
1266
1274
|
}
|