@ticketboothapp/booking 1.2.98 → 1.2.99
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
|
@@ -3439,12 +3439,9 @@ export function AdminChangeBookingFlow({
|
|
|
3439
3439
|
// Percentage/fixed promos: tax on discounted amount (promo before GST per CRA guidance).
|
|
3440
3440
|
// Vouchers and gift cards: tax on full subtotal (voucher discount includes tax on free portion; gift card is payment).
|
|
3441
3441
|
// Change booking: get-promo-discount uses forBookingChange + prior promo from receipt so expired codes stay locked (BE).
|
|
3442
|
-
const
|
|
3443
|
-
lockedPromoCode
|
|
3444
|
-
? Math.max(0, originalReceiptPromoAdjustment.amount)
|
|
3445
|
-
: 0;
|
|
3442
|
+
const receiptPromoFallbackAmount = Math.max(0, originalReceiptPromoAdjustment.amount);
|
|
3446
3443
|
const effectivePromoDiscountAmount =
|
|
3447
|
-
promoDiscountAmount > 0 ? promoDiscountAmount :
|
|
3444
|
+
promoDiscountAmount > 0 ? promoDiscountAmount : receiptPromoFallbackAmount;
|
|
3448
3445
|
const effectivePromoLineType =
|
|
3449
3446
|
isGiftCard || originalReceiptPromoAdjustment.type === 'GIFT_CARD'
|
|
3450
3447
|
? 'GIFT_CARD'
|
|
@@ -5444,7 +5441,7 @@ export function AdminChangeBookingFlow({
|
|
|
5444
5441
|
...(effectivePromoDiscountAmount > 0
|
|
5445
5442
|
? [
|
|
5446
5443
|
{
|
|
5447
|
-
label: appliedPromoCode ? `Promo: ${appliedPromoCode}` : (originalReceipt?.promoLabel || (t('booking.discount') || 'Discount')),
|
|
5444
|
+
label: appliedPromoCode ? `Promo: ${appliedPromoCode}` : (originalReceiptPromoAdjustment.label || originalReceipt?.promoLabel || (t('booking.discount') || 'Discount')),
|
|
5448
5445
|
amount: -effectivePromoDiscountAmount,
|
|
5449
5446
|
type: effectivePromoLineType,
|
|
5450
5447
|
},
|
|
@@ -5522,7 +5519,7 @@ export function AdminChangeBookingFlow({
|
|
|
5522
5519
|
isTaxIncludedInPrice,
|
|
5523
5520
|
taxRate: pricingConfig?.taxRate ?? 0,
|
|
5524
5521
|
promoDiscountAmount: effectivePromoDiscountAmount > 0 ? effectivePromoDiscountAmount : 0,
|
|
5525
|
-
discountLabel: appliedPromoCode ? `Promo: ${appliedPromoCode}` : (originalReceipt?.promoLabel || undefined),
|
|
5522
|
+
discountLabel: appliedPromoCode ? `Promo: ${appliedPromoCode}` : (originalReceiptPromoAdjustment.label || originalReceipt?.promoLabel || undefined),
|
|
5526
5523
|
});
|
|
5527
5524
|
setShowAdminPaymentChoice(true);
|
|
5528
5525
|
setLoading(false);
|
|
@@ -5573,7 +5570,7 @@ export function AdminChangeBookingFlow({
|
|
|
5573
5570
|
isTaxIncludedInPrice,
|
|
5574
5571
|
taxRate: pricingConfig?.taxRate ?? 0,
|
|
5575
5572
|
promoDiscountAmount: effectivePromoDiscountAmount > 0 ? effectivePromoDiscountAmount : 0,
|
|
5576
|
-
discountLabel: appliedPromoCode ? `Promo: ${appliedPromoCode}` : (originalReceipt?.promoLabel || undefined),
|
|
5573
|
+
discountLabel: appliedPromoCode ? `Promo: ${appliedPromoCode}` : (originalReceiptPromoAdjustment.label || originalReceipt?.promoLabel || undefined),
|
|
5577
5574
|
changeTotals:
|
|
5578
5575
|
isCustomerSelfServeChange && originalReceipt
|
|
5579
5576
|
? {
|