@colijnit/transaction 255.1.39 → 255.1.41

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 (27) hide show
  1. package/bundles/colijnit-transaction.umd.js +167 -105
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/core/base/transaction-payment-base.component.js +12 -4
  5. package/esm2015/lib/component/dialog/transaction-line/dialog-transaction-line-warehouse-cc/dialog-transaction-line-warehouse-cc.component.js +2 -1
  6. package/esm2015/lib/component/transaction-line-fields/transaction-line-warehouse.component.js +2 -2
  7. package/esm2015/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-cash-desk/transaction-lines-side-panel-cash-desk.component.js +22 -7
  8. package/esm2015/lib/component/transaction-send-documents/transaction-send-documents.component.js +2 -2
  9. package/esm2015/lib/component/transaction-service-overview/components/transaction-service-message.component.js +3 -3
  10. package/esm2015/lib/component/transaction-service-overview/components/transaction-service-message.module.js +4 -3
  11. package/esm2015/lib/component/transaction-service-overview/transaction-service-overview.component.js +5 -3
  12. package/esm2015/lib/component/transaction-undo-delivery/transaction-undo-delivery.component.js +2 -2
  13. package/esm2015/lib/enum/transaction-cfg-name.enum.js +3 -1
  14. package/esm2015/lib/service/transaction-create.service.js +12 -1
  15. package/esm2015/lib/service/transaction-payment.service.js +9 -3
  16. package/esm2015/lib/service/transaction.service.js +43 -47
  17. package/esm2015/lib/transaction-version.js +3 -3
  18. package/fesm2015/colijnit-transaction.js +108 -68
  19. package/fesm2015/colijnit-transaction.js.map +1 -1
  20. package/lib/component/core/base/transaction-payment-base.component.d.ts +5 -2
  21. package/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-cash-desk/transaction-lines-side-panel-cash-desk.component.d.ts +2 -1
  22. package/lib/component/transaction-service-overview/transaction-service-overview.component.d.ts +2 -0
  23. package/lib/enum/transaction-cfg-name.enum.d.ts +2 -1
  24. package/lib/service/transaction-create.service.d.ts +2 -0
  25. package/lib/service/transaction-payment.service.d.ts +3 -1
  26. package/lib/service/transaction.service.d.ts +2 -1
  27. package/package.json +2 -2
@@ -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 = "255.1.39";
37
- this.publishDate = "20-9-2024 17:21:27";
36
+ this.symVer = "255.1.41";
37
+ this.publishDate = "25-9-2024 17:27:58";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -11581,6 +11581,8 @@
11581
11581
  TransactionCfgName["StickerAmount"] = "stickerAmount";
11582
11582
  TransactionCfgName["LineWarehouseLocationReceived"] = "lineWarehouseLocationReceived";
11583
11583
  /* Invoice_check rubric */
11584
+ /* Service Overview Tab*/
11585
+ TransactionCfgName["ServiceMessage"] = "serviceMessage";
11584
11586
  })(exports.TransactionCfgName || (exports.TransactionCfgName = {}));
11585
11587
 
