@colijnit/transaction 256.1.96 → 256.1.97

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.
@@ -33,8 +33,8 @@
33
33
  function Version() {
34
34
  this.name = "@colijnit/transaction";
35
35
  this.description = "Colijn IT transaction package";
36
- this.symVer = "256.1.96";
37
- this.publishDate = "23/06/2025, 16:59:54";
36
+ this.symVer = "256.1.97";
37
+ this.publishDate = "26/06/2025, 17:16:13";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -10337,13 +10337,14 @@
10337
10337
  });
10338
10338
  });
10339
10339
  };
10340
- TransactionConnectorService.prototype.getCashDrawers = function (cashDrawersRequest) {
10340
+ TransactionConnectorService.prototype.getCashDrawers = function (cashDrawersRequest, overrideOld) {
10341
+ if (overrideOld === void 0) { overrideOld = false; }
10341
10342
  return __awaiter(this, void 0, void 0, function () {
10342
10343
  var _this = this;
10343
10344
  return __generator(this, function (_a) {
10344
10345
  return [2 /*return*/, this._selectMultipleParameterizedCacheService.requestCache(cashDrawer_bo.CashDrawer, function (cashDrawersRequest) {
10345
10346
  return _this._adapterService.functionCall(_this._adapterService.getCashDrawers, [cashDrawersRequest]);
10346
- }).getValue(cashDrawersRequest)];
10347
+ }, overrideOld).getValue(cashDrawersRequest)];
10347
10348
  });
10348
10349
  });
10349
10350
  };
@@ -15610,7 +15611,7 @@
15610
15611
  return [3 /*break*/, 1];
15611
15612
  case 5:
15612
15613
  hasPendingReasons = response.headerOperationStatuses.filter(function (los) { return los.pendingReason !== "REASON_NONE"; }).length > 0;
15613
- if (!!hasPendingReasons) return [3 /*break*/, 8];
15614
+ if (!(!hasPendingReasons && this.transactionKind !== transactionKind_enum.TransactionKind.PurchaseOrder)) return [3 /*break*/, 8];
15614
15615
  if (!((this.autoSave && saveTransaction && !this.manualSaveParam) || overrideSave)) return [3 /*break*/, 6];
15615
15616
  return [2 /*return*/, this.saveTransactionAndCommit(response)];
15616
15617
  case 6: // just replace transaction object
@@ -15787,7 +15788,7 @@
15787
15788
  case 1:
15788
15789
  response = _a.sent();
15789
15790
  // this.rememberCurrentTransaction(response);
15790
- return [2 /*return*/, this.handleHeaderOperationStatuses(response)];
15791
+ return [2 /*return*/, this.handleHeaderOperationStatuses(response, false)];
15791
15792
  }
15792
15793
  });
15793
15794
  });
@@ -17267,8 +17268,8 @@
17267
17268
  });
17268
17269
  };
17269
17270
  TransactionService.prototype.updateDiscountTransactionLine = function (uuid, lineUuid, type, discount, reason, code) {
17270
- if (reason === void 0) { reason = ""; }
17271
- if (code === void 0) { code = ""; }
17271
+ if (reason === void 0) { reason = ''; }
17272
+ if (code === void 0) { code = ''; }
17272
17273
  return __awaiter(this, void 0, void 0, function () {
17273
17274
  var response;
17274
17275
  return __generator(this, function (_a) {
@@ -18278,7 +18279,7 @@
18278
18279
  return this.connector.getCashRegisters(branch, group, this.cashRegistersDirty);
18279
18280
  };
18280
18281
  TransactionService.prototype.getCashDrawers = function (cashDrawersRequest) {
18281
- return this.connector.getCashDrawers(cashDrawersRequest);
18282
+ return this.connector.getCashDrawers(cashDrawersRequest, this.cashRegistersDirty);
18282
18283
  };
18283
18284
  TransactionService.prototype.getPriceLists = function () {
18284
18285
  return this.connector.getPriceLists();
@@ -18303,8 +18304,9 @@
18303
18304
  if (transactionInfo && transactionInfo.branch) {
18304
18305
  transactionBranch = transactionInfo.branch.relationNr;
18305
18306
  }
18306
- else if (this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.branch)
18307
+ else if (this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.branch) {
18307
18308
  transactionBranch = this.currentTransaction.transactionInfo.branch.relationNr;
18309
+ }
18308
18310
  else {
18309
18311
  transactionBranch = this.currentBranch;
18310
18312
  }
@@ -20170,7 +20172,7 @@
20170
20172
  })];
20171
20173
  case 1: return [2 /*return*/, _a.sent()];
20172
20174
  case 2:
20173
- rxjs.throwError("Failed to create transaction");
20175
+ rxjs.throwError('Failed to create transaction');
20174
20176
  _a.label = 3;
20175
20177
  case 3: return [3 /*break*/, 5];
20176
20178
  case 4: return [2 /*return*/, Promise.resolve(true)];
@@ -20184,7 +20186,7 @@
20184
20186
  TransactionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TransactionService_Factory() { return new TransactionService(i0__namespace.ɵɵinject(TransactionSettingsService), i0__namespace.ɵɵinject(TransactionDialogService), i0__namespace.ɵɵinject(TransactionConnectorService), i0__namespace.ɵɵinject(ArticleConnectorService), i0__namespace.ɵɵinject(DictionaryService), i0__namespace.ɵɵinject(TransactionEventService), i0__namespace.ɵɵinject(TransactionRelationService), i0__namespace.ɵɵinject(TransactionScreenConfigurationService), i0__namespace.ɵɵinject(i9__namespace.RelationService), i0__namespace.ɵɵinject(i10__namespace.SharedService)); }, token: TransactionService, providedIn: "root" });
