@colijnit/transaction 12.1.153 → 12.1.154

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.
Files changed (40) hide show
  1. package/bundles/colijnit-transaction.umd.js +113 -29
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/cache/service/business-object-cache-manager.service.js +7 -1
  5. package/esm2015/lib/cache/service/select-single-cache.service.js +7 -4
  6. package/esm2015/lib/component/checkout/checkout.component.js +5 -1
  7. package/esm2015/lib/component/deposit-payment/deposit-payment.component.js +4 -3
  8. package/esm2015/lib/component/payment/payment.component.js +54 -37
  9. package/esm2015/lib/component/payment/payment.module.js +4 -3
  10. package/esm2015/lib/component/transaction-header/transaction-header-payment/transaction-header-payment.component.js +8 -5
  11. package/esm2015/lib/component/transaction-line/transaction-purchase-order-line/transaction-purchase-order-line-base.component.js +4 -1
  12. package/esm2015/lib/component/transaction-line/transaction-purchase-order-line/transaction-purchase-order-line.component.js +2 -6
  13. package/esm2015/lib/component/transaction-line-fields/transaction-line-delivery-date-button.component.js +2 -2
  14. package/esm2015/lib/component/transaction-line-fields/transaction-line-supplier-delivery-date-button.component.js +36 -6
  15. package/esm2015/lib/component/transaction-line-purchase-confirmation/transaction-line-purchase-confirmation.component.js +5 -5
  16. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-confirmation/transaction-quick-access-order-confirmation.component.js +3 -3
  17. package/esm2015/lib/service/relation.service.js +19 -11
  18. package/esm2015/lib/service/transaction-base.service.js +9 -1
  19. package/esm2015/lib/transaction-version.js +3 -3
  20. package/fesm2015/colijnit-transaction.js +150 -71
  21. package/fesm2015/colijnit-transaction.js.map +1 -1
  22. package/lib/cache/service/business-object-cache-manager.service.d.ts +3 -0
  23. package/lib/cache/service/select-single-cache.service.d.ts +5 -5
  24. package/lib/component/checkout/checkout.component.d.ts +4 -0
  25. package/lib/component/deposit-payment/style/_layout.scss +3 -1
  26. package/lib/component/deposit-payment/style/_material-definition.scss +2 -2
  27. package/lib/component/payment/payment.component.d.ts +4 -1
  28. package/lib/component/payment/style/_layout.scss +64 -35
  29. package/lib/component/payment/style/_material-definition.scss +1 -1
  30. package/lib/component/payment/style/_theme.scss +0 -3
  31. package/lib/component/payment-tile/style/_layout.scss +5 -3
  32. package/lib/component/payment-to-pay/style/_layout.scss +6 -5
  33. package/lib/component/payment-to-pay/style/_material-definition.scss +4 -4
  34. package/lib/component/stepper/style/_material-definition.scss +4 -4
  35. package/lib/component/transaction/style/_layout.scss +1 -1
  36. package/lib/component/transaction-header/transaction-header-payment/style/_layout.scss +17 -0
  37. package/lib/component/transaction-line-fields/transaction-line-delivery-date-button.component.d.ts +2 -2
  38. package/lib/component/transaction-line-fields/transaction-line-supplier-delivery-date-button.component.d.ts +6 -1
  39. package/lib/service/transaction-base.service.d.ts +2 -0
  40. package/package.json +1 -1
@@ -32,8 +32,8 @@
32
32
  function Version() {
33
33
  this.name = "@colijnit/transaction";
34
34
  this.description = "Colijn IT transaction package";
35
- this.symVer = "12.1.153";
36
- this.publishDate = "19-10-2023 15:15:35";
35
+ this.symVer = "12.1.154";
36
+ this.publishDate = "20-10-2023 19:08:26";
37
37
  }
38
38
  return Version;
39
39
  }());
@@ -1557,6 +1557,13 @@
1557
1557
  var cacheId = id.toString();
1558
1558
  return this._selectSingleCache.has(key) && this._selectSingleCache.get(key)[cacheId];
1559
1559
  };
1560
+ BusinessObjectCacheManagerService.prototype.deleteSingleCacheItem = function (key, id) {
1561
+ if (id === void 0) { id = BusinessObjectCacheManagerService._NullBoId; }
1562
+ var cacheId = id.toString();
1563
+ if (this._selectSingleCache.has(key)) {
1564
+ this._selectSingleCache.delete(key);
1565
+ }
1566
+ };
1560
1567
  // Returns the parameterized cache item with the given key. T is the type of the cache value items requested, e.g. Color.