11586
11588
  var TransactionScreenConfigurationService = /** @class */ (function (_super) {
@@ -12216,7 +12218,7 @@
12216
12218
  DialogTransactionLineWarehouseCcComponent.decorators = [
12217
12219
  { type: i0.Component, args: [{
12218
12220
  selector: "co-dialog-transaction-line-warehouse-cc",
12219
- template: "\n <co-dialog\n [customCssClass]=\"'co-small-scrollbar'\"\n [headerTemplate]=\"dialogHeader\"\n [footerTemplate]=\"footerTemplate\"\n (closeClick)=\"handleCloseDialog($event, buttonType.Cancel)\">\n <div class=\"transaction-line-warehouse-cc-section flex\">\n <co-input-number-picker\n class=\"quantity-number-picker\"\n [(model)]=\"quantity\" [min]=\"1\"\n [decimals]=\"decimals\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n (modelChange)=\"handleQuantityChange($event)\">\n </co-input-number-picker>\n <co-button\n *ngIf=\"showDirectSell\"\n class=\"bordered\"\n [iconData]=\"iconCacheService.getIcon(icons.IndustryRegular)\"\n (click)=\"directSellModalVisible = true\">\n </co-button>\n </div>\n <div class=\"transaction-line-warehouse-cc-section\" *ngIf=\"transactionKind !== transKind.PurchaseOrder\">\n <div class=\"transaction-line-warehouse-cc-section-label\" [textContent]=\"'COMMISSION_CODE' | localize\"></div>\n <co-transaction-line-commission-code\n [transactionLine]=\"transactionLine\"\n [value]=\"commissionCode\"\n [useModel]=\"false\"\n (valueChange)=\"handleCommissionCodeChange($event)\"></co-transaction-line-commission-code>\n </div>\n <div class=\"transaction-line-warehouse-cc-section\">\n <div class=\"transaction-line-warehouse-cc-section-label\" [textContent]=\"'WAREHOUSE' | localize\"></div>\n <co-transaction-line-warehouse\n [transactionLine]=\"transactionLine\"\n [value]=\"warehouse\"\n [useModel]=\"false\"\n (valueChange)=\"handleWarehouseChange($event)\"></co-transaction-line-warehouse>\n </div>\n </co-dialog>\n <ng-template #dialogHeader>\n <div class=\"co-dialog-header-title\" [textContent]=\"'COMMISSION_CODE_WAREHOUSE_SELECTION' | localize\"></div>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"handleOkClick()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"iconCacheService.getIcon(icons.Crossskinny)\"\n (click)=\"handleCloseDialog($event, buttonType.Cancel)\"></co-button>\n </div>\n </ng-template>\n\n <co-dialog-sell\n *ngIf=\"directSellModalVisible\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [lineUuid]=\"transactionLine.uuid\"\n [goodId]=\"transactionLine.goodId\"\n (showDirectSellModal)=\"showDirectSellModal($event)\">\n </co-dialog-sell>\n ",
12221
+ template: "\n <co-dialog\n [customCssClass]=\"'co-small-scrollbar'\"\n [headerTemplate]=\"dialogHeader\"\n [footerTemplate]=\"footerTemplate\"\n (closeClick)=\"handleCloseDialog($event, buttonType.Cancel)\">\n <div class=\"transaction-line-warehouse-cc-section flex\">\n <co-input-number-picker\n class=\"quantity-number-picker\"\n [(model)]=\"quantity\" [min]=\"1\"\n [decimals]=\"decimals\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n (modelChange)=\"handleQuantityChange($event)\">\n </co-input-number-picker>\n <co-button\n *ngIf=\"showDirectSell\"\n class=\"bordered\"\n [iconData]=\"iconCacheService.getIcon(icons.IndustryRegular)\"\n (click)=\"directSellModalVisible = true\">\n </co-button>\n </div>\n <div class=\"transaction-line-warehouse-cc-section\" *ngIf=\"transactionKind !== transKind.PurchaseOrder\">\n <div class=\"transaction-line-warehouse-cc-section-label\" [textContent]=\"'COMMISSION_CODE' | localize\"></div>\n <co-transaction-line-commission-code\n [transactionLine]=\"transactionLine\"\n [value]=\"commissionCode\"\n [useModel]=\"false\"\n (valueChange)=\"handleCommissionCodeChange($event)\"></co-transaction-line-commission-code>\n </div>\n <div class=\"transaction-line-warehouse-cc-section\">\n <div class=\"transaction-line-warehouse-cc-section-label\" [textContent]=\"'WAREHOUSE' | localize\"></div>\n <co-transaction-line-warehouse\n [transactionLine]=\"transactionLine\"\n [value]=\"warehouse\"\n [useModel]=\"false\"\n [transactionInfo]=\"transactionInfo\"\n (valueChange)=\"handleWarehouseChange($event)\"></co-transaction-line-warehouse>\n </div>\n </co-dialog>\n <ng-template #dialogHeader>\n <div class=\"co-dialog-header-title\" [textContent]=\"'COMMISSION_CODE_WAREHOUSE_SELECTION' | localize\"></div>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"handleOkClick()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"iconCacheService.getIcon(icons.Crossskinny)\"\n (click)=\"handleCloseDialog($event, buttonType.Cancel)\"></co-button>\n </div>\n </ng-template>\n\n <co-dialog-sell\n *ngIf=\"directSellModalVisible\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [lineUuid]=\"transactionLine.uuid\"\n [goodId]=\"transactionLine.goodId\"\n (showDirectSellModal)=\"showDirectSellModal($event)\">\n </co-dialog-sell>\n ",
12220
12222
  encapsulation: i0.ViewEncapsulation.None
12221
12223
  },] }
12222
12224
  ];
@@ -15408,27 +15410,24 @@
15408
15410
  };
15409
15411
  TransactionService.prototype.createSalesOrder = function (request) {
15410
15412
  return __awaiter(this, void 0, void 0, function () {
15411
- var _this = this;
15413
+ var response;
15412
15414
  return __generator(this, function (_a) {
15413
- return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
15414
- var _this = this;
15415
- return __generator(this, function (_a) {
15416
- switch (_a.label) {
15417
- case 0: return [4 /*yield*/, this.checkBranch()];
15418
- case 1:
15419
- _a.sent();
15420
- if (!this.currentBranch) {
15421
- return [2 /*return*/, reject()];
15422
- }
15423
- request.branchNr = this.currentBranch;
15424
- this.connector.createSalesOrder(request).then(function (response) {
15425
- _this.rememberCurrentTransaction(response);
15426
- resolve(true);
15427
- });
15428
- return [2 /*return*/];
15429
- }
15430
- });
15431
- }); })];
15415
+ switch (_a.label) {
15416
+ case 0: return [4 /*yield*/, this.checkBranch()];
15417
+ case 1:
15418
+ _a.sent();
15419
+ if (!this.currentBranch) {
15420
+ return [2 /*return*/, Promise.reject()];
15421
+ }
15422
+ request.branchNr = this.currentBranch;
15423
+ return [4 /*yield*/, this.connector.createSalesOrder(request)];
15424
+ case 2:
15425
+ response = _a.sent();
15426
+ return [4 /*yield*/, this.rememberCurrentTransaction(response)];
15427
+ case 3:
15428
+ _a.sent();
15429
+ return [2 /*return*/, true];
15430
+ }
15432
15431
  });
15433
15432
  });
15434
15433
  };
@@ -15459,27 +15458,24 @@
15459
15458
  };
15460
15459
  TransactionService.prototype.createPurchaseOrder = function (request) {
15461
15460
  return __awaiter(this, void 0, void 0, function () {
15462
- var _this = this;
15461
+ var response;
15463
15462
  return __generator(this, function (_a) {
15464
- return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
15465
- var _this = this;
15466
- return __generator(this, function (_a) {
15467
- switch (_a.label) {
15468
- case 0: return [4 /*yield*/, this.checkBranch()];
15469
- case 1:
15470
- _a.sent();
15471
- if (!this.currentBranch) {
15472
- return [2 /*return*/, reject()];
15473
- }
15474
- request.branchNr = this.currentBranch;
15475
- this.connector.createPurchaseOrder(request).then(function (response) {
15476
- _this.rememberCurrentTransaction(response);
15477
- resolve(true);
15478
- });
15479
- return [2 /*return*/];
15480
- }
15481
- });
15482
- }); })];
15463
+ switch (_a.label) {
15464
+ case 0: return [4 /*yield*/, this.checkBranch()];
15465
+ case 1:
15466
+ _a.sent();
15467
+ if (!this.currentBranch) {
15468
+ return [2 /*return*/, Promise.reject()];
15469
+ }
15470
+ request.branchNr = this.currentBranch;
15471
+ return [4 /*yield*/, this.connector.createPurchaseOrder(request)];
15472
+ case 2:
15473
+ response = _a.sent();
15474
+ return [4 /*yield*/, this.rememberCurrentTransaction(response)];
15475
+ case 3:
15476
+ _a.sent();
15477
+ return [2 /*return*/, true];
15478
+ }
15483
15479
  });
