@pisell/pisellos 2.3.207 → 2.3.208

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.
@@ -640,7 +640,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
640
640
  generateIdempotencyToken(): string;
641
641
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
642
642
  createOrder(params: CommitOrderParams['query']): {
643
- type: "appointment_booking" | "virtual";
643
+ type: "virtual" | "appointment_booking";
644
644
  platform: string;
645
645
  sales_channel: string;
646
646
  order_sales_channel: string;
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "normal" | "duration" | "session";
52
+ getProductType(): "normal" | "session" | "duration";
53
53
  }
@@ -55,6 +55,8 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
55
55
  protected store: BaseSalesState;
56
56
  protected otherParams: Record<string, any>;
57
57
  getInventory(): InventoryController | undefined;
58
+ /** Retail and standard POS opt in per sales instance; other hosts retain their member flow. */
59
+ isMemberCartConsistencyEnabled(): boolean;
58
60
  prepareCheckout(signal?: AbortSignal): Promise<CheckoutRuntimeSnapshot | undefined>;
59
61
  protected cacheId: string | undefined;
60
62
  /**
@@ -38,6 +38,7 @@ import { BaseModule } from "../../modules/BaseModule";
38
38
  import { isLocalFinalizedPayment, PAYMENT_REFRESH_MESSAGE, requiresLocalPaymentRefresh } from "../../modules/Order/localEftposState";
39
39
  import { BaseSalesHookNames } from "./types";
40
40
  import { OrderModule } from "../../modules/Order";
41
+ import { ensureUniqueProductLineUids, consolidateDiscountFreeProductLines } from "../../modules/Order/utils/discountProductLineIdentity";
41
42
  import { isFulfillmentTimingBooking } from "../../modules/Order/pickupTiming";
42
43
  import { PickupTimingController } from "./pickupTiming";
43
44
  import { FulfillmentItemRulesController } from "./fulfillmentItemRules";
@@ -176,6 +177,14 @@ function preserveManualProductDiscountProducts(previousProducts, nextProducts) {
176
177
  return previous && isBaseSalesManualProductDiscountProduct(previous) ? previous : product;
177
178
  });
178
179
  }
180
+
181
+ /** Rules may split a coupon quantity into rows that still share the original UID. */
182
+ function applyDiscountProductLines(tempOrder, products, discounts, enableMemberCartConsistency) {
183
+ tempOrder.products = preserveManualProductDiscountProducts(tempOrder.products, products);
184
+ if (!enableMemberCartConsistency) return;
185
+ ensureUniqueProductLineUids(tempOrder, discounts);
186
+ consolidateDiscountFreeProductLines(tempOrder);
187
+ }
179
188
  function isBaseSalesHistoricalDiscountEntry(discount) {
180
189
  return Boolean((discount === null || discount === void 0 ? void 0 : discount.isEditMode) || (discount === null || discount === void 0 ? void 0 : discount.isDisabled) || (discount === null || discount === void 0 ? void 0 : discount.order_discount_id) != null);
181
190
  }
@@ -652,6 +661,13 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
652
661
  value: function getInventory() {
653
662
  return this.otherParams.inventory;
654
663
  }