1561
1568
  BusinessObjectCacheManagerService.prototype.getSelectMultipleParameterCacheItem = function (key) {
1562
1569
  return this._selectMultipleParameterizedCache.get(key);
@@ -6657,7 +6664,11 @@
6657
6664
  function SelectSingleCacheService(_boCacheManager) {
6658
6665
  this._boCacheManager = _boCacheManager;
6659
6666
  }
6660
- SelectSingleCacheService.prototype.requestCache = function (clazz, sourceId, loadFunction) {
6667
+ SelectSingleCacheService.prototype.requestCache = function (clazz, sourceId, loadFunction, reload) {
6668
+ if (reload === void 0) { reload = false; }
6669
+ if (reload) {
6670
+ this._boCacheManager.deleteSingleCacheItem(clazz, sourceId);
6671
+ }
6661
6672
  if (!this._boCacheManager.hasSingleCacheItem(clazz, sourceId)) {
6662
6673
  this._createCacheItem(clazz, sourceId, loadFunction);
6663
6674
  }
@@ -9404,14 +9415,16 @@
9404
9415
  this._boFactory = new businessObjectFactory.BusinessObjectFactory();
9405
9416
  }
9406
9417
  RelationService.prototype.getCustomerFullObject = function (relationNo) {
9407
- // return this._selectSingleCacheService.requestCache<CustomerFullObject>(CustomerFullObject, relationNo, () => {
9408
- return this._adapterService.getCustomerFullObject(relationNo);
9409
- // }).getValue();
9418
+ var _this = this;
9419
+ return this._selectSingleCacheService.requestCache(customerFullObject_bo.CustomerFullObject, relationNo, function () {
9420
+ return _this._adapterService.getCustomerFullObject(relationNo);
9421
+ }).getValue();
9410
9422
  };
9411
9423
  RelationService.prototype.getSupplierFullObject = function (relationNo) {
9412
- // return this._selectSingleCacheService.requestCache<SupplierFullObject>(SupplierFullObject, relationNo, () => {
9413
- return this._adapterService.getSupplierFullObject(relationNo);
9414
- // }).getValue();
9424
+ var _this = this;
9425
+ return this._selectSingleCacheService.requestCache(supplierFullObject_bo.SupplierFullObject, relationNo, function () {
9426
+ return _this._adapterService.getSupplierFullObject(relationNo);
9427
+ }).getValue();
9415
9428
  };
9416
9429
  RelationService.prototype.insertAddress = function (address) {
9417
9430
  return this._adapterService.insertAddress(address);
@@ -9420,22 +9433,34 @@
9420
9433
  return this._adapterService.updateAddress(address);
9421
9434
  };
9422
9435
  RelationService.prototype.insertCustomer = function (relation) {
9423
- return this._adapterService.insertCustomer(relation);
9436
+ var _this = this;
9437
+ return this._selectSingleCacheService.requestCache(customerFullObject_bo.CustomerFullObject, relation.relationNumber, function () {
9438
+ return _this._adapterService.insertCustomer(relation);
9439
+ }, true).getValue();
9424
9440
  };
9425
9441
  RelationService.prototype.updateCustomer = function (relation) {
9426
9442
  return __awaiter(this, void 0, void 0, function () {
9443
+ var _this = this;
9427
9444
  return __generator(this, function (_a) {
9428
- return [2 /*return*/, this._adapterService.updateCustomer(relation)];
9445
+ return [2 /*return*/, this._selectSingleCacheService.requestCache(customerFullObject_bo.CustomerFullObject, relation.relationNumber, function () {
9446
+ return _this._adapterService.updateCustomer(relation);
9447
+ }, true).getValue()];
9429
9448
  });
9430
9449
  });
9431
9450
  };
9432
9451
  RelationService.prototype.insertSupplier = function (relation) {
9433
- return this._adapterService.insertSupplier(relation);
9452
+ var _this = this;
9453
+ return this._selectSingleCacheService.requestCache(supplierFullObject_bo.SupplierFullObject, relation.relationNumber, function () {
9454
+ return _this._adapterService.insertSupplier(relation);
9455
+ }, true).getValue();
9434
9456
  };
9435
9457
  RelationService.prototype.updateSupplier = function (relation) {
9436
9458
  return __awaiter(this, void 0, void 0, function () {
9459
+ var _this = this;
9437
9460
  return __generator(this, function (_a) {
9438
- return [2 /*return*/, this._adapterService.updateSupplier(relation)];
9461
+ return [2 /*return*/, this._selectSingleCacheService.requestCache(supplierFullObject_bo.SupplierFullObject, relation.relationNumber, function () {
9462
+ return _this._adapterService.updateSupplier(relation);
9463
+ }, true).getValue()];
9439
9464
  });
9440
9465
  });
9441
9466
  };
@@ -9832,6 +9857,22 @@
9832
9857
  var clazz = this._getRelationClass(this.transactionKind);
9833
9858
  this.relation = new clazz;
9834
9859
  };
9860
+ TransactionBaseService.prototype.setRelationOnTransaction = function (relationNr, relationKind) {
9861
+ return __awaiter(this, void 0, void 0, function () {
9862
+ var relation;
9863
+ return __generator(this, function (_a) {
9864
+ switch (_a.label) {
9865
+ case 0: return [4 /*yield*/, this.relationService.getRelation(relationKind, relationNr)];
9866
+ case 1:
9867
+ relation = _a.sent();
9868
+ if (relation) {
9869
+ this.relation = relation;
9870
+ }
9871
+ return [2 /*return*/];
9872
+ }
9873
+ });
9874
+ });
9875
+ };
9835
9876
  TransactionBaseService.prototype.resetCurrentTransaction = function () {
9836
9877
  this.currentTransaction = new transactionInfoResponse_bo.TransactionInfoResponse();
9837
9878
  this._relation = new customerFullObject_bo.CustomerFullObject();
@@ -13608,6 +13649,9 @@
13608
13649
  this.service.transactionKind = this.transactionType;
13609
13650
  this.relationType = this.service.getRelationKindFromTransactionKind();
13610
13651
  this.service.createNewRelation();
13652
+ if (this.relationNr) {
13653
+ this.service.setRelationOnTransaction(this.relationNr, this.relationType);
13654
+ }
13611
13655
  };
13612
13656
  CheckoutComponent.prototype.ngOnDestroy = function () {
13613
13657
  this._subs.forEach(function (s) { return s.unsubscribe(); });
@@ -13777,6 +13821,7 @@
13777
13821
  checkoutDelivery: [{ type: i0.ViewChild, args: ["checkoutDelivery",] }],
13778
13822
  checkoutPayment: [{ type: i0.ViewChild, args: ["checkoutPayment",] }],
13779
13823
  newTransaction: [{ type: i0.Input }],
13824
+ relationNr: [{ type: i0.Input }],
13780
13825
  sellerId: [{ type: i0.Input }],
13781
13826
  transactionType: [{ type: i0.Input }],
13782
13827
  showCreateTransactionButton: [{ type: i0.Input }],
@@ -17171,8 +17216,8 @@
17171
17216
  .map(function (line) {
17172
17217
  var details = new purchaseOrderConfirmationLineDetails.PurchaseOrderConfirmationLineDetails();
17173
17218
  details.lineNumber = line.lineNr;
17174
- details.amountConfirmed = line.quantityPurchaseToConfirm;
17175
- details.confirmedDate = _this.purchaseOrderConfirmation.confirmationDate;
17219
+ details.amountConfirmed = +line.purchasePortalLine.amountToBeConfirmed;
17220
+ details.confirmedDate = line.purchasePortalLine.deliveryDateConfirmed ? new Date(line.purchasePortalLine.deliveryDateConfirmed) : _this.purchaseOrderConfirmation.confirmationDate;
17176
17221
  details.confirmedPrice = +line.purchasePortalLine.confirmedPrice;
17177
17222
  return details;
17178
17223
  });
@@ -18913,6 +18958,9 @@
18913
18958
  }
18914
18959
  TransactionPurchaseOrderLineBaseComponent.prototype.ngOnInit = function () {
18915
18960
  var _this = this;
18961
+ if (this.transactionLine.purchasePortalLine.amountToBeConfirmed === null || this.transactionLine.purchasePortalLine.amountToBeConfirmed === undefined) {
18962
+ this.transactionLine.purchasePortalLine.amountToBeConfirmed = this.transactionLine.amount.toString();
18963
+ }
18916
18964
  this._subs.push(this.transactionEventService.selectAllSalesOrderLinesForPurchase.subscribe(function (value) {
18917
18965
  _this.selected = value && _this.showCheckboxForLine;
18918
18966
  _this.detectChanges();
@@ -18997,7 +19045,7 @@
18997
19045
  TransactionPurchaseOrderLineComponent.decorators = [
18998
19046
  { type: i0.Component, args: [{
18999
19047
  selector: "co-transaction-purchase-order-line",
19000
- template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [checkbox]=\"showCheckboxForLine\"\n [checkboxValue]=\"selected\"\n (click)=\"handleOpenSidePanel($event)\"\n (checkboxValueChanged)=\"selected = $event\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <div class=\"transaction-line-content-wrapper\">\n <co-transaction-line-statusbar data-action=\"openSidePanel\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"transactionTypeCategory.PurchaseOrderOrderConfirmation\"\n ></co-transaction-line-statusbar>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [model]=\"transactionLine.amount\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineGrossOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.grossOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-discount-button\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineNetOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.netOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.DeliveryDate\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-line-delivery-date-button>\n </div>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineArticleNrSupplier\"\n [model]=\"transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'\"\n [leftIconData]=\"iconCacheService.getIcon(icons.RegularIndustryTag)\"\n [customHeight]=\"true\"\n [tooltip]=\"'ARTICLE_NO_SUPPLIER' | localize\"\n ></co-input-text>\n <co-transaction-line-confirmed-price class=\"transaction-line-confirmed-price price\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedPrice\"\n [(price)]=\"transactionLine.purchasePortalLine.confirmedPrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n [tooltip]=\"'CONFIRMED_PRICE' | localize\"\n ></co-transaction-line-confirmed-price>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedAmount\"\n [required]=\"true\"\n [(model)]=\"+transactionLine.purchasePortalLine.amountConfirmed\"\n [min]=\"1\"\n [max]=\"+transactionLine.purchasePortalLine.amountOrdered\"\n [leftIconData]=\"iconCacheService.getIcon(icons.FileCircleInfoRegular)\"\n [tooltip]=\"'CONFIRMED' | localize\"\n ></co-input-number-picker>\n <co-transaction-line-supplier-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.LineConfirmedDate\"\n [transactionLine]=\"transactionLine\"\n [tooltip]=\"'CONFIRMED_DATE' | localize\"\n ></co-transaction-line-supplier-delivery-date-button>\n </div>\n </div>\n </co-transaction-base-line>\n ",
19048
+ template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [checkbox]=\"showCheckboxForLine\"\n [checkboxValue]=\"selected\"\n (click)=\"handleOpenSidePanel($event)\"\n (checkboxValueChanged)=\"selected = $event\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <div class=\"transaction-line-content-wrapper\">\n <co-transaction-line-statusbar data-action=\"openSidePanel\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"transactionTypeCategory.PurchaseOrderOrderConfirmation\"\n ></co-transaction-line-statusbar>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [model]=\"transactionLine.amount\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineGrossOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.grossOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-discount-button\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineNetOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.netOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.DeliveryDate\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-line-delivery-date-button>\n </div>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineArticleNrSupplier\"\n [model]=\"transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'\"\n [leftIconData]=\"iconCacheService.getIcon(icons.RegularIndustryTag)\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-confirmed-price class=\"transaction-line-confirmed-price price\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedPrice\"\n [(price)]=\"transactionLine.purchasePortalLine.confirmedPrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-confirmed-price>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedAmount\"\n [required]=\"true\"\n [(model)]=\"transactionLine.purchasePortalLine.amountToBeConfirmed\"\n [min]=\"1\"\n [max]=\"+transactionLine.purchasePortalLine.amountOrdered\"\n [leftIconData]=\"iconCacheService.getIcon(icons.FileCircleInfoRegular)\"\n ></co-input-number-picker>\n <co-transaction-line-supplier-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.LineConfirmedDate\"\n [transactionLine]=\"transactionLine\"\n ></co-transaction-line-supplier-delivery-date-button>\n </div>\n </div>\n </co-transaction-base-line>\n ",
19001
19049
  encapsulation: i0.ViewEncapsulation.None,
19002
19050
  changeDetection: i0.ChangeDetectionStrategy.OnPush
19003
19051
  },] }
@@ -22436,7 +22484,7 @@
22436
22484
  TransactionLineDeliveryDateButtonComponent.decorators = [
22437
22485
  { type: i0.Component, args: [{
22438
22486
  selector: "co-transaction-line-delivery-date-button",
22439
- template: "\n <co-transaction-button\n #parentComponent\n class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.SharpLightTruckMovingClock)\"\n [label]=\"transactionLine.deliveryDate | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowHideClick()\"\n ></co-transaction-button>\n ",
22487
+ template: "\n <co-transaction-button\n #parentComponent\n class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.SharpLightTruckMovingClock)\"\n [label]=\"transactionLine.deliveryDate | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowHideClick()\"\n ></co-transaction-button>\n ",
22440
22488
  providers: [
22441
22489
  corecomponents_v12.OverlayService,
22442
22490
  {
@@ -24599,11 +24647,12 @@
24599
24647
  ]; };
24600
24648
 
24601
24649
  var PaymentComponent = /** @class */ (function () {
24602
- function PaymentComponent(_transactionService, _sharedService, _paymentService, _transactionEventService) {
24650
+ function PaymentComponent(_transactionService, _sharedService, _paymentService, _transactionEventService, iconCacheService) {
24603
24651
  this._transactionService = _transactionService;
24604
24652
  this._sharedService = _sharedService;
24605
24653
  this._paymentService = _paymentService;
24606
24654
  this._transactionEventService = _transactionEventService;
24655
+ this.iconCacheService = iconCacheService;
24607
24656
  this.icons = Icon;
24608
24657
  this.updateDepositAmount = true;
24609
24658
  this.payed = new i0.EventEmitter();
@@ -24616,6 +24665,7 @@
24616
24665
  this.showPspQrCode = false;
24617
24666
  this.showLoader = true;
24618
24667
  this.amountToPay = 0;
24668
+ this.depositAmount = 0;
24619
24669
  this.statusMessage = "";
24620
24670
  this._amount = 0;
24621
24671
  this._paymentStatusPollIntervalMs = 5000;
@@ -24733,6 +24783,7 @@
24733
24783
  info = _a.sent();
24734
24784
  if (info) {
24735
24785
  this.amountToPay = info.depositRemainderAmount;
24786
+ this.depositAmount = info.depositAmount;
24736
24787
  }
24737
24788
  return [3 /*break*/, 3];
24738
24789
  case 2:
@@ -24872,7 +24923,7 @@
24872
24923
  PaymentComponent.decorators = [
24873
24924
  { type: i0.Component, args: [{
24874
24925
  selector: "co-payment",
24875
- template: "\n <div class=\"payment-wrapper\">\n <div class=\"payment-methods-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT_A' | localize\"></span>\n <span class=\"payment-header-title extra\" [textContent]=\"'FREE' | localize:false\"></span>\n <span class=\"payment-header-title\" [textContent]=\"'PAYMENT_METHOD' | localize:false\"></span>\n </div>\n <div class=\"payment-methods\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <ng-container *ngIf=\"!showLoader\">\n <co-payment-tile *ngFor=\"let paymentMethod of paymentMethods; let index = index\"\n [image]=\"paymentMethod.image\"\n [description]=\"paymentMethod.payment.description\"\n [selected]=\"paymentMethodIdx === index\"\n (selectedChange)=\"paymentMethodSelected(paymentMethod.payment, index)\"\n ></co-payment-tile>\n </ng-container>\n </div>\n <div class=\"payment-cash-register-wrapper\" *ngIf=\"showCashRegisters\">\n <div class=\"payment-cash-register-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT_CASH_REGISTER' | localize\"></span>\n </div>\n <div class=\"payment-methods\">\n <co-payment-tile *ngFor=\"let cashRegister of cashRegisters; let index = index\"\n [icon]=\"cashRegister.icon\"\n [description]=\"cashRegister.description\"\n [selected]=\"cashRegisterIdx === index\"\n (selectedChange)=\"cashRegisterSelected(cashRegister, index)\"\n ></co-payment-tile>\n </div>\n </div>\n <div class=\"payment-to-pay-wrapper\">\n <co-payment-to-pay [amountToPay]=\"amountToPay\"></co-payment-to-pay>\n <div class=\"payment-deposit\">\n <co-deposit-payment [branch]=\"branch\" [transactionUuid]=\"transactionUuid\"></co-deposit-payment>\n </div>\n <div class=\"payment-to-pay-button\">\n <!--\n <co-loader *ngIf=\"statusMessage\"></co-loader>\n -->\n <div class=\"payment-error-message\" *ngIf=\"statusMessage\" [textContent]=\"statusMessage\"></div>\n <co-button [label]=\"'PAY' | localize\" (click)=\"handlePayment()\" [disabled]=\"amountToPay === 0\"></co-button>\n </div>\n <co-key-pad class=\"payment-to-pay-keypad\"\n [showValue]=\"false\"\n [emitModelChangeOnEnter]=\"false\"\n [model]=\"amountToPay\"\n (modelChange)=\"handleKeyPadModelChange($event)\"\n (enterClick)=\"handlePayment()\"\n ></co-key-pad>\n </div>\n </div>\n <co-dialog *ngIf=\"showPspQrCode\" (closeClick)=\"showPspQrCode = false\">\n <co-payment-qr-code\n [qrCodeImage]=\"qrCodeImage\"\n ></co-payment-qr-code>\n </co-dialog>\n ",
24926
+ template: "\n <div class=\"payment-wrapper\">\n <div class=\"payment-methods-register-wrapper\">\n <div class=\"payment-methods-wrapper\">\n <div class=\"payment-methods-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT' | localize\"></span>\n <!--span class=\"payment-header-title extra\" [textContent]=\"'FREE' | localize:false\"></span-->\n <span class=\"payment-header-title\" [textContent]=\"'PAYMENT_METHOD' | localize:false\"></span>\n </div>\n <div class=\"payment-methods co-small-scrollbar\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <ng-container *ngIf=\"!showLoader\">\n <co-payment-tile *ngFor=\"let paymentMethod of paymentMethods; let index = index\"\n [image]=\"paymentMethod.image\"\n [description]=\"paymentMethod.payment.description\"\n [selected]=\"paymentMethodIdx === index\"\n (selectedChange)=\"paymentMethodSelected(paymentMethod.payment, index)\"\n ></co-payment-tile>\n </ng-container>\n </div>\n </div>\n <div class=\"payment-cash-register-wrapper\" *ngIf=\"showCashRegisters\">\n <div class=\"payment-cash-register-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT_CASH_REGISTER' | localize\"></span>\n </div>\n <div class=\"payment-methods\">\n <co-payment-tile *ngFor=\"let cashRegister of cashRegisters; let index = index\"\n [icon]=\"cashRegister.icon\"\n [description]=\"cashRegister.description\"\n [selected]=\"cashRegisterIdx === index\"\n (selectedChange)=\"cashRegisterSelected(cashRegister, index)\"\n ></co-payment-tile>\n </div>\n </div>\n </div>\n <div class=\"payment-to-pay-wrapper\">\n <div class=\"payment-to-pay-total\">\n <div class=\"payment-to-pay-header\">\n <span class=\"payment-header-title\" [textContent]=\"'TOTAL_AMOUNT_TO_PAY' | localize\"></span>\n <span class=\"payment-total-pay\" [textContent]=\"depositAmount === 0 ? depositAmount : (depositAmount | coCurrency)\"></span>\n </div>\n <div class=\"payment-input-button-wrapper\">\n <div class=\"payment-input-button\">\n <co-payment-to-pay [amountToPay]=\"amountToPay\"></co-payment-to-pay>\n <div class=\"payment-to-pay-button\">\n <co-button [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\" (click)=\"handlePayment()\" [disabled]=\"amountToPay === 0\"></co-button>\n </div>\n </div>\n <div class=\"payment-error-message\" *ngIf=\"statusMessage\" [textContent]=\"statusMessage\"></div>\n </div>\n </div>\n\n <div class=\"payment-deposit\">\n <co-deposit-payment [branch]=\"branch\" [transactionUuid]=\"transactionUuid\"></co-deposit-payment>\n </div>\n <co-key-pad class=\"payment-to-pay-keypad\"\n [showValue]=\"false\"\n [emitModelChangeOnEnter]=\"false\"\n [model]=\"amountToPay\"\n (modelChange)=\"handleKeyPadModelChange($event)\"\n (enterClick)=\"handlePayment()\"\n ></co-key-pad>\n </div>\n </div>\n <co-dialog *ngIf=\"showPspQrCode\" (closeClick)=\"showPspQrCode = false\">\n <co-payment-qr-code\n [qrCodeImage]=\"qrCodeImage\"\n ></co-payment-qr-code>\n </co-dialog>\n ",
24876
24927
  encapsulation: i0.ViewEncapsulation.None
24877
24928
  },] }
24878
24929
  ];
@@ -24880,7 +24931,8 @@
24880
24931
  { type: TransactionService },
24881
24932
  { type: SharedService },
24882
24933
  { type: PaymentService },
24883
- { type: TransactionEventService }
24934
+ { type: TransactionEventService },
24935
+ { type: IconCacheService }
24884
24936
  ]; };
24885
24937
  PaymentComponent.propDecorators = {
24886
24938
  transId: [{ type: i0.Input }],
@@ -25037,7 +25089,7 @@
25037
25089
  DepositPaymentComponent.decorators = [
25038
25090
  { type: i0.Component, args: [{
25039
25091
  selector: "co-deposit-payment",
25040
- template: "\n <div class=\"down-payment-payments-title\" [textContent]=\"'PAYMENTS_MADE' | localize\" *ngIf=\"showTitle\"></div>\n <div class=\"down-payment-payments-wrapper\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <div class=\"down-payment-payments\" *ngFor=\"let payment of depositPayments\">\n <co-payment-tile\n [image]=\"payment.paymentMethod?.image\"\n [description]=\"payment.paymentMethod?.payment.description\"\n ></co-payment-tile>\n <div class=\"deposit-payment-spacer\"></div>\n <div class=\"down-payment-amount-wrapper\">\n <div class=\"down-payment-date\" [textContent]=\"payment.depositPayment?.date | date:'d MMMM yyyy | HH:mm'\"></div>\n <div class=\"down-payment-amount\" [textContent]=\"payment.depositPayment?.depositPaymentAmount | coCurrency\"></div>\n </div>\n </div>\n </div>\n ",
25092
+ template: "\n <div class=\"down-payment-payments-title\" [textContent]=\"'PAYMENTS_MADE' | localize\" *ngIf=\"showTitle\"></div>\n <div class=\"down-payment-payments-wrapper\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <div class=\"down-payment-payments\" *ngFor=\"let payment of depositPayments\">\n <co-payment-tile\n [image]=\"payment.paymentMethod?.image\"\n [description]=\"payment.paymentMethod?.payment.description\"\n ></co-payment-tile>\n <div class=\"down-payment-date-wrapper\">\n <div class=\"down-payment-date\" [textContent]=\"payment.depositPayment?.date | date:'d MMMM yyyy'\"></div>\n </div>\n <div class=\"down-payment-amount-wrapper\">\n <div class=\"down-payment-amount\" [textContent]=\"payment.depositPayment?.depositPaymentAmount | coCurrency\"></div>\n </div>\n </div>\n </div>\n ",
25041
25093
  encapsulation: i0.ViewEncapsulation.None
25042
25094
  },] }
25043
25095
  ];
@@ -25136,7 +25188,8 @@
25136
25188
  PaymentQrCodeModule,
25137
25189
  DepositPaymentModule,
25138
25190
  LoaderModule,
25139
- PaymentToPayModule
25191
+ PaymentToPayModule,
25192
+ corecomponents_v12.IconModule
25140
25193
  ],
25141
25194
  declarations: [
25142
25195
  PaymentComponent
@@ -30012,7 +30065,7 @@
30012
30065
  TransactionHeaderPaymentComponent.decorators = [
30013
30066
  { type: i0.Component, args: [{
30014
30067
  selector: "co-transaction-header-payment",
30015
- template: "\n <div class=\"transaction-header-payment-wrapper\">\n <div class=\"transaction-header-payment-wrapper-content\" [class.show-remaining]=\"showRemainingPayment\">\n <co-transaction-header-block\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n [thirdBlockTemplate]=\"thirdBlock\"\n [hiddenBlockTemplate]=\"hiddenBlock\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n <co-transaction-header-block *ngIf=\"showRemainingPayment\"\n [firstBlockTemplate]=\"firstBlockRest\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n </div>\n </div>\n <ng-template #firstBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegular)\">\n </co-icon>\n </div>\n <div class=\"header-downpayment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_AMOUNT' | localize\"></div>\n <co-transaction-header-deposit-amount class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transaction]=\"transaction\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #firstBlockRest>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showPaymentDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n </div>\n <div class=\"header-remaining-payment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'REMAINING_PAYMENT' | localize\"></div>\n <co-transaction-header-remaining-amount class=\"transaction-header-remaining\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n (remainingAmountChange)=\"remainingToPay = $event\"\n ></co-transaction-header-remaining-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #secondBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-downpayment-percentage-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'%' | localize\"></div>\n <co-transaction-header-deposit-percentage class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-percentage>\n </div>\n </div>\n </ng-template>\n <ng-template #thirdBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-payment-button-wrapper\" (click)=\"openPayment($event)\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPaymentHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\" [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n <div class=\"spacer\"></div>\n <div class=\"payment-payed-wrapper\">\n <!--div class=\"header-payed-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_DONE' | localize\"></div-->\n <span class=\"payment-paid\" [class.success]=\"paid >= toPay\" [textContent]=\"(paid | coCurrency) || 0\"></span>\n </div>\n <!--co-transaction-header-payment-button *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-header-payment-button-->\n </div>\n </div>\n </ng-template>\n <ng-template #hiddenBlock>\n <!--div class=\"transaction-header-block-row\">\n <div class=\"header-branch-label co-transaction-label\" [textContent]=\"'BRANCH' | localize\"></div>\n <div class=\"branch-label\" [textContent]=\"transactionInfo.branch?.familyName\"></div>\n </div-->\n </ng-template>\n <co-transaction-header-popup *ngIf=\"showDialog\"\n [activeCategoryDescription]=\"'PAYMENT_INFORMATION'\"\n [relation]=\"relation\"\n [transaction]=\"transaction\"\n (closeClick)=\"showDialog = false\"></co-transaction-header-popup>\n<!--\n <co-dialog class=\"transaction-header-payment-dialog\" [headerTemplate]=\"headerTemplate\" *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-header-title\" [textContent]=\"'PAYMENT_INFORMATION' | localize\"></div>\n <co-transaction-header-block\n [headerBlockTemplate]=\"headerBlock\"\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n >\n </co-transaction-header-block>\n </ng-template>\n <div class=\"payment-dialog-section\">\n <co-deposit-payment [branch]=\"transactionInfo.branch?.relationNr\" [transactionUuid]=\"transactionInfo.uuid\"></co-deposit-payment>\n </div>\n </co-dialog>\n-->\n <co-dialog class=\"payment-dialog\" [customCssClass]=\"'co-small-scrollbar'\" *ngIf=\"showPaymentDialog\"\n [modal]=\"true\"\n (closeClick)=\"showPaymentDialog = false\"\n >\n <co-payment\n [transId]=\"transactionInfo.id\"\n [branch]=\"transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [amount]=\"showRemainingPayment ? remainingToPay : toPay\"\n [updateDepositAmount]=\"!showRemainingPayment\"\n [currencyId]=\"transactionInfo.currencyId\"\n ></co-payment>\n </co-dialog>\n ",
30068
+ template: "\n <div class=\"transaction-header-payment-wrapper\">\n <div class=\"transaction-header-payment-wrapper-content\" [class.show-remaining]=\"showRemainingPayment\">\n <co-transaction-header-block\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n [thirdBlockTemplate]=\"thirdBlock\"\n [hiddenBlockTemplate]=\"hiddenBlock\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n <co-transaction-header-block *ngIf=\"showRemainingPayment\"\n [firstBlockTemplate]=\"firstBlockRest\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n </div>\n </div>\n <ng-template #firstBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegular)\">\n </co-icon>\n </div>\n <div class=\"header-downpayment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_AMOUNT' | localize\"></div>\n <co-transaction-header-deposit-amount class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transaction]=\"transaction\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #firstBlockRest>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showPaymentDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n </div>\n <div class=\"header-remaining-payment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'REMAINING_PAYMENT' | localize\"></div>\n <co-transaction-header-remaining-amount class=\"transaction-header-remaining\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n (remainingAmountChange)=\"remainingToPay = $event\"\n ></co-transaction-header-remaining-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #secondBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-downpayment-percentage-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'%' | localize\"></div>\n <co-transaction-header-deposit-percentage class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-percentage>\n </div>\n </div>\n </ng-template>\n <ng-template #thirdBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-payment-button-wrapper\" (click)=\"openPayment($event)\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPaymentHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\" [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n <div class=\"spacer\"></div>\n <div class=\"payment-payed-wrapper\">\n <!--div class=\"header-payed-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_DONE' | localize\"></div-->\n <span class=\"payment-paid\" [class.success]=\"paid >= toPay\" [textContent]=\"(paid | coCurrency) || 0\"></span>\n </div>\n <!--co-transaction-header-payment-button *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-header-payment-button-->\n </div>\n </div>\n </ng-template>\n <ng-template #hiddenBlock>\n <!--div class=\"transaction-header-block-row\">\n <div class=\"header-branch-label co-transaction-label\" [textContent]=\"'BRANCH' | localize\"></div>\n <div class=\"branch-label\" [textContent]=\"transactionInfo.branch?.familyName\"></div>\n </div-->\n </ng-template>\n <co-transaction-header-popup *ngIf=\"showDialog\"\n [activeCategoryDescription]=\"'PAYMENT_INFORMATION'\"\n [relation]=\"relation\"\n [transaction]=\"transaction\"\n (closeClick)=\"showDialog = false\"></co-transaction-header-popup>\n<!--\n <co-dialog class=\"transaction-header-payment-dialog\" [headerTemplate]=\"headerTemplate\" *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-header-title\" [textContent]=\"'PAYMENT_INFORMATION' | localize\"></div>\n <co-transaction-header-block\n [headerBlockTemplate]=\"headerBlock\"\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n >\n </co-transaction-header-block>\n </ng-template>\n <div class=\"payment-dialog-section\">\n <co-deposit-payment [branch]=\"transactionInfo.branch?.relationNr\" [transactionUuid]=\"transactionInfo.uuid\"></co-deposit-payment>\n </div>\n </co-dialog>\n-->\n <co-dialog class=\"payment-dialog\" [modal]=\"true\" [headerTemplate]=\"headerTemplate\" *ngIf=\"showPaymentDialog\" (closeClick)=\"showPaymentDialog = false\">\n <ng-template #headerTemplate>\n <div class=\"payment-wrapper-popup-title\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\"></co-icon>\n <div class=\"co-dialog-header-title\" [textContent]=\"'PAYMENT_METHOD' | localize\"></div>\n </div>\n </ng-template>\n <co-payment\n [transId]=\"transactionInfo.id\"\n [branch]=\"transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [amount]=\"showRemainingPayment ? remainingToPay : toPay\"\n [updateDepositAmount]=\"!showRemainingPayment\"\n [currencyId]=\"transactionInfo.currencyId\"\n ></co-payment>\n </co-dialog>\n ",
30016
30069
  providers: [{
30017
30070
  provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
30018
30071
  useExisting: i0.forwardRef(function () { return TransactionHeaderPaymentComponent; })
@@ -31876,8 +31929,6 @@
31876
31929
  existingBatch.docAmount = this.docDeliveryBatch.docAmount;
31877
31930
  existingBatch.docDate = this.docDeliveryBatch.docDate;
31878
31931
  existingBatch.reference = this.docDeliveryBatch.reference;
31879
- existingBatch.docAmountOrg = this.docDeliveryBatch.docAmountOrg;
31880
- existingBatch.docDateOrg = this.docDeliveryBatch.docDateOrg;
31881
31932
  }
31882
31933
  else { // or create a new one
31883
31934
  this.docDeliveryBatch.deleteLine = 'F';
@@ -31919,7 +31970,7 @@
31919
31970
  };
31920
31971
  TransactionLinePurchaseConfirmationComponent.prototype.handleSelectHistoryRow = function (row) {
31921
31972
  this.docDeliveryBatch = row;
31922
- // this.docDeliveryBatch.docDate = new Date(row.docDate);
31973
+ this.docDeliveryBatch.docDate = new Date(row.docDate);
31923
31974
  };
31924
31975
  TransactionLinePurchaseConfirmationComponent.prototype.handleCancelClick = function () {
31925
31976
  this._initNewDocDeliveryBatch();
@@ -31932,7 +31983,9 @@
31932
31983
  };
31933
31984
  TransactionLinePurchaseConfirmationComponent.prototype._initNewDocDeliveryBatch = function () {
31934
31985
  this.docDeliveryBatch = new docDeliveryBatch_bo.DocDeliveryBatch();
31935
- this.docDeliveryBatch.docAmount = +this.transactionLine.purchasePortalLine.amountOrdered;
31986
+ this.docDeliveryBatch.docAmount = this.transactionLine.purchasePortalLine.docBatchArray.length === 0
31987
+ ? +this.transactionLine.amount
31988
+ : +this.transactionLine.purchasePortalLine.amountOrdered;
31936
31989
  this.docDeliveryBatch.confirmedPrice = +this.transactionLine.purchasePortalLine.netOrderPrice;
31937
31990
  };
31938
31991
  return TransactionLinePurchaseConfirmationComponent;
@@ -34886,19 +34939,49 @@
34886
34939
  _this._overlayService = _overlayService;
34887
34940
  _this._elementRef = _elementRef;
34888
34941
  _this.icons = Icon;
34942
+ _this.showCalender = false;
34889
34943
  return _this;
34890
34944
  }
34891
34945
  TransactionLineSupplierDeliveryDateButtonComponent.prototype.showClass = function () {
34892
34946
  return true;
34893
34947
  };
34894
- TransactionLineSupplierDeliveryDateButtonComponent.prototype.handleShowDialog = function (event) {
34948
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype.handleShowHideClick = function () {
34949
+ this.showCalender = !this.showCalender;
34950
+ if (this.showCalender) {
34951
+ this._showPopup();
34952
+ }
34953
+ else {
34954
+ this._hidePopup();
34955
+ }
34956
+ };
34957
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype._showPopup = function () {
34958
+ var _this = this;
34959
+ this.showCalender = true;
34960
+ this._calendarPopupComponentRef = this._overlayService.createComponent(corecomponents_v12.CalendarComponent, {
34961
+ parentForOverlay: this.parentComponent,
34962
+ selectedDate: new Date(this.transactionLine.purchasePortalLine.deliveryDateConfirmed
34963
+ ? this.transactionLine.purchasePortalLine.deliveryDateConfirmed
34964
+ : new Date())
34965
+ }, {
34966
+ dateSelected: function (date) { return _this._handleDateChanged(date); },
34967
+ clickedOutside: function () { return _this.handleShowHideClick(); }
34968
+ });
34969
+ };
34970
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype._handleDateChanged = function (date) {
34971
+ this.transactionLine.purchasePortalLine.deliveryDateConfirmed = date.toDateString();
34972
+ this.handleShowHideClick();
34973
+ this.detectChanges();
34974
+ };
34975
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype._hidePopup = function () {
34976
+ this.showCalender = false;
34977
+ this._overlayService.removeComponent(this._calendarPopupComponentRef);
34895
34978
  };
34896
34979
  return TransactionLineSupplierDeliveryDateButtonComponent;
34897
34980
  }(TransactionBaseComponent));
34898
34981
  TransactionLineSupplierDeliveryDateButtonComponent.decorators = [
34899
34982
  { type: i0.Component, args: [{
34900
34983
  selector: 'co-transaction-line-supplier-delivery-date-button',
34901
- template: "\n <co-transaction-button class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.RegularIndustryClock)\"\n [label]=\"transactionLine.purchasePortalLine.deliveryDateConfirmed | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowDialog($event)\"\n ></co-transaction-button>\n ",
34984
+ template: "\n <co-transaction-button #parentComponent class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.RegularIndustryClock)\"\n [label]=\"transactionLine.purchasePortalLine.deliveryDateConfirmed | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowHideClick()\"\n ></co-transaction-button>\n ",
34902
34985
  providers: [
34903
34986
  corecomponents_v12.OverlayService,
34904
34987
  {
@@ -34921,6 +35004,7 @@
34921
35004
  { type: i0.ElementRef }
34922
35005
  ]; };
34923
35006
  TransactionLineSupplierDeliveryDateButtonComponent.propDecorators = {
35007
+ parentComponent: [{ type: i0.ViewChild, args: ['parentComponent', { read: i0.ElementRef },] }],
34924
35008
  showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-line-supplier-delivery-date-button',] }]
34925
35009
  };
34926
35010