15484
15480
  });
15485
15481
  };
@@ -15559,27 +15555,24 @@
15559
15555
  };
15560
15556
  TransactionService.prototype.createSalesQuotation = function (request) {
15561
15557
  return __awaiter(this, void 0, void 0, function () {
15562
- var _this = this;
15558
+ var response;
15563
15559
  return __generator(this, function (_a) {
15564
- return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
15565
- var _this = this;
15566
- return __generator(this, function (_a) {
15567
- switch (_a.label) {
15568
- case 0: return [4 /*yield*/, this.checkBranch()];
15569
- case 1:
15570
- _a.sent();
15571
- if (!this.currentBranch) {
15572
- return [2 /*return*/, reject()];
15573
- }
15574
- request.branchNr = this.currentBranch;
15575
- this.connector.createSalesQuotation(request).then(function (response) {
15576
- _this.rememberCurrentTransaction(response);
15577
- resolve(true);
15578
- });
15579
- return [2 /*return*/];
15580
- }
15581
- });
15582
- }); })];
15560
+ switch (_a.label) {
15561
+ case 0: return [4 /*yield*/, this.checkBranch()];
15562
+ case 1:
15563
+ _a.sent();
15564
+ if (!this.currentBranch) {
15565
+ return [2 /*return*/, Promise.reject()];
15566
+ }
15567
+ request.branchNr = this.currentBranch;
15568
+ return [4 /*yield*/, this.connector.createSalesQuotation(request)];
15569
+ case 2:
15570
+ response = _a.sent();
15571
+ return [4 /*yield*/, this.rememberCurrentTransaction(response)];
15572
+ case 3:
15573
+ _a.sent();
15574
+ return [2 /*return*/, true];
15575
+ }
15583
15576
  });
15584
15577
  });
15585
15578
  };
@@ -16262,9 +16255,16 @@
16262
16255
  TransactionService.prototype.getWarehouses = function () {
16263
16256
  return this.connector.getWarehouses(this.currentBranch);
16264
16257
  };