664
+
665
+ /** Retail and standard POS opt in per sales instance; other hosts retain their member flow. */
666
+ }, {
667
+ key: "isMemberCartConsistencyEnabled",
668
+ value: function isMemberCartConsistencyEnabled() {
669
+ return this.otherParams.enableMemberCartConsistency === true;
670
+ }
655
671
  }, {
656
672
  key: "prepareCheckout",
657
673
  value: function () {
@@ -3699,7 +3715,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3699
3715
  isCurrentRequest = function isCurrentRequest() {
3700
3716
  var _this20$store$order, _this20$store$order$g, _this20$store$order2, _this20$store$order2$;
3701
3717
  var currentTempOrder = (_this20$store$order = _this20.store.order) === null || _this20$store$order === void 0 || (_this20$store$order$g = _this20$store$order.getTempOrder) === null || _this20$store$order$g === void 0 ? void 0 : _this20$store$order$g.call(_this20$store$order);
3702
- return Boolean(currentTempOrder && (requestEpoch === undefined || ((_this20$store$order2 = _this20.store.order) === null || _this20$store$order2 === void 0 || (_this20$store$order2$ = _this20$store$order2.getCustomerWalletPrepareConfigEpoch) === null || _this20$store$order2$ === void 0 ? void 0 : _this20$store$order2$.call(_this20$store$order2)) === requestEpoch) && _this20.resolveDiscountConfigCustomerId(currentTempOrder) === customerId && _this20.getDiscountConfigOrderIdentityKey(currentTempOrder) === requestOrderIdentityKey);
3718
+ var current = Boolean(currentTempOrder && (requestEpoch === undefined || ((_this20$store$order2 = _this20.store.order) === null || _this20$store$order2 === void 0 || (_this20$store$order2$ = _this20$store$order2.getCustomerWalletPrepareConfigEpoch) === null || _this20$store$order2$ === void 0 ? void 0 : _this20$store$order2$.call(_this20$store$order2)) === requestEpoch) && _this20.resolveDiscountConfigCustomerId(currentTempOrder) === customerId && _this20.getDiscountConfigOrderIdentityKey(currentTempOrder) === requestOrderIdentityKey);
3719
+ // Cart edits can replace the object while member configuration is pending.
3720
+ // Keep the logical-order guard, but apply coupons to its latest rows.
3721
+ if (current && _this20.isMemberCartConsistencyEnabled()) tempOrder = currentTempOrder;
3722
+ return current;
3703
3723
  };
3704
3724
  getCurrentResult = function getCurrentResult() {
3705
3725
  var _this20$store$order3, _this20$store$order3$, _discountModule$getDi2;
@@ -3951,7 +3971,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3951
3971
  discountList: nextDiscountList
3952
3972
  };
3953
3973
  if (result.productList) {
3954
- tempOrder.products = preserveManualProductDiscountProducts(tempOrder.products, result.productList);
3974
+ applyDiscountProductLines(tempOrder, result.productList, result.discountList || nextDiscountList, this.isMemberCartConsistencyEnabled());
3955
3975
  }
3956
3976
  _iterator5 = _createForOfIteratorHelper(tempOrder.products || []);
3957
3977
  _context36.prev = 93;
@@ -4152,7 +4172,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4152
4172
  preserveEntitlementSelection: false
4153
4173
  }) || result;
4154
4174
  if (result.productList) {
4155
- tempOrder.products = preserveManualProductDiscountProducts(tempOrder.products, result.productList);
4175
+ applyDiscountProductLines(tempOrder, result.productList, result.discountList || nextDiscountList, this.isMemberCartConsistencyEnabled());
4156
4176
  }
