@colijnit/transaction 256.1.27 → 256.1.29

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 (61) hide show
  1. package/bundles/colijnit-transaction.umd.js +555 -218
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.d.ts +11 -9
  4. package/colijnit-transaction.metadata.json +1 -1
  5. package/esm2015/colijnit-transaction.js +12 -10
  6. package/esm2015/lib/component/core/base/service/transaction-header.service.js +13 -1
  7. package/esm2015/lib/component/core/base/transaction-base.component.js +1 -5
  8. package/esm2015/lib/component/core/base/transaction-header-base.component.js +7 -1
  9. package/esm2015/lib/component/core/base/transaction-line-base.component.js +7 -1
  10. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/delivery-planning-overview-tile-line.component.js +4 -15
  11. package/esm2015/lib/component/dialog/dialog-branch/dialog-branch.component.js +131 -0
  12. package/esm2015/lib/component/dialog/dialog-branch/dialog-branch.module.js +26 -0
  13. package/esm2015/lib/component/transaction-card/transaction-card-invoice/transaction-card-invoice.component.js +2 -2
  14. package/esm2015/lib/component/transaction-create-wizard/transaction-create-wizard.component.js +50 -28
  15. package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +15 -4
  16. package/esm2015/lib/component/transaction-internal/transaction-internal.module.js +4 -4
  17. package/esm2015/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.js +31 -11
  18. package/esm2015/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line.component.js +4 -4
  19. package/esm2015/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.js +31 -12
  20. package/esm2015/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line.component.js +4 -4
  21. package/esm2015/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.js +38 -3
  22. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-invoice/transaction-quick-access-invoice.component.js +2 -2
  23. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.component.js +2 -2
  24. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-sales-quotation/transaction-quick-access-sales-quotation.component.js +2 -3
  25. package/esm2015/lib/enum/icon.enum.js +3 -1
  26. package/esm2015/lib/model/icon-svg.js +3 -1
  27. package/esm2015/lib/service/dialog.service.js +6 -9
  28. package/esm2015/lib/service/transaction-base.service.js +1 -2
  29. package/esm2015/lib/service/transaction-connector-adapter.service.js +19 -1
  30. package/esm2015/lib/service/transaction-connector.service.js +6 -1
  31. package/esm2015/lib/service/transaction-mapping.service.js +2 -2
  32. package/esm2015/lib/service/transaction.service.js +14 -2
  33. package/esm2015/lib/transaction-version.js +3 -3
  34. package/fesm2015/colijnit-transaction.js +547 -256
  35. package/fesm2015/colijnit-transaction.js.map +1 -1
  36. package/lib/component/core/base/service/transaction-header.service.d.ts +4 -0
  37. package/lib/component/core/base/transaction-base.component.d.ts +0 -4
  38. package/lib/component/core/base/transaction-header-base.component.d.ts +2 -0
  39. package/lib/component/core/base/transaction-line-base.component.d.ts +2 -0
  40. package/lib/component/delivery-planning/style/_layout.scss +5 -0
  41. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/style/_layout.scss +11 -10
  42. package/lib/component/dialog/dialog-branch/dialog-branch.component.d.ts +48 -0
  43. package/lib/component/dialog/dialog-branch/dialog-branch.module.d.ts +2 -0
  44. package/lib/component/dialog/dialog-branch/style/_layout.scss +11 -0
  45. package/lib/component/dialog/dialog-branch/style/_material-definition.scss +2 -0
  46. package/lib/component/dialog/dialog-branch/style/_theme.scss +4 -0
  47. package/lib/component/dialog/dialog-branch/style/material.scss +4 -0
  48. package/lib/component/transaction-create-wizard/transaction-create-wizard.component.d.ts +8 -3
  49. package/lib/component/transaction-internal/style/_layout.scss +3 -0
  50. package/lib/component/transaction-internal/transaction-internal.component.d.ts +4 -2
  51. package/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.d.ts +3 -1
  52. package/lib/component/transaction-line/transaction-line/style/_layout.scss +8 -0
  53. package/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.d.ts +3 -1
  54. package/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.d.ts +2 -1
  55. package/lib/component/transaction-service-overview/style/_layout.scss +28 -3
  56. package/lib/enum/icon.enum.d.ts +2 -0
  57. package/lib/service/dialog.service.d.ts +1 -1
  58. package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
  59. package/lib/service/transaction-connector.service.d.ts +1 -0
  60. package/lib/service/transaction.service.d.ts +1 -0
  61. package/package.json +3 -3
@@ -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.27";
37
- this.publishDate = "13-12-2024 17:51:03";
36
+ this.symVer = "256.1.29";
37
+ this.publishDate = "18-12-2024 16:12:43";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -795,6 +795,8 @@
795
795
  Icon["RegularWarehouseClock"] = "regular_warehouse_clock";
796
796
  Icon["Remark"] = "remark";
797
797
  Icon["Resize"] = "resize";
798
+ Icon["ScrewdriverWrenchLight"] = "screwdriver_wrench_light";
799
+ Icon["ScrewdriverWrenchRegular"] = "screwdriver_wrench_regular";
798
800
  Icon["ServiceCartRegular"] = "service_cart_regular";
799
801
  Icon["ShareSolid"] = "share_solid";
800
802
  Icon["SharpLightTruckMovingClock"] = "sharp_light_truck_moving_clock";
@@ -952,6 +954,8 @@
952
954
  "regular_warehouse_clock": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M0 176.3c0-29.3 17.8-55.7 44.9-66.7L299 6.6c13.5-5.5 28.6-5.5 42.1 0l254 103c27.2 11 45 37.4 45 66.7L640 488l0-120 0-101.2c-12.9-18.3-29.2-34-48-46.3l0-44.2c0-9.8-5.9-18.6-15-22.2L323 51.1c-1.9-.8-4.1-.8-6 0L63 154.1c-9.1 3.7-15 12.5-15 22.2L48 488c0 13.3-10.7 24-24 24s-24-10.7-24-24L0 176.3zM96 232c0-22.1 17.9-40 40-40l360 0c-46.8 0-89.3 18.2-120.8 48L144 240l0 40 199.5 0c-8.5 14.8-15 30.9-19 48L144 328l0 48 176.2 0c.7 16.7 3.8 32.8 8.9 48L144 424l0 40 204.5 0c12.3 18.8 28 35.1 46.3 48l-274.5 0-.3 0c-13.3 0-24-10.7-24-24l0-256zM352 368c0-79.5 64.5-144 144-144s144 64.5 144 144s-64.5 144-144 144s-144-64.5-144-144zm128-64l0 64c0 8.8 7.2 16 16 16l48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0-48c0-8.8-7.2-16-16-16s-16 7.2-16 16zm16-112l8 0c2.5 0 4.9 .2 7.2 .7c-5-.4-10.1-.7-15.2-.7z\"/></svg>",
953
955
  "remark": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><path d=\"M15,.93C6.72,.93,0,5.83,0,11.89c0,2.12,.84,4.09,2.27,5.77h-.16c.16,.1,.28,.22,.43,.32,.4,.44,.86,.85,1.35,1.24,3.07,3.75,.06,8.71-3.25,9.84,5.79-1.34,9.31-3.89,10.9-6.53,1.11,.19,2.27,.31,3.46,.31,8.28,0,15-4.91,15-10.96S23.28,.93,15,.93Z\" fill=\"#484f60\"/></g></svg>",
954
956
  "resize": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><polygon points=\"1.1 49.9 1.1 30.6 7.8 37.3 37.3 8 30.6 1.3 49.9 1.3 49.9 20.6 43.2 13.9 13.7 43.2 20.5 49.9 1.1 49.9\" fill=\"#4d5050\"/></svg>",
957
+ "screwdriver_wrench_light": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M64.7 34.6L160 107.9l0 52.1-52.1 0L34.6 64.7 64.7 34.6zM192 169.3c0-.4 0-.9 0-1.3l0-64c0-7.5-3.5-14.5-9.4-19L78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4l64 0c.4 0 .9 0 1.3 0L271.2 293.9c-19.5 30-16.2 70.5 10.1 96.8l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-26.3-26.3-66.8-29.7-96.8-10.1L192 169.3zM304 304c17.7-17.7 46.3-17.7 64 0L480 416l-64 64L304 368c-17.7-17.7-17.7-46.3 0-64zM104 424a16 16 0 1 0 -32 0 16 16 0 1 0 32 0zM23.2 376.8C8.3 391.7 0 411.8 0 432.8C0 476.5 35.5 512 79.2 512c21 0 41.1-8.3 56-23.2L238.5 385.5c-5.7-11.2-9.3-23.1-10.9-35.3L112.1 465.7c-8.7 8.7-20.6 13.6-32.9 13.6c-25.7 0-46.6-20.8-46.6-46.6c0-12.3 4.9-24.2 13.6-32.9L189.1 257l-23.1-23.1L23.2 376.8zM479.4 160c0 44.8-23.1 84.1-58 106.8l23.5 23.5c40.7-29 67.2-76.6 67.2-130.3c0-24.8-5.7-48.3-15.7-69.3c-4.4-9.2-16.5-10.5-23.7-3.3l-67.9 67.9c-3 3-7.1 4.7-11.3 4.7L368 160c-8.8 0-16-7.2-16-16l0-25.4c0-4.2 1.7-8.3 4.7-11.3l67.9-67.9c7.2-7.2 5.9-19.3-3.3-23.7C400.3 5.7 376.8 0 352 0C296.1 0 246.9 28.6 218.3 72.1l26 20C266.8 56.3 306.7 32.6 352 32.6c10.3 0 20.2 1.2 29.7 3.5L333.6 84.2c-9.1 9.1-14.2 21.5-14.2 34.4l0 25.4c0 26.9 21.8 48.6 48.6 48.6l25.4 0c12.9 0 25.3-5.1 34.4-14.2l48.1-48.1c2.3 9.5 3.5 19.5 3.5 29.7z\"/></svg>",
958
+ "screwdriver_wrench_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4l54.1 0 109 109c-14.7 29-10 65.4 14.3 89.6l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-24.2-24.2-60.6-29-89.6-14.3l-109-109 0-54.1c0-7.5-3.5-14.5-9.4-19L78.6 5zM23.2 376.8C8.3 391.7 0 411.8 0 432.8C0 476.5 35.5 512 79.2 512c21 0 41.1-8.3 56-23.2L238.5 385.5c-8.9-17.6-12.8-37.1-11.6-56.3L101.3 454.9c-5.9 5.8-13.8 9.1-22.1 9.1C62 464 48 450 48 432.8c0-8.3 3.3-16.2 9.1-22.1L194.3 273.5l-33.9-33.9L23.2 376.8zM463.9 164c-1.4 38.9-22.6 72.8-53.8 91.8c1.1 1 2.1 2 3.1 3l31.6 31.6c40.7-29 67.2-76.6 67.2-130.3c0-24.8-5.7-48.3-15.7-69.3c-4.4-9.2-16.5-10.5-23.7-3.3l-67.9 67.9c-3 3-7.1 4.7-11.3 4.7L368 160c-8.8 0-16-7.2-16-16l0-25.4c0-4.2 1.7-8.3 4.7-11.3l67.9-67.9c7.2-7.2 5.9-19.3-3.3-23.7C400.3 5.7 376.8 0 352 0C294.7 0 244.4 30.1 216.2 75.4C221.2 84 224 93.8 224 104l0 40.8 16 16 0-.8c0-60.5 48-109.9 108-111.9L322.7 73.4s0 0 0 0c-12 12-18.7 28.3-18.7 45.3l0 25.4c0 35.3 28.7 64 64 64l25.4 0c17 0 33.3-6.7 45.3-18.7L463.9 164z\"/></svg>",
955
959
  "service_cart_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M64 24C64 10.7 74.7 0 88 0h45.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H234.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H552c13.3 0 24 10.7 24 24s-10.7 24-24 24H263.7c-34.6 0-64.3-24.6-70.7-58.5l-51.6-271c-.7-3.8-4-6.5-7.9-6.5H88C74.7 48 64 37.3 64 24zM225.6 240H523.2c10.9 0 20.4-7.3 23.2-17.8L584.7 80H195.1l30.5 160zM192 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM24 96h80c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 80h96c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24zm0 80H136c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"/></svg>",
956
960
  "share_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M503.7 226.2l-176 151.1c-15.38 13.3-39.69 2.545-39.69-18.16V272.1C132.9 274.3 66.06 312.8 111.4 457.8c5.031 16.09-14.41 28.56-28.06 18.62C39.59 444.6 0 383.8 0 322.3c0-152.2 127.4-184.4 288-186.3V56.02c0-20.67 24.28-31.46 39.69-18.16l176 151.1C514.8 199.4 514.8 216.6 503.7 226.2z\"/></svg>",