16265
- TransactionService.prototype.getWarehouseStockInfoByGoodAndBranch = function (goodId) {
16266
- var transactionBranch = this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.branch ?
16267
- this.currentTransaction.transactionInfo.branch.relationNr : this.currentBranch;
16258
+ TransactionService.prototype.getWarehouseStockInfoByGoodAndBranch = function (goodId, transactionInfo) {
16259
+ var transactionBranch;
16260
+ if (transactionInfo && transactionInfo.branch) {
16261
+ transactionBranch = transactionInfo.branch.relationNr;
16262
+ }
16263
+ else if (this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.branch)
16264
+ transactionBranch = this.currentTransaction.transactionInfo.branch.relationNr;
16265
+ else {
16266
+ transactionBranch = this.currentBranch;
16267
+ }
16268
16268
  return this.connector.getWarehouseStockInfoByGoodAndBranch(goodId, transactionBranch);
16269
16269
  };
16270
16270
  TransactionService.prototype.getMaxConfirmedDeliveryDateForPurchaseOrder = function (transId) {
@@ -17890,30 +17890,29 @@
17890
17890
  };
17891
17891
  TransactionService.prototype._checkAndCreateTransaction = function () {
17892
17892
  return __awaiter(this, void 0, void 0, function () {
17893
- var createMethod_1;
17893
+ var createMethod, request;
17894
17894
  return __generator(this, function (_a) {
17895
- if (!this.currentTransaction || !this.currentTransaction.transactionInfo || !this.currentTransaction.transactionInfo.transactionNr) {
17896
- createMethod_1 = this._createTransactionMethods.get(this.transactionKind);
17897
- if (createMethod_1) {
17898
- return [2 /*return*/, new Promise(function (resolve) {
17899
- var request = new createTransactionRequest.CreateTransactionRequest();
17900
- createMethod_1(request)
17901
- .then(function () {
17902
- resolve(true);
17903
- })
17904
- .catch(function () {
17905
- resolve(false);
17906
- });
17895
+ switch (_a.label) {
17896
+ case 0:
17897
+ if (!(!this.currentTransaction || !this.currentTransaction.transactionInfo || !this.currentTransaction.transactionInfo.transactionNr)) return [3 /*break*/, 4];
17898
+ createMethod = this._createTransactionMethods.get(this.transactionKind || transactionKind_enum.TransactionKind.SalesOrder);
17899
+ if (!createMethod) return [3 /*break*/, 2];
17900
+ request = new createTransactionRequest.CreateTransactionRequest();
17901
+ return [4 /*yield*/, createMethod(request)
17902
+ .then(function () {
17903
+ return true;
17904
+ })
17905
+ .catch(function () {
17906
+ return false;
17907
17907
  })];
17908
- }
17909
- else {
17908
+ case 1: return [2 /*return*/, _a.sent()];
17909
+ case 2:
17910
17910
  rxjs.throwError("Failed to create transaction");
17911
- }
17912
- }
17913
- else {
17914
- return [2 /*return*/, Promise.resolve(true)];
17911
+ _a.label = 3;
17912
+ case 3: return [3 /*break*/, 5];
17913
+ case 4: return [2 /*return*/, Promise.resolve(true)];
17914
+ case 5: return [2 /*return*/];
17915
17915
  }
17916
- return [2 /*return*/];
17917
17916
  });
17918
17917
  });
17919
17918
  };
@@ -22864,7 +22863,7 @@
22864
22863
  TransactionSendDocumentsComponent.decorators = [
22865
22864
  { type: i0.Component, args: [{
22866
22865
  selector: "co-transaction-send-documents",
22867
- template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports.length > 0\">\n <div class=\"amount-send-indicator\">\n <span [textContent]=\"historicReports.length\"></span>\n </div>\n <div class=\"send-button\" [class.no-pointer]=\"historicReports.length === 0\"\n [class.selected]=\"selected\"\n (click)=\"toggleSendDocumentsDialog()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.FileCircleInfoSolid)\"></co-icon>\n <span [textContent]=\"'SENT' | localize\"></span>\n </div>\n <co-dialog-wizard *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-container header>\n <div class=\"dialog-title\" [textContent]=\"'ALREADY_SENT' | localize\"></div>\n </ng-container>\n <div class=\"dialog-container\">\n <div class=\"historic-report-line\" *ngFor=\"let report of historicReports\" (click)=\"handleShowHistoricDocumentLines(report)\">\n <co-icon [iconData]=\"iconCacheService.getIcon(getSendMethodIcon(report))\"></co-icon>\n <span [textContent]=\"report.reportId + ' ' + (report.reportCreationDate | date)\"></span>\n </div>\n </div>\n </co-dialog-wizard>\n </div>\n ",
22866
+ template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports?.length > 0\">\n <div class=\"amount-send-indicator\">\n <span [textContent]=\"historicReports.length\"></span>\n </div>\n <div class=\"send-button\" [class.no-pointer]=\"historicReports.length === 0\"\n [class.selected]=\"selected\"\n (click)=\"toggleSendDocumentsDialog()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.FileCircleInfoSolid)\"></co-icon>\n <span [textContent]=\"'SENT' | localize\"></span>\n </div>\n <co-dialog-wizard *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-container header>\n <div class=\"dialog-title\" [textContent]=\"'ALREADY_SENT' | localize\"></div>\n </ng-container>\n <div class=\"dialog-container\">\n <div class=\"historic-report-line\" *ngFor=\"let report of historicReports\" (click)=\"handleShowHistoricDocumentLines(report)\">\n <co-icon [iconData]=\"iconCacheService.getIcon(getSendMethodIcon(report))\"></co-icon>\n <span [textContent]=\"report.reportId + ' ' + (report.reportCreationDate | date)\"></span>\n </div>\n </div>\n </co-dialog-wizard>\n </div>\n ",
22868
22867
  encapsulation: i0.ViewEncapsulation.None
22869
22868
  },] }
22870
22869
  ];
@@ -27040,12 +27039,36 @@
27040
27039
  });
27041
27040
  };
27042
27041
  TransactionLinesSidePanelCashDeskComponent.prototype.paymentMethodSelected = function (method, index) {
27043
- this.cashRegisterNr = this.posOrderData ? this.posOrderData.cashRegisterNr : this.transaction.transactionInfo.cashRegisterNr;
27044
- this.cashRegisterGroupId = this.posOrderData ? this.posOrderData.cashRegisterGroupId : this.transaction.transactionInfo.cashRegisterGroupId;
27045
- this.cashRegisterDrawerId = this.posOrderData ? this.posOrderData.cashDrawerId : undefined;
27046
- this.printerName = this.posOrderData ? this.posOrderData.printerName : undefined;
27047
- this.selectedPaymentMethod = method;
27048
- this.showCashRegisterPaymentDialog = true;
27042
+ return __awaiter(this, void 0, void 0, function () {
27043
+ var registers, register;
27044
+ var _this = this;
27045
+ return __generator(this, function (_a) {
27046
+ switch (_a.label) {
27047
+ case 0:
27048
+ this.cashRegisterNr = this.posOrderData ? this.posOrderData.cashRegisterNr : this.transaction.transactionInfo.cashRegisterNr;
27049
+ this.cashRegisterGroupId = this.posOrderData ? this.posOrderData.cashRegisterGroupId : this.transaction.transactionInfo.cashRegisterGroupId;
27050
+ this.cashRegisterDrawerId = this.posOrderData ? this.posOrderData.cashDrawerId : undefined;
27051
+ this.printerName = this.posOrderData ? this.posOrderData.printerName : undefined;
27052
+ if (!((this.cashRegisterDrawerId === undefined || this.cashRegisterDrawerId === null) ||
27053
+ (this.printerName === undefined || this.printerName === null))) return [3 /*break*/, 2];
27054
+ return [4 /*yield*/, this.transactionService.getCashRegisters(this.transactionInfo.branch.relationNr, this.cashRegisterGroupId)];
27055
+ case 1:
27056
+ registers = _a.sent();
27057
+ register = registers.find(function (c) { return c.nr === _this.cashRegisterNr; });
27058
+ if (register !== undefined && register !== null) {
27059
+ if (this.cashRegisterDrawerId === undefined || this.cashRegisterDrawerId === null) {
27060
+ this.cashRegisterDrawerNr = register.defaultDrawerNumber;
27061
+ }
27062
+ this.printerName = this.printerName ? this.printerName : register.defaultPrinter;
27063
+ }
27064
+ _a.label = 2;
27065
+ case 2:
27066
+ this.selectedPaymentMethod = method;
27067
+ this.showCashRegisterPaymentDialog = true;
27068
+ return [2 /*return*/];
27069
+ }
27070
+ });
27071
+ });
27049
27072
  };
27050
27073
  TransactionLinesSidePanelCashDeskComponent.prototype._getPaymentMethods = function () {
27051
27074
  var _this = this;
@@ -27059,7 +27082,7 @@
27059
27082
  TransactionLinesSidePanelCashDeskComponent.decorators = [
27060
27083
  { type: i0.Component, args: [{
27061
27084
  selector: 'co-transaction-lines-side-panel-cash-desk',
27062
- template: "\n <div class=\"cash-register-button-wrapper\">\n <co-button class=\"expense-button\" [iconData]=\"iconCacheService.getIcon(icons.UpFromLineRegular)\"\n [label]=\"'EXPENSE' | localize\" (click)=\"showExpenseDialog = true\">\n </co-button>\n </div>\n <div class=\"cash-register-payment-methods-wrapper\">\n <co-payment-tile *ngFor=\"let paymentMethod of paymentMethods; let index = index\"\n [image]=\"paymentMethod.image\"\n [description]=\"paymentMethod.payment.description\"\n [showRadioButton]=\"false\"\n (selectedChange)=\"paymentMethodSelected(paymentMethod, index)\"\n ></co-payment-tile>\n </div>\n <co-transaction-cash-register-payment-dialog *ngIf=\"showCashRegisterPaymentDialog\"\n [transactionNr]=\"transaction.transactionInfo.transactionNr\"\n [transId]=\"transaction.transactionInfo.id\"\n [branch]=\"transaction.transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n [amount]=\"transaction.transactionTotal.netAmount\"\n [currencyId]=\"transaction.transactionInfo.currencyId\"\n [relation]=\"relation\"\n [paymentViewModel]=\"selectedPaymentMethod\"\n [cashRegisterNr]=\"cashRegisterNr\"\n [cashRegisterGroupId]=\"cashRegisterGroupId\"\n [cashRegisterDrawerId]=\"cashRegisterDrawerId\"\n [printerName]=\"printerName\"\n [emailLayout]=\"emailLayout\"\n [printerLayout]=\"printerLayout\"\n (posOrderPayed)=\"handlePayed()\"\n (closeDialog)=\"showCashRegisterPaymentDialog = false\"\n >\n </co-transaction-cash-register-payment-dialog>\n <co-transaction-cash-register-order-expense-dialog *ngIf=\"showExpenseDialog\"\n [transaction]=\"this.transaction\"\n (cancelClicked)=\"showExpenseDialog = false\"\n (okayClicked)=\"createExpenseForOrder($event)\"\n >\n </co-transaction-cash-register-order-expense-dialog>\n ",
27085
+ template: "\n <div class=\"cash-register-button-wrapper\">\n <co-button class=\"expense-button\" [iconData]=\"iconCacheService.getIcon(icons.UpFromLineRegular)\"\n [label]=\"'EXPENSE' | localize\" (click)=\"showExpenseDialog = true\">\n </co-button>\n </div>\n <div class=\"cash-register-payment-methods-wrapper\">\n <co-payment-tile *ngFor=\"let paymentMethod of paymentMethods; let index = index\"\n [image]=\"paymentMethod.image\"\n [description]=\"paymentMethod.payment.description\"\n [showRadioButton]=\"false\"\n (selectedChange)=\"paymentMethodSelected(paymentMethod, index)\"\n ></co-payment-tile>\n </div>\n <co-transaction-cash-register-payment-dialog *ngIf=\"showCashRegisterPaymentDialog\"\n [transactionNr]=\"transaction.transactionInfo.transactionNr\"\n [transId]=\"transaction.transactionInfo.id\"\n [branch]=\"transaction.transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n [amount]=\"transaction.transactionTotal.netAmount\"\n [currencyId]=\"transaction.transactionInfo.currencyId\"\n [relation]=\"relation\"\n [paymentViewModel]=\"selectedPaymentMethod\"\n [cashRegisterNr]=\"cashRegisterNr\"\n [cashRegisterGroupId]=\"cashRegisterGroupId\"\n [cashRegisterDrawerId]=\"cashRegisterDrawerId\"\n [cashRegisterDrawerNr]=\"cashRegisterDrawerNr\"\n [printerName]=\"printerName\"\n [emailLayout]=\"emailLayout\"\n [printerLayout]=\"printerLayout\"\n (posOrderPayed)=\"handlePayed()\"\n (closeDialog)=\"showCashRegisterPaymentDialog = false\"\n >\n </co-transaction-cash-register-payment-dialog>\n <co-transaction-cash-register-order-expense-dialog *ngIf=\"showExpenseDialog\"\n [transaction]=\"this.transaction\"\n (cancelClicked)=\"showExpenseDialog = false\"\n (okayClicked)=\"createExpenseForOrder($event)\"\n >\n </co-transaction-cash-register-order-expense-dialog>\n ",
27063
27086
  encapsulation: i0.ViewEncapsulation.None
27064
27087
  },] }
27065
27088
  ];
@@ -29411,7 +29434,7 @@
29411
29434
  TransactionLineWarehouseComponent.prototype.ngOnInit = function () {
29412
29435
  var _this = this;
29413
29436
  this.viewModels.length = 0;
29414
- this.transactionService.getWarehouseStockInfoByGoodAndBranch(this.transactionLine.goodId).then(function (warehouses) {
29437
+ this.transactionService.getWarehouseStockInfoByGoodAndBranch(this.transactionLine.goodId, this.transactionInfo).then(function (warehouses) {
29415
29438
  _this.collection = !_this.transactionLine.dropShipment ? warehouses.slice() : warehouses.slice().filter(function (warehouse) { return warehouse.dropShipment; });
29416
29439
  _this.detectChanges();
29417
29440
  });
@@ -33788,7 +33811,17 @@
33788
33811
  },
33789
33812
  set: function (value) {
33790
33813
  this._cashRegisterDrawerNr = value;
33791
- this.setCashDrawerIdIfValifDrawer(this._cashRegisterDrawerNr);
33814
+ this.setCashDrawerIdIfValidDrawer(this._cashRegisterDrawerNr);
33815
+ },
33816
+ enumerable: false,
33817
+ configurable: true
33818
+ });
33819
+ Object.defineProperty(TransactionPaymentService.prototype, "cashRegisterDrawerId", {
33820
+ get: function () {
33821
+ return this._cashRegisterDrawerId;
33822
+ },
33823
+ set: function (value) {
33824
+ this._cashRegisterDrawerId = value;
33792
33825
  },
33793
33826
  enumerable: false,
33794
33827
  configurable: true
@@ -34033,7 +34066,7 @@
34033
34066
  TransactionPaymentService.prototype._dataUriToBase64 = function (uri, mimeType) {
34034
34067
  return uri ? "data:" + mimeType + ";base64," + uri : "";
34035
34068
  };
34036
- TransactionPaymentService.prototype.setCashDrawerIdIfValifDrawer = function (drawerNr) {
34069
+ TransactionPaymentService.prototype.setCashDrawerIdIfValidDrawer = function (drawerNr) {
34037
34070
  return __awaiter(this, void 0, void 0, function () {
34038
34071
  var request, drawers;
34039
34072
  var _this = this;
@@ -34186,7 +34219,18 @@
34186
34219
  },
34187
34220
  set: function (value) {
34188
34221
  this._cashRegisterDrawerId = value;
34189
- this.paymentService.cashRegisterDrawerNr = this._cashRegisterDrawerId;
34222
+ this.paymentService.cashRegisterDrawerId = this._cashRegisterDrawerId;
34223
+ },
34224
+ enumerable: false,
34225
+ configurable: true
34226
+ });
34227
+ Object.defineProperty(TransactionPaymentBaseComponent.prototype, "cashRegisterDrawerNr", {
34228
+ get: function () {
34229
+ return this._cashRegisterDrawerNr;
34230
+ },
34231
+ set: function (value) {
34232
+ this._cashRegisterDrawerNr = value;
34233
+ this.paymentService.cashRegisterDrawerNr = this._cashRegisterDrawerNr;
34190
34234
  },
34191
34235
  enumerable: false,
34192
34236
  configurable: true
@@ -34292,7 +34336,7 @@
34292
34336
  this.cashRegisterIdx = index;
34293
34337
  this.cashRegisterNr = cashRegister.nr;
34294
34338
  this.cashRegisterGroupId = cashRegister.group;
34295
- this.cashRegisterDrawerId = cashRegister.defaultDrawerNumber;
34339
+ this.cashRegisterDrawerNr = cashRegister.defaultDrawerNumber;
34296
34340
  this.paymentService.printerName = cashRegister.defaultPrinter;
34297
34341
  };
34298
34342
  TransactionPaymentBaseComponent.prototype.handlePayment = function () {
@@ -34335,7 +34379,7 @@
34335
34379
  if (currentCashRegister) {
34336
34380
  _this.cashRegisterNr = currentCashRegister.nr;
34337
34381
  _this.cashRegisterGroupId = currentCashRegister.group;
34338
- _this.cashRegisterDrawerId = currentCashRegister.defaultDrawerNumber;
34382
+ _this.cashRegisterDrawerNr = currentCashRegister.defaultDrawerNumber;
34339
34383
  _this.prepareCashDrawers(currentCashRegister.group);
34340
34384
  _this.paymentService.printerName = currentCashRegister.defaultPrinter;
34341
34385
  }
@@ -34376,6 +34420,7 @@
34376
34420
  cashRegisterNr: [{ type: i0.Input }],
34377
34421
  cashRegisterGroupId: [{ type: i0.Input }],
34378
34422
  cashRegisterDrawerId: [{ type: i0.Input }],
34423
+ cashRegisterDrawerNr: [{ type: i0.Input }],
34379
34424
  printerName: [{ type: i0.Input }],
34380
34425
  emailLayout: [{ type: i0.Input }],
34381
34426
  printerLayout: [{ type: i0.Input }],
@@ -39455,8 +39500,23 @@
39455
39500
  });
39456
39501
  });
39457
39502
  };
39503
+ //In this case we need information about a separate transaction to add info from it to the transaction we actually wish to create.
39504
+ //As such we need to fetch a transaction but just return it. Not set it on the service.
39505
+ TransactionCreateService.prototype.getSeparateTransactionById = function (transactionId) {
39506
+ return __awaiter(this, void 0, void 0, function () {
39507
+ return __generator(this, function (_a) {
39508
+ switch (_a.label) {
39509
+ case 0: return [4 /*yield*/, this.connector.getTransactionById(transactionId)];
39510
+ case 1: return [2 /*return*/, _a.sent()];
39511
+ }
39512
+ });
39513
+ });
39514
+ };
39458
39515
  return TransactionCreateService;
39459
- }(TransactionService));
39516
+ }(TransactionService));
39517
+ TransactionCreateService.decorators = [
39518
+ { type: i0.Injectable }
39519
+ ];
39460
39520
 
