taxtank-core 0.29.21 → 0.29.23

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.
@@ -5524,17 +5524,22 @@
5524
5524
  };
5525
5525
  ServiceSubscriptionCollection.prototype.groupByProduct = function (products) {
5526
5526
  var _this = this;
5527
- var dictionary = new Dictionary([]);
5527
+ var collectionDictionary = new CollectionDictionary(new ServiceSubscriptionCollection([]));
5528
5528
  products.toArray().forEach(function (product) {
5529
- dictionary.add(product.id, _this.findByProduct(product));
5529
+ collectionDictionary.add(product.id, _this.filterByProduct(product));
5530
5530
  });
5531
- return dictionary;
5531
+ return collectionDictionary;
5532
5532
  };
5533
5533
  ServiceSubscriptionCollection.prototype.findByProduct = function (product) {
5534
5534
  return this.find(function (subscription) {
5535
5535
  return !!subscription.items.find(function (item) { return item.price.product.id === product.id; });
5536
5536
  });
5537
5537
  };
5538
+ ServiceSubscriptionCollection.prototype.filterByProduct = function (product) {
5539
+ return this.filter(function (subscription) {
5540
+ return !!subscription.items.find(function (item) { return item.price.product.id === product.id; });
5541
+ });
5542
+ };
5538
5543
  ServiceSubscriptionCollection.prototype.hasPropertyTank = function () {
5539
5544
  return !!this.getItems().propertiesItem;
5540
5545
  };
@@ -19776,7 +19781,7 @@
19776
19781
  if (data === void 0) { data = {}; }
19777
19782
  if (includeDisabledFields === void 0) { includeDisabledFields = false; }
19778
19783
  // remove property/business allocations if empty
19779
- return _super.prototype.submit.call(this, Object.assign({ bankAccountProperties: [], businessAllocations: [] }, this.value));
19784
+ return _super.prototype.submit.call(this, Object.assign(data, { bankAccountProperties: [], businessAllocations: [] }, this.value));
19780
19785
  };
19781
19786
  return BankAccountAllocationForm;
19782
19787
  }(AbstractForm));