957
961
  "sharp_light_truck_moving_clock": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M32 64l0 240 0 32c13.4-10 30-16 48-16c26.2 0 49.4 12.6 64 32c14.6-19.4 37.8-32 64-32c32.8 0 61 19.7 73.3 48c12.9 0 25.8 0 38.7 0c0 10.9 1 21.6 2.9 32c-11.6 0-23.3 0-34.9 0c0 44.2-35.8 80-80 80c-26.2 0-49.4-12.6-64-32c-14.6 19.4-37.8 32-64 32c-44.2 0-80-35.8-80-80c0-10.7 0-21.3 0-32c0-21.3 0-42.7 0-64C0 224 0 144 0 64C0 53.3 0 42.7 0 32c10.7 0 21.3 0 32 0c138.7 0 277.3 0 416 0c10.7 0 21.3 0 32 0c0 10.7 0 21.3 0 32c0 21.3 0 42.7 0 64c24 0 48 0 72 0c2.4 0 4.7 0 7.1 0c1.6 1.8 3.2 3.5 4.8 5.3c24 26.7 48 53.3 72 80c1.4 1.5 2.7 3.1 4.1 4.6c0 2 0 4.1 0 6.1c0 10.7 0 21.3 0 32c0 3.6 0 7.2 0 10.8c-11.7-16.6-26.2-31.1-42.8-42.8c1.8 0 3.6 0 5.3 0c-19.2-21.3-38.4-42.7-57.6-64c-21.6 0-43.3 0-64.9 0c0 10.9 0 21.8 0 32.7c-11 1-21.7 3-32 5.9c0-44.9 0-89.8 0-134.6c-138.7 0-277.3 0-416 0zM256 400c0-17.1-9.1-33-24-41.6s-33.1-8.6-48 0s-24 24.4-24 41.6s9.1 33 24 41.6s33.1 8.6 48 0s24-24.4 24-41.6zM80 448c17.1 0 33-9.1 41.6-24s8.6-33.1 0-48S97.1 352 80 352s-33 9.1-41.6 24s-8.6 33.1 0 48S62.9 448 80 448zm528-80c0-40-21.3-77-56-97s-77.3-20-112 0s-56 57-56 97s21.3 77 56 97s77.3 20 112 0s56-57 56-97zm-256 0c0-51.4 27.4-99 72-124.7s99.4-25.7 144 0s72 73.3 72 124.7s-27.4 99-72 124.7s-99.4 25.7-144 0S352 419.4 352 368zm160-64l0 48c10.7 0 21.3 0 32 0c5.3 0 10.7 0 16 0c0 10.7 0 21.3 0 32c-5.3 0-10.7 0-16 0c-16 0-32 0-48 0c-5.3 0-10.7 0-16 0c0-5.3 0-10.7 0-16c0-21.3 0-42.7 0-64c0-5.3 0-10.7 0-16c10.7 0 21.3 0 32 0c0 5.3 0 10.7 0 16z\"/></svg>",
@@ -4181,6 +4185,27 @@
4181
4185
  });
4182
4186
  });
4183
4187
  };
4188
+ TransactionConnectorAdapterService.prototype.changeTransactionLineQuantitySelectNone = function (uuid) {
4189
+ return __awaiter(this, void 0, void 0, function () {
4190
+ var _this = this;
4191
+ return __generator(this, function (_a) {
4192
+ return [2 /*return*/, new Promise(function (resolve, reject) {
4193
+ var request = {
4194
+ transactionUuid: uuid
4195
+ };
4196
+ return _this.connector.changeTransactionLineQuantitySelectNone(request).then(function (result) {
4197
+ if (result.validationResult && result.validationResult.success) {
4198
+ resolve(_this._boFactory.makeWithRawBackendData(transactionInfoResponse_bo.TransactionInfoResponse, result.resultObject));
4199
+ }
4200
+ else {
4201
+ _this._handleExceptionFromResponse(result);
4202
+ reject(null);
4203
+ }
4204
+ });
4205
+ })];
4206
+ });
4207
+ });
4208
+ };
4184
4209
  TransactionConnectorAdapterService.prototype.changeTransactionLineCommissionCode = function (uuid, lineUuid, code) {
4185
4210
  return __awaiter(this, void 0, void 0, function () {
4186
4211
  var request, response;
@@ -9852,6 +9877,13 @@
9852
9877
  });
9853
9878
  });
9854
9879
  };