39461
39521
  var TransactionHeaderPopupServiceFieldsComponent = /** @class */ (function () {
39462
39522
  function TransactionHeaderPopupServiceFieldsComponent(transactionService) {
@@ -42948,7 +43008,7 @@
42948
43008
  TransactionUndoDeliveryComponent.decorators = [
42949
43009
  { type: i0.Component, args: [{
42950
43010
  selector: "co-undo-delivery",
42951
- template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports.length > 0 && allowToUndoDelivery\">\n <div class=\"amount-send-indicator\">\n <span [textContent]=\"historicReports.length\"></span>\n </div>\n <div class=\"send-button\" [class.no-pointer]=\"historicReports.length === 0\"\n [class.selected]=\"selected\"\n (click)=\"toggleUndoDeliveryDialog()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"></co-icon>\n <span [textContent]=\"'UNDO_DELIVERY' | localize\"></span>\n </div>\n <co-dialog-wizard *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-container header>\n <div class=\"dialog-title\" [textContent]=\"'DELIVERY_NOTE' | localize\"></div>\n </ng-container>\n <div class=\"dialog-container\">\n <div class=\"historic-report-line\" *ngFor=\"let report of historicReports\"\n (click)=\"undoDelivery(report.reportId)\">\n <span [textContent]=\"report.reportId + ' ' + (report.reportCreationDate | date)\"></span>\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.TrashBin)\"></co-icon>\n </div>\n </div>\n <co-loader *ngIf=\"showUndoLoader\"></co-loader>\n </co-dialog-wizard>\n </div>\n ",
43011
+ template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports?.length > 0 && allowToUndoDelivery\">\n <div class=\"amount-send-indicator\">\n <span [textContent]=\"historicReports.length\"></span>\n </div>\n <div class=\"send-button\" [class.no-pointer]=\"historicReports.length === 0\"\n [class.selected]=\"selected\"\n (click)=\"toggleUndoDeliveryDialog()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"></co-icon>\n <span [textContent]=\"'UNDO_DELIVERY' | localize\"></span>\n </div>\n <co-dialog-wizard *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-container header>\n <div class=\"dialog-title\" [textContent]=\"'DELIVERY_NOTE' | localize\"></div>\n </ng-container>\n <div class=\"dialog-container\">\n <div class=\"historic-report-line\" *ngFor=\"let report of historicReports\"\n (click)=\"undoDelivery(report.reportId)\">\n <span [textContent]=\"report.reportId + ' ' + (report.reportCreationDate | date)\"></span>\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.TrashBin)\"></co-icon>\n </div>\n </div>\n <co-loader *ngIf=\"showUndoLoader\"></co-loader>\n </co-dialog-wizard>\n </div>\n ",
42952
43012
  encapsulation: i0.ViewEncapsulation.None
42953
43013
  },] }
42954
43014
  ];
@@ -51960,6 +52020,7 @@
51960
52020
  _this._dialogService = _dialogService;
51961
52021
  _this.TableName = tableName_enum.TableName;
51962
52022
  _this.WorkflowCategoryType = workflowCategory_enum.WorkflowCategoryType;
52023
+ _this.cfgNames = exports.TransactionCfgName;
51963
52024
  _this.Icon = Icon;
51964
52025
  _this._editMode = false;
51965
52026
  _this.priorityDomainColl = [];
@@ -52171,7 +52232,7 @@
52171
52232
  TransactionServiceOverviewComponent.decorators = [
52172
52233
  { type: i0.Component, args: [{
52173
52234
  selector: "co-transaction-service-overview",
52174
- template: "\n <div class=\"service-overview-wrapper\">\n <div class=\"message-and-task-wrapper\">\n <div class=\"service-message-and-image-wrapper\">\n <div class=\"service-message-wrapper\">\n <label class=\"label service-label\" [textContent]=\"'SERVICE_REPORT'| localize\"></label>\n <span *ngIf=\"transactionServiceInfo && transactionServiceInfo.wizardQuestionsAndAnswers\"\n [textContent]=\"transactionServiceInfo.wizardQuestionsAndAnswers\"></span>\n <co-transaction-service-message class=\"transaction-service-message\" [transaction]=\"transaction\">\n </co-transaction-service-message>\n </div>\n <co-files-upload (documentChangeEvent)=\"upsertDocument($event)\"\n (documentDeleted)=\"deleteDocument($event)\"\n [label]=\"'ADD_IMAGES' | localize\"\n [documents]=\"documents\"\n [isEditable]=\"false\">\n </co-files-upload>\n <div class=\"service-order-lines-wrapper\">\n <div class=\"service-message-extra-wrapper\">\n <co-list-of-values [label]=\"'PRIORITY'| localize\" displayField=\"description\" [model]=\"priorityModel\"\n [collection]=\"priorityDomainColl\"\n (modelChange)=\"setPriority($event)\"></co-list-of-values>\n <co-list-of-values [label]=\"'CAUSE_CODE' | localize\" displayField=\"description\" [model]=\"causeCodeModel\"\n [collection]=\"causeCodeColl\"\n (modelChange)=\"setCauseCode($event)\"></co-list-of-values>\n <co-list-of-values [label]=\"'ENTRY_TYPE' | localize\" displayField=\"description\" [model]=\"entryTypeModel\"\n [collection]=\"entryTypeColl\"\n (modelChange)=\"setEntryType($event)\"></co-list-of-values>\n </div>\n <co-transaction-lines-side-panel\n class=\"higher-max-width\"\n [posOrderData]=\"posOrderData\"\n [transaction]=\"transaction\">\n </co-transaction-lines-side-panel>\n </div>\n\n </div>\n <div class=\"activity-list-component-wrapper\">\n <div class=\"activity-task-creator-wrapper\">\n <co-component-activity-list #openActivities [showActivityHeader]=\"showActivityHeader\" [table]=\"TableName.Transactions\" [key]=\"transactionInfo.id.toString()\" (refreshRequested)=\"finishedActivitiesRefreshRequested()\">\n </co-component-activity-list>\n <co-task-creator [table]=\"TableName.Transactions\" [remarkAndWorkKey]=\"transactionInfo.id.toString()\" [taskKey]=\"transactionInfo.transactionNr.toString()\"\n [author]=\"transactionService.loggedInUser\" [branchNo]=\"transactionInfo.branch.relationNr.toString()\"\n [workflowCategoryType]=\"WorkflowCategoryType.ServiceOrder\"\n (activityCreated)=\"fullActivitiesRefreshRequested()\"></co-task-creator>\n </div>\n <div class=\"activity-list-conv-wrapper\">\n <label class=\"label history-label\" [textContent]=\"'HISTORIC_ACTIVITY_CHAT'| localize\"></label>\n <co-activity-list [activities]=\"activities\"></co-activity-list>\n </div>\n </div>\n </div>\n </div>\n\n ",
52235
+ template: "\n <div class=\"service-overview-wrapper\">\n <div class=\"message-and-task-wrapper\">\n <div class=\"service-message-and-image-wrapper\">\n <div class=\"service-message-wrapper\">\n <label class=\"label service-label\" [textContent]=\"'SERVICE_REPORT'| localize\"></label>\n <span *ngIf=\"transactionServiceInfo && transactionServiceInfo.wizardQuestionsAndAnswers\"\n [textContent]=\"transactionServiceInfo.wizardQuestionsAndAnswers\"></span> <!--[screenConfigurationObject]=\"\" screenConfigNativeElement-->\n <co-transaction-service-message class=\"transaction-service-message\" [transaction]=\"transaction\">\n </co-transaction-service-message>\n </div>\n <co-files-upload (documentChangeEvent)=\"upsertDocument($event)\"\n (documentDeleted)=\"deleteDocument($event)\"\n [label]=\"'ADD_IMAGES' | localize\"\n [documents]=\"documents\"\n [isEditable]=\"false\">\n </co-files-upload>\n <div class=\"service-order-lines-wrapper\">\n <div class=\"service-message-extra-wrapper\">\n <co-list-of-values [label]=\"'PRIORITY'| localize\" displayField=\"description\" [model]=\"priorityModel\"\n [collection]=\"priorityDomainColl\"\n (modelChange)=\"setPriority($event)\"></co-list-of-values>\n <co-list-of-values [label]=\"'CAUSE_CODE' | localize\" displayField=\"description\" [model]=\"causeCodeModel\"\n [collection]=\"causeCodeColl\"\n (modelChange)=\"setCauseCode($event)\"></co-list-of-values>\n <co-list-of-values [label]=\"'ENTRY_TYPE' | localize\" displayField=\"description\" [model]=\"entryTypeModel\"\n [collection]=\"entryTypeColl\"\n (modelChange)=\"setEntryType($event)\"></co-list-of-values>\n </div>\n <co-transaction-lines-side-panel\n class=\"higher-max-width\"\n [posOrderData]=\"posOrderData\"\n [transaction]=\"transaction\">\n </co-transaction-lines-side-panel>\n </div>\n\n </div>\n <div class=\"activity-list-component-wrapper\">\n <div class=\"activity-task-creator-wrapper\">\n <co-component-activity-list #openActivities [showActivityHeader]=\"showActivityHeader\" [table]=\"TableName.Transactions\" [key]=\"transactionInfo.id.toString()\" (refreshRequested)=\"finishedActivitiesRefreshRequested()\">\n </co-component-activity-list>\n <co-task-creator [table]=\"TableName.Transactions\" [remarkAndWorkKey]=\"transactionInfo.id.toString()\" [taskKey]=\"transactionInfo.transactionNr.toString()\"\n [author]=\"transactionService.loggedInUser\" [branchNo]=\"transactionInfo.branch.relationNr.toString()\"\n [workflowCategoryType]=\"WorkflowCategoryType.ServiceOrder\"\n (activityCreated)=\"fullActivitiesRefreshRequested()\"></co-task-creator>\n </div>\n <div class=\"activity-list-conv-wrapper\">\n <label class=\"label history-label\" [textContent]=\"'HISTORIC_ACTIVITY_CHAT'| localize\"></label>\n <co-activity-list [activities]=\"activities\"></co-activity-list>\n </div>\n </div>\n </div>\n </div>\n\n ",
52175
52236
  encapsulation: i0.ViewEncapsulation.None
52176
52237
  },] }
52177
52238
  ];
@@ -52237,7 +52298,7 @@
52237
52298
  TransactionServiceMessageComponent.decorators = [
52238
52299
  { type: i0.Component, args: [{
52239
52300
  selector: "co-transaction-service-message",
52240
- template: "\n <co-input-textarea #input\n [model]=\"transactionServiceInfo.reportMessage\"\n [readonly]=\"readonly\"\n [showSaveCancel]=\"true\"\n ></co-input-textarea>\n ",
52301
+ template: "\n <co-input-textarea #input\n [model]=\"transactionServiceInfo.reportMessage\"\n [forceReadonly]=\"readonly\"\n [showSaveCancel]=\"true\"\n ></co-input-textarea> <!--[screenConfigurationObject]=\"cfgNames.ServiceMessage\"-->\n ",
52241
52302
  encapsulation: i0.ViewEncapsulation.None
52242
52303
  },] }
52243
52304
  ];
@@ -52256,7 +52317,8 @@
52256
52317
  common.CommonModule,
52257
52318
  corecomponents_v12.InputTextModule,
52258
52319
  PipeModule,
52259
- corecomponents_v12.InputTextareaModule
52320
+ corecomponents_v12.InputTextareaModule,
52321
+ corecomponents_v12.ScreenConfigurationModule
52260
52322
  ],
52261
52323
  declarations: [
52262
52324
  TransactionServiceMessageComponent