20185
20187
  TransactionService.decorators = [
20186
20188
  { type: i0.Injectable, args: [{
20187
- providedIn: "root"
20189
+ providedIn: 'root'
20188
20190
  },] }
20189
20191
  ];
20190
20192
 
@@ -48910,7 +48912,7 @@
48910
48912
  PaymentComponent.decorators = [
48911
48913
  { type: i0.Component, args: [{
48912
48914
  selector: "co-payment",
48913
- 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 ? (depositAmount | coCurrency: true) : (paymentService.amount | coCurrency: true)\"></span>\n </div>\n <div class=\"payment-input-button-wrapper\">\n <div class=\"payment-input-button\">\n <co-payment-to-pay\n [amountToPay]=\"paymentService.amountToPay\"></co-payment-to-pay>\n <div class=\"payment-to-pay-button\">\n <co-button [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\" (click)=\"handlePayment()\"\n [disabled]=\"paymentService.amountToPay === 0\"></co-button>\n </div>\n </div>\n <div class=\"payment-bookdate\" *ngIf=\"showPaymentDate\">\n <co-input-date [(model)]=\"paymentDate\"></co-input-date>\n </div>\n <div class=\"payment-error-message\" *ngIf=\"paymentService.statusMessage\"\n [textContent]=\"paymentService.statusMessage\"></div>\n </div>\n </div>\n\n <div class=\"payment-deposit\">\n <co-deposit-payment\n [branch]=\"branch\"\n [transactionUuid]=\"transactionUuid\"\n (depositPaymentFetched)=\"onDepositPaymentFetched($event)\">\n </co-deposit-payment>\n </div>\n <co-key-pad class=\"payment-to-pay-keypad\" *ngIf=\"showKeyPad\"\n [showValue]=\"false\"\n [emitModelChangeOnEnter]=\"false\"\n [model]=\"paymentService.amountToPay\"\n (modelChange)=\"handleKeyPadModelChange($event)\"\n (enterClick)=\"handlePayment()\"\n ></co-key-pad>\n </div>\n </div>\n <co-dialog *ngIf=\"paymentService.showPspQrCode\" (closeClick)=\"paymentService.showPspQrCode = false\">\n <co-payment-qr-code\n [qrCodeImage]=\"paymentService.qrCodeImage\"\n ></co-payment-qr-code>\n </co-dialog>\n ",
48915
+ 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]=\"paymentService.amountToPay | coCurrency: true\"></span>\n </div>\n <div class=\"payment-input-button-wrapper\">\n <div class=\"payment-input-button\">\n <co-payment-to-pay\n [amountToPay]=\"paymentService.amountToPay\"></co-payment-to-pay>\n <div class=\"payment-to-pay-button\">\n <co-button [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\" (click)=\"handlePayment()\"\n [disabled]=\"paymentService.amountToPay === 0\"></co-button>\n </div>\n </div>\n <div class=\"payment-bookdate\" *ngIf=\"showPaymentDate\">\n <co-input-date [(model)]=\"paymentDate\"></co-input-date>\n </div>\n <div class=\"payment-error-message\" *ngIf=\"paymentService.statusMessage\"\n [textContent]=\"paymentService.statusMessage\"></div>\n </div>\n </div>\n\n <div class=\"payment-deposit\">\n <co-deposit-payment\n [branch]=\"branch\"\n [transactionUuid]=\"transactionUuid\"\n (depositPaymentFetched)=\"onDepositPaymentFetched($event)\">\n </co-deposit-payment>\n </div>\n <co-key-pad class=\"payment-to-pay-keypad\" *ngIf=\"showKeyPad\"\n [showValue]=\"false\"\n [emitModelChangeOnEnter]=\"false\"\n [model]=\"paymentService.amountToPay\"\n (modelChange)=\"handleKeyPadModelChange($event)\"\n (enterClick)=\"handlePayment()\"\n ></co-key-pad>\n </div>\n </div>\n <co-dialog *ngIf=\"paymentService.showPspQrCode\" (closeClick)=\"paymentService.showPspQrCode = false\">\n <co-payment-qr-code\n [qrCodeImage]=\"paymentService.qrCodeImage\"\n ></co-payment-qr-code>\n </co-dialog>\n ",
48914
48916
  providers: [
48915
48917
  TransactionPaymentService
48916
48918
  ],
@@ -51707,6 +51709,7 @@
51707
51709
  this._paymentSubs.push(this.transactionEventService.transactionPaymentDone.subscribe(function () {
51708
51710
  _this._getDepositInfo();
51709
51711
  _this._getOutstandingAmounts();
51712
+ _this.handleCloseDialog();
51710
51713
  }), this.screenConfigService.configSet.subscribe(function (configObjects) { return _this._getObjectConfiguration(configObjects); }));
51711
51714
  _b = this;
51712
51715
  return [4 /*yield*/, this.transactionService.getInternalParameter(internalParam_enum.InternalParam.SellDirectlyFromSuppl)];
@@ -51759,7 +51762,7 @@
51759
51762
  this.cashOnDelivery = value;
51760
51763
  };
51761
51764
  TransactionHeaderPopupPaymentComponent.prototype.showPaymentButton = function () {
51762
- return this.orderPaymentAnalysis.some(function (t) { return t.outstandingAmount > 0; }) && this.chosenAmountToPay > 0;
51765
+ return this.orderPaymentAnalysis.some(function (t) { return t.outstandingAmount !== 0; }) && this.chosenAmountToPay !== 0;
51763
51766
  };
51764
51767
  TransactionHeaderPopupPaymentComponent.prototype.openPayment = function (event) {
51765
51768
  var _a;
@@ -51772,8 +51775,8 @@
51772
51775
  event.preventDefault();
51773
51776
  event.stopPropagation();
51774
51777
  this.transactionIdToPay = (_a = this.transactionIdToPay) !== null && _a !== void 0 ? _a : this.transactionInfo.id;
51775
- if (this.orderPaymentAnalysis.filter(function (payment) { return payment.transactionKind === _this.transKind.SalesInvoice && payment.outstandingAmount > 0; }).length === 1) {
51776
- lastTransaction = this.orderPaymentAnalysis.filter(function (payment) { return payment.transactionKind === _this.transKind.SalesInvoice && payment.outstandingAmount > 0; })[0];
51778
+ if (this.orderPaymentAnalysis.filter(function (payment) { return payment.transactionKind === _this.transKind.SalesInvoice && payment.outstandingAmount !== 0; }).length === 1) {
51779
+ lastTransaction = this.orderPaymentAnalysis.filter(function (payment) { return payment.transactionKind === _this.transKind.SalesInvoice && payment.outstandingAmount !== 0; })[0];
51777
51780
  this.transactionIdToPay = lastTransaction.transactionId;
51778
51781
  }
51779
51782
  return [4 /*yield*/, this.lockTransaction()];
@@ -51868,20 +51871,20 @@
51868
51871
  };
51869
51872
  TransactionHeaderPopupPaymentComponent.prototype._updateChosenAmountToPay = function () {
51870
51873
  var _this = this;
51871
- if (this.orderPaymentAnalysis.some(function (t) { return t.outstandingAmount > 0; }) &&
51874
+ if (this.orderPaymentAnalysis.some(function (t) { return t.outstandingAmount !== 0; }) &&
51872
51875
  this.orderPaymentAnalysis.filter(function (payment) { return payment.transactionKind === _this.transKind.SalesInvoice; }).length === 0) {
51873
51876
  this.chosenAmountToPay = this.paymentAnalysis.totalDeposit;
51874
51877
  }
51875
51878
  // Deposit only
51876
51879
  if (this.orderPaymentAnalysis.filter(function (payment) { return payment.transactionKind === _this.transKind.SalesOrder &&
51877
- payment.outstandingAmount > 0; }).length === 1) {
51880
+ payment.outstandingAmount !== 0; }).length === 1) {
51878
51881
  this.chosenAmountToPay = this.orderPaymentAnalysis[0].outstandingAmount;
51879
51882
  }
51880
- if (this.orderPaymentAnalysis.filter(function (payment) { return (payment.transactionKind === _this.transKind.SalesInvoice) && (payment.outstandingAmount > 0); }).length === 1) {
51881
- var remainingInvoice = this.orderPaymentAnalysis.filter(function (payment) { return (payment.transactionKind === _this.transKind.SalesInvoice) && (payment.outstandingAmount > 0); })[0];
51883
+ if (this.orderPaymentAnalysis.filter(function (payment) { return (payment.transactionKind === _this.transKind.SalesInvoice) && (payment.outstandingAmount !== 0); }).length === 1) {
51884
+ var remainingInvoice = this.orderPaymentAnalysis.filter(function (payment) { return (payment.transactionKind === _this.transKind.SalesInvoice) && (payment.outstandingAmount !== 0); })[0];
51882
51885
  this.chosenAmountToPay = remainingInvoice.outstandingAmount;
51883
51886
  }
51884
- if (this.orderPaymentAnalysis.filter(function (payment) { return (payment.transactionKind === _this.transKind.SalesInvoice) && (payment.outstandingAmount > 0); }).length > 1) {
51887
+ if (this.orderPaymentAnalysis.filter(function (payment) { return (payment.transactionKind === _this.transKind.SalesInvoice) && (payment.outstandingAmount !== 0); }).length > 1) {
51885
51888
  this.chosenAmountToPay = 0;
51886
51889
  }
51887
51890
  };
@@ -51890,7 +51893,7 @@
51890
51893
  TransactionHeaderPopupPaymentComponent.decorators = [
51891
51894
  { type: i0.Component, args: [{
51892
51895
  selector: 'co-transaction-header-popup-payment',
51893
- template: "\n <div class=\"transaction-header-popup-category-wrapper co-small-scrollbar\">\n <co-form>\n <div class=\"transaction-header-popup-section\">\n <div\n class=\"transaction-header-popup-section-label\"\n *ngIf=\"showPayDownLabel\"\n [textContent]=\"'TO_PAY_DOWN' | localize\">\n </div>\n\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-deposit-percentage\n [screenConfigurationObject]=\"cfgNames.DepositPercentage\"\n [lockAndSave]=\"true\"\n (depositUpdated)=\"showOutstandingAmounts()\">\n </co-transaction-header-deposit-percentage>\n <co-transaction-header-deposit-amount class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.DepositAmount\"\n [lockAndSave]=\"true\"\n (businessRuleApplied)=\"showBusinessRuleInfo = $event\">\n </co-transaction-header-deposit-amount>\n </div>\n\n <div class=\"transaction-header-popup-three-column-grid\">\n <co-transaction-header-use-deposit-rule\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.UseDepositRule\"\n [lockAndSave]=\"false\">\n </co-transaction-header-use-deposit-rule>\n <co-transaction-header-auto-recalculate-deposit\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.AutoRecalculateDeposit\"\n [lockAndSave]=\"false\">\n </co-transaction-header-auto-recalculate-deposit>\n <co-transaction-header-divide-evenly\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.DivideEvenly\"\n [lockAndSave]=\"false\">\n </co-transaction-header-divide-evenly>\n <div class=\"transaction-header-popup-business-rule-applied\" *ngIf=\"showBusinessRuleInfo\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.CircleExclamationRegular)\"></co-icon>\n <span [textContent]=\"'DEPOSIT_BUSINESS_RULE_APPLIED' | localize\"></span>\n </div>\n </div>\n\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-amount-to-settle\n [screenConfigurationObject]=\"cfgNames.AmountToSettle\"\n [lockAndSave]=\"false\">\n </co-transaction-header-amount-to-settle>\n <div class=\"transaction-header-popup-already-paid\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.TotalPaidDown\"\n [placeholder]=\"'TOTAL_PAID_DOWN' | localize\" [forceReadonly]=\"true\"\n [model]=\"paidDown\" [formatPipe]=\"currencyPipe\">\n </co-input-text>\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.SettledSoFar\"\n [placeholder]=\"'SETTLED_SO_FAR' | localize\" [forceReadonly]=\"true\"\n [model]=\"settled\" [formatPipe]=\"currencyPipe\">\n </co-input-text>\n </div>\n </div>\n\n <div class=\"transaction-header-popup-two-column-grid\" *ngIf=\"showCashOnDelivery\">\n <div class=\"cash-on-delivery-row\">\n <co-input-text\n [placeholder]=\"'CASH_ON_DELIVERY' | localize\"\n [forceReadonly]=\"true\"\n [(model)]=\"cashOnDelivery\"\n [formatPipe]=\"currencyPipe\">\n </co-input-text>\n <co-button\n class=\"save-button\"\n [disabled]=\"!isDirectSellEnabled()\"\n [iconData]=\"iconCacheService.getIcon(icons.TruckMovingRegular)\"\n (click)=\"cashOnDeliveryModalVisible = true\">\n </co-button>\n </div>\n <div></div>\n </div>\n\n <div\n class=\"transaction-header-popup-two-column-grid\"\n [screenConfigurationObject]=\"cfgNames.PaymentBtn\"\n screenConfigNativeElement>\n <co-transaction-header-payment-button\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [label]=\"('DELIVERY_TOTAL' | localize) | append:' / ' | append:('TO_SETTLE' | localize:false)\"\n [lockAndSave]=\"false\">\n </co-transaction-header-payment-button>\n </div>\n </div>\n\n <div *ngIf=\"paymentAnalysis\" class=\"transaction-header-popup-section\">\n <div class=\"transaction-header-popup-section-label\" [textContent]=\"'TO_INVOICE' | localize\"></div>\n <div class=\"still-top-pay-stats\">\n <div class=\"payment-item\">\n <label [textContent]=\"'TO_BE_INVOICED' | localize\"></label>\n <div class=\"amount\">{{ paymentAnalysis?.totalToInvoice | coCurrency:true }}</div>\n </div>\n <div class=\"payment-item\">\n <label [textContent]=\"'ALREADY_INVOICED' | localize\"></label>\n <div class=\"amount\">{{ paymentAnalysis?.totalDepositInvoice | coCurrency:true }}</div>\n </div>\n <div class=\"payment-item\">\n <label [textContent]=\"'STILL_TO_PAY' | localize\"></label>\n <div class=\"amount\" [class.outstanding]=\"paymentAnalysis?.totalToPay > 0\">\n <strong>{{ paymentAnalysis?.totalToPay | coCurrency:true }}</strong>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"orderPaymentAnalysis.length > 0\" class=\"payment-information\">\n <co-button\n class=\"save-button payment-button\"\n *ngIf=\"showPaymentButton()\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegular)\"\n (click)=\"openPayment($event)\">\n </co-button>\n\n <div class=\"payment-categories\">\n <div\n class=\"payment-category\"\n [class.selected]=\"activeCategory.index === category.index\"\n *ngFor=\"let category of paymentCategories\"\n (click)=\"handleCategoryClick(category)\">\n <div class=\"title\" [textContent]=\"category.title | localize\"></div>\n </div>\n </div>\n\n <table *ngIf=\"activeCategory.index === 0\">\n <thead>\n <tr>\n <th class=\"left\" *ngIf=\"showInvoiceSelection()\" [textContent]=\"'PAY' | localize\"></th>\n <th class=\"left\" [textContent]=\"'DESCRIPTION' | localize\"></th>\n <th [textContent]=\"'AMOUNT2' | localize\"></th>\n <th [textContent]=\"'PAID' | localize\"></th>\n <th [textContent]=\"'SETTLED' | localize\"></th>\n <th [textContent]=\"'OUTSTANDING' | localize\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let paymentInfo of orderPaymentAnalysis\">\n <td class=\"left\" *ngIf=\"showInvoiceSelection()\">\n <co-input-radio-button\n *ngIf=\"paymentInfo.transactionKind === transKind.SalesInvoice && paymentInfo.outstandingAmount !== 0\"\n class=\"default-width\"\n [(model)]=\"paymentInfo.isSelected\"\n (modelChange)=\"handleSelectInvoiceLines(paymentInfo)\">\n </co-input-radio-button>\n </td>\n <td class=\"left\">\n <span\n *ngIf=\"paymentInfo.transactionKind === transKind.SalesOrder\"\n [textContent]=\"'DEPOSIT' | localize\">\n </span>\n <span *ngIf=\"paymentInfo.transactionKind === transKind.SalesInvoice\">\n <span [textContent]=\"'INVOICE' | localize\"></span>\n <span> {{ paymentInfo.transactionNumber }}</span>\n <span> {{ paymentInfo.transactionDate | date:'dd-MM-yyyy' }}</span>\n </span>\n </td>\n <td><strong>{{ paymentInfo.invoiceAmount | coCurrency:true }}</strong></td>\n <td [class.paid]=\"paymentInfo.paidAmount > 0\">\n <strong>{{ paymentInfo.paidAmount | coCurrency:true }}</strong>\n </td>\n <td>{{ paymentInfo.settledAmount | coCurrency:true }}</td>\n <td [class.outstanding]=\"paymentInfo.outstandingAmount > 0\">\n <strong>{{ paymentInfo.outstandingAmount | coCurrency:true }}</strong>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div *ngIf=\"activeCategory.index === 1\">\n <p\n *ngIf=\"registeredPaymentInfo && registeredPaymentInfo.payments.length === 0\"\n [textContent]=\"'NOT_FOUND' | localize\">\n </p>\n\n <table *ngIf=\"registeredPaymentInfo && registeredPaymentInfo.payments.length > 0\">\n <thead>\n <tr>\n <th class=\"left\" [textContent]=\"'DESCRIPTION' | localize\"></th>\n <th [textContent]=\"'AMOUNT2' | localize\"></th>\n <th [textContent]=\"'DATE' | localize\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let paymentInfo of registeredPaymentInfo.payments\">\n <td class=\"left\">{{ paymentInfo.reference }}</td>\n <td><strong>{{ paymentInfo.amount | coCurrency:true }}</strong></td>\n <td>{{ paymentInfo.paymentDateTime | date:'dd-MM-yyyy' }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </co-form>\n\n <co-cash-on-delivery-modal\n *ngIf=\"cashOnDeliveryModalVisible\"\n [transactionInfoUuid]=\"transactionInfo.uuid\"\n (cashAmount)=\"getCashAmount($event)\"\n (showCashOnDeliveryModal)=\"showCashOnDeliveryModal($event)\">\n </co-cash-on-delivery-modal>\n </div>\n\n <co-dialog\n class=\"payment-dialog\"\n [modal]=\"true\"\n [headerTemplate]=\"headerTemplate\"\n *ngIf=\"showPaymentDialog\"\n (closeClick)=\"handleCloseDialog()\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-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]=\"transactionIdToPay\"\n [branch]=\"transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [amount]=\"chosenAmountToPay\"\n [remainingPayment]=\"true\"\n [currencyId]=\"transactionInfo.currencyId\"\n [doNotFetchAmountToPayForRemaining]=\"true\"\n [showPaymentDate]=\"true\"\n ></co-payment>\n </co-dialog>\n ",
51896
+ template: "\n <div class=\"transaction-header-popup-category-wrapper co-small-scrollbar\">\n <co-form>\n <div class=\"transaction-header-popup-section\">\n <div\n class=\"transaction-header-popup-section-label\"\n *ngIf=\"showPayDownLabel\"\n [textContent]=\"'TO_PAY_DOWN' | localize\">\n </div>\n\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-deposit-percentage\n [screenConfigurationObject]=\"cfgNames.DepositPercentage\"\n [lockAndSave]=\"true\"\n (depositUpdated)=\"showOutstandingAmounts()\">\n </co-transaction-header-deposit-percentage>\n <co-transaction-header-deposit-amount class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.DepositAmount\"\n [lockAndSave]=\"true\"\n (businessRuleApplied)=\"showBusinessRuleInfo = $event\">\n </co-transaction-header-deposit-amount>\n </div>\n\n <div class=\"transaction-header-popup-three-column-grid\">\n <co-transaction-header-use-deposit-rule\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.UseDepositRule\"\n [lockAndSave]=\"false\">\n </co-transaction-header-use-deposit-rule>\n <co-transaction-header-auto-recalculate-deposit\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.AutoRecalculateDeposit\"\n [lockAndSave]=\"false\">\n </co-transaction-header-auto-recalculate-deposit>\n <co-transaction-header-divide-evenly\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.DivideEvenly\"\n [lockAndSave]=\"false\">\n </co-transaction-header-divide-evenly>\n <div class=\"transaction-header-popup-business-rule-applied\" *ngIf=\"showBusinessRuleInfo\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.CircleExclamationRegular)\"></co-icon>\n <span [textContent]=\"'DEPOSIT_BUSINESS_RULE_APPLIED' | localize\"></span>\n </div>\n </div>\n\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-amount-to-settle\n [screenConfigurationObject]=\"cfgNames.AmountToSettle\"\n [lockAndSave]=\"false\">\n </co-transaction-header-amount-to-settle>\n <div class=\"transaction-header-popup-already-paid\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.TotalPaidDown\"\n [placeholder]=\"'TOTAL_PAID_DOWN' | localize\" [forceReadonly]=\"true\"\n [model]=\"paidDown\" [formatPipe]=\"currencyPipe\">\n </co-input-text>\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.SettledSoFar\"\n [placeholder]=\"'SETTLED_SO_FAR' | localize\" [forceReadonly]=\"true\"\n [model]=\"settled\" [formatPipe]=\"currencyPipe\">\n </co-input-text>\n </div>\n </div>\n\n <div class=\"transaction-header-popup-two-column-grid\" *ngIf=\"showCashOnDelivery\">\n <div class=\"cash-on-delivery-row\">\n <co-input-text\n [placeholder]=\"'CASH_ON_DELIVERY' | localize\"\n [forceReadonly]=\"true\"\n [(model)]=\"cashOnDelivery\"\n [formatPipe]=\"currencyPipe\">\n </co-input-text>\n <co-button\n class=\"save-button\"\n [disabled]=\"!isDirectSellEnabled()\"\n [iconData]=\"iconCacheService.getIcon(icons.TruckMovingRegular)\"\n (click)=\"cashOnDeliveryModalVisible = true\">\n </co-button>\n </div>\n <div></div>\n </div>\n\n <div\n class=\"transaction-header-popup-two-column-grid\"\n [screenConfigurationObject]=\"cfgNames.PaymentBtn\"\n screenConfigNativeElement>\n <co-transaction-header-payment-button\n *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [label]=\"('DELIVERY_TOTAL' | localize) | append:' / ' | append:('TO_SETTLE' | localize:false)\"\n [lockAndSave]=\"false\">\n </co-transaction-header-payment-button>\n </div>\n </div>\n\n <div *ngIf=\"paymentAnalysis\" class=\"transaction-header-popup-section\">\n <div class=\"transaction-header-popup-section-label\" [textContent]=\"'TO_INVOICE' | localize\"></div>\n <div class=\"still-top-pay-stats\">\n <div class=\"payment-item\">\n <label [textContent]=\"'TO_BE_INVOICED' | localize\"></label>\n <div class=\"amount\">{{ paymentAnalysis?.totalToInvoice | coCurrency:true }}</div>\n </div>\n <div class=\"payment-item\">\n <label [textContent]=\"'ALREADY_INVOICED' | localize\"></label>\n <div class=\"amount\">{{ paymentAnalysis?.totalDepositInvoice | coCurrency:true }}</div>\n </div>\n <div class=\"payment-item\">\n <label [textContent]=\"'STILL_TO_PAY' | localize\"></label>\n <div class=\"amount\" [class.outstanding]=\"paymentAnalysis?.totalToPay > 0\">\n <strong>{{ paymentAnalysis?.totalToPay | coCurrency:true }}</strong>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"orderPaymentAnalysis.length > 0\" class=\"payment-information\">\n <co-button\n class=\"save-button payment-button\"\n *ngIf=\"showPaymentButton()\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegular)\"\n (click)=\"openPayment($event)\">\n </co-button>\n\n <div class=\"payment-categories\">\n <div\n class=\"payment-category\"\n [class.selected]=\"activeCategory.index === category.index\"\n *ngFor=\"let category of paymentCategories\"\n (click)=\"handleCategoryClick(category)\">\n <div class=\"title\" [textContent]=\"category.title | localize\"></div>\n </div>\n </div>\n\n <table *ngIf=\"activeCategory.index === 0\">\n <thead>\n <tr>\n <th class=\"left\" *ngIf=\"showInvoiceSelection()\" [textContent]=\"'PAY' | localize\"></th>\n <th class=\"left\" [textContent]=\"'DESCRIPTION' | localize\"></th>\n <th [textContent]=\"'AMOUNT2' | localize\"></th>\n <th [textContent]=\"'PAID' | localize\"></th>\n <th [textContent]=\"'SETTLED' | localize\"></th>\n <th [textContent]=\"'OUTSTANDING' | localize\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let paymentInfo of orderPaymentAnalysis\">\n <td class=\"left\" *ngIf=\"showInvoiceSelection()\">\n <co-input-radio-button\n *ngIf=\"paymentInfo.transactionKind === transKind.SalesInvoice && paymentInfo.outstandingAmount !== 0\"\n class=\"default-width\"\n [(model)]=\"paymentInfo.isSelected\"\n (modelChange)=\"handleSelectInvoiceLines(paymentInfo)\">\n </co-input-radio-button>\n </td>\n <td class=\"left\">\n <span\n *ngIf=\"paymentInfo.transactionKind === transKind.SalesOrder\"\n [textContent]=\"'DEPOSIT' | localize\">\n </span>\n <span *ngIf=\"paymentInfo.transactionKind === transKind.SalesInvoice\">\n <span [textContent]=\"'INVOICE' | localize\"></span>\n <span> {{ paymentInfo.transactionNumber }}</span>\n <span> {{ paymentInfo.transactionDate | date:'dd-MM-yyyy' }}</span>\n </span>\n </td>\n <td><strong>{{ paymentInfo.invoiceAmount | coCurrency:true }}</strong></td>\n <td [class.paid]=\"paymentInfo.paidAmount > 0\">\n <strong>{{ paymentInfo.paidAmount | coCurrency:true }}</strong>\n </td>\n <td>{{ paymentInfo.settledAmount | coCurrency:true }}</td>\n <td [class.outstanding]=\"paymentInfo.outstandingAmount !== 0\">\n <strong>{{ paymentInfo.outstandingAmount | coCurrency:true }}</strong>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div *ngIf=\"activeCategory.index === 1\">\n <p\n *ngIf=\"registeredPaymentInfo && registeredPaymentInfo.payments.length === 0\"\n [textContent]=\"'NOT_FOUND' | localize\">\n </p>\n\n <table *ngIf=\"registeredPaymentInfo && registeredPaymentInfo.payments.length > 0\">\n <thead>\n <tr>\n <th class=\"left\" [textContent]=\"'DESCRIPTION' | localize\"></th>\n <th [textContent]=\"'AMOUNT2' | localize\"></th>\n <th [textContent]=\"'DATE' | localize\"></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let paymentInfo of registeredPaymentInfo.payments\">\n <td class=\"left\">{{ paymentInfo.reference }}</td>\n <td><strong>{{ paymentInfo.amount | coCurrency:true }}</strong></td>\n <td>{{ paymentInfo.paymentDateTime | date:'dd-MM-yyyy' }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </co-form>\n\n <co-cash-on-delivery-modal\n *ngIf=\"cashOnDeliveryModalVisible\"\n [transactionInfoUuid]=\"transactionInfo.uuid\"\n (cashAmount)=\"getCashAmount($event)\"\n (showCashOnDeliveryModal)=\"showCashOnDeliveryModal($event)\">\n </co-cash-on-delivery-modal>\n </div>\n\n <co-dialog\n class=\"payment-dialog\"\n [modal]=\"true\"\n [headerTemplate]=\"headerTemplate\"\n *ngIf=\"showPaymentDialog\"\n (closeClick)=\"handleCloseDialog()\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-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]=\"transactionIdToPay\"\n [branch]=\"transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [amount]=\"chosenAmountToPay\"\n [remainingPayment]=\"true\"\n [currencyId]=\"transactionInfo.currencyId\"\n [doNotFetchAmountToPayForRemaining]=\"true\"\n [showPaymentDate]=\"true\"\n ></co-payment>\n </co-dialog>\n ",
51894
51897
  encapsulation: i0.ViewEncapsulation.None
51895
51898
  },] }
51896
51899
  ];