4157
4177
  if (!result.discountList) {
4158
4178
  _context37.next = 28;
@@ -4265,7 +4285,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4265
4285
  key: "scanPromotionCode",
4266
4286
  value: function () {
4267
4287
  var _scanPromotionCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(code, customerId, options) {
4268
- var raw, tempOrder;
4288
+ var raw, _tempOrder;
4269
4289
  return _regeneratorRuntime().wrap(function _callee39$(_context39) {
4270
4290
  while (1) switch (_context39.prev = _context39.next) {
4271
4291
  case 0:
@@ -4290,13 +4310,13 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4290
4310
  });
4291
4311
  case 9:
4292
4312
  this.store.order.persistTempOrder();
4293
- tempOrder = this.store.order.ensureTempOrder();
4313
+ _tempOrder = this.store.order.ensureTempOrder();
4294
4314
  _context39.next = 13;
4295
4315
  return this.effectsEmit('onDiscountApplied', {
4296
- productList: tempOrder.products || [],
4316
+ productList: _tempOrder.products || [],
4297
4317
  discountList: this.store.order.getDiscountList(),
4298
- selectedDiscountList: tempOrder.discount_list || [],
4299
- tempOrder: tempOrder
4318
+ selectedDiscountList: _tempOrder.discount_list || [],
4319
+ tempOrder: _tempOrder
4300
4320
  });
4301
4321
  case 13:
4302
4322
  return _context39.abrupt("return", _objectSpread(_objectSpread({
@@ -4327,7 +4347,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4327
4347
  key: "setDiscountSelected",
4328
4348
  value: function () {
4329
4349
  var _setDiscountSelected = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
4330
- var currentOrder, _store3, _store3$setDiscountLi, list, updated, tempOrder, orderStore, _discountModule, rulesModule, nextDiscountList, _orderStore$summary3, orderTotalAmount, result, beforeSelectedIds, promotionCardIds, _iterator6, _step6, d, selectedResourceIds, filterSelectedDiscountDetails, _iterator7, _step7, _product$metadata8, _tempOrder$_extend7, _product$metadata$sou2, _product$metadata9, _product$metadata10, _product$original_pri2, product, productUid, runtimeOrigin, totalPerUnitDiscount, optionSum, sourcePrice, newSourceSellingPrice, newMainSellingPrice;
4350
+ var currentOrder, _store3, _store3$setDiscountLi, list, updated, _tempOrder2, orderStore, _discountModule, rulesModule, nextDiscountList, _orderStore$summary3, orderTotalAmount, result, beforeSelectedIds, promotionCardIds, _iterator6, _step6, d, selectedResourceIds, filterSelectedDiscountDetails, _iterator7, _step7, _product$metadata8, _tempOrder2$_extend, _product$metadata$sou2, _product$metadata9, _product$metadata10, _product$original_pri2, product, productUid, runtimeOrigin, totalPerUnitDiscount, optionSum, sourcePrice, newSourceSellingPrice, newMainSellingPrice;
4331
4351
  return _regeneratorRuntime().wrap(function _callee40$(_context40) {
4332
4352
  while (1) switch (_context40.prev = _context40.next) {
4333
4353
  case 0:
@@ -4364,7 +4384,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4364
4384
  }) : d;
4365
4385
  });
4366
4386
  this.hasManualDiscountSelection = true;
4367
- tempOrder = this.store.order.ensureTempOrder();
4387
+ _tempOrder2 = this.store.order.ensureTempOrder();
4368
4388
  orderStore = this.store.order.store || {};
4369
4389
  _discountModule = orderStore.discount;
4370
4390
  rulesModule = orderStore.rules;
@@ -4375,22 +4395,22 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4375
4395
  if (rulesModule) {
4376
4396
  orderTotalAmount = Number(((_orderStore$summary3 = orderStore.summary) === null || _orderStore$summary3 === void 0 ? void 0 : _orderStore$summary3.total_amount) || 0);
4377
4397
  result = rulesModule.calcDiscount({
4378
- productList: tempOrder.products,
4398
+ productList: _tempOrder2.products,
4379
4399
  discountList: updated,
4380
4400
  holders: [],
4381
4401
  isFormSubject: function isFormSubject(product) {
4382
- return resolveIsFormSubject(tempOrder, product);
4402
+ return resolveIsFormSubject(_tempOrder2, product);
4383
4403
  },
4384
4404
  orderTotalAmount: orderTotalAmount
4385
4405
  }, {
4386
4406
  discountId: params.discountId,
4387
4407
  isSelected: params.isSelected
4388
4408
  }) || {
4389
- productList: tempOrder.products,
4409
+ productList: _tempOrder2.products,
4390
4410
  discountList: updated
4391
4411
  };
4392
4412
  if (result !== null && result !== void 0 && result.productList) {
4393
- tempOrder.products = preserveManualProductDiscountProducts(tempOrder.products, result.productList);
4413
+ applyDiscountProductLines(_tempOrder2, result.productList, result.discountList || updated, this.isMemberCartConsistencyEnabled());
4394
4414
  }
4395
4415
  if (result !== null && result !== void 0 && result.discountList) {
4396
4416
  nextDiscountList = result.discountList;
@@ -4441,7 +4461,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4441
4461
  return rid != null && selectedResourceIds.has(rid);
4442
4462
  });
4443
4463
  };
4444
- _iterator7 = _createForOfIteratorHelper(tempOrder.products);
4464
+ _iterator7 = _createForOfIteratorHelper(_tempOrder2.products);
4445
4465
  _context40.prev = 27;
4446
4466
  _iterator7.s();
4447
4467
  case 29:
@@ -4451,7 +4471,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4451
4471
  }
4452
4472
  product = _step7.value;
4453
4473
  productUid = (_product$metadata8 = product.metadata) === null || _product$metadata8 === void 0 ? void 0 : _product$metadata8.unique_identification_number;
4454
- runtimeOrigin = productUid ? (_tempOrder$_extend7 = tempOrder._extend) === null || _tempOrder$_extend7 === void 0 || (_tempOrder$_extend7 = _tempOrder$_extend7.productsByUid) === null || _tempOrder$_extend7 === void 0 || (_tempOrder$_extend7 = _tempOrder$_extend7[productUid]) === null || _tempOrder$_extend7 === void 0 ? void 0 : _tempOrder$_extend7.origin : undefined;
4474
+ runtimeOrigin = productUid ? (_tempOrder2$_extend = _tempOrder2._extend) === null || _tempOrder2$_extend === void 0 || (_tempOrder2$_extend = _tempOrder2$_extend.productsByUid) === null || _tempOrder2$_extend === void 0 || (_tempOrder2$_extend = _tempOrder2$_extend[productUid]) === null || _tempOrder2$_extend === void 0 ? void 0 : _tempOrder2$_extend.origin : undefined;
4455
4475
  if (!(runtimeOrigin !== null && runtimeOrigin !== void 0 && runtimeOrigin.isManualDiscount || isBaseSalesManualProductDiscountProduct(product))) {
4456
4476
  _context40.next = 35;
4457
4477
  break;
@@ -4506,11 +4526,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4506
4526
  _iterator7.f();
4507
4527
  return _context40.finish(51);
4508
4528
  case 54:
4509
- OrderModule.populateSavedAmounts(tempOrder.products, nextDiscountList);
4529
+ OrderModule.populateSavedAmounts(_tempOrder2.products, nextDiscountList);
4510
4530
  _context40.next = 57;
4511
4531
  return _discountModule === null || _discountModule === void 0 ? void 0 : _discountModule.setDiscountList(nextDiscountList);
4512
4532
  case 57:
4513
- tempOrder.discount_list = (nextDiscountList || []).filter(function (d) {
4533
+ _tempOrder2.discount_list = (nextDiscountList || []).filter(function (d) {
4514
4534
  return d.isSelected;
4515
4535
  });
4516
4536
  _context40.next = 60;
@@ -4520,10 +4540,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4520
4540
  case 60:
4521
4541
  this.store.order.persistTempOrder();
4522
4542
  this.effectsEmit('onDiscountApplied', {
4523
- productList: tempOrder.products,
4543
+ productList: _tempOrder2.products,
4524
4544
  discountList: nextDiscountList,
4525
- selectedDiscountList: tempOrder.discount_list,
4526
- tempOrder: tempOrder
4545
+ selectedDiscountList: _tempOrder2.discount_list,
4546
+ tempOrder: _tempOrder2
4527
4547
  });
4528
4548
  _context40.next = 67;
4529
4549
  break;
@@ -4546,7 +4566,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4546
4566
  key: "applyDiscountCalculationResult",
4547
4567
  value: function () {
4548
4568
  var _applyDiscountCalculationResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(result) {
4549
- var tempOrder, orderStore, _discountModule2;
4569
+ var _tempOrder3, orderStore, _discountModule2;
4550
4570
  return _regeneratorRuntime().wrap(function _callee41$(_context41) {
4551
4571
  while (1) switch (_context41.prev = _context41.next) {
4552
4572
  case 0:
@@ -4563,21 +4583,21 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4563
4583
  }
4564
4584
  return _context41.abrupt("return");
4565
4585
  case 5:
4566
- tempOrder = this.store.order.ensureTempOrder();
4586
+ _tempOrder3 = this.store.order.ensureTempOrder();
4567
4587
  orderStore = this.store.order.store || {};
4568
4588
  _discountModule2 = orderStore.discount;
4569
4589
  if (result.productList) {
4570
- tempOrder.products = preserveManualProductDiscountProducts(tempOrder.products, result.productList);
4590
+ applyDiscountProductLines(_tempOrder3, result.productList, result.discountList || this.getDiscountList(), this.isMemberCartConsistencyEnabled());
4571
4591
  }
4572
4592
  if (!result.discountList) {
4573
4593
  _context41.next = 14;
4574
4594
  break;
4575
4595
  }
4576
- OrderModule.populateSavedAmounts(tempOrder.products, result.discountList);
4596
+ OrderModule.populateSavedAmounts(_tempOrder3.products, result.discountList);
4577
4597
  _context41.next = 13;
4578
4598
  return _discountModule2 === null || _discountModule2 === void 0 ? void 0 : _discountModule2.setDiscountList(result.discountList);
4579
4599
  case 13:
4580
- tempOrder.discount_list = result.discountList.filter(function (discount) {
4600
+ _tempOrder3.discount_list = result.discountList.filter(function (discount) {
4581
4601
  return discount.isSelected;
4582
4602
  });
4583
4603
  case 14:
@@ -4589,10 +4609,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4589
4609
  this.store.order.persistTempOrder();
4590
4610
  _context41.next = 19;
4591
4611
  return this.effectsEmit('onDiscountApplied', {
4592
- productList: tempOrder.products || [],
4612
+ productList: _tempOrder3.products || [],
4593
4613
  discountList: result.discountList || [],
4594
- selectedDiscountList: tempOrder.discount_list || [],
4595
- tempOrder: tempOrder
4614
+ selectedDiscountList: _tempOrder3.discount_list || [],
4615
+ tempOrder: _tempOrder3
4596
4616
  });
4597
4617
  case 19:
4598
4618
  _context41.next = 24;
@@ -7470,6 +7490,14 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7470
7490
  return this.resolveProductBookingPriceGroups(paramsList, currentOrderCustomerId);
7471
7491
  case 9:
7472
7492
  authoritativeProducts = _context75.sent;
7493
+ if (!paramsList.some(function (params, index) {
7494
+ return params.requireAuthoritativePrice && !authoritativeProducts[index];
7495
+ })) {
7496
+ _context75.next = 12;
7497
+ break;
7498
+ }
7499
+ throw new Error('The current customer product price is unavailable. Please retry before paying.');
7500
+ case 12:
7473
7501
  plans = paramsList.map(function (params, index) {
7474
7502
  if (!isPos) return null;
7475
7503
  var product = authoritativeProducts[index];
@@ -7499,20 +7527,20 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7499
7527
  return queryIndex;
7500
7528
  })) || [];
7501
7529
  });
7502
- _context75.next = 15;
7530
+ _context75.next = 17;
7503
7531
  return this.resolveProductBookingPriceGroups(segmentQueries, currentOrderCustomerId, true);
7504
- case 15:
7532
+ case 17:
7505
7533
  segmentProducts = _context75.sent;
7506
7534
  if (!segmentProducts.some(function (product) {
7507
7535
  return !product;
7508
7536
  })) {
7509
- _context75.next = 18;
7537
+ _context75.next = 20;
7510
7538
  break;
7511
7539
  }
7512
7540
  throw durationPricingUnavailable('An authoritative product is missing for a billing unit.');
7513
- case 18:
7541
+ case 20:
7514
7542
  if (useCustomerUserPricing) {
7515
- _context75.next = 23;
7543
+ _context75.next = 25;
7516
7544
  break;
7517
7545
  }
7518
7546
  quotationContexts = new Map();
@@ -7527,13 +7555,13 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7527
7555
  customer_id: (_params$customer_id3 = params.customer_id) !== null && _params$customer_id3 !== void 0 ? _params$customer_id3 : currentOrderCustomerId
7528
7556
  });
7529
7557
  });
7530
- _context75.next = 23;
7558
+ _context75.next = 25;
7531
7559
  return Promise.all(Array.from(quotationContexts.values()).map(function (context) {
7532
7560
  return _this25.loadQuotationForPriceQuery(_objectSpread({
7533
7561
  quotation: quotation
7534
7562
  }, context));
7535
7563
  }));
7536
- case 23:
7564
+ case 25:
7537
7565
  return _context75.abrupt("return", paramsList.map(function (params, index) {
7538
7566
  var _params$customer_id4, _authoritativeProduct2, _params$duration;
7539
7567
  var productInput = params.product || {};
@@ -7584,7 +7612,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
7584
7612
  duration: undefined
7585
7613
  }) : result;
7586
7614
  }));
7587
- case 24:
7615
+ case 26:
7588
7616
  case "end":
7589
7617
  return _context75.stop();
7590
7618
  }
@@ -305,6 +305,8 @@ export interface BaseSalesQuotationDurationConfig {
305
305
  }
306
306
  export interface BaseSalesCalculateProductBookingPriceParams {
307
307
  product: Record<string, any>;
308
+ /** Fail closed when the current customer price cannot be resolved; no old-line fallback. */
309
+ requireAuthoritativePrice?: boolean;
308
310
  booking?: {
309
311
  start_date?: string;
310
312
  start_time?: string;
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  date: string;
343
343
  status: string;
344
344
  week: string;
345
- weekNum: 0 | 2 | 1 | 6 | 4 | 5 | 3;
345
+ weekNum: 0 | 2 | 1 | 3 | 5 | 4 | 6;
346
346
  }[]>;
347
347
  submitTimeSlot(timeSlots: TimeSliceItem): void;
348
348
  private getScheduleDataByIds;
@@ -389,7 +389,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
389
389
  };
390
390
  setOtherData(key: string, value: any): void;
391
391
  getOtherData(key: string): any;
392
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
392
+ getProductTypeById(id: number): Promise<"normal" | "session" | "duration">;
393
393
  /**
394
394
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
395
395
  *
@@ -32,6 +32,8 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
32
32
  private orderCustomerDiscountRefreshCustomerId;
33
33
  private orderCustomerDiscountRefreshTarget;
34
34
  private orderCustomerPromotionRefreshInFlight;
35
+ private orderCustomerRefreshTask;
36
+ private orderCustomerRefreshRevision;
35
37
  private orderCustomerContactRequest;
36
38
  private readonly customerResolveRequests;
37
39
  protected loadOpenDataInFlight: Promise<OpenDataConfig> | null;
@@ -283,6 +285,9 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
283
285
  setOrderCustomer(customer: ICustomer | null, options?: {
284
286
  source?: OrderCustomerChangePayload['source'];
285
287
  }): void;
288
+ /** Shared by customer changes and an explicit retry; keep the selected customer/cart intact. */
289
+ private refreshMemberCartContext;
290
+ retryOrderCustomerRefresh(): Promise<void>;
286
291
  private resetOrderCustomerContactInfo;
287
292
  /** Explicit edits, including clearing the contact, must win over a pending default. */
288
293
  updateTempOrderContactsInfo(contact: Record<string, any> | null): Record<string, any> | null;
@@ -321,6 +326,8 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
321
326
  private buildOrderCustomerPayload;
322
327
  protected refreshDiscountConfigAfterOrderCustomerChange(customerId: number | null): Promise<void>;
323
328
  protected waitForOrderCustomerPromotionRefresh(): Promise<void>;
329
+ /** Wait before reading cart rows: member coupons can split or consolidate them. */
330
+ waitForOrderCustomerRefresh(): Promise<void>;
324
331
  protected prepareProductPriceQueryContext(customerId?: number | string): Promise<void>;
325
332
  protected preferAuthoritativeProductQueryPrice(): boolean;
326
333
  /**