@ticketboothapp/booking 1.2.117 → 1.2.118
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/package.json
CHANGED
|
@@ -3183,18 +3183,7 @@ export function AdminChangeBookingFlow({
|
|
|
3183
3183
|
);
|
|
3184
3184
|
const effectiveSubtotalForCheckout = roundMoney(effectiveSubtotal + adminCustomAdjustmentTotal);
|
|
3185
3185
|
|
|
3186
|
-
/**
|
|
3187
|
-
const quantitiesSignature = useMemo(
|
|
3188
|
-
() =>
|
|
3189
|
-
Object.entries(quantities)
|
|
3190
|
-
.filter(([, n]) => (n ?? 0) > 0)
|
|
3191
|
-
.sort(([a], [b]) => a.localeCompare(b))
|
|
3192
|
-
.map(([c, n]) => `${c}:${n}`)
|
|
3193
|
-
.join('|'),
|
|
3194
|
-
[quantities]
|
|
3195
|
-
);
|
|
3196
|
-
|
|
3197
|
-
/** Fee rows shown in the editor must use the same receipt-floor math as the subtotal. */
|
|
3186
|
+
/** Fee rows shown in change flow must use the same receipt-floor rules as the protected subtotal. */
|
|
3198
3187
|
const feeLineItemsForChangeFlowDisplay = useMemo(() => {
|
|
3199
3188
|
if (!changeFlowApplyReceiptPaidFloors || totalQuantity <= 0) return feeLineItems;
|
|
3200
3189
|
const initialParty = changeFlowInitialTicketCount;
|
|
@@ -3221,6 +3210,17 @@ export function AdminChangeBookingFlow({
|
|
|
3221
3210
|
changeFlowProtectedReceiptPricing,
|
|
3222
3211
|
]);
|
|
3223
3212
|
|
|
3213
|
+
/** Stable signature for promo discount API (avoid effect re-fire on object identity churn). */
|
|
3214
|
+
const quantitiesSignature = useMemo(
|
|
3215
|
+
() =>
|
|
3216
|
+
Object.entries(quantities)
|
|
3217
|
+
.filter(([, n]) => (n ?? 0) > 0)
|
|
3218
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
3219
|
+
.map(([c, n]) => `${c}:${n}`)
|
|
3220
|
+
.join('|'),
|
|
3221
|
+
[quantities]
|
|
3222
|
+
);
|
|
3223
|
+
|
|
3224
3224
|
// Fee line items including add-ons (for PriceSummary and CheckoutModal)
|
|
3225
3225
|
const feeLineItemsWithAddOns = useMemo(() => {
|
|
3226
3226
|
const addOnLines = addOnSelections
|
|
@@ -3409,7 +3409,7 @@ export function AdminChangeBookingFlow({
|
|
|
3409
3409
|
.map((line) => `${line.category}:${line.qty}:${Math.round(line.itemTotal * 100)}`)
|
|
3410
3410
|
.sort()
|
|
3411
3411
|
.join('|'),
|
|
3412
|
-
String(Math.round(
|
|
3412
|
+
String(Math.round(feeLineItemsWithAddOns.reduce((sum, fee) => sum + fee.totalAmount, 0) * 100)),
|
|
3413
3413
|
String(Math.round(effectiveSubtotalForCheckout * 100)),
|
|
3414
3414
|
lockedPromoCode ? String(Math.round(originalReceiptPromoAdjustment.amount * 100)) : '',
|
|
3415
3415
|
].join('::');
|
|
@@ -3424,7 +3424,7 @@ export function AdminChangeBookingFlow({
|
|
|
3424
3424
|
currency,
|
|
3425
3425
|
quantitiesSignature,
|
|
3426
3426
|
ticketLineItemsForChangeFlowDisplay,
|
|
3427
|
-
|
|
3427
|
+
feeLineItemsWithAddOns,
|
|
3428
3428
|
effectiveSubtotalForCheckout,
|
|
3429
3429
|
lockedPromoCode,
|
|
3430
3430
|
originalReceiptPromoAdjustment.amount,
|
|
@@ -3434,7 +3434,7 @@ export function AdminChangeBookingFlow({
|
|
|
3434
3434
|
selectedAvailability,
|
|
3435
3435
|
ticketLineItems: ticketLineItemsForChangeFlowDisplay.map((l) => ({ category: l.category, qty: l.qty, itemTotal: l.itemTotal })),
|
|
3436
3436
|
effectiveSubtotal: effectiveSubtotalForCheckout,
|
|
3437
|
-
displayedProductFeeTotal:
|
|
3437
|
+
displayedProductFeeTotal: feeLineItemsWithAddOns.reduce((sum, fee) => sum + fee.totalAmount, 0),
|
|
3438
3438
|
appliedPromoCode,
|
|
3439
3439
|
changeBookingPromo: lockedPromoCode
|
|
3440
3440
|
? { priorAmount: originalReceiptPromoAdjustment.amount }
|
|
@@ -4080,7 +4080,6 @@ export function AdminChangeBookingFlow({
|
|
|
4080
4080
|
total: roundMoney(originalReceipt.total),
|
|
4081
4081
|
}
|
|
4082
4082
|
: null;
|
|
4083
|
-
|
|
4084
4083
|
/**
|
|
4085
4084
|
* True until `quoteChangeBooking` returns a confirmed `serverDisplay` for the current selection.
|
|
4086
4085
|
* Named so manual price-line UI can align with “still settling final price” without touching ticket/receipt math.
|
|
@@ -6196,15 +6195,13 @@ export function AdminChangeBookingFlow({
|
|
|
6196
6195
|
? t('booking.totalOwedForBookingChange')
|
|
6197
6196
|
: 'Total owed for booking difference'
|
|
6198
6197
|
}
|
|
6199
|
-
subtotal={
|
|
6198
|
+
subtotal={adminFeAuthoritativeReceipt.subtotal}
|
|
6200
6199
|
taxAmount={
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
? adminFeAuthoritativeReceipt.tax
|
|
6207
|
-
: 0
|
|
6200
|
+
!isTaxIncludedInPrice &&
|
|
6201
|
+
adminFeAuthoritativeReceipt.tax > 0 &&
|
|
6202
|
+
!priceSummaryLinesIncludeTaxRow
|
|
6203
|
+
? adminFeAuthoritativeReceipt.tax
|
|
6204
|
+
: 0
|
|
6208
6205
|
}
|
|
6209
6206
|
taxRate={pricingConfig?.taxRate}
|
|
6210
6207
|
currency={currency}
|