addio-admin-sdk 1.7.188 → 1.7.189-canary-2

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/changelog.md CHANGED
@@ -1,12 +1,3 @@
1
- ## [25-06-2026]
2
-
3
- ### Délai minimum des commandes d'installation (Groupe Richer)
4
-
5
- - **Added**
6
- - **Changed**
7
- - Dans `getMinDateOffset` (`rules/GR/utils/expedition.ts`), nouvelle logique de première plage horaire disponible pour les commandes d'installation : Jeudi et Vendredi → Lundi, les autres jours → +2 jours. L'ancienne logique « Medium staff » (Jeudi → Samedi) est conservée en commentaire daté pour pouvoir y revenir.
8
- - **Fixed**
9
-
10
1
  ## [03-06-2026]
11
2
 
12
3
  ### Ajustement à la logique qui génère l'item de "type de panier" pour le bon de commande G2
@@ -3466,9 +3466,8 @@ class Cart extends baseService_1.BaseServiceClass {
3466
3466
  if (singleBankItems.length == 0) {
3467
3467
  throw new Error(PromiseToPurchase_2.ApplyBanksToCartErrorsEnum.ONLY_ITEMS_WITH_MULTI_ASSOCIATED_BANKS);
3468
3468
  }
3469
- // manage mixed products if the cart contains any
3470
- // mixed product => product with no associated bank (can be deduced from any bank) or with more than one associated bank
3471
- const multipleBankItems = itemsToCheck.filter((item) => !!!item.promise_to_purchase_association_ids || item.promise_to_purchase_association_ids.length != 1);
3469
+ // Only items that are associated with more than one bank go to mostUsedBank. An item without an associated bank isn't deducted from any bank
3470
+ const multipleBankItems = itemsToCheck.filter((item) => !!item.promise_to_purchase_association_ids && item.promise_to_purchase_association_ids.length >= 2);
3472
3471
  // If forcedBankTypeId is defined, only keep associated remainingAmount
3473
3472
  if (!!forcedBankTypeId) {
3474
3473
  let bankToUse = remainingAmounts.find((bank) => bank.bank_type_id == forcedBankTypeId);
@@ -3581,16 +3580,11 @@ class Cart extends baseService_1.BaseServiceClass {
3581
3580
  : undefined;
3582
3581
  const parentBankInRemaining = !!parentBankId && remainingAmounts.some((b) => b.bank_type_id === parentBankId);
3583
3582
  const isEscForParentBank = !!parentBankId && parentBankId === bank_type_id;
3584
- const isServiceOrMultiple = (!!item.promise_to_purchase_association_ids &&
3585
- !!!item.promise_to_purchase_association_ids.length &&
3586
- !!item.is_service &&
3587
- !!item.sku &&
3588
- !!!item.is_temp_prod) ||
3589
- !!multipleBankItems.some((i) => i.sku === item.sku);
3583
+ const isMultiAssociated = !!multipleBankItems.some((i) => i.sku === item.sku);
3590
3584
  return ((!!bankIDInAssociatedPromises ||
3591
3585
  !!isEscSupp ||
3592
3586
  !!isEscForParentBank ||
3593
- (!!isServiceOrMultiple && !parentBankInRemaining && bank.bank_type_id === mostUsedBank.id)) &&
3587
+ (!!isMultiAssociated && !parentBankInRemaining && bank.bank_type_id === mostUsedBank.id)) &&
3594
3588
  !!!accountedForItems.includes(item.sku));
3595
3589
  });
3596
3590
  amountToRemove = (0, sumBy_1.default)(itemsToAccount, (item) => {