9880
+ TransactionConnectorService.prototype.changeTransactionLineQuantitySelectNone = function (uuid) {
9881
+ return __awaiter(this, void 0, void 0, function () {
9882
+ return __generator(this, function (_a) {
9883
+ return [2 /*return*/, this._adapterService.changeTransactionLineQuantitySelectNone(uuid)];
9884
+ });
9885
+ });
9886
+ };
9855
9887
  TransactionConnectorService.prototype.resolvePendingLineReason = function (pendingLineValues) {
9856
9888
  return __awaiter(this, void 0, void 0, function () {
9857
9889
  return __generator(this, function (_a) {
@@ -12372,10 +12404,6 @@
12372
12404
  this.readonly = false;
12373
12405
  this.showLoader = false;
12374
12406
  this.relationChange = new i0.EventEmitter();
12375
- this.canAllLinesBeDelivered = false;
12376
- this.canAllLinesBeInvoiced = false;
12377
- this.hasLinesToDeliver = false;
12378
- this.hasLinesToInvoice = false;
12379
12407
  this.decimals = 0;
12380
12408
  this.committing = false;
12381
12409
  this.headerTooltipMessages = [];
@@ -12752,6 +12780,10 @@
12752
12780
  this.isPurchaseOrder = false;
12753
12781
  this.reservationMode = false;
12754
12782
  this.readonly = false;
12783
+ this.canAllLinesBeDelivered = false;
12784
+ this.canAllLinesBeInvoiced = false;
12785
+ this.hasLinesToDeliver = false;
12786
+ this.hasLinesToInvoice = false;
12755
12787
  this.relationSet = new rxjs.BehaviorSubject(false);
12756
12788
  this.transactionSet = new rxjs.BehaviorSubject(false);
12757
12789
  this.transactionInfoSet = new rxjs.BehaviorSubject(false);
@@ -12790,6 +12822,14 @@
12790
12822
  }
12791
12823
  if (this._transaction.transactionLines) {
12792
12824
  this.transactionLines = this._transaction.transactionLines;
12825
+ this.canAllLinesBeDelivered = this.transactionLines.filter(function (l) { return l.articleLineStatus ? (l.articleLineStatus.quantityToDeliver === 0) : false; }).length === 0;
12826
+ this.canAllLinesBeInvoiced = this.transactionLines.filter(function (l) { return l.articleLineStatus ? (l.articleLineStatus.quantityToInvoice === 0) : false; }).length === 0;
12827
+ this.hasLinesToDeliver = this.transactionInfo.allowPartialDelivery ?
12828
+ this.transactionLines.filter(function (l) { return l.articleLineStatus ? l.articleLineStatus.quantityToDeliver !== 0 : false; }).length > 0 :
12829
+ this.transactionLines.filter(function (l) { return l.articleLineStatus ? l.articleLineStatus.quantityToDeliver === 0 : false; }).length === 0;
12830
+ this.hasLinesToInvoice = this.transactionInfo.allowPartialDelivery ?
12831
+ this.transactionLines.filter(function (l) { return l.articleLineStatus ? l.articleLineStatus.quantityToInvoice !== 0 : false; }).length > 0 :
12832
+ this.transactionLines.filter(function (l) { return l.articleLineStatus ? l.articleLineStatus.quantityToInvoice === 0 : false; }).length === 0;
12793
12833
  }
12794
12834
  if (this._transaction.deliveryCostLines) {
12795
12835
  this.deliveryCostLines = this._transaction.deliveryCostLines;
@@ -13125,6 +13165,20 @@
13125
13165
  enumerable: false,
13126
13166
  configurable: true
13127
13167
  });
13168
+ Object.defineProperty(TransactionLineBaseComponent.prototype, "canAllLinesBeDelivered", {
13169
+ get: function () {
13170
+ return this.transactionHeaderService.canAllLinesBeDelivered;
13171
+ },
13172
+ enumerable: false,
13173
+ configurable: true
13174
+ });
13175
+ Object.defineProperty(TransactionLineBaseComponent.prototype, "canAllLinesBeInvoiced", {
13176
+ get: function () {
13177
+ return this.transactionHeaderService.canAllLinesBeInvoiced;
13178
+ },
13179
+ enumerable: false,
13180
+ configurable: true
13181
+ });
13128
13182
  Object.defineProperty(TransactionLineBaseComponent.prototype, "model", {
13129
13183
  get: function () {
13130
13184
  return this.transactionLine;
@@ -13578,6 +13632,20 @@
13578
13632
  enumerable: false,
13579
13633
  configurable: true
13580
13634
  });
13635
+ Object.defineProperty(TransactionHeaderBaseComponent.prototype, "hasLinesToDeliver", {
13636
+ get: function () {
13637
+ return this.transactionHeaderService.hasLinesToDeliver;
13638
+ },
13639
+ enumerable: false,
13640
+ configurable: true
13641
+ });
13642
+ Object.defineProperty(TransactionHeaderBaseComponent.prototype, "hasLinesToInvoice", {
13643
+ get: function () {
13644
+ return this.transactionHeaderService.hasLinesToInvoice;
13645
+ },
13646
+ enumerable: false,
13647
+ configurable: true
13648
+ });
13581
13649
  TransactionHeaderBaseComponent.prototype.ngOnInit = function () {
13582
13650
  var _this = this;
13583
13651
  _super.prototype.ngOnInit.call(this);
@@ -13659,84 +13727,6 @@
13659
13727
  transaction: [{ type: i0.Input }]
13660
13728
  };
13661
13729
 
13662
- var DialogTransactionHeaderBaseComponent = /** @class */ (function (_super) {
13663
- __extends(DialogTransactionHeaderBaseComponent, _super);
13664
- function DialogTransactionHeaderBaseComponent() {
13665
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
13666
- _this.buttonType = AppPopupButtonType;
13667
- _this.autoClose = false;
13668
- _this.useModel = true;
13669
- _this.close = new i0.EventEmitter();
13670
- _this.shouldRollbackOnClose = true;
13671
- return _this;
13672
- }
13673
- DialogTransactionHeaderBaseComponent.prototype.onClose = function (eventType, output) {
13674
- return;
13675
- };
13676
- DialogTransactionHeaderBaseComponent.prototype.handleValueChange = function (value) {
13677
- this.value = value;
13678
- };
13679
- DialogTransactionHeaderBaseComponent.prototype.handleOkClick = function () {
13680
- this.onClose(AppPopupButtonType.Ok, this.value);
13681
- };
13682
- DialogTransactionHeaderBaseComponent.prototype.handleSearch = function (text) {
13683
- this.searchText = text;
13684
- };
13685
- DialogTransactionHeaderBaseComponent.prototype.handleCloseDialog = function (event, type) {
13686
- if (event) {
13687
- event.preventDefault();
13688
- event.stopPropagation();
13689
- }
13690
- this.handleClose(type);
13691
- };
13692
- DialogTransactionHeaderBaseComponent.prototype.handleClose = function (type) {
13693
- if (type === AppPopupButtonType.Cancel && this.shouldRollbackOnClose) {
13694
- this.rollback();
13695
- }
13696
- this.close.emit();
13697
- this.onClose(type);
13698
- this.detectChanges();
13699
- };
13700
- return DialogTransactionHeaderBaseComponent;
13701
- }(TransactionHeaderBaseComponent));
13702
- DialogTransactionHeaderBaseComponent.decorators = [
13703
- { type: i0.Directive }
13704
- ];
13705
- DialogTransactionHeaderBaseComponent.propDecorators = {
13706
- autoClose: [{ type: i0.Input }],
13707
- useModel: [{ type: i0.Input }],
13708
- close: [{ type: i0.Output }]
13709
- };
13710
-
13711
- var DialogTransactionHeaderBranchComponent = /** @class */ (function (_super) {
13712
- __extends(DialogTransactionHeaderBranchComponent, _super);
13713
- function DialogTransactionHeaderBranchComponent() {
13714
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
13715
- _this.buttonType = AppPopupButtonType;
13716
- return _this;
13717
- }
13718
- DialogTransactionHeaderBranchComponent.prototype.showClass = function () {
13719
- return true;
13720
- };
13721
- DialogTransactionHeaderBranchComponent.prototype.handleValueChange = function (value) {
13722
- this.value = value;
13723
- };
13724
- DialogTransactionHeaderBranchComponent.prototype.handleOkClick = function () {
13725
- this.onClose(AppPopupButtonType.Ok, this.value);
13726
- };
13727
- return DialogTransactionHeaderBranchComponent;
13728
- }(DialogTransactionHeaderBaseComponent));
13729
- DialogTransactionHeaderBranchComponent.decorators = [
13730
- { type: i0.Component, args: [{
13731
- selector: "co-dialog-transaction-header-branch",
13732
- template: "\n <co-dialog [headerTemplate]=\"dialogHeader\" [footerTemplate]=\"footerTemplate\" (closeClick)=\"handleCloseDialog($event, buttonType.Cancel)\">\n <co-transaction-header-branch\n [useModel]=\"useModel\"\n [searchText]=\"searchText\"\n (valueChange)=\"handleValueChange($event)\"\n ></co-transaction-header-branch>\n </co-dialog>\n <ng-template #dialogHeader>\n <co-dialog-header-search [title]=\"'BRANCH'\" (search)=\"handleSearch($event)\"></co-dialog-header-search>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\" *ngIf=\"!useModel\">\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 ",
13733
- encapsulation: i0.ViewEncapsulation.None
13734
- },] }
13735
- ];
13736
- DialogTransactionHeaderBranchComponent.propDecorators = {
13737
- showClass: [{ type: i0.HostBinding, args: ["class.co-dialog-transaction-header-branch",] }]
13738
- };
13739
-
13740
13730
  var TransactionCashRegisterOrderReceiptDialogComponent = /** @class */ (function (_super) {
13741
13731
  __extends(TransactionCashRegisterOrderReceiptDialogComponent, _super);
13742
13732
  function TransactionCashRegisterOrderReceiptDialogComponent() {
@@ -14016,6 +14006,123 @@
14016
14006
  showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-cash-register-order-receipt-dialog",] }]
14017
14007
  };
14018
14008
 
14009
+ var DialogBranchComponent = /** @class */ (function () {
14010
+ function DialogBranchComponent(iconCacheService, _relationService) {
14011
+ this.iconCacheService = iconCacheService;
14012
+ this._relationService = _relationService;
14013
+ this.icons = Icon;
14014
+ this.buttonType = AppPopupButtonType;
14015
+ this.fields = { text: "description", value: "relationId" };
14016
+ this.viewModels = [];
14017
+ this.viewModelsFiltered = [];
14018
+ this.codeField = 'branchNo';
14019
+ this.checkField = 'relationNr';
14020
+ this.propsForLabel = [{ label: 'branchNo' }, { label: 'description' }];
14021
+ }
14022
+ DialogBranchComponent.prototype.showClass = function () {
14023
+ return true;
14024
+ };
14025
+ Object.defineProperty(DialogBranchComponent.prototype, "searchText", {
14026
+ get: function () {
14027
+ return this._searchText;
14028
+ },
14029
+ set: function (value) {
14030
+ if (value !== undefined && value !== null) {
14031
+ this._searchText = value;
14032
+ this._doSearch();
14033
+ }
14034
+ },
14035
+ enumerable: false,
14036
+ configurable: true
14037
+ });
14038
+ DialogBranchComponent.prototype.ngOnInit = function () {
14039
+ this._getCollection();
14040
+ };
14041
+ DialogBranchComponent.prototype.onClose = function (eventType, output) {
14042
+ return;
14043
+ };
14044
+ DialogBranchComponent.prototype.handleSearch = function (text) {
14045
+ this.searchText = text;
14046
+ };
14047
+ DialogBranchComponent.prototype.handleOkClick = function () {
14048
+ this.onClose(AppPopupButtonType.Save, this.value);
14049
+ };
14050
+ DialogBranchComponent.prototype.handleCloseDialog = function (event, type) {
14051
+ if (event) {
14052
+ event.preventDefault();
14053
+ event.stopPropagation();
14054
+ }
14055
+ this.onClose(type);
14056
+ };
14057
+ DialogBranchComponent.prototype.handleChecked = function (row) {
14058
+ return __awaiter(this, void 0, void 0, function () {
14059
+ var currentModel, i;
14060
+ return __generator(this, function (_a) {
14061
+ row.checked = true;
14062
+ currentModel = this.viewModels.find(function (v) { return v.value === row.value; });
14063
+ if (currentModel) {
14064
+ currentModel.checked = true;
14065
+ }
14066
+ for (i = 0; i < this.viewModels.length; i++) {
14067
+ if (this.viewModels[i].value !== row.value) {
14068
+ this.viewModels[i].checked = false;
14069
+ }
14070
+ }
14071
+ this.value = row.value;
14072
+ return [2 /*return*/];
14073
+ });
14074
+ });
14075
+ };
14076
+ DialogBranchComponent.prototype._getCollection = function () {
14077
+ var _this = this;
14078
+ this._relationService.getBranches().then(function (branches) {
14079
+ _this._collection = branches;
14080
+ _this._prepareViewModels();
14081
+ });
14082
+ };
14083
+ DialogBranchComponent.prototype._prepareViewModels = function () {
14084
+ var _this = this;
14085
+ this.viewModels.length = 0;
14086
+ this._collection.forEach(function (d, index) {
14087
+ var labels = JSON.parse(JSON.stringify(_this.propsForLabel));
14088
+ labels.forEach(function (l) { return l.label = d[l.label]; });
14089
+ _this.viewModels.push({
14090
+ value: d[_this.codeField],
14091
+ propsForLabel: labels,
14092
+ checked: (_this.value ? _this.value === d[_this.codeField] : index === 0)
14093
+ });
14094
+ });
14095
+ this.viewModelsFiltered = this.viewModels.slice();
14096
+ if (this.viewModels.length > 0) {
14097
+ // this.valueChange.next(this.value ? this.value : this.viewModels[0].value);
14098
+ }
14099
+ };
14100
+ DialogBranchComponent.prototype._doSearch = function () {
14101
+ var _this = this;
14102
+ this.viewModelsFiltered = JSON.parse(JSON.stringify(this.viewModels));
14103
+ if (this.searchText) {
14104
+ this.viewModelsFiltered = this.viewModelsFiltered.filter(function (vmf) {
14105
+ return vmf.propsForLabel.find(function (p) { return p.label && p.label.toString().match(new RegExp(_this.searchText, 'gi')); });
14106
+ });
14107
+ }
14108
+ };
14109
+ return DialogBranchComponent;
14110
+ }());
14111
+ DialogBranchComponent.decorators = [
14112
+ { type: i0.Component, args: [{
14113
+ selector: 'co-dialog-branch',
14114
+ template: "\n <co-dialog [headerTemplate]=\"dialogHeader\" [footerTemplate]=\"footerTemplate\" (closeClick)=\"handleCloseDialog($event, buttonType.Cancel)\">\n <co-transaction-line-checkbox-list\n [collection]=\"viewModelsFiltered\"\n (checked)=\"handleChecked($event)\"\n ></co-transaction-line-checkbox-list>\n </co-dialog>\n <ng-template #dialogHeader>\n <co-dialog-header-search [title]=\"'BRANCH'\" (search)=\"handleSearch($event)\"></co-dialog-header-search>\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 ",
14115
+ encapsulation: i0.ViewEncapsulation.None
14116
+ },] }
14117
+ ];
14118
+ DialogBranchComponent.ctorParameters = function () { return [
14119
+ { type: IconCacheService },
14120
+ { type: TransactionRelationService }
14121
+ ]; };
14122
+ DialogBranchComponent.propDecorators = {
14123
+ showClass: [{ type: i0.HostBinding, args: ['class.co-dialog-branch',] }]
14124
+ };
14125
+
14019
14126
  var DialogService = /** @class */ (function () {
14020
14127
  function DialogService(_compFactoryResolver, appRef, injector, dynamicComponentService, _dictionaryService) {
14021
14128
  this._compFactoryResolver = _compFactoryResolver;
@@ -14086,12 +14193,9 @@
14086
14193
  };
14087
14194
  return this.dynamicComponentService.createComponent(DialogTransactionLineWarehouseCcComponent, data, undefined, [provider]);
14088
14195
  };
14089
- DialogService.prototype.showBranch = function (transaction) {
14090
- var data = {
14091
- transaction: transaction,
14092
- useModel: false
14093
- };
14094
- return this.dynamicComponentService.createComponent(DialogTransactionHeaderBranchComponent, data);
14196
+ DialogService.prototype.showBranch = function () {
14197
+ var data = {};
14198
+ return this.dynamicComponentService.createComponent(DialogBranchComponent, data);
14095
14199
  };
14096
14200
  DialogService.prototype.showWarehouseLocation = function (warehouseNr, useModel, autoClose, showClose, transactionLine) {
14097
14201
  var data = {
@@ -14204,7 +14308,6 @@
14204
14308
  _this.relationUpdated = new rxjs.BehaviorSubject(undefined);
14205
14309
  _this.transactionKindSet = new rxjs.BehaviorSubject(false);
14206
14310
  _this.transactionMargeViewClicked = new rxjs.Subject();
14207
- _this.currentBranch = "1"; // current user branch, needs to be set before we can do anything with transactions
14208
14311
  _this.autoSave = false;
14209
14312
  _this.manualSaveParam = false;
14210
14313
  _this.applicationUser = false;
@@ -16574,6 +16677,28 @@
16574
16677
  });
16575
16678
  });
16576
16679
  };
16680
+ TransactionService.prototype.updateQuantitySelectNone = function (uuid, saveTransaction, rememberTransaction) {
16681
+ if (saveTransaction === void 0) { saveTransaction = true; }
16682
+ if (rememberTransaction === void 0) { rememberTransaction = true; }
16683
+ return __awaiter(this, void 0, void 0, function () {
16684
+ var response;
16685
+ return __generator(this, function (_a) {
16686
+ switch (_a.label) {
16687
+ case 0: return [4 /*yield*/, this.connector.changeTransactionLineQuantitySelectNone(uuid)];
16688
+ case 1:
16689
+ response = _a.sent();
16690
+ if (!response) return [3 /*break*/, 3];
16691
+ this.transactionDirty = true;
16692
+ return [4 /*yield*/, this.handleLineOperationStatuses(response, saveTransaction, rememberTransaction)];
16693
+ case 2:
16694
+ _a.sent();
16695
+ this.transactionEventService.quantitySelectedLineChanged.next(true);
16696
+ return [2 /*return*/, true];
16697
+ case 3: return [2 /*return*/, false];
16698
+ }
16699
+ });
16700
+ });
16701
+ };
16577
16702
  TransactionService.prototype.updateDeliveryDateTransactionLine = function (uuid, lineUuid, date) {
16578
16703
  return __awaiter(this, void 0, void 0, function () {
16579
16704
  var response;
@@ -19070,7 +19195,7 @@
19070
19195
  switch (_a.label) {
19071
19196
  case 0:
19072
19197
  if (!!this.currentBranch) return [3 /*break*/, 2];
19073
- return [4 /*yield*/, this.dialogService.showBranch(this.currentTransaction)];
19198
+ return [4 /*yield*/, this.dialogService.showBranch()];
19074
19199
  case 1:
19075
19200
  response = _a.sent();
19076
19201
  if (response.button !== AppPopupButtonType.Cancel) {
@@ -22216,6 +22341,55 @@
22216
22341
  showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-totals",] }]
22217
22342
  };
22218
22343
 
22344
+ var DialogTransactionHeaderBaseComponent = /** @class */ (function (_super) {
22345
+ __extends(DialogTransactionHeaderBaseComponent, _super);
22346
+ function DialogTransactionHeaderBaseComponent() {
22347
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
22348
+ _this.buttonType = AppPopupButtonType;
22349
+ _this.autoClose = false;
22350
+ _this.useModel = true;
22351
+ _this.close = new i0.EventEmitter();
22352
+ _this.shouldRollbackOnClose = true;
22353
+ return _this;
22354
+ }
22355
+ DialogTransactionHeaderBaseComponent.prototype.onClose = function (eventType, output) {
22356
+ return;
22357
+ };
22358
+ DialogTransactionHeaderBaseComponent.prototype.handleValueChange = function (value) {
22359
+ this.value = value;
22360
+ };
22361
+ DialogTransactionHeaderBaseComponent.prototype.handleOkClick = function () {
22362
+ this.onClose(AppPopupButtonType.Ok, this.value);
22363
+ };
22364
+ DialogTransactionHeaderBaseComponent.prototype.handleSearch = function (text) {
22365
+ this.searchText = text;
22366
+ };
22367
+ DialogTransactionHeaderBaseComponent.prototype.handleCloseDialog = function (event, type) {
22368
+ if (event) {
22369
+ event.preventDefault();
22370
+ event.stopPropagation();
22371
+ }
22372
+ this.handleClose(type);
22373
+ };
22374
+ DialogTransactionHeaderBaseComponent.prototype.handleClose = function (type) {
22375
+ if (type === AppPopupButtonType.Cancel && this.shouldRollbackOnClose) {
22376
+ this.rollback();
22377
+ }
22378
+ this.close.emit();
22379
+ this.onClose(type);
22380
+ this.detectChanges();
22381
+ };
22382
+ return DialogTransactionHeaderBaseComponent;
22383
+ }(TransactionHeaderBaseComponent));
22384
+ DialogTransactionHeaderBaseComponent.decorators = [
22385
+ { type: i0.Directive }
22386
+ ];
22387
+ DialogTransactionHeaderBaseComponent.propDecorators = {
22388
+ autoClose: [{ type: i0.Input }],
22389
+ useModel: [{ type: i0.Input }],
22390
+ close: [{ type: i0.Output }]
22391
+ };
22392
+
22219
22393
  var DialogTransactionHeaderDiscountComponent = /** @class */ (function (_super) {
22220
22394
  __extends(DialogTransactionHeaderDiscountComponent, _super);
22221
22395
  function DialogTransactionHeaderDiscountComponent() {
@@ -25008,6 +25182,7 @@
25008
25182
  _this._subscriptions = [];
25009
25183
  _this.showCheckbox = false;
25010
25184
  _this.checkboxReadonly = false;
25185
+ _this.localAmountSelected = 0;
25011
25186
  return _this;
25012
25187
  }
25013
25188
  TransactionOrderDeliveryLineBaseComponent.prototype.ngOnInit = function () {
@@ -25017,11 +25192,13 @@
25017
25192
  this._subscriptions.push(this.transactionEventService.selectAllSalesOrderLinesForDelivery.subscribe(function (value) {
25018
25193
  if (_this.lineQuantityToDeliver !== 0) {
25019
25194
  _this.transactionLine.selected = value;
25195
+ _this.transactionLine.amountSelected = _this.localAmountSelected;
25020
25196
  _this.transactionEventService.lineSelectedForDelivery.next({ lineUuid: _this.transactionLine.uuid, selected: _this.transactionLine.selected });
25021
25197
  }
25022
25198
  _this.detectChanges();
25023
25199
  }));
25024
25200
  this._checkCheckbox();
25201
+ this._checkAmounts();
25025
25202
  };
25026
25203
  TransactionOrderDeliveryLineBaseComponent.prototype.ngOnDestroy = function () {
25027
25204
  this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
@@ -25036,23 +25213,33 @@
25036
25213
  switch (_a.label) {
25037
25214
  case 0:
25038
25215
  this.transactionLine.selected = checked;
25039
- return [4 /*yield*/, this.updateSelectedQuantity()];
25216
+ if (this.transactionLine.selected) {
25217
+ this.transactionLine.amountSelected = this.localAmountSelected;
25218
+ }
25219
+ else {
25220
+ this.transactionLine.amountSelected = 0;
25221
+ }
25222
+ return [4 /*yield*/, this.updateSelectedQuantity(this.transactionLine.amountSelected)];
25040
25223
  case 1:
25041
25224
  _a.sent();
25225
+ //TODO check if this is truly necessary
25226
+ this._checkAmounts();
25227
+ this.detectChanges();
25042
25228
  return [2 /*return*/];
25043
25229
  }
25044
25230
  });
25045
25231
  });
25046
25232
  };
25047
- TransactionOrderDeliveryLineBaseComponent.prototype.updateSelectedQuantity = function () {
25233
+ TransactionOrderDeliveryLineBaseComponent.prototype.updateSelectedQuantity = function (amount) {
25048
25234
  return __awaiter(this, void 0, void 0, function () {
25049
25235
  var request;
25050
25236
  return __generator(this, function (_a) {
25051
25237
  switch (_a.label) {
25052
25238
  case 0:
25239
+ this.transactionLine.amountSelected = amount;
25053
25240
  request = new changeLineQuantitySelectedLineRequest.ChangeLineQuantitySelectedLineRequest();
25054
25241
  request.lineUuid = this.transactionLine.uuid;
25055
- request.newQuantitySelected = this.transactionLine.selected ? this.transactionLine.amountSelected : 0;
25242
+ request.newQuantitySelected = amount;
25056
25243
  return [4 /*yield*/, this.transactionService.updateQuantitySelectedTransactionLine(this.transactionInfo.uuid, [request], false, false)];
25057
25244
  case 1:
25058
25245
  _a.sent();
@@ -25063,24 +25250,20 @@
25063
25250
  };
25064
25251
  TransactionOrderDeliveryLineBaseComponent.prototype.transactionLineSet = function () {
25065
25252
  _super.prototype.transactionLineSet.call(this);
25066
- if (this.transactionLine.amountSelected === undefined) {
25067
- if (!this.transactionInfo.allowPartialDelivery) {
25068
- this.transactionLine.amountSelected = this.transactionLine.amount;
25069
- }
25070
- else {
25071
- this.transactionLine.amountSelected = 0;
25072
- }
25073
- }
25074
25253
  this._checkCheckbox();
25254
+ this._checkAmounts();
25075
25255
  };
25076
25256
  TransactionOrderDeliveryLineBaseComponent.prototype.transactionInfoSet = function () {
25077
25257
  _super.prototype.transactionInfoSet.call(this);
25078
25258
  this._checkCheckbox();
25259
+ this._checkAmounts();
25079
25260
  };
25080
25261
  TransactionOrderDeliveryLineBaseComponent.prototype._checkCheckbox = function () {
25081
25262
  if (this.transactionInfo && this.transactionLine) {
25082
25263
  if (this.transactionInfo.allowPartialDelivery) {
25083
25264
  this.showCheckbox = this.lineQuantityToDeliver !== 0 && !this.lineIsDelivered;
25265
+ this.checkboxReadonly = !this.showCheckbox;
25266
+ this.selected = ((this.transactionLine.amountSelected !== 0) && (this.transactionLine.amountSelected !== undefined));
25084
25267
  }
25085
25268
  else {
25086
25269
  this.showCheckbox = this.canAllLinesBeDelivered && !this.lineIsDelivered;
@@ -25091,6 +25274,16 @@
25091
25274
  this.detectChanges();
25092
25275
  }
25093
25276
  };
25277
+ TransactionOrderDeliveryLineBaseComponent.prototype._checkAmounts = function () {
25278
+ if (this.transactionInfo && this.transactionLine) {
25279
+ if (this.transactionInfo.allowPartialDelivery) {
25280
+ this.localAmountSelected = this.transactionLine.selected ? this.transactionLine.amountSelected : this.transactionLineService.lineQuantityToDeliver;
25281
+ }
25282
+ else {
25283
+ this.localAmountSelected = this.transactionLineService.lineQuantityToDeliver;
25284
+ }
25285
+ }
25286
+ };
25094
25287
  return TransactionOrderDeliveryLineBaseComponent;
25095
25288
  }(TransactionLineBaseComponent));
25096
25289
  TransactionOrderDeliveryLineBaseComponent.decorators = [
@@ -25129,7 +25322,7 @@
25129
25322
  TransactionOrderDeliveryLineComponent.decorators = [
25130
25323
  { type: i0.Component, args: [{
25131
25324
  selector: "co-transaction-order-delivery-line",
25132
- template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [checkbox]=\"showCheckbox && transactionInfo.transactionDefinitive\"\n [checkboxValue]=\"transactionLine.selected\"\n [checkboxReadonly]=\"checkboxReadonly\"\n (checkboxValueChanged)=\"handleSelectCheckboxClick($event)\"\n >\n <div class=\"transaction-line-wrapper\" [class.transaction-not-definitive]=\"!transactionInfo.transactionDefinitive\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column1\">\n <co-transaction-line-statusbar\n class=\"status-bar-wrapper\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderDeliveryNote\"></co-transaction-line-statusbar>\n </div>\n <div class=\"column2\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'WAREHOUSE'\"></co-transaction-line-label>\n <co-transaction-line-warehouse-button\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [readonly]=\"readonly\"></co-transaction-line-warehouse-button>\n </div>\n </div>\n </div>\n <div class=\"column3\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n ></co-transaction-line-delivery-button>\n </div>\n </div>\n </div>\n <div class=\"column4\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PRICE'\"></co-transaction-line-label>\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DISCOUNT'\"></co-transaction-line-label>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n ></co-transaction-line-discount-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineQuantityToDeliver\"\n [(model)]=\"transactionLine.amountSelected\"\n [decimals]=\"decimals\"\n [min]=\"!transactionInfo.allowPartialDelivery ? transactionLine.amount : 0\"\n [max]=\"transactionLineService?.lineQuantityToDeliver\"\n [readonly]=\"!transactionLine.selected || readonly || !transactionInfo.allowPartialDelivery\"\n (modelChange)=\"updateSelectedQuantity()\"\n >\n </co-input-number-picker>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'TOTAL'\"></co-transaction-line-label>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </co-transaction-base-line>\n ",
25325
+ template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [checkbox]=\"showCheckbox && transactionInfo.transactionDefinitive\"\n [checkboxValue]=\"transactionLine.selected\"\n [checkboxReadonly]=\"checkboxReadonly\"\n (checkboxValueChanged)=\"handleSelectCheckboxClick($event)\"\n >\n <div class=\"transaction-line-wrapper\" [class.transaction-not-definitive]=\"!transactionInfo.transactionDefinitive\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column1\">\n <co-transaction-line-statusbar\n class=\"status-bar-wrapper\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderDeliveryNote\"></co-transaction-line-statusbar>\n </div>\n <div class=\"column2\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'WAREHOUSE'\"></co-transaction-line-label>\n <co-transaction-line-warehouse-button\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [readonly]=\"readonly\"></co-transaction-line-warehouse-button>\n </div>\n </div>\n </div>\n <div class=\"column3\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n ></co-transaction-line-delivery-button>\n </div>\n </div>\n </div>\n <div class=\"column4\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PRICE'\"></co-transaction-line-label>\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DISCOUNT'\"></co-transaction-line-label>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n ></co-transaction-line-discount-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineQuantityToDeliver\"\n [(model)]=\"localAmountSelected\"\n [decimals]=\"decimals\"\n [min]=\"!transactionInfo.allowPartialDelivery ? transactionLine.amount : 0\"\n [max]=\"transactionLineService?.lineQuantityToDeliver\"\n [forceReadonly]=\"(!transactionLine.selected) || transactionLineService?.lineQuantityToDeliver === 0 || readonly || !transactionInfo.allowPartialDelivery\"\n (modelChange)=\"updateSelectedQuantity(localAmountSelected)\"\n >\n </co-input-number-picker>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'TOTAL'\"></co-transaction-line-label>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </co-transaction-base-line>\n ",
25133
25326
  encapsulation: i0.ViewEncapsulation.None,
25134
25327
  changeDetection: i0.ChangeDetectionStrategy.OnPush
25135
25328
  },] }
@@ -25295,10 +25488,11 @@
25295
25488
  });
25296
25489
  };
25297
25490
  TransactionQuickAccessOrderDeliveryComponent.prototype._createRequestLines = function (selectedLines) {
25491
+ var _this = this;
25298
25492
  return selectedLines.map(function (line) {
25299
25493
  var transactionLineReportingRequest = new transactionLineReportingRequest_bo.TransactionLineReportingRequest();
25300
25494
  transactionLineReportingRequest.lineNr = line.lineNr;
25301
- transactionLineReportingRequest.amount = line.amountSelected;
25495
+ transactionLineReportingRequest.amount = _this.transactionInfo.allowPartialDelivery ? line.amountSelected : line.articleLineStatus.quantityToDeliver;
25302
25496
  return transactionLineReportingRequest;
25303
25497
  });
25304
25498
  };
@@ -26792,10 +26986,11 @@
26792
26986
  });
26793
26987
  };
26794
26988
  TransactionQuickAccessInvoiceComponent.prototype._createRequestLines = function (selectedLines) {
26989
+ var _this = this;
26795
26990
  return selectedLines.map(function (line) {
26796
26991
  var transactionLineReportingRequest = new transactionLineReportingRequest_bo.TransactionLineReportingRequest();
26797
26992
  transactionLineReportingRequest.lineNr = line.lineNr;
26798
- transactionLineReportingRequest.amount = line.amountSelected;
26993
+ transactionLineReportingRequest.amount = _this.transactionInfo.allowPartialDelivery ? line.amountSelected : line.articleLineStatus.quantityToInvoice;
26799
26994
  return transactionLineReportingRequest;
26800
26995
  });
26801
26996
  };
@@ -26829,6 +27024,7 @@
26829
27024
  _this._subscriptions = [];
26830
27025
  _this.showCheckbox = false;
26831
27026
  _this.checkboxReadonly = false;
27027
+ _this.localAmountSelected = 0;
26832
27028
  return _this;
26833
27029
  }
26834
27030
  TransactionInvoiceLineBaseComponent.prototype.ngOnInit = function () {
@@ -26843,6 +27039,7 @@
26843
27039
  _this.detectChanges();
26844
27040
  }));
26845
27041
  this._checkCheckbox();
27042
+ this._checkAmounts();
26846
27043
  };
26847
27044
  TransactionInvoiceLineBaseComponent.prototype.ngOnDestroy = function () {
26848
27045
  this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
@@ -26850,12 +27047,8 @@
26850
27047
  };
26851
27048
  TransactionInvoiceLineBaseComponent.prototype.transactionLineSet = function () {
26852
27049
  _super.prototype.transactionLineSet.call(this);
26853
- if (this.transactionLine.articleLineStatus) {
26854
- this.transactionLine.quantityToInvoice = this.lineQuantityToInvoice;
26855
- }
26856
- if (this.transactionLine.amountSelected === undefined) {
26857
- this.transactionLine.amountSelected = 0;
26858
- }
27050
+ this._checkCheckbox();
27051
+ this._checkAmounts();
26859
27052
  };
26860
27053
  TransactionInvoiceLineBaseComponent.prototype.handleSelectCheckboxClick = function (checked) {
26861
27054
  return __awaiter(this, void 0, void 0, function () {
@@ -26863,23 +27056,33 @@
26863
27056
  switch (_a.label) {
26864
27057
  case 0:
26865
27058
  this.transactionLine.selected = checked;
26866
- return [4 /*yield*/, this.updateSelectedQuantity()];
27059
+ if (this.transactionLine.selected) {
27060
+ this.transactionLine.amountSelected = this.localAmountSelected;
27061
+ }
27062
+ else {
27063
+ this.transactionLine.amountSelected = 0;
27064
+ }
27065
+ return [4 /*yield*/, this.updateSelectedQuantity(this.transactionLine.amountSelected)];
26867
27066
  case 1:
26868
27067
  _a.sent();
27068
+ //TODO check if this is truly necessary
27069
+ this._checkAmounts();
27070
+ this.detectChanges();
26869
27071
  return [2 /*return*/];
26870
27072
  }
26871
27073
  });
26872
27074
  });
26873
27075
  };
26874
- TransactionInvoiceLineBaseComponent.prototype.updateSelectedQuantity = function () {
27076
+ TransactionInvoiceLineBaseComponent.prototype.updateSelectedQuantity = function (amount) {
26875
27077
  return __awaiter(this, void 0, void 0, function () {
26876
27078
  var request;
26877
27079
  return __generator(this, function (_a) {
26878
27080
  switch (_a.label) {
26879
27081
  case 0:
27082
+ this.transactionLine.amountSelected = amount;
26880
27083
  request = new changeLineQuantitySelectedLineRequest.ChangeLineQuantitySelectedLineRequest();
26881
27084
  request.lineUuid = this.transactionLine.uuid;
26882
- request.newQuantitySelected = this.transactionLine.selected ? this.transactionLine.amountSelected : 0;
27085
+ request.newQuantitySelected = amount;
26883
27086
  return [4 /*yield*/, this.transactionService.updateQuantitySelectedTransactionLine(this.transactionInfo.uuid, [request], false, false)];
26884
27087
  case 1:
26885
27088
  _a.sent();
@@ -26891,7 +27094,9 @@
26891
27094
  TransactionInvoiceLineBaseComponent.prototype._checkCheckbox = function () {
26892
27095
  if (this.transactionInfo && this.transactionLine) {
26893
27096
  if (this.transactionInfo.allowPartialDelivery) {
26894
- this.showCheckbox = this.lineQuantityToInvoice !== 0 && !this.lineIsInvoiced;
27097
+ this.showCheckbox = (this.lineQuantityToInvoice !== 0 && !this.lineIsInvoiced);
27098
+ this.checkboxReadonly = !this.showCheckbox;
27099
+ this.selected = ((this.transactionLine.amountSelected !== 0) && (this.transactionLine.amountSelected !== undefined));
26895
27100
  }
26896
27101
  else {
26897
27102
  this.showCheckbox = this.canAllLinesBeInvoiced && !this.lineIsInvoiced;
@@ -26902,6 +27107,16 @@
26902
27107
  this.detectChanges();
26903
27108
  }
26904
27109
  };
27110
+ TransactionInvoiceLineBaseComponent.prototype._checkAmounts = function () {
27111
+ if (this.transactionInfo && this.transactionLine) {
27112
+ if (this.transactionInfo.allowPartialDelivery) {
27113
+ this.localAmountSelected = this.transactionLine.selected ? this.transactionLine.amountSelected : this.transactionLineService.lineQuantityToInvoice;
27114
+ }
27115
+ else {
27116
+ this.localAmountSelected = this.transactionLineService.lineQuantityToInvoice;
27117
+ }
27118
+ }
27119
+ };
26905
27120
  return TransactionInvoiceLineBaseComponent;
26906
27121
  }(TransactionLineBaseComponent));
26907
27122
  TransactionInvoiceLineBaseComponent.decorators = [
@@ -26940,7 +27155,7 @@
26940
27155
  TransactionInvoiceLineComponent.decorators = [
26941
27156
  { type: i0.Component, args: [{
26942
27157
  selector: "co-transaction-invoice-line",
26943
- template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [checkbox]=\"showCheckbox && transactionInfo.transactionDefinitive\"\n [checkboxValue]=\"transactionLine.selected\"\n [checkboxReadonly]=\"checkboxReadonly\"\n (checkboxValueChanged)=\"handleSelectCheckboxClick($event)\"\n >\n <div class=\"transaction-line-wrapper\" [class.transaction-not-definitive]=\"!transactionInfo.transactionDefinitive\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column1\">\n <co-transaction-line-statusbar\n class=\"status-bar-wrapper\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderInvoice\"></co-transaction-line-statusbar>\n </div>\n <div class=\"column2\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'WAREHOUSE'\"></co-transaction-line-label>\n <co-transaction-line-warehouse-button\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [readonly]=\"readonly\"></co-transaction-line-warehouse-button>\n </div>\n </div>\n </div>\n <div class=\"column3\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n ></co-transaction-line-delivery-button>\n </div>\n </div>\n </div>\n <div class=\"column4\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PRICE'\"></co-transaction-line-label>\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DISCOUNT'\"></co-transaction-line-label>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n ></co-transaction-line-discount-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineQuantityToInvoice\"\n [(model)]=\"transactionLine.amountSelected\"\n [decimals]=\"decimals\"\n [min]=\"1\"\n [max]=\"transactionLineService?.lineQuantityToInvoice\"\n [readonly]=\"!transactionLine.selected || readonly\"\n (modelChange)=\"updateSelectedQuantity()\"\n >\n </co-input-number-picker>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\" *ngIf=\"!lineIsInvoiced\">\n <co-transaction-line-label [insideLabel]=\"'TOTAL'\"></co-transaction-line-label>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </co-transaction-base-line>\n ",
27158
+ template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [checkbox]=\"showCheckbox && transactionInfo.transactionDefinitive\"\n [checkboxValue]=\"transactionLine.selected\"\n [checkboxReadonly]=\"checkboxReadonly\"\n (checkboxValueChanged)=\"handleSelectCheckboxClick($event)\"\n >\n <div class=\"transaction-line-wrapper\" [class.transaction-not-definitive]=\"!transactionInfo.transactionDefinitive\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column1\">\n <co-transaction-line-statusbar\n class=\"status-bar-wrapper\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderInvoice\"></co-transaction-line-statusbar>\n </div>\n <div class=\"column2\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'WAREHOUSE'\"></co-transaction-line-label>\n <co-transaction-line-warehouse-button\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [readonly]=\"readonly\"></co-transaction-line-warehouse-button>\n </div>\n </div>\n </div>\n <div class=\"column3\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n ></co-transaction-line-delivery-button>\n </div>\n </div>\n </div>\n <div class=\"column4\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PRICE'\"></co-transaction-line-label>\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DISCOUNT'\"></co-transaction-line-label>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n ></co-transaction-line-discount-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineQuantityToInvoice\"\n [(model)]=\"localAmountSelected\"\n [decimals]=\"decimals\"\n [min]=\"1\"\n [max]=\"transactionLineService?.lineQuantityToInvoice\"\n [forceReadonly]=\"(!transactionLine.selected) || transactionLineService?.lineQuantityToInvoice === 0 || readonly || !transactionInfo.allowPartialDelivery\"\n (modelChange)=\"updateSelectedQuantity(localAmountSelected)\"\n >\n </co-input-number-picker>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\" *ngIf=\"!lineIsInvoiced\">\n <co-transaction-line-label [insideLabel]=\"'TOTAL'\"></co-transaction-line-label>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </co-transaction-base-line>\n ",
26944
27159
  encapsulation: i0.ViewEncapsulation.None,
26945
27160
  changeDetection: i0.ChangeDetectionStrategy.OnPush
26946
27161
  },] }
@@ -27090,7 +27305,7 @@
27090
27305
  TransactionCardInvoiceComponent.decorators = [
27091
27306
  { type: i0.Component, args: [{
27092
27307
  selector: "co-transaction-card-invoice",
27093
- template: "\n <div class=\"transaction-card-wrapper\">\n <co-transaction-card-header\n [showActionButtons]=\"true\"\n [showCheckbox]=\"showCheckbox && transactionInfo.transactionDefinitive\"\n [showThumbnail]=\"false\"\n [expanded]=\"expanded\"\n (checkboxValueChanged)=\"handleSelectCheckboxClick($event)\"\n (expandClicked)=\"expanded = !expanded\">\n <div class=\"transaction-line-totals-amount card-button\" *ngIf=\"lineQuantityToInvoice !== 0\">\n <co-input-number-picker class=\"amount-number-picker\"\n [(model)]=\"transactionLine.amountSelected\"\n [decimals]=\"decimals\"\n [min]=\"1\"\n [max]=\"transactionLine.amount\"\n [readonly]=\"readonly\"\n (modelChange)=\"updateSelectedQuantity()\">\n </co-input-number-picker>\n </div>\n </co-transaction-card-header>\n <div class=\"transaction-card-content-wrapper\">\n <div class=\"content-base top-base\">\n <div class=\"transaction-field-wrapper status-bar\">\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderDeliveryNote\"></co-transaction-line-statusbar>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'WAREHOUSE'\"></co-transaction-line-label>\n <co-transaction-line-warehouse-button></co-transaction-line-warehouse-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button></co-transaction-line-delivery-button>\n </div>\n </div>\n </div>\n <div class=\"content-base bottom-base\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PRICE'\"></co-transaction-line-label>\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DISCOUNT'\"></co-transaction-line-label>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n ></co-transaction-line-discount-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-transaction-line-amount class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n ></co-transaction-line-amount>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'TOTAL'\"></co-transaction-line-label>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n <div class=\"content-expanded\" *ngIf=\"expanded\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n ></co-transaction-line-delivery-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_DATE'\"></co-transaction-line-label>\n <co-transaction-line-delivery-date-button></co-transaction-line-delivery-date-button>\n </div>\n </div>\n </div>\n </div>\n\n <co-transaction-card-footer\n [transactionTypeCategory]=\"category.SalesOrderInvoice\"\n [expanded]=\"expanded\"\n ></co-transaction-card-footer>\n </div>\n ",
27308
+ template: "\n <div class=\"transaction-card-wrapper\">\n <co-transaction-card-header\n [showActionButtons]=\"true\"\n [showCheckbox]=\"showCheckbox && transactionInfo.transactionDefinitive\"\n [showThumbnail]=\"false\"\n [expanded]=\"expanded\"\n (checkboxValueChanged)=\"handleSelectCheckboxClick($event)\"\n (expandClicked)=\"expanded = !expanded\">\n <div class=\"transaction-line-totals-amount card-button\" *ngIf=\"lineQuantityToInvoice !== 0\">\n <co-input-number-picker class=\"amount-number-picker\"\n [(model)]=\"transactionLine.amountSelected\"\n [decimals]=\"decimals\"\n [min]=\"1\"\n [max]=\"transactionLine.amount\"\n [readonly]=\"readonly\"\n (modelChange)=\"updateSelectedQuantity(transactionLine.amountSelected)\">\n </co-input-number-picker>\n </div>\n </co-transaction-card-header>\n <div class=\"transaction-card-content-wrapper\">\n <div class=\"content-base top-base\">\n <div class=\"transaction-field-wrapper status-bar\">\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [activeCategory]=\"category.SalesOrderDeliveryNote\"></co-transaction-line-statusbar>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'WAREHOUSE'\"></co-transaction-line-label>\n <co-transaction-line-warehouse-button></co-transaction-line-warehouse-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button></co-transaction-line-delivery-button>\n </div>\n </div>\n </div>\n <div class=\"content-base bottom-base\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'PRICE'\"></co-transaction-line-label>\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DISCOUNT'\"></co-transaction-line-label>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n ></co-transaction-line-discount-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'QUANTITY'\"></co-transaction-line-label>\n <co-transaction-line-amount class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n ></co-transaction-line-amount>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'TOTAL'\"></co-transaction-line-label>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n <div class=\"content-expanded\" *ngIf=\"expanded\">\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_METHOD'\"></co-transaction-line-label>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n ></co-transaction-line-delivery-button>\n </div>\n </div>\n <div class=\"transaction-field-wrapper\">\n <div class=\"inside-field\">\n <co-transaction-line-label [insideLabel]=\"'DELIVERY_DATE'\"></co-transaction-line-label>\n <co-transaction-line-delivery-date-button></co-transaction-line-delivery-date-button>\n </div>\n </div>\n </div>\n </div>\n\n <co-transaction-card-footer\n [transactionTypeCategory]=\"category.SalesOrderInvoice\"\n [expanded]=\"expanded\"\n ></co-transaction-card-footer>\n </div>\n ",
27094
27309
  encapsulation: i0.ViewEncapsulation.None
27095
27310
  },] }
27096
27311
  ];
@@ -28180,7 +28395,7 @@
28180
28395
  TransactionQuickAccessSalesQuotationComponent.decorators = [
28181
28396
  { type: i0.Component, args: [{
28182
28397
  selector: "co-transaction-quick-access-sales-quotation",
28183
- template: "\n <div class=\"quick-access-content-wrapper\">\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"showSendMethodDialog = true\"\n ></co-quick-send-button>\n <co-transaction-send-documents\n [historicReports]=\"historicReports\"\n [transactionTypeCategory]=\"transactionTypeCategory.SalesOrderQuotation\"\n ></co-transaction-send-documents>\n <co-transaction-button\n [label]=\"'SALES_ORDER' | localize\"\n [iconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n (click)=\"createSalesOrder()\"\n class=\"sales-quote-btn custom-width\"\n ></co-transaction-button>\n <co-transaction-navigation-button-list\n [refTransactions]=\"getCurrentRefTransactions()\"\n [showRelationButton]=\"false\"\n [emptyLabel]=\"'NO_SALES_QUOTE_ORDER' | localize\"\n (transactionClick)=\"handleSalesOrderNavigation($event)\"\n ></co-transaction-navigation-button-list>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'Verzendmethode'\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email, sendMethodType.Pdf]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [isDocSignEnabled]=\"true\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n ></co-send-method-dialog>\n </div>\n <co-digital-signature\n [documentId]=\"signatureDocumentId\"\n (documentStored)=\"commitAndRefreshTransaction()\"\n ></co-digital-signature>\n ",
28398
+ template: "\n <div class=\"quick-access-content-wrapper\">\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"showSendMethodDialog = true\"\n ></co-quick-send-button>\n <co-transaction-send-documents\n [historicReports]=\"historicReports\"\n [transactionTypeCategory]=\"transactionTypeCategory.SalesOrderQuotation\"\n ></co-transaction-send-documents>\n <co-transaction-button class=\"sales-quote-btn custom-width\"\n [label]=\"'SALES_ORDER' | localize\"\n [iconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n (click)=\"createSalesOrder()\"\n ></co-transaction-button>\n <co-transaction-navigation-button-list\n [refTransactions]=\"getCurrentRefTransactions()\"\n [showRelationButton]=\"false\"\n [emptyLabel]=\"'NO_SALES_QUOTE_ORDER' | localize\"\n (transactionClick)=\"handleSalesOrderNavigation($event)\"\n ></co-transaction-navigation-button-list>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'Verzendmethode'\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email, sendMethodType.Pdf]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [isDocSignEnabled]=\"true\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n ></co-send-method-dialog>\n </div>\n <co-digital-signature\n [documentId]=\"signatureDocumentId\"\n (documentStored)=\"commitAndRefreshTransaction()\"\n ></co-digital-signature>\n ",
28184
28399
  encapsulation: i0.ViewEncapsulation.None
28185
28400
  },] }
28186
28401
  ];
@@ -29258,8 +29473,42 @@
29258
29473
  }
29259
29474
  };
29260
29475
  TransactionPlanningLineComponent.prototype.dragStarted = function (ev) {
29476
+ var _a, _b, _c;
29261
29477
  this._deliveryPlanningService.currentTransId = this.transactionInfo.id;
29262
- ev.dataTransfer.setData('text', 'lines');
29478
+ ev.target.classList.add('dragging');
29479
+ var lineElement = ev.target.closest('co-transaction-base-line');
29480
+ if (!lineElement)
29481
+ return;
29482
+ var dragBox = (_a = lineElement.querySelector('.co-transaction-line-image-and-description')) === null || _a === void 0 ? void 0 : _a.cloneNode(true);
29483
+ var dragImage = document.createElement('div');
29484
+ dragImage.style.display = 'flex';
29485
+ dragImage.style.flexDirection = 'row';
29486
+ dragImage.style.alignItems = 'center';
29487
+ dragImage.style.justifyContent = 'space-around';
29488
+ dragImage.style.width = '250px';
29489
+ dragImage.style.minHeight = '50px';
29490
+ dragImage.style.padding = '10px';
29491
+ dragImage.style.backgroundColor = '#ffffff';
29492
+ dragImage.style.border = '1px solid #ccc';
29493
+ dragImage.style.boxShadow = '0 4px 6px rgba(0, 0, 0, 0.1)';
29494
+ dragImage.style.borderRadius = '5px';
29495
+ dragImage.style.fontSize = '12px';
29496
+ if (dragBox) {
29497
+ dragBox.style.flex = '1';
29498
+ dragImage.appendChild(dragBox);
29499
+ }
29500
+ document.body.appendChild(dragImage);
29501
+ dragImage.style.position = 'absolute';
29502
+ dragImage.style.top = '-1000px';
29503
+ dragImage.style.left = '-1000px';
29504
+ // Set the custom drag image
29505
+ (_b = ev.dataTransfer) === null || _b === void 0 ? void 0 : _b.setDragImage(dragImage, 50, 25);
29506
+ // Cleanup: Remove the drag image after it's set
29507
+ setTimeout(function () { return document.body.removeChild(dragImage); }, 0);
29508
+ (_c = ev.dataTransfer) === null || _c === void 0 ? void 0 : _c.setData('text', 'lines');
29509
+ };
29510
+ TransactionPlanningLineComponent.prototype.dragEnded = function (ev) {
29511
+ ev.target.classList.remove('dragging');
29263
29512
  };
29264
29513
  Object.defineProperty(TransactionPlanningLineComponent.prototype, "linePlanned", {
29265
29514
  get: function () {
@@ -29299,7 +29548,8 @@
29299
29548
  descriptionDblClick: [{ type: i0.Output }],
29300
29549
  showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-planning-line',] }],
29301
29550
  handleMouseOver: [{ type: i0.HostListener, args: ['mouseover', ['$event'],] }],
29302
- handleMouseLeave: [{ type: i0.HostListener, args: ['mouseleave', ['$event'],] }]
29551
+ handleMouseLeave: [{ type: i0.HostListener, args: ['mouseleave', ['$event'],] }],
29552
+ dragEnded: [{ type: i0.HostListener, args: ['dragend', ['$event'],] }]
29303
29553
  };
29304
29554
 
29305
29555
  var TransactionQuickAccessPlanningComponent = /** @class */ (function (_super) {
@@ -29870,7 +30120,7 @@
29870
30120
  // {title: 'DELIVERY_NOTE', icon: Icon.MemoCircleCheckRegular, category: TransactionTypeCategory.SalesOrderDeliveryNote, component: TransactionSalesDeliveryButtonBarButtonComponent, cfgName: this.cfgNames.RubricDelivery},
29871
30121
  //]],
29872
30122
  [transactionKind_enum.TransactionKind.ServiceOrder, [
29873
- { title: 'SERVICE', icon: Icon.ToolboxRegular, category: TransactionTypeCategory.ServiceOrderService, component: TransactionServiceServiceButtonBarButtonComponent },
30123
+ { title: 'SERVICE', icon: Icon.ScrewdriverWrenchRegular, category: TransactionTypeCategory.ServiceOrderService, component: TransactionServiceServiceButtonBarButtonComponent },
29874
30124
  { title: 'OVERVIEW', icon: Icon.CartShoppingRegular, category: TransactionTypeCategory.ServiceOrderOverview, component: TransactionSalesOverviewButtonBarButtonComponent, cfgName: this.cfgNames.RubricOverview },
29875
30125
  { title: 'PURCHASE', icon: Icon.PalletBoxesSharpRegular, category: TransactionTypeCategory.ServiceOrderPurchase, component: TransactionSalesPurchaseButtonBarButtonComponent, cfgName: this.cfgNames.RubricPurchase },
29876
30126
  { title: 'ALLOCATION', icon: Icon.ShelvesRegular, category: TransactionTypeCategory.ServiceOrderAllocation, component: TransactionSalesAllocationButtonBarButtonComponent, cfgName: this.cfgNames.RubricAllocate },
@@ -39613,13 +39863,8 @@
39613
39863
  this.orderLines = !this.orderLines;
39614
39864
  };
39615
39865
  DeliveryPlanningOverviewTileLineComponent.prototype.showNormalOrderLines = function (event) {
39616
- if (!this.isActive) {
39617
- return;
39618
- }
39619
- else {
39620
- event.stopPropagation();
39621
- this.orderLines = !this.orderLines;
39622
- }
39866
+ event.stopPropagation();
39867
+ this.linesActive = !this.linesActive;
39623
39868
  };
39624
39869
  DeliveryPlanningOverviewTileLineComponent.prototype.getPlannedLines = function (lines) {
39625
39870
  return lines.filter(function (line) { return line.planned === true; });
@@ -39632,7 +39877,7 @@
39632
39877
  DeliveryPlanningOverviewTileLineComponent.decorators = [
39633
39878
  { type: i0.Component, args: [{
39634
39879
  selector: "co-delivery-planning-overview-tile-line",
39635
- template: "\n <div class=\"planning-line-wrapper\" (click)=\"setLinesActive()\" [class.normal-mode]=\"isActive\" [class.active-lines]=\"linesActive || isActive\">\n <div class=\"planning-line-content\" (click)=\"showNormalOrderLines($event)\">\n <div class=\"planning-line-left\">\n <div class=\"planning-line-extend\" (click)=\"showOrderLines($event)\" *ngIf=\"linesActive || orderLines || isActive\">\n <co-icon *ngIf=\"!orderLines\"\n [iconData]=\"iconCacheService.getIcon(icons.ChevronDownRegular)\"></co-icon>\n <co-icon *ngIf=\"orderLines\"\n [iconData]=\"iconCacheService.getIcon(icons.ChevronUpRegular)\"></co-icon>\n </div>\n <div class=\"line-content-left\">\n <div class=\"planning-relation\">\n <span [textContent]=\"order?.relationName\"></span>\n </div>\n <div class=\"planning-address\" *ngIf=\"linesActive || isActive\">\n <span [textContent]=\"order?.shortAddress\"></span>\n </div>\n </div>\n </div>\n <div class=\"planning-line-right\">\n <div class=\"line-content-right\">\n <div class=\"planning-order\">\n <co-icon (click)=\"setLinesActive()\"\n [iconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"></co-icon>\n <a href=\"javascript:void(0)\" [textContent]=\"order?.transactionNr\" (click)=\"handleEditOrderEvent(order)\"></a>\n\n </div>\n <div class=\"planning-time\" *ngIf=\"linesActive || isActive\">\n <span\n [textContent]=\"(order?.startTime | date: 'HH:mm') + ' - ' + (order?.endTime | date: 'HH:mm')\"></span>\n </div>\n </div>\n <div class=\"planning-line-actions\">\n <co-icon *ngIf=\"linesActive || isActive\" (click)=\"handleDeleteOrderClick(order)\"\n [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n <co-icon *ngIf=\"!linesActive\" [class.hidden]=\"isActive\" [iconData]=\"iconCacheService.getIcon(icons.ChevronRightRegular)\"></co-icon>\n </div>\n </div>\n </div>\n <div class=\"order-line-list-wrapper\" *ngIf=\"orderLines\">\n <div class=\"order-lines\" *ngFor=\"let line of getPlannedLines(order?.lines)\">\n <span [textContent]=\"line.articleNumber\"></span>\n <span [textContent]=\"line.description\"></span>\n <co-icon *ngIf=\"linesActive || isActive\" (click)=\"handleDeleteOrderLineClick(order, line)\"\n [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n </div>\n </div>\n </div>\n ",
39880
+ template: "\n <div class=\"planning-line-wrapper\" (click)=\"setLinesActive()\" [class.normal-mode]=\"isActive\" [class.active-lines]=\"linesActive || isActive\">\n <div class=\"planning-line-content\" (click)=\"showNormalOrderLines($event)\">\n <div class=\"planning-line-left\">\n <div class=\"line-content-left\">\n <div class=\"planning-relation\">\n <span [textContent]=\"order?.relationName\"></span>\n </div>\n <div class=\"planning-address\" *ngIf=\"linesActive || isActive\">\n <span [textContent]=\"order?.shortAddress\"></span>\n </div>\n </div>\n </div>\n <div class=\"planning-line-right\">\n <div class=\"line-content-right\">\n <div class=\"planning-order\">\n <co-icon (click)=\"setLinesActive()\"\n [iconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"></co-icon>\n <a href=\"javascript:void(0)\" [textContent]=\"order?.transactionNr\" (click)=\"handleEditOrderEvent(order)\"></a>\n\n </div>\n <div class=\"planning-time\" *ngIf=\"linesActive || isActive\">\n <span\n [textContent]=\"(order?.startTime | date: 'HH:mm') + ' - ' + (order?.endTime | date: 'HH:mm')\"></span>\n </div>\n </div>\n <div class=\"planning-line-actions\">\n <co-icon *ngIf=\"linesActive || isActive\" (click)=\"handleDeleteOrderClick(order)\"\n [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n <co-icon *ngIf=\"!linesActive\" [class.hidden]=\"isActive\" [iconData]=\"iconCacheService.getIcon(icons.ChevronRightRegular)\"></co-icon>\n </div>\n </div>\n </div>\n <div class=\"order-line-list-wrapper\" *ngIf=\"linesActive\">\n <div class=\"order-lines\" *ngFor=\"let line of getPlannedLines(order?.lines)\">\n <span [textContent]=\"line.articleNumber\"></span>\n <span [textContent]=\"line.description\"></span>\n <co-icon *ngIf=\"linesActive || isActive\" (click)=\"handleDeleteOrderLineClick(order, line)\"\n [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n </div>\n </div>\n </div>\n ",
39636
39881
  encapsulation: i0.ViewEncapsulation.None
39637
39882
  },] }
39638
39883
  ];
@@ -53146,8 +53391,77 @@
53146
53391
  showClass: [{ type: i0.HostBinding, args: ['class.co-shopping-cart',] }]
53147
53392
  };
53148
53393
 
53394
+ var LineSelectionService = /** @class */ (function () {
53395
+ function LineSelectionService(_transactionEventService, _transactionService) {
53396
+ var _this = this;
53397
+ this._transactionEventService = _transactionEventService;
53398
+ this._transactionService = _transactionService;
53399
+ this._subs = [];
53400
+ this._selectedLineUuidsForDelivery = [];
53401
+ this._selectedLineUuidsForInvoice = [];
53402
+ this._subs.push(this._transactionEventService.lineSelectedForDelivery.subscribe(function (data) {
53403
+ if (_this._checkAllLinesSelectedForDelivery(data)) {
53404
+ _this._selectedLineUuidsForDelivery.length = 0;
53405
+ _this._transactionEventService.allLinesSelectedForDelivery.next();
53406
+ }
53407
+ }), this._transactionEventService.lineSelectedForInvoice.subscribe(function (data) {
53408
+ if (_this._checkAllLinesSelectedForInvoice(data)) {
53409
+ _this._selectedLineUuidsForInvoice.length = 0;
53410
+ _this._transactionEventService.allLinesSelectedForInvoice.next();
53411
+ }
53412
+ }));
53413
+ }
53414
+ LineSelectionService.prototype.ngOnDestroy = function () {
53415
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
53416
+ };
53417
+ LineSelectionService.prototype._checkAllLinesSelectedForDelivery = function (data) {
53418
+ var _this = this;
53419
+ if (data && data.lineUuid) {
53420
+ if (!data.selected) {
53421
+ return true;
53422
+ }
53423
+ this._selectedLineUuidsForDelivery.push(data.lineUuid);
53424
+ var transactionLinesForDelivery = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToDeliver !== 0; });
53425
+ if (this._transactionService.currentTransaction.deliveryCostLines) {
53426
+ transactionLinesForDelivery = transactionLinesForDelivery.concat(this._transactionService.currentTransaction.deliveryCostLines);
53427
+ }
53428
+ var notFound = transactionLinesForDelivery.filter(function (l) { return _this._selectedLineUuidsForDelivery.indexOf(l.uuid) < 0; });
53429
+ return notFound.length === 0;
53430
+ }
53431
+ return false;
53432
+ };
53433
+ LineSelectionService.prototype._checkAllLinesSelectedForInvoice = function (data) {
53434
+ var _this = this;
53435
+ if (data && data.lineUuid) {
53436
+ if (!data.selected) {
53437
+ return true;
53438
+ }
53439
+ this._selectedLineUuidsForInvoice.push(data.lineUuid);
53440
+ var transactionLinesForInvoice = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToInvoice !== 0; });
53441
+ if (this._transactionService.currentTransaction.deliveryCostLines) {
53442
+ transactionLinesForInvoice = transactionLinesForInvoice.concat(this._transactionService.currentTransaction.deliveryCostLines);
53443
+ }
53444
+ var notFound = transactionLinesForInvoice.filter(function (l) { return _this._selectedLineUuidsForInvoice.indexOf(l.uuid) < 0; });
53445
+ return notFound.length === 0;
53446
+ }
53447
+ return false;
53448
+ };
53449
+ return LineSelectionService;
53450
+ }());
53451
+ LineSelectionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LineSelectionService_Factory() { return new LineSelectionService(i0__namespace.ɵɵinject(TransactionEventService), i0__namespace.ɵɵinject(TransactionService)); }, token: LineSelectionService, providedIn: "root" });
53452
+ LineSelectionService.decorators = [
53453
+ { type: i0.Injectable, args: [{
53454
+ providedIn: "root"
53455
+ },] }
53456
+ ];
53457
+ LineSelectionService.ctorParameters = function () { return [
53458
+ { type: TransactionEventService },
53459
+ { type: TransactionService }
53460
+ ]; };
53461
+
53149
53462
  var TransactionInternalComponent = /** @class */ (function () {
53150
- function TransactionInternalComponent(iconCacheService, service, transactionEventService, _transactionConnectorService, _transactionEventService, _screenConfigurationService, _dialogService, _purchaseConfirmationService, _deliveryPlanningService, _transactionBaseService, _changeDetector, _transactionHeaderService) {
53463
+ function TransactionInternalComponent(iconCacheService, service, transactionEventService, _transactionConnectorService, _transactionEventService, _screenConfigurationService, _dialogService, _purchaseConfirmationService, _deliveryPlanningService, _transactionBaseService, _changeDetector, _transactionHeaderService, _lineSelection //Do not remove this. While it is not directly used it has its own important subscriptions.
53464
+ ) {
53151
53465
  this.iconCacheService = iconCacheService;
53152
53466
  this.service = service;
53153
53467
  this.transactionEventService = transactionEventService;
@@ -53160,6 +53474,7 @@
53160
53474
  this._transactionBaseService = _transactionBaseService;
53161
53475
  this._changeDetector = _changeDetector;
53162
53476
  this._transactionHeaderService = _transactionHeaderService;
53477
+ this._lineSelection = _lineSelection;
53163
53478
  this.categories = TransactionTypeCategory;
53164
53479
  this.viewModes = corecomponents_v12.ContentViewMode;
53165
53480
  this.icons = Icon;
@@ -53296,7 +53611,21 @@
53296
53611
  // this.service.relation = relation;
53297
53612
  // }
53298
53613
  TransactionInternalComponent.prototype.handleButtonBarButtonClicked = function (button) {
53299
- this.activeCategory = button.category;
53614
+ return __awaiter(this, void 0, void 0, function () {
53615
+ return __generator(this, function (_b) {
53616
+ switch (_b.label) {
53617
+ case 0:
53618
+ if (!(this.activeCategory !== button.category && this.transaction)) return [3 /*break*/, 2];
53619
+ return [4 /*yield*/, this.service.updateQuantitySelectNone(this.transaction.transactionInfo.uuid, false, false)];
53620
+ case 1:
53621
+ _b.sent();
53622
+ _b.label = 2;
53623
+ case 2:
53624
+ this.activeCategory = button.category;
53625
+ return [2 /*return*/];
53626
+ }
53627
+ });
53628
+ });
53300
53629
  };
53301
53630
  TransactionInternalComponent.prototype.handleShowSidePanel = function (line, force) {
53302
53631
  if (force === void 0) { force = false; }
@@ -53578,7 +53907,8 @@
53578
53907
  { type: DeliveryPlanningService },
53579
53908
  { type: TransactionBaseService },
53580
53909
  { type: i0.ChangeDetectorRef },
53581
- { type: TransactionHeaderService }
53910
+ { type: TransactionHeaderService },
53911
+ { type: LineSelectionService }
53582
53912
  ]; };
53583
53913
  TransactionInternalComponent.propDecorators = {
53584
53914
  sidePanelComponents: [{ type: i0.ViewChildren, args: [TransactionLineSidePanelComponent,] }],
@@ -57934,6 +58264,35 @@
57934
58264
  },] }
57935
58265
  ];
57936
58266
 
58267
+ var DialogTransactionHeaderBranchComponent = /** @class */ (function (_super) {
58268
+ __extends(DialogTransactionHeaderBranchComponent, _super);
58269
+ function DialogTransactionHeaderBranchComponent() {
58270
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
58271
+ _this.buttonType = AppPopupButtonType;
58272
+ return _this;
58273
+ }
58274
+ DialogTransactionHeaderBranchComponent.prototype.showClass = function () {
58275
+ return true;
58276
+ };
58277
+ DialogTransactionHeaderBranchComponent.prototype.handleValueChange = function (value) {
58278
+ this.value = value;
58279
+ };
58280
+ DialogTransactionHeaderBranchComponent.prototype.handleOkClick = function () {
58281
+ this.onClose(AppPopupButtonType.Ok, this.value);
58282
+ };
58283
+ return DialogTransactionHeaderBranchComponent;
58284
+ }(DialogTransactionHeaderBaseComponent));
58285
+ DialogTransactionHeaderBranchComponent.decorators = [
58286
+ { type: i0.Component, args: [{
58287
+ selector: "co-dialog-transaction-header-branch",
58288
+ template: "\n <co-dialog [headerTemplate]=\"dialogHeader\" [footerTemplate]=\"footerTemplate\" (closeClick)=\"handleCloseDialog($event, buttonType.Cancel)\">\n <co-transaction-header-branch\n [useModel]=\"useModel\"\n [searchText]=\"searchText\"\n (valueChange)=\"handleValueChange($event)\"\n ></co-transaction-header-branch>\n </co-dialog>\n <ng-template #dialogHeader>\n <co-dialog-header-search [title]=\"'BRANCH'\" (search)=\"handleSearch($event)\"></co-dialog-header-search>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\" *ngIf=\"!useModel\">\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 ",
58289
+ encapsulation: i0.ViewEncapsulation.None
58290
+ },] }
58291
+ ];
58292
+ DialogTransactionHeaderBranchComponent.propDecorators = {
58293
+ showClass: [{ type: i0.HostBinding, args: ["class.co-dialog-transaction-header-branch",] }]
58294
+ };
58295
+
57937
58296
  var DialogTransactionHeaderBranchModule = /** @class */ (function () {
57938
58297
  function DialogTransactionHeaderBranchModule() {
57939
58298
  }
@@ -57958,6 +58317,29 @@
57958
58317
  },] }
57959
58318
  ];
57960
58319
 
58320
+ var DialogBranchModule = /** @class */ (function () {
58321
+ function DialogBranchModule() {
58322
+ }
58323
+ return DialogBranchModule;
58324
+ }());
58325
+ DialogBranchModule.decorators = [
58326
+ { type: i0.NgModule, args: [{
58327
+ imports: [
58328
+ common.CommonModule,
58329
+ corecomponents_v12.CoDialogModule,
58330
+ DialogHeaderSearchModule,
58331
+ corecomponents_v12.ButtonModule,
58332
+ TransactionLineCheckboxModule
58333
+ ],
58334
+ declarations: [
58335
+ DialogBranchComponent
58336
+ ],
58337
+ exports: [
58338
+ DialogBranchComponent
58339
+ ]
58340
+ },] }
58341
+ ];
58342
+
57961
58343
  var TransactionSalesReservationPopupComponent = /** @class */ (function () {
57962
58344
  function TransactionSalesReservationPopupComponent(iconCacheService, salesReservationService, _transactionService, _transactionHeaderService) {
57963
58345
  this.iconCacheService = iconCacheService;
@@ -58044,15 +58426,14 @@
58044
58426
  TransactionButtonModule,
58045
58427
  corecomponents_v12.ScreenConfigurationModule,
58046
58428
  TransactionServiceOverviewModule,
58047
- TransactionLinesSidePanelModule,
58048
58429
  TransactionCardsModule,
58049
58430
  TransactionMarginModule,
58050
58431
  ClickBlockModule,
58051
58432
  DialogTransactionLineWarehouseCcModule,
58052
58433
  DialogTransactionHeaderBranchModule,
58434
+ DialogBranchModule,
58053
58435
  TransactionPurchaseReservationOrderTileModule,
58054
- corecomponents_v12.CoDialogModule,
58055
- corecomponents_v12.ButtonModule,
58436
+ corecomponents_v12.CoDialogModule
58056
58437
  ],
58057
58438
  declarations: [
58058
58439
  TransactionInternalComponent,
@@ -59083,19 +59464,22 @@
59083
59464
  ];
59084
59465
 
59085
59466
  var TransactionCreateWizardComponent = /** @class */ (function () {
59086
- function TransactionCreateWizardComponent(createService, relationService, transactionScreenConfigurationService) {
59467
+ function TransactionCreateWizardComponent(createService, relationService, transactionScreenConfigurationService, _headerService) {
59087
59468
  this.createService = createService;
59088
59469
  this.relationService = relationService;
59089
59470
  this.transactionScreenConfigurationService = transactionScreenConfigurationService;
59471
+ this._headerService = _headerService;
59090
59472
  this.transKind = transactionKind_enum.TransactionKind;
59091
59473
  this.Icon = Icon;
59092
59474
  this.transactionFinished = new i0.EventEmitter();
59093
59475
  //This can be an input once the component is adjusted to work to create more transactions.
59094
59476
  this.transactionType = transactionKind_enum.TransactionKind.ServiceOrder;
59095
59477
  this.noLockOnCustomerSet = false;
59478
+ this.isReady = false;
59096
59479
  this._externallyProvidedTransaction = null;
59097
59480
  //for bundle puroses where an new, non transaction based, service should always start with the customer already set
59098
59481
  this._externallyProvidedCustomer = null;
59482
+ this._subs = [];
59099
59483
  }
59100
59484
  Object.defineProperty(TransactionCreateWizardComponent.prototype, "externallyProvidedTransaction", {
59101
59485
  set: function (transaction) {
@@ -59123,9 +59507,16 @@
59123
59507
  };
59124
59508
  TransactionCreateWizardComponent.prototype.ngOnInit = function () {
59125
59509
  return __awaiter(this, void 0, void 0, function () {
59510
+ var _this = this;
59126
59511
  return __generator(this, function (_a) {
59127
59512
  switch (_a.label) {
59128
- case 0: return [4 /*yield*/, this.createService.prepareAfterSalesSystemParam()];
59513
+ case 0:
59514
+ this._subs.push(this.createService.transactionUpdated.subscribe(function (transaction) {
59515
+ if (transaction) {
59516
+ _this._headerService.transaction = transaction;
59517
+ }
59518
+ }));
59519
+ return [4 /*yield*/, this.createService.prepareAfterSalesSystemParam()];
59129
59520
  case 1:
59130
59521
  _a.sent();
59131
59522
  if (this.createService.afterSalesSystemParam) {
@@ -59137,11 +59528,22 @@
59137
59528
  this.createService.transactionKind = this.transactionType;
59138
59529
  this.createService.createNewRelation();
59139
59530
  this._processExternalSettings();
59531
+ this._headerService.relation = new customerFullObject_bo.CustomerFullObject();
59532
+ this._headerService.createCloneRelation();
59533
+ this.isReady = true;
59140
59534
  return [2 /*return*/];
59141
59535
  }
59142
59536
  });
59143
59537
  });
59144
59538
  };
59539
+ TransactionCreateWizardComponent.prototype.ngOnDestroy = function () {
59540
+ return __awaiter(this, void 0, void 0, function () {
59541
+ return __generator(this, function (_a) {
59542
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
59543
+ return [2 /*return*/];
59544
+ });
59545
+ });
59546
+ };
59145
59547
  TransactionCreateWizardComponent.prototype.handleRelationValidation = function () {
59146
59548
  return __awaiter(this, void 0, void 0, function () {
59147
59549
  var valid, _a;
@@ -59354,15 +59756,16 @@
59354
59756
  TransactionCreateWizardComponent.decorators = [
59355
59757
  { type: i0.Component, args: [{
59356
59758
  selector: "co-transaction-create-wizard",
59357
- template: "\n <co-click-block></co-click-block>\n <co-simple-vertical-stepper [stepButtonLabels]=\"['Volgende', 'Volgende', 'Volgende', 'Volgende', 'Afronden']\"\n #stepper [titleIcon]=\"Icon.ServiceCartRegular\" [title]=\"'CREATE_SERVICE' | localize\" [doNotShowOKOnSteps]=\"[3]\">\n <co-stepper-step #stepRelationSection [index]=\"1\" [label]=\"'PERSONAL_DATA' | localize\" (validateStep)=\"handleRelationValidation()\">\n <co-transaction-header-popup-relation #relationSection [noLockOnCustomerSet]=\"noLockOnCustomerSet\" [forceReadonly]=\"noLockOnCustomerSet\"\n *ngIf=\"stepRelationSection.show\"\n class=\"category-content\"\n [forceReadonly]=\"(createService.currentTransaction.transactionInfo.uuid !== undefined)\"\n [showInvoiceAddress]=\"false\" [showPrivacy]=\"false\" [showMessageForChangeCustomer]=\"true\"\n (changeCustomerRequested)=\"resetWizard()\"\n ></co-transaction-header-popup-relation>\n </co-stepper-step>\n <co-stepper-step #stepTransactionSection [index]=\"2\" [label]=\"'HOW_TO_CREATE_SERVICE' | localize\" (validateStep)=\"handleTransactionValidation()\">\n <co-transaction-header-popup-create-service #transactionSection [relation]=\"createService.relation\" [forceReadonly]=\"(createService.currentTransaction.transactionInfo.uuid !== undefined)\"\n [afterSalesSystem]=\"createService.afterSalesSystemParam\"></co-transaction-header-popup-create-service>\n </co-stepper-step>\n <co-stepper-step #stepWizardSection [index]=\"3\" [label]=\"'SERVICE_WIZARD' | localize\" (validateStep)=\"handleWizardValidation()\">\n <co-transaction-header-popup-service-wizard #wizardSection (wizardFinished)=\"wizardFinished()\" (skipWizard)=\"skipWizard()\"></co-transaction-header-popup-service-wizard>\n </co-stepper-step>\n <co-stepper-step #stepServiceFieldsSection [index]=\"4\" [label]=\"'SERVICE_INFO' | localize\" (validateStep)=\"handleServiceInfoValidation()\">\n <co-transaction-header-popup-service-fields #serviceFieldsSection></co-transaction-header-popup-service-fields>\n </co-stepper-step>\n <co-stepper-step [index]=\"5\" [label]=\"'FINISH' | localize\">\n </co-stepper-step>\n </co-simple-vertical-stepper>\n\n ",
59358
- providers: [TransactionCreateService],
59759
+ template: "\n <co-click-block></co-click-block>\n <ng-container *ngIf=\"isReady\">\n <co-simple-vertical-stepper [stepButtonLabels]=\"['Volgende', 'Volgende', 'Volgende', 'Volgende', 'Afronden']\"\n #stepper [titleIcon]=\"Icon.ServiceCartRegular\" [title]=\"'CREATE_SERVICE' | localize\" [doNotShowOKOnSteps]=\"[3]\">\n <co-stepper-step #stepRelationSection [index]=\"1\" [label]=\"'PERSONAL_DATA' | localize\" (validateStep)=\"handleRelationValidation()\">\n\n <co-transaction-header-popup-relation #relationSection [noLockOnCustomerSet]=\"noLockOnCustomerSet\" [forceReadonly]=\"noLockOnCustomerSet\"\n *ngIf=\"stepRelationSection.show\"\n class=\"category-content\"\n [forceReadonly]=\"(createService.currentTransaction.transactionInfo.uuid !== undefined)\"\n [showInvoiceAddress]=\"false\" [showPrivacy]=\"false\" [showMessageForChangeCustomer]=\"true\"\n (changeCustomerRequested)=\"resetWizard()\"\n ></co-transaction-header-popup-relation>\n </co-stepper-step>\n <co-stepper-step #stepTransactionSection [index]=\"2\" [label]=\"'HOW_TO_CREATE_SERVICE' | localize\" (validateStep)=\"handleTransactionValidation()\">\n <co-transaction-header-popup-create-service #transactionSection [relation]=\"createService.relation\" [forceReadonly]=\"(createService.currentTransaction.transactionInfo.uuid !== undefined)\"\n [afterSalesSystem]=\"createService.afterSalesSystemParam\"></co-transaction-header-popup-create-service>\n </co-stepper-step>\n <co-stepper-step #stepWizardSection [index]=\"3\" [label]=\"'SERVICE_WIZARD' | localize\" (validateStep)=\"handleWizardValidation()\">\n <co-transaction-header-popup-service-wizard #wizardSection (wizardFinished)=\"wizardFinished()\" (skipWizard)=\"skipWizard()\"></co-transaction-header-popup-service-wizard>\n </co-stepper-step>\n <co-stepper-step #stepServiceFieldsSection [index]=\"4\" [label]=\"'SERVICE_INFO' | localize\" (validateStep)=\"handleServiceInfoValidation()\">\n <co-transaction-header-popup-service-fields #serviceFieldsSection></co-transaction-header-popup-service-fields>\n </co-stepper-step>\n <co-stepper-step [index]=\"5\" [label]=\"'FINISH' | localize\">\n </co-stepper-step>\n </co-simple-vertical-stepper>\n </ng-container>\n\n ",
59760
+ providers: [TransactionCreateService, TransactionHeaderService],
59359
59761
  encapsulation: i0.ViewEncapsulation.None
59360
59762
  },] }
59361
59763
  ];
59362
59764
  TransactionCreateWizardComponent.ctorParameters = function () { return [
59363
59765
  { type: TransactionCreateService },
59364
59766
  { type: TransactionRelationService },
59365
- { type: TransactionScreenConfigurationService }
59767
+ { type: TransactionScreenConfigurationService },
59768
+ { type: TransactionHeaderService }
59366
59769
  ]; };
59367
59770
  TransactionCreateWizardComponent.propDecorators = {
59368
59771
  stepper: [{ type: i0.ViewChild, args: ["stepper",] }],
@@ -59605,74 +60008,6 @@
59605
60008
  { type: TransactionSettingsService }
59606
60009
  ]; };
59607
60010
 
59608
- var LineSelectionService = /** @class */ (function () {
59609
- function LineSelectionService(_transactionEventService, _transactionService) {
59610
- var _this = this;
59611
- this._transactionEventService = _transactionEventService;
59612
- this._transactionService = _transactionService;
59613
- this._subs = [];
59614
- this._selectedLineUuidsForDelivery = [];
59615
- this._selectedLineUuidsForInvoice = [];
59616
- this._subs.push(this._transactionEventService.lineSelectedForDelivery.subscribe(function (data) {
59617
- if (_this._checkAllLinesSelectedForDelivery(data)) {
59618
- _this._selectedLineUuidsForDelivery.length = 0;
59619
- _this._transactionEventService.allLinesSelectedForDelivery.next();
59620
- }
59621
- }), this._transactionEventService.lineSelectedForInvoice.subscribe(function (data) {
59622
- if (_this._checkAllLinesSelectedForInvoice(data)) {
59623
- _this._selectedLineUuidsForInvoice.length = 0;
59624
- _this._transactionEventService.allLinesSelectedForInvoice.next();
59625
- }
59626
- }));
59627
- }
59628
- LineSelectionService.prototype.ngOnDestroy = function () {
59629
- this._subs.forEach(function (s) { return s.unsubscribe(); });
59630
- };
59631
- LineSelectionService.prototype._checkAllLinesSelectedForDelivery = function (data) {
59632
- var _this = this;
59633
- if (data && data.lineUuid) {
59634
- if (!data.selected) {
59635
- return true;
59636
- }
59637
- this._selectedLineUuidsForDelivery.push(data.lineUuid);
59638
- var transactionLinesForDelivery = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToDeliver !== 0; });
59639
- if (this._transactionService.currentTransaction.deliveryCostLines) {
59640
- transactionLinesForDelivery = transactionLinesForDelivery.concat(this._transactionService.currentTransaction.deliveryCostLines);
59641
- }
59642
- var notFound = transactionLinesForDelivery.filter(function (l) { return _this._selectedLineUuidsForDelivery.indexOf(l.uuid) < 0; });
59643
- return notFound.length === 0;
59644
- }
59645
- return false;
59646
- };
59647
- LineSelectionService.prototype._checkAllLinesSelectedForInvoice = function (data) {
59648
- var _this = this;
59649
- if (data && data.lineUuid) {
59650
- if (!data.selected) {
59651
- return true;
59652
- }
59653
- this._selectedLineUuidsForInvoice.push(data.lineUuid);
59654
- var transactionLinesForInvoice = this._transactionService.currentTransaction.transactionLines.filter(function (l) { return l.articleLineStatus && l.articleLineStatus.quantityToInvoice !== 0; });
59655
- if (this._transactionService.currentTransaction.deliveryCostLines) {
59656
- transactionLinesForInvoice = transactionLinesForInvoice.concat(this._transactionService.currentTransaction.deliveryCostLines);
59657
- }
59658
- var notFound = transactionLinesForInvoice.filter(function (l) { return _this._selectedLineUuidsForInvoice.indexOf(l.uuid) < 0; });
59659
- return notFound.length === 0;
59660
- }
59661
- return false;
59662
- };
59663
- return LineSelectionService;
59664
- }());
59665
- LineSelectionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LineSelectionService_Factory() { return new LineSelectionService(i0__namespace.ɵɵinject(TransactionEventService), i0__namespace.ɵɵinject(TransactionService)); }, token: LineSelectionService, providedIn: "root" });
59666
- LineSelectionService.decorators = [
59667
- { type: i0.Injectable, args: [{
59668
- providedIn: "root"
59669
- },] }
59670
- ];
59671
- LineSelectionService.ctorParameters = function () { return [
59672
- { type: TransactionEventService },
59673
- { type: TransactionService }
59674
- ]; };
59675
-
59676
60011
  /**
59677
60012
  * Generated bundle index. Do not edit.
59678
60013
  */
@@ -60413,16 +60748,18 @@
60413
60748
  exports["ɵys"] = TransactionLineWarehouseCcInterbranchComponent;
60414
60749
  exports["ɵyt"] = DialogTransactionHeaderBranchModule;
60415
60750
  exports["ɵyu"] = DialogTransactionHeaderBranchComponent;
60416
- exports["ɵyv"] = TransactionInternalComponent;
60417
- exports["ɵyw"] = TransactionSalesReservationPopupComponent;
60418
- exports["ɵyx"] = TransactionCashRegisterOrderReceiptDialogModule;
60419
- exports["ɵyy"] = TransactionCashRegisterOrderReceiptDialogComponent;
60420
- exports["ɵyz"] = SaveCancelButtonsModule;
60751
+ exports["ɵyv"] = DialogBranchModule;
60752
+ exports["ɵyw"] = DialogBranchComponent;
60753
+ exports["ɵyx"] = TransactionInternalComponent;
60754
+ exports["ɵyy"] = TransactionSalesReservationPopupComponent;
60755
+ exports["ɵyz"] = TransactionCashRegisterOrderReceiptDialogModule;
60421
60756
  exports["ɵz"] = CharacteristicAnswerModule;
60422
- exports["ɵza"] = SaveCancelButtonsComponent;
60423
- exports["ɵzb"] = TransactionTagComponent;
60424
- exports["ɵzc"] = SimpleVerticalStepperModule;
60425
- exports["ɵzd"] = SimpleVerticalStepperComponent;
60757
+ exports["ɵza"] = TransactionCashRegisterOrderReceiptDialogComponent;
60758
+ exports["ɵzb"] = SaveCancelButtonsModule;
60759
+ exports["ɵzc"] = SaveCancelButtonsComponent;
60760
+ exports["ɵzd"] = TransactionTagComponent;
60761
+ exports["ɵze"] = SimpleVerticalStepperModule;
60762
+ exports["ɵzf"] = SimpleVerticalStepperComponent;
60426
60763
 
60427
60764
  Object.defineProperty(exports, '__esModule', { value: true });
60428
60765