@harbortouch/skytab-analytics-report-utils 0.4.2 → 0.4.4
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/columns/index.d.ts +1 -1
- package/dist/index.cjs +190 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +175 -0
- package/dist/reports/dailySales.d.ts +6 -0
- package/dist/reports/dailySalesDiscounts.d.ts +6 -0
- package/dist/reports/dailySalesPayments.d.ts +6 -0
- package/dist/reports/dailySalesRefundsVoids.d.ts +6 -0
- package/dist/reports/dailySalesTaxes.d.ts +6 -0
- package/dist/reports/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/columns/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns';
|
|
1
|
+
export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName';
|
|
2
2
|
export interface ColumnMetadata {
|
|
3
3
|
titleKey: string;
|
|
4
4
|
shortTitleKey: string;
|
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
COLUMN_REGISTRY: () => COLUMN_REGISTRY,
|
|
24
|
+
DAILY_SALES_AVAILABLE_COLUMNS: () => DAILY_SALES_AVAILABLE_COLUMNS,
|
|
25
|
+
DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
|
|
26
|
+
DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS: () => DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
|
|
27
|
+
DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
|
|
28
|
+
DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS: () => DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
29
|
+
DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS,
|
|
30
|
+
DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS: () => DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
|
|
31
|
+
DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
|
|
32
|
+
DAILY_SALES_TAXES_AVAILABLE_COLUMNS: () => DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
|
|
33
|
+
DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
|
|
24
34
|
ITEM_TAX_AVAILABLE_COLUMNS: () => ITEM_TAX_AVAILABLE_COLUMNS,
|
|
25
35
|
ITEM_TAX_DEFAULT_VISIBLE_COLUMNS: () => ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
|
|
26
36
|
MODIFIER_MIX_AVAILABLE_COLUMNS: () => MODIFIER_MIX_AVAILABLE_COLUMNS,
|
|
@@ -35,6 +45,11 @@ __export(index_exports, {
|
|
|
35
45
|
TICKET_SUMMARY_AVAILABLE_COLUMNS: () => TICKET_SUMMARY_AVAILABLE_COLUMNS,
|
|
36
46
|
TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS: () => TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
|
|
37
47
|
calculateReportTotals: () => calculateReportTotals,
|
|
48
|
+
dailySalesConfig: () => dailySalesConfig,
|
|
49
|
+
dailySalesDiscountsConfig: () => dailySalesDiscountsConfig,
|
|
50
|
+
dailySalesPaymentsConfig: () => dailySalesPaymentsConfig,
|
|
51
|
+
dailySalesRefundsVoidsConfig: () => dailySalesRefundsVoidsConfig,
|
|
52
|
+
dailySalesTaxesConfig: () => dailySalesTaxesConfig,
|
|
38
53
|
getColumnAlignment: () => getColumnAlignment,
|
|
39
54
|
getColumnMetadata: () => getColumnMetadata,
|
|
40
55
|
isNumericType: () => isNumericType,
|
|
@@ -179,6 +194,11 @@ var COLUMN_REGISTRY = {
|
|
|
179
194
|
shortTitleKey: "common.report-col.discount-amount.short",
|
|
180
195
|
infoTextKey: "common.report-col.discount-amount.info"
|
|
181
196
|
},
|
|
197
|
+
discountCount: {
|
|
198
|
+
titleKey: "common.report-col.discount-count",
|
|
199
|
+
shortTitleKey: "common.report-col.discount-count.short",
|
|
200
|
+
infoTextKey: "common.report-col.discount-count.info"
|
|
201
|
+
},
|
|
182
202
|
discover: {
|
|
183
203
|
titleKey: "common.report-col.discover",
|
|
184
204
|
shortTitleKey: "common.report-col.discover.short",
|
|
@@ -608,6 +628,46 @@ var COLUMN_REGISTRY = {
|
|
|
608
628
|
titleKey: "common.report-col.visa-returns",
|
|
609
629
|
shortTitleKey: "common.report-col.visa-returns.short",
|
|
610
630
|
infoTextKey: "common.report-col.visa-returns.info"
|
|
631
|
+
},
|
|
632
|
+
paymentsCount: {
|
|
633
|
+
titleKey: "common.report-col.payments-count",
|
|
634
|
+
shortTitleKey: "common.report-col.payments-count.short",
|
|
635
|
+
infoTextKey: "common.report-col.payments-count.info"
|
|
636
|
+
},
|
|
637
|
+
paymentsAmount: {
|
|
638
|
+
titleKey: "common.report-col.payments-amount",
|
|
639
|
+
shortTitleKey: "common.report-col.payments-amount.short",
|
|
640
|
+
infoTextKey: "common.report-col.payments-amount.info"
|
|
641
|
+
},
|
|
642
|
+
paymentsTotal: {
|
|
643
|
+
titleKey: "common.report-col.payments-total",
|
|
644
|
+
shortTitleKey: "common.report-col.payments-total.short",
|
|
645
|
+
infoTextKey: "common.report-col.payments-total.info"
|
|
646
|
+
},
|
|
647
|
+
refundVoidDescription: {
|
|
648
|
+
titleKey: "common.report-col.refund-void-description",
|
|
649
|
+
shortTitleKey: "common.report-col.refund-void-description.short",
|
|
650
|
+
infoTextKey: "common.report-col.refund-void-description.info"
|
|
651
|
+
},
|
|
652
|
+
refundVoidCount: {
|
|
653
|
+
titleKey: "common.report-col.refund-void-count",
|
|
654
|
+
shortTitleKey: "common.report-col.refund-void-count.short",
|
|
655
|
+
infoTextKey: "common.report-col.refund-void-count.info"
|
|
656
|
+
},
|
|
657
|
+
refundVoidAmount: {
|
|
658
|
+
titleKey: "common.report-col.refund-void-amount",
|
|
659
|
+
shortTitleKey: "common.report-col.refund-void-amount.short",
|
|
660
|
+
infoTextKey: "common.report-col.refund-void-amount.info"
|
|
661
|
+
},
|
|
662
|
+
refundVoidPctSales: {
|
|
663
|
+
titleKey: "common.report-col.refund-void-pct-sales",
|
|
664
|
+
shortTitleKey: "common.report-col.refund-void-pct-sales.short",
|
|
665
|
+
infoTextKey: "common.report-col.refund-void-pct-sales.info"
|
|
666
|
+
},
|
|
667
|
+
discountName: {
|
|
668
|
+
titleKey: "common.report-col.discount-name",
|
|
669
|
+
shortTitleKey: "common.report-col.discount-name.short",
|
|
670
|
+
infoTextKey: "common.report-col.discount-name.info"
|
|
611
671
|
}
|
|
612
672
|
};
|
|
613
673
|
function getColumnMetadata(key) {
|
|
@@ -1134,9 +1194,134 @@ var itemTaxConfig = {
|
|
|
1134
1194
|
availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
|
|
1135
1195
|
defaultVisibleColumns: ITEM_TAX_DEFAULT_VISIBLE_COLUMNS
|
|
1136
1196
|
};
|
|
1197
|
+
|
|
1198
|
+
// src/reports/dailySales.ts
|
|
1199
|
+
var FIRST_COLUMN_WIDTH4 = 240;
|
|
1200
|
+
var FIELDS7 = {
|
|
1201
|
+
groupById: { type: "string" },
|
|
1202
|
+
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH4 },
|
|
1203
|
+
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
1204
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1205
|
+
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
1206
|
+
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
1207
|
+
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
1208
|
+
salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
|
|
1209
|
+
avgPrice: {
|
|
1210
|
+
type: "fixedNumber",
|
|
1211
|
+
columnKey: "averageGrossPrice",
|
|
1212
|
+
footerCalculation: {
|
|
1213
|
+
type: "average",
|
|
1214
|
+
numeratorField: "salesAmountGross",
|
|
1215
|
+
denominatorField: "itemsQuantity"
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
};
|
|
1219
|
+
var DAILY_SALES_AVAILABLE_COLUMNS = [
|
|
1220
|
+
"itemsQuantity",
|
|
1221
|
+
"salesAmountGross",
|
|
1222
|
+
"discountsAmount",
|
|
1223
|
+
"salesAmountNet",
|
|
1224
|
+
"salesMixPct"
|
|
1225
|
+
];
|
|
1226
|
+
var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
|
|
1227
|
+
var dailySalesConfig = {
|
|
1228
|
+
fields: FIELDS7,
|
|
1229
|
+
availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
|
|
1230
|
+
defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
// src/reports/dailySalesPayments.ts
|
|
1234
|
+
var FIRST_COLUMN_WIDTH5 = 240;
|
|
1235
|
+
var FIELDS8 = {
|
|
1236
|
+
paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH5 },
|
|
1237
|
+
paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
|
|
1238
|
+
paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
|
|
1239
|
+
tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
|
|
1240
|
+
totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
|
|
1241
|
+
};
|
|
1242
|
+
var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
|
|
1243
|
+
"paymentsCount",
|
|
1244
|
+
"paymentsAmount",
|
|
1245
|
+
"tipsAmount",
|
|
1246
|
+
"totalSales"
|
|
1247
|
+
];
|
|
1248
|
+
var DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS;
|
|
1249
|
+
var dailySalesPaymentsConfig = {
|
|
1250
|
+
fields: FIELDS8,
|
|
1251
|
+
availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
1252
|
+
defaultVisibleColumns: DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
// src/reports/dailySalesDiscounts.ts
|
|
1256
|
+
var FIRST_COLUMN_WIDTH6 = 240;
|
|
1257
|
+
var FIELDS9 = {
|
|
1258
|
+
discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH6 },
|
|
1259
|
+
discountsCount: { type: "number", columnKey: "discountCount", footerCalculation: { type: "sum" } },
|
|
1260
|
+
discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
|
|
1261
|
+
};
|
|
1262
|
+
var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
|
|
1263
|
+
"discountsCount",
|
|
1264
|
+
"discountsAmount"
|
|
1265
|
+
];
|
|
1266
|
+
var DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS;
|
|
1267
|
+
var dailySalesDiscountsConfig = {
|
|
1268
|
+
fields: FIELDS9,
|
|
1269
|
+
availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
|
|
1270
|
+
defaultVisibleColumns: DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
// src/reports/dailySalesRefundsVoids.ts
|
|
1274
|
+
var FIRST_COLUMN_WIDTH7 = 240;
|
|
1275
|
+
var FIELDS10 = {
|
|
1276
|
+
description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH7 },
|
|
1277
|
+
count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
|
|
1278
|
+
amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
|
|
1279
|
+
pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
|
|
1280
|
+
};
|
|
1281
|
+
var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
|
|
1282
|
+
"count",
|
|
1283
|
+
"amount",
|
|
1284
|
+
"pctSales"
|
|
1285
|
+
];
|
|
1286
|
+
var DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS;
|
|
1287
|
+
var dailySalesRefundsVoidsConfig = {
|
|
1288
|
+
fields: FIELDS10,
|
|
1289
|
+
availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
|
|
1290
|
+
defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1293
|
+
// src/reports/dailySalesTaxes.ts
|
|
1294
|
+
var FIRST_COLUMN_WIDTH8 = 240;
|
|
1295
|
+
var FIELDS11 = {
|
|
1296
|
+
taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH8 },
|
|
1297
|
+
taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
|
|
1298
|
+
taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
|
|
1299
|
+
exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
|
|
1300
|
+
};
|
|
1301
|
+
var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
|
|
1302
|
+
"taxableSales",
|
|
1303
|
+
"taxesAmount",
|
|
1304
|
+
"exemptSales"
|
|
1305
|
+
];
|
|
1306
|
+
var DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_TAXES_AVAILABLE_COLUMNS;
|
|
1307
|
+
var dailySalesTaxesConfig = {
|
|
1308
|
+
fields: FIELDS11,
|
|
1309
|
+
availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
|
|
1310
|
+
defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
|
|
1311
|
+
};
|
|
1137
1312
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1138
1313
|
0 && (module.exports = {
|
|
1139
1314
|
COLUMN_REGISTRY,
|
|
1315
|
+
DAILY_SALES_AVAILABLE_COLUMNS,
|
|
1316
|
+
DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
|
|
1317
|
+
DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
|
|
1318
|
+
DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
|
|
1319
|
+
DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
1320
|
+
DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS,
|
|
1321
|
+
DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
|
|
1322
|
+
DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
|
|
1323
|
+
DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
|
|
1324
|
+
DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
|
|
1140
1325
|
ITEM_TAX_AVAILABLE_COLUMNS,
|
|
1141
1326
|
ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
|
|
1142
1327
|
MODIFIER_MIX_AVAILABLE_COLUMNS,
|
|
@@ -1151,6 +1336,11 @@ var itemTaxConfig = {
|
|
|
1151
1336
|
TICKET_SUMMARY_AVAILABLE_COLUMNS,
|
|
1152
1337
|
TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
|
|
1153
1338
|
calculateReportTotals,
|
|
1339
|
+
dailySalesConfig,
|
|
1340
|
+
dailySalesDiscountsConfig,
|
|
1341
|
+
dailySalesPaymentsConfig,
|
|
1342
|
+
dailySalesRefundsVoidsConfig,
|
|
1343
|
+
dailySalesTaxesConfig,
|
|
1154
1344
|
getColumnAlignment,
|
|
1155
1345
|
getColumnMetadata,
|
|
1156
1346
|
isNumericType,
|
package/dist/index.d.ts
CHANGED
|
@@ -10,3 +10,8 @@ export { ticketLiveConfig, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VI
|
|
|
10
10
|
export { productMixConfig, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, } from './reports/productMix';
|
|
11
11
|
export { modifierMixConfig, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS, } from './reports/modifierMix';
|
|
12
12
|
export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS } from './reports/itemTax';
|
|
13
|
+
export { dailySalesConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySales';
|
|
14
|
+
export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesPayments';
|
|
15
|
+
export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesDiscounts';
|
|
16
|
+
export { dailySalesRefundsVoidsConfig, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesRefundsVoids';
|
|
17
|
+
export { dailySalesTaxesConfig, DAILY_SALES_TAXES_AVAILABLE_COLUMNS, DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesTaxes';
|
package/dist/index.js
CHANGED
|
@@ -130,6 +130,11 @@ var COLUMN_REGISTRY = {
|
|
|
130
130
|
shortTitleKey: "common.report-col.discount-amount.short",
|
|
131
131
|
infoTextKey: "common.report-col.discount-amount.info"
|
|
132
132
|
},
|
|
133
|
+
discountCount: {
|
|
134
|
+
titleKey: "common.report-col.discount-count",
|
|
135
|
+
shortTitleKey: "common.report-col.discount-count.short",
|
|
136
|
+
infoTextKey: "common.report-col.discount-count.info"
|
|
137
|
+
},
|
|
133
138
|
discover: {
|
|
134
139
|
titleKey: "common.report-col.discover",
|
|
135
140
|
shortTitleKey: "common.report-col.discover.short",
|
|
@@ -559,6 +564,46 @@ var COLUMN_REGISTRY = {
|
|
|
559
564
|
titleKey: "common.report-col.visa-returns",
|
|
560
565
|
shortTitleKey: "common.report-col.visa-returns.short",
|
|
561
566
|
infoTextKey: "common.report-col.visa-returns.info"
|
|
567
|
+
},
|
|
568
|
+
paymentsCount: {
|
|
569
|
+
titleKey: "common.report-col.payments-count",
|
|
570
|
+
shortTitleKey: "common.report-col.payments-count.short",
|
|
571
|
+
infoTextKey: "common.report-col.payments-count.info"
|
|
572
|
+
},
|
|
573
|
+
paymentsAmount: {
|
|
574
|
+
titleKey: "common.report-col.payments-amount",
|
|
575
|
+
shortTitleKey: "common.report-col.payments-amount.short",
|
|
576
|
+
infoTextKey: "common.report-col.payments-amount.info"
|
|
577
|
+
},
|
|
578
|
+
paymentsTotal: {
|
|
579
|
+
titleKey: "common.report-col.payments-total",
|
|
580
|
+
shortTitleKey: "common.report-col.payments-total.short",
|
|
581
|
+
infoTextKey: "common.report-col.payments-total.info"
|
|
582
|
+
},
|
|
583
|
+
refundVoidDescription: {
|
|
584
|
+
titleKey: "common.report-col.refund-void-description",
|
|
585
|
+
shortTitleKey: "common.report-col.refund-void-description.short",
|
|
586
|
+
infoTextKey: "common.report-col.refund-void-description.info"
|
|
587
|
+
},
|
|
588
|
+
refundVoidCount: {
|
|
589
|
+
titleKey: "common.report-col.refund-void-count",
|
|
590
|
+
shortTitleKey: "common.report-col.refund-void-count.short",
|
|
591
|
+
infoTextKey: "common.report-col.refund-void-count.info"
|
|
592
|
+
},
|
|
593
|
+
refundVoidAmount: {
|
|
594
|
+
titleKey: "common.report-col.refund-void-amount",
|
|
595
|
+
shortTitleKey: "common.report-col.refund-void-amount.short",
|
|
596
|
+
infoTextKey: "common.report-col.refund-void-amount.info"
|
|
597
|
+
},
|
|
598
|
+
refundVoidPctSales: {
|
|
599
|
+
titleKey: "common.report-col.refund-void-pct-sales",
|
|
600
|
+
shortTitleKey: "common.report-col.refund-void-pct-sales.short",
|
|
601
|
+
infoTextKey: "common.report-col.refund-void-pct-sales.info"
|
|
602
|
+
},
|
|
603
|
+
discountName: {
|
|
604
|
+
titleKey: "common.report-col.discount-name",
|
|
605
|
+
shortTitleKey: "common.report-col.discount-name.short",
|
|
606
|
+
infoTextKey: "common.report-col.discount-name.info"
|
|
562
607
|
}
|
|
563
608
|
};
|
|
564
609
|
function getColumnMetadata(key) {
|
|
@@ -1085,8 +1130,133 @@ var itemTaxConfig = {
|
|
|
1085
1130
|
availableColumns: ITEM_TAX_AVAILABLE_COLUMNS,
|
|
1086
1131
|
defaultVisibleColumns: ITEM_TAX_DEFAULT_VISIBLE_COLUMNS
|
|
1087
1132
|
};
|
|
1133
|
+
|
|
1134
|
+
// src/reports/dailySales.ts
|
|
1135
|
+
var FIRST_COLUMN_WIDTH4 = 240;
|
|
1136
|
+
var FIELDS7 = {
|
|
1137
|
+
groupById: { type: "string" },
|
|
1138
|
+
groupByName: { type: "string", size: FIRST_COLUMN_WIDTH4 },
|
|
1139
|
+
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
1140
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1141
|
+
discountsAmount: { type: "money", columnKey: "discountAmount" },
|
|
1142
|
+
inclusiveTaxesAmount: { type: "money", columnKey: "inclusiveTax" },
|
|
1143
|
+
salesAmountNet: { type: "money", columnKey: "netSales" },
|
|
1144
|
+
salesMixPct: { type: "percent", columnKey: "salesMixByPct" },
|
|
1145
|
+
avgPrice: {
|
|
1146
|
+
type: "fixedNumber",
|
|
1147
|
+
columnKey: "averageGrossPrice",
|
|
1148
|
+
footerCalculation: {
|
|
1149
|
+
type: "average",
|
|
1150
|
+
numeratorField: "salesAmountGross",
|
|
1151
|
+
denominatorField: "itemsQuantity"
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
var DAILY_SALES_AVAILABLE_COLUMNS = [
|
|
1156
|
+
"itemsQuantity",
|
|
1157
|
+
"salesAmountGross",
|
|
1158
|
+
"discountsAmount",
|
|
1159
|
+
"salesAmountNet",
|
|
1160
|
+
"salesMixPct"
|
|
1161
|
+
];
|
|
1162
|
+
var DAILY_SALES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_AVAILABLE_COLUMNS;
|
|
1163
|
+
var dailySalesConfig = {
|
|
1164
|
+
fields: FIELDS7,
|
|
1165
|
+
availableColumns: DAILY_SALES_AVAILABLE_COLUMNS,
|
|
1166
|
+
defaultVisibleColumns: DAILY_SALES_DEFAULT_VISIBLE_COLUMNS
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
// src/reports/dailySalesPayments.ts
|
|
1170
|
+
var FIRST_COLUMN_WIDTH5 = 240;
|
|
1171
|
+
var FIELDS8 = {
|
|
1172
|
+
paymentTypeName: { type: "string", size: FIRST_COLUMN_WIDTH5 },
|
|
1173
|
+
paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
|
|
1174
|
+
paymentsAmount: { type: "money", columnKey: "paymentsAmount", footerCalculation: { type: "sum" } },
|
|
1175
|
+
tipsAmount: { type: "money", columnKey: "tips", footerCalculation: { type: "sum" } },
|
|
1176
|
+
totalSales: { type: "money", columnKey: "paymentsTotal", footerCalculation: { type: "sum" } }
|
|
1177
|
+
};
|
|
1178
|
+
var DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS = [
|
|
1179
|
+
"paymentsCount",
|
|
1180
|
+
"paymentsAmount",
|
|
1181
|
+
"tipsAmount",
|
|
1182
|
+
"totalSales"
|
|
1183
|
+
];
|
|
1184
|
+
var DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS;
|
|
1185
|
+
var dailySalesPaymentsConfig = {
|
|
1186
|
+
fields: FIELDS8,
|
|
1187
|
+
availableColumns: DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
1188
|
+
defaultVisibleColumns: DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS
|
|
1189
|
+
};
|
|
1190
|
+
|
|
1191
|
+
// src/reports/dailySalesDiscounts.ts
|
|
1192
|
+
var FIRST_COLUMN_WIDTH6 = 240;
|
|
1193
|
+
var FIELDS9 = {
|
|
1194
|
+
discountName: { type: "string", columnKey: "discountName", size: FIRST_COLUMN_WIDTH6 },
|
|
1195
|
+
discountsCount: { type: "number", columnKey: "discountCount", footerCalculation: { type: "sum" } },
|
|
1196
|
+
discountsAmount: { type: "money", columnKey: "discountAmount", footerCalculation: { type: "sum" } }
|
|
1197
|
+
};
|
|
1198
|
+
var DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS = [
|
|
1199
|
+
"discountsCount",
|
|
1200
|
+
"discountsAmount"
|
|
1201
|
+
];
|
|
1202
|
+
var DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS;
|
|
1203
|
+
var dailySalesDiscountsConfig = {
|
|
1204
|
+
fields: FIELDS9,
|
|
1205
|
+
availableColumns: DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
|
|
1206
|
+
defaultVisibleColumns: DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
// src/reports/dailySalesRefundsVoids.ts
|
|
1210
|
+
var FIRST_COLUMN_WIDTH7 = 240;
|
|
1211
|
+
var FIELDS10 = {
|
|
1212
|
+
description: { type: "string", columnKey: "refundVoidDescription", size: FIRST_COLUMN_WIDTH7 },
|
|
1213
|
+
count: { type: "number", columnKey: "refundVoidCount", footerCalculation: { type: "sum" } },
|
|
1214
|
+
amount: { type: "money", columnKey: "refundVoidAmount", footerCalculation: { type: "sum" } },
|
|
1215
|
+
pctSales: { type: "percent", columnKey: "refundVoidPctSales", footerCalculation: { type: "sum" } }
|
|
1216
|
+
};
|
|
1217
|
+
var DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS = [
|
|
1218
|
+
"count",
|
|
1219
|
+
"amount",
|
|
1220
|
+
"pctSales"
|
|
1221
|
+
];
|
|
1222
|
+
var DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS;
|
|
1223
|
+
var dailySalesRefundsVoidsConfig = {
|
|
1224
|
+
fields: FIELDS10,
|
|
1225
|
+
availableColumns: DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
|
|
1226
|
+
defaultVisibleColumns: DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
// src/reports/dailySalesTaxes.ts
|
|
1230
|
+
var FIRST_COLUMN_WIDTH8 = 240;
|
|
1231
|
+
var FIELDS11 = {
|
|
1232
|
+
taxName: { type: "string", columnKey: "taxName", size: FIRST_COLUMN_WIDTH8 },
|
|
1233
|
+
taxableSales: { type: "money", columnKey: "taxableSales", footerCalculation: { type: "sum" } },
|
|
1234
|
+
taxesAmount: { type: "money", columnKey: "taxCollected", footerCalculation: { type: "sum" } },
|
|
1235
|
+
exemptSales: { type: "money", columnKey: "exemptTaxes", footerCalculation: { type: "sum" } }
|
|
1236
|
+
};
|
|
1237
|
+
var DAILY_SALES_TAXES_AVAILABLE_COLUMNS = [
|
|
1238
|
+
"taxableSales",
|
|
1239
|
+
"taxesAmount",
|
|
1240
|
+
"exemptSales"
|
|
1241
|
+
];
|
|
1242
|
+
var DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS = DAILY_SALES_TAXES_AVAILABLE_COLUMNS;
|
|
1243
|
+
var dailySalesTaxesConfig = {
|
|
1244
|
+
fields: FIELDS11,
|
|
1245
|
+
availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
|
|
1246
|
+
defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
|
|
1247
|
+
};
|
|
1088
1248
|
export {
|
|
1089
1249
|
COLUMN_REGISTRY,
|
|
1250
|
+
DAILY_SALES_AVAILABLE_COLUMNS,
|
|
1251
|
+
DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
|
|
1252
|
+
DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS,
|
|
1253
|
+
DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS,
|
|
1254
|
+
DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS,
|
|
1255
|
+
DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS,
|
|
1256
|
+
DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS,
|
|
1257
|
+
DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS,
|
|
1258
|
+
DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
|
|
1259
|
+
DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS,
|
|
1090
1260
|
ITEM_TAX_AVAILABLE_COLUMNS,
|
|
1091
1261
|
ITEM_TAX_DEFAULT_VISIBLE_COLUMNS,
|
|
1092
1262
|
MODIFIER_MIX_AVAILABLE_COLUMNS,
|
|
@@ -1101,6 +1271,11 @@ export {
|
|
|
1101
1271
|
TICKET_SUMMARY_AVAILABLE_COLUMNS,
|
|
1102
1272
|
TICKET_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
|
|
1103
1273
|
calculateReportTotals,
|
|
1274
|
+
dailySalesConfig,
|
|
1275
|
+
dailySalesDiscountsConfig,
|
|
1276
|
+
dailySalesPaymentsConfig,
|
|
1277
|
+
dailySalesRefundsVoidsConfig,
|
|
1278
|
+
dailySalesTaxesConfig,
|
|
1104
1279
|
getColumnAlignment,
|
|
1105
1280
|
getColumnMetadata,
|
|
1106
1281
|
isNumericType,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReportConfig } from '../types';
|
|
2
|
+
type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'avgPrice';
|
|
3
|
+
export declare const DAILY_SALES_AVAILABLE_COLUMNS: DailySalesField[];
|
|
4
|
+
export declare const DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: DailySalesField[];
|
|
5
|
+
export declare const dailySalesConfig: ReportConfig<DailySalesField>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReportConfig } from '../types';
|
|
2
|
+
type DailySalesDiscountsField = 'discountName' | 'discountsCount' | 'discountsAmount';
|
|
3
|
+
export declare const DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS: DailySalesDiscountsField[];
|
|
4
|
+
export declare const DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS: DailySalesDiscountsField[];
|
|
5
|
+
export declare const dailySalesDiscountsConfig: ReportConfig<DailySalesDiscountsField>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReportConfig } from '../types';
|
|
2
|
+
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
3
|
+
export declare const DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS: DailySalesPaymentsField[];
|
|
4
|
+
export declare const DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS: DailySalesPaymentsField[];
|
|
5
|
+
export declare const dailySalesPaymentsConfig: ReportConfig<DailySalesPaymentsField>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReportConfig } from '../types';
|
|
2
|
+
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
3
|
+
export declare const DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS: DailySalesRefundsVoidsField[];
|
|
4
|
+
export declare const DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS: DailySalesRefundsVoidsField[];
|
|
5
|
+
export declare const dailySalesRefundsVoidsConfig: ReportConfig<DailySalesRefundsVoidsField>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReportConfig } from '../types';
|
|
2
|
+
type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
|
|
3
|
+
export declare const DAILY_SALES_TAXES_AVAILABLE_COLUMNS: DailySalesTaxesField[];
|
|
4
|
+
export declare const DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS: DailySalesTaxesField[];
|
|
5
|
+
export declare const dailySalesTaxesConfig: ReportConfig<DailySalesTaxesField>;
|
|
6
|
+
export {};
|
package/dist/reports/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ export { ticketLiveConfig, TICKET_LIVE_AVAILABLE_COLUMNS, TICKET_LIVE_DEFAULT_VI
|
|
|
4
4
|
export { productMixConfig, PRODUCT_MIX_AVAILABLE_COLUMNS, PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS, PRODUCT_MIX_CHART_FIELDS, } from './productMix';
|
|
5
5
|
export { modifierMixConfig, MODIFIER_MIX_AVAILABLE_COLUMNS, MODIFIER_MIX_DEFAULT_VISIBLE_COLUMNS } from './modifierMix';
|
|
6
6
|
export { itemTaxConfig, ITEM_TAX_AVAILABLE_COLUMNS, ITEM_TAX_DEFAULT_VISIBLE_COLUMNS } from './itemTax';
|
|
7
|
+
export { dailySalesConfig, DAILY_SALES_AVAILABLE_COLUMNS, DAILY_SALES_DEFAULT_VISIBLE_COLUMNS } from './dailySales';
|
|
8
|
+
export { dailySalesPaymentsConfig, DAILY_SALES_PAYMENTS_AVAILABLE_COLUMNS, DAILY_SALES_PAYMENTS_DEFAULT_VISIBLE_COLUMNS, } from './dailySalesPayments';
|
|
9
|
+
export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAILY_SALES_DISCOUNTS_DEFAULT_VISIBLE_COLUMNS, } from './dailySalesDiscounts';
|