@colijnit/transaction 256.1.28 → 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.
- package/bundles/colijnit-transaction.umd.js +279 -109
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/core/base/service/transaction-header.service.js +13 -1
- package/esm2015/lib/component/core/base/transaction-base.component.js +1 -5
- package/esm2015/lib/component/core/base/transaction-header-base.component.js +7 -1
- package/esm2015/lib/component/core/base/transaction-line-base.component.js +7 -1
- package/esm2015/lib/component/transaction-card/transaction-card-invoice/transaction-card-invoice.component.js +2 -2
- package/esm2015/lib/component/transaction-create-wizard/transaction-create-wizard.component.js +50 -28
- package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +15 -4
- package/esm2015/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.js +31 -11
- package/esm2015/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line.component.js +4 -4
- package/esm2015/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.js +31 -12
- package/esm2015/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line.component.js +4 -4
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-invoice/transaction-quick-access-invoice.component.js +2 -2
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.component.js +2 -2
- package/esm2015/lib/enum/icon.enum.js +3 -1
- package/esm2015/lib/model/icon-svg.js +3 -1
- package/esm2015/lib/service/transaction-connector-adapter.service.js +19 -1
- package/esm2015/lib/service/transaction-connector.service.js +6 -1
- package/esm2015/lib/service/transaction-mapping.service.js +2 -2
- package/esm2015/lib/service/transaction.service.js +13 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +261 -133
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/core/base/service/transaction-header.service.d.ts +4 -0
- package/lib/component/core/base/transaction-base.component.d.ts +0 -4
- package/lib/component/core/base/transaction-header-base.component.d.ts +2 -0
- package/lib/component/core/base/transaction-line-base.component.d.ts +2 -0
- package/lib/component/transaction-create-wizard/transaction-create-wizard.component.d.ts +8 -3
- package/lib/component/transaction-internal/transaction-internal.component.d.ts +4 -2
- package/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.d.ts +3 -1
- package/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.d.ts +3 -1
- package/lib/component/transaction-service-overview/style/_layout.scss +28 -3
- package/lib/enum/icon.enum.d.ts +2 -0
- package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
- package/lib/service/transaction-connector.service.d.ts +1 -0
- package/lib/service/transaction.service.d.ts +1 -0
- package/package.json +2 -2
|
@@ -281,8 +281,8 @@ class Version {
|
|
|
281
281
|
constructor() {
|
|
282
282
|
this.name = "@colijnit/transaction";
|
|
283
283
|
this.description = "Colijn IT transaction package";
|
|
284
|
-
this.symVer = "256.1.
|
|
285
|
-
this.publishDate = "
|
|
284
|
+
this.symVer = "256.1.29";
|
|
285
|
+
this.publishDate = "18-12-2024 16:12:43";
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -576,6 +576,8 @@ var Icon;
|
|
|
576
576
|
Icon["RegularWarehouseClock"] = "regular_warehouse_clock";
|
|
577
577
|
Icon["Remark"] = "remark";
|
|
578
578
|
Icon["Resize"] = "resize";
|
|
579
|
+
Icon["ScrewdriverWrenchLight"] = "screwdriver_wrench_light";
|
|
580
|
+
Icon["ScrewdriverWrenchRegular"] = "screwdriver_wrench_regular";
|
|
579
581
|
Icon["ServiceCartRegular"] = "service_cart_regular";
|
|
580
582
|
Icon["ShareSolid"] = "share_solid";
|
|
581
583
|
Icon["SharpLightTruckMovingClock"] = "sharp_light_truck_moving_clock";
|
|
@@ -733,6 +735,8 @@ const IconSvg = {
|
|
|
733
735
|
"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>",
|
|
734
736
|
"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>",
|
|
735
737
|
"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>",
|
|
738
|
+
"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>",
|
|
739
|
+
"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>",
|
|
736
740
|
"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>",
|
|
737
741
|
"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>",
|
|
738
742
|
"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>",
|
|
@@ -3291,6 +3295,24 @@ class TransactionConnectorAdapterService {
|
|
|
3291
3295
|
});
|
|
3292
3296
|
});
|
|
3293
3297
|
}
|
|
3298
|
+
changeTransactionLineQuantitySelectNone(uuid) {
|
|
3299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3300
|
+
return new Promise((resolve, reject) => {
|
|
3301
|
+
const request = {
|
|
3302
|
+
transactionUuid: uuid
|
|
3303
|
+
};
|
|
3304
|
+
return this.connector.changeTransactionLineQuantitySelectNone(request).then((result) => {
|
|
3305
|
+
if (result.validationResult && result.validationResult.success) {
|
|
3306
|
+
resolve(this._boFactory.makeWithRawBackendData(TransactionInfoResponse, result.resultObject));
|
|
3307
|
+
}
|
|
3308
|
+
else {
|
|
3309
|
+
this._handleExceptionFromResponse(result);
|
|
3310
|
+
reject(null);
|
|
3311
|
+
}
|
|
3312
|
+
});
|
|
3313
|
+
});
|
|
3314
|
+
});
|
|
3315
|
+
}
|
|
3294
3316
|
changeTransactionLineCommissionCode(uuid, lineUuid, code) {
|
|
3295
3317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3296
3318
|
const request = {
|
|
@@ -6905,6 +6927,11 @@ class TransactionConnectorService {
|
|
|
6905
6927
|
return this._adapterService.changeTransactionLineQuantitySelected(uuid, lines);
|
|
6906
6928
|
});
|
|
6907
6929
|
}
|
|
6930
|
+
changeTransactionLineQuantitySelectNone(uuid) {
|
|
6931
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6932
|
+
return this._adapterService.changeTransactionLineQuantitySelectNone(uuid);
|
|
6933
|
+
});
|
|
6934
|
+
}
|
|
6908
6935
|
resolvePendingLineReason(pendingLineValues) {
|
|
6909
6936
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6910
6937
|
return this._adapterService.resolvePendingLineReason(pendingLineValues);
|
|
@@ -8490,10 +8517,6 @@ class TransactionBaseComponent {
|
|
|
8490
8517
|
this.readonly = false;
|
|
8491
8518
|
this.showLoader = false;
|
|
8492
8519
|
this.relationChange = new EventEmitter();
|
|
8493
|
-
this.canAllLinesBeDelivered = false;
|
|
8494
|
-
this.canAllLinesBeInvoiced = false;
|
|
8495
|
-
this.hasLinesToDeliver = false;
|
|
8496
|
-
this.hasLinesToInvoice = false;
|
|
8497
8520
|
this.decimals = 0;
|
|
8498
8521
|
this.committing = false;
|
|
8499
8522
|
this.headerTooltipMessages = [];
|
|
@@ -8825,6 +8848,10 @@ class TransactionHeaderService {
|
|
|
8825
8848
|
this.isPurchaseOrder = false;
|
|
8826
8849
|
this.reservationMode = false;
|
|
8827
8850
|
this.readonly = false;
|
|
8851
|
+
this.canAllLinesBeDelivered = false;
|
|
8852
|
+
this.canAllLinesBeInvoiced = false;
|
|
8853
|
+
this.hasLinesToDeliver = false;
|
|
8854
|
+
this.hasLinesToInvoice = false;
|
|
8828
8855
|
this.relationSet = new BehaviorSubject(false);
|
|
8829
8856
|
this.transactionSet = new BehaviorSubject(false);
|
|
8830
8857
|
this.transactionInfoSet = new BehaviorSubject(false);
|
|
@@ -8855,6 +8882,14 @@ class TransactionHeaderService {
|
|
|
8855
8882
|
}
|
|
8856
8883
|
if (this._transaction.transactionLines) {
|
|
8857
8884
|
this.transactionLines = this._transaction.transactionLines;
|
|
8885
|
+
this.canAllLinesBeDelivered = this.transactionLines.filter(l => l.articleLineStatus ? (l.articleLineStatus.quantityToDeliver === 0) : false).length === 0;
|
|
8886
|
+
this.canAllLinesBeInvoiced = this.transactionLines.filter(l => l.articleLineStatus ? (l.articleLineStatus.quantityToInvoice === 0) : false).length === 0;
|
|
8887
|
+
this.hasLinesToDeliver = this.transactionInfo.allowPartialDelivery ?
|
|
8888
|
+
this.transactionLines.filter(l => l.articleLineStatus ? l.articleLineStatus.quantityToDeliver !== 0 : false).length > 0 :
|
|
8889
|
+
this.transactionLines.filter(l => l.articleLineStatus ? l.articleLineStatus.quantityToDeliver === 0 : false).length === 0;
|
|
8890
|
+
this.hasLinesToInvoice = this.transactionInfo.allowPartialDelivery ?
|
|
8891
|
+
this.transactionLines.filter(l => l.articleLineStatus ? l.articleLineStatus.quantityToInvoice !== 0 : false).length > 0 :
|
|
8892
|
+
this.transactionLines.filter(l => l.articleLineStatus ? l.articleLineStatus.quantityToInvoice === 0 : false).length === 0;
|
|
8858
8893
|
}
|
|
8859
8894
|
if (this._transaction.deliveryCostLines) {
|
|
8860
8895
|
this.deliveryCostLines = this._transaction.deliveryCostLines;
|
|
@@ -9054,6 +9089,12 @@ class TransactionLineBaseComponent extends TransactionBaseComponent {
|
|
|
9054
9089
|
get lineQuantityInvoiceControl() {
|
|
9055
9090
|
return this.transactionLineService.lineQuantityInvoiceControl;
|
|
9056
9091
|
}
|
|
9092
|
+
get canAllLinesBeDelivered() {
|
|
9093
|
+
return this.transactionHeaderService.canAllLinesBeDelivered;
|
|
9094
|
+
}
|
|
9095
|
+
get canAllLinesBeInvoiced() {
|
|
9096
|
+
return this.transactionHeaderService.canAllLinesBeInvoiced;
|
|
9097
|
+
}
|
|
9057
9098
|
get model() {
|
|
9058
9099
|
return this.transactionLine;
|
|
9059
9100
|
}
|
|
@@ -9521,6 +9562,12 @@ class TransactionHeaderBaseComponent extends TransactionBaseComponent {
|
|
|
9521
9562
|
get model() {
|
|
9522
9563
|
return this.transactionInfo;
|
|
9523
9564
|
}
|
|
9565
|
+
get hasLinesToDeliver() {
|
|
9566
|
+
return this.transactionHeaderService.hasLinesToDeliver;
|
|
9567
|
+
}
|
|
9568
|
+
get hasLinesToInvoice() {
|
|
9569
|
+
return this.transactionHeaderService.hasLinesToInvoice;
|
|
9570
|
+
}
|
|
9524
9571
|
ngOnInit() {
|
|
9525
9572
|
super.ngOnInit();
|
|
9526
9573
|
if (this.transactionInfo && this.transactionInfo.id) {
|
|
@@ -11685,6 +11732,18 @@ class TransactionService extends PendingReasonService {
|
|
|
11685
11732
|
return false;
|
|
11686
11733
|
});
|
|
11687
11734
|
}
|
|
11735
|
+
updateQuantitySelectNone(uuid, saveTransaction = true, rememberTransaction = true) {
|
|
11736
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11737
|
+
const response = yield this.connector.changeTransactionLineQuantitySelectNone(uuid);
|
|
11738
|
+
if (response) {
|
|
11739
|
+
this.transactionDirty = true;
|
|
11740
|
+
yield this.handleLineOperationStatuses(response, saveTransaction, rememberTransaction);
|
|
11741
|
+
this.transactionEventService.quantitySelectedLineChanged.next(true);
|
|
11742
|
+
return true;
|
|
11743
|
+
}
|
|
11744
|
+
return false;
|
|
11745
|
+
});
|
|
11746
|
+
}
|
|
11688
11747
|
updateDeliveryDateTransactionLine(uuid, lineUuid, date) {
|
|
11689
11748
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11690
11749
|
const response = yield this.connector.changeTransactionLineDeliveryDate(uuid, lineUuid, date);
|
|
@@ -19492,6 +19551,7 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19492
19551
|
this._subscriptions = [];
|
|
19493
19552
|
this.showCheckbox = false;
|
|
19494
19553
|
this.checkboxReadonly = false;
|
|
19554
|
+
this.localAmountSelected = 0;
|
|
19495
19555
|
}
|
|
19496
19556
|
ngOnInit() {
|
|
19497
19557
|
super.ngOnInit();
|
|
@@ -19499,11 +19559,13 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19499
19559
|
this._subscriptions.push(this.transactionEventService.selectAllSalesOrderLinesForDelivery.subscribe((value) => {
|
|
19500
19560
|
if (this.lineQuantityToDeliver !== 0) {
|
|
19501
19561
|
this.transactionLine.selected = value;
|
|
19562
|
+
this.transactionLine.amountSelected = this.localAmountSelected;
|
|
19502
19563
|
this.transactionEventService.lineSelectedForDelivery.next({ lineUuid: this.transactionLine.uuid, selected: this.transactionLine.selected });
|
|
19503
19564
|
}
|
|
19504
19565
|
this.detectChanges();
|
|
19505
19566
|
}));
|
|
19506
19567
|
this._checkCheckbox();
|
|
19568
|
+
this._checkAmounts();
|
|
19507
19569
|
}
|
|
19508
19570
|
ngOnDestroy() {
|
|
19509
19571
|
this._subscriptions.forEach(s => s.unsubscribe());
|
|
@@ -19515,37 +19577,43 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19515
19577
|
handleSelectCheckboxClick(checked) {
|
|
19516
19578
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19517
19579
|
this.transactionLine.selected = checked;
|
|
19518
|
-
|
|
19580
|
+
if (this.transactionLine.selected) {
|
|
19581
|
+
this.transactionLine.amountSelected = this.localAmountSelected;
|
|
19582
|
+
}
|
|
19583
|
+
else {
|
|
19584
|
+
this.transactionLine.amountSelected = 0;
|
|
19585
|
+
}
|
|
19586
|
+
yield this.updateSelectedQuantity(this.transactionLine.amountSelected);
|
|
19587
|
+
//TODO check if this is truly necessary
|
|
19588
|
+
this._checkAmounts();
|
|
19589
|
+
this.detectChanges();
|
|
19519
19590
|
});
|
|
19520
19591
|
}
|
|
19521
|
-
updateSelectedQuantity() {
|
|
19592
|
+
updateSelectedQuantity(amount) {
|
|
19522
19593
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19594
|
+
this.transactionLine.amountSelected = amount;
|
|
19523
19595
|
const request = new ChangeLineQuantitySelectedLineRequest();
|
|
19524
19596
|
request.lineUuid = this.transactionLine.uuid;
|
|
19525
|
-
request.newQuantitySelected =
|
|
19597
|
+
request.newQuantitySelected = amount;
|
|
19526
19598
|
yield this.transactionService.updateQuantitySelectedTransactionLine(this.transactionInfo.uuid, [request], false, false);
|
|
19527
19599
|
});
|
|
19528
19600
|
}
|
|
19529
19601
|
transactionLineSet() {
|
|
19530
19602
|
super.transactionLineSet();
|
|
19531
|
-
if (this.transactionLine.amountSelected === undefined) {
|
|
19532
|
-
if (!this.transactionInfo.allowPartialDelivery) {
|
|
19533
|
-
this.transactionLine.amountSelected = this.transactionLine.amount;
|
|
19534
|
-
}
|
|
19535
|
-
else {
|
|
19536
|
-
this.transactionLine.amountSelected = 0;
|
|
19537
|
-
}
|
|
19538
|
-
}
|
|
19539
19603
|
this._checkCheckbox();
|
|
19604
|
+
this._checkAmounts();
|
|
19540
19605
|
}
|
|
19541
19606
|
transactionInfoSet() {
|
|
19542
19607
|
super.transactionInfoSet();
|
|
19543
19608
|
this._checkCheckbox();
|
|
19609
|
+
this._checkAmounts();
|
|
19544
19610
|
}
|
|
19545
19611
|
_checkCheckbox() {
|
|
19546
19612
|
if (this.transactionInfo && this.transactionLine) {
|
|
19547
19613
|
if (this.transactionInfo.allowPartialDelivery) {
|
|
19548
19614
|
this.showCheckbox = this.lineQuantityToDeliver !== 0 && !this.lineIsDelivered;
|
|
19615
|
+
this.checkboxReadonly = !this.showCheckbox;
|
|
19616
|
+
this.selected = ((this.transactionLine.amountSelected !== 0) && (this.transactionLine.amountSelected !== undefined));
|
|
19549
19617
|
}
|
|
19550
19618
|
else {
|
|
19551
19619
|
this.showCheckbox = this.canAllLinesBeDelivered && !this.lineIsDelivered;
|
|
@@ -19556,6 +19624,16 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19556
19624
|
this.detectChanges();
|
|
19557
19625
|
}
|
|
19558
19626
|
}
|
|
19627
|
+
_checkAmounts() {
|
|
19628
|
+
if (this.transactionInfo && this.transactionLine) {
|
|
19629
|
+
if (this.transactionInfo.allowPartialDelivery) {
|
|
19630
|
+
this.localAmountSelected = this.transactionLine.selected ? this.transactionLine.amountSelected : this.transactionLineService.lineQuantityToDeliver;
|
|
19631
|
+
}
|
|
19632
|
+
else {
|
|
19633
|
+
this.localAmountSelected = this.transactionLineService.lineQuantityToDeliver;
|
|
19634
|
+
}
|
|
19635
|
+
}
|
|
19636
|
+
}
|
|
19559
19637
|
}
|
|
19560
19638
|
TransactionOrderDeliveryLineBaseComponent.decorators = [
|
|
19561
19639
|
{ type: Directive }
|
|
@@ -19655,12 +19733,12 @@ TransactionOrderDeliveryLineComponent.decorators = [
|
|
|
19655
19733
|
<co-transaction-line-label [insideLabel]="'QUANTITY'"></co-transaction-line-label>
|
|
19656
19734
|
<co-input-number-picker class="amount-number-picker"
|
|
19657
19735
|
[screenConfigurationObject]="cfgNames.LineQuantityToDeliver"
|
|
19658
|
-
[(model)]="
|
|
19736
|
+
[(model)]="localAmountSelected"
|
|
19659
19737
|
[decimals]="decimals"
|
|
19660
19738
|
[min]="!transactionInfo.allowPartialDelivery ? transactionLine.amount : 0"
|
|
19661
19739
|
[max]="transactionLineService?.lineQuantityToDeliver"
|
|
19662
|
-
[
|
|
19663
|
-
(modelChange)="updateSelectedQuantity()"
|
|
19740
|
+
[forceReadonly]="(!transactionLine.selected) || transactionLineService?.lineQuantityToDeliver === 0 || readonly || !transactionInfo.allowPartialDelivery"
|
|
19741
|
+
(modelChange)="updateSelectedQuantity(localAmountSelected)"
|
|
19664
19742
|
>
|
|
19665
19743
|
</co-input-number-picker>
|
|
19666
19744
|
</div>
|
|
@@ -19830,7 +19908,7 @@ class TransactionQuickAccessOrderDeliveryComponent extends TransactionQuickAcces
|
|
|
19830
19908
|
return selectedLines.map((line) => {
|
|
19831
19909
|
const transactionLineReportingRequest = new TransactionLineReportingRequest();
|
|
19832
19910
|
transactionLineReportingRequest.lineNr = line.lineNr;
|
|
19833
|
-
transactionLineReportingRequest.amount = line.amountSelected;
|
|
19911
|
+
transactionLineReportingRequest.amount = this.transactionInfo.allowPartialDelivery ? line.amountSelected : line.articleLineStatus.quantityToDeliver;
|
|
19834
19912
|
return transactionLineReportingRequest;
|
|
19835
19913
|
});
|
|
19836
19914
|
}
|
|
@@ -22052,7 +22130,7 @@ class TransactionQuickAccessInvoiceComponent extends TransactionQuickAccessSendM
|
|
|
22052
22130
|
return selectedLines.map((line) => {
|
|
22053
22131
|
const transactionLineReportingRequest = new TransactionLineReportingRequest();
|
|
22054
22132
|
transactionLineReportingRequest.lineNr = line.lineNr;
|
|
22055
|
-
transactionLineReportingRequest.amount = line.amountSelected;
|
|
22133
|
+
transactionLineReportingRequest.amount = this.transactionInfo.allowPartialDelivery ? line.amountSelected : line.articleLineStatus.quantityToInvoice;
|
|
22056
22134
|
return transactionLineReportingRequest;
|
|
22057
22135
|
});
|
|
22058
22136
|
}
|
|
@@ -22122,6 +22200,7 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22122
22200
|
this._subscriptions = [];
|
|
22123
22201
|
this.showCheckbox = false;
|
|
22124
22202
|
this.checkboxReadonly = false;
|
|
22203
|
+
this.localAmountSelected = 0;
|
|
22125
22204
|
}
|
|
22126
22205
|
ngOnInit() {
|
|
22127
22206
|
super.ngOnInit();
|
|
@@ -22134,6 +22213,7 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22134
22213
|
this.detectChanges();
|
|
22135
22214
|
}));
|
|
22136
22215
|
this._checkCheckbox();
|
|
22216
|
+
this._checkAmounts();
|
|
22137
22217
|
}
|
|
22138
22218
|
ngOnDestroy() {
|
|
22139
22219
|
this._subscriptions.forEach(s => s.unsubscribe());
|
|
@@ -22141,31 +22221,39 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22141
22221
|
}
|
|
22142
22222
|
transactionLineSet() {
|
|
22143
22223
|
super.transactionLineSet();
|
|
22144
|
-
|
|
22145
|
-
|
|
22146
|
-
}
|
|
22147
|
-
if (this.transactionLine.amountSelected === undefined) {
|
|
22148
|
-
this.transactionLine.amountSelected = 0;
|
|
22149
|
-
}
|
|
22224
|
+
this._checkCheckbox();
|
|
22225
|
+
this._checkAmounts();
|
|
22150
22226
|
}
|
|
22151
22227
|
handleSelectCheckboxClick(checked) {
|
|
22152
22228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22153
22229
|
this.transactionLine.selected = checked;
|
|
22154
|
-
|
|
22230
|
+
if (this.transactionLine.selected) {
|
|
22231
|
+
this.transactionLine.amountSelected = this.localAmountSelected;
|
|
22232
|
+
}
|
|
22233
|
+
else {
|
|
22234
|
+
this.transactionLine.amountSelected = 0;
|
|
22235
|
+
}
|
|
22236
|
+
yield this.updateSelectedQuantity(this.transactionLine.amountSelected);
|
|
22237
|
+
//TODO check if this is truly necessary
|
|
22238
|
+
this._checkAmounts();
|
|
22239
|
+
this.detectChanges();
|
|
22155
22240
|
});
|
|
22156
22241
|
}
|
|
22157
|
-
updateSelectedQuantity() {
|
|
22242
|
+
updateSelectedQuantity(amount) {
|
|
22158
22243
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22244
|
+
this.transactionLine.amountSelected = amount;
|
|
22159
22245
|
const request = new ChangeLineQuantitySelectedLineRequest();
|
|
22160
22246
|
request.lineUuid = this.transactionLine.uuid;
|
|
22161
|
-
request.newQuantitySelected =
|
|
22247
|
+
request.newQuantitySelected = amount;
|
|
22162
22248
|
yield this.transactionService.updateQuantitySelectedTransactionLine(this.transactionInfo.uuid, [request], false, false);
|
|
22163
22249
|
});
|
|
22164
22250
|
}
|
|
22165
22251
|
_checkCheckbox() {
|
|
22166
22252
|
if (this.transactionInfo && this.transactionLine) {
|
|
22167
22253
|
if (this.transactionInfo.allowPartialDelivery) {
|
|
22168
|
-
this.showCheckbox = this.lineQuantityToInvoice !== 0 && !this.lineIsInvoiced;
|
|
22254
|
+
this.showCheckbox = (this.lineQuantityToInvoice !== 0 && !this.lineIsInvoiced);
|
|
22255
|
+
this.checkboxReadonly = !this.showCheckbox;
|
|
22256
|
+
this.selected = ((this.transactionLine.amountSelected !== 0) && (this.transactionLine.amountSelected !== undefined));
|
|
22169
22257
|
}
|
|
22170
22258
|
else {
|
|
22171
22259
|
this.showCheckbox = this.canAllLinesBeInvoiced && !this.lineIsInvoiced;
|
|
@@ -22176,6 +22264,16 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22176
22264
|
this.detectChanges();
|
|
22177
22265
|
}
|
|
22178
22266
|
}
|
|
22267
|
+
_checkAmounts() {
|
|
22268
|
+
if (this.transactionInfo && this.transactionLine) {
|
|
22269
|
+
if (this.transactionInfo.allowPartialDelivery) {
|
|
22270
|
+
this.localAmountSelected = this.transactionLine.selected ? this.transactionLine.amountSelected : this.transactionLineService.lineQuantityToInvoice;
|
|
22271
|
+
}
|
|
22272
|
+
else {
|
|
22273
|
+
this.localAmountSelected = this.transactionLineService.lineQuantityToInvoice;
|
|
22274
|
+
}
|
|
22275
|
+
}
|
|
22276
|
+
}
|
|
22179
22277
|
}
|
|
22180
22278
|
TransactionInvoiceLineBaseComponent.decorators = [
|
|
22181
22279
|
{ type: Directive }
|
|
@@ -22275,12 +22373,12 @@ TransactionInvoiceLineComponent.decorators = [
|
|
|
22275
22373
|
<co-transaction-line-label [insideLabel]="'QUANTITY'"></co-transaction-line-label>
|
|
22276
22374
|
<co-input-number-picker class="amount-number-picker"
|
|
22277
22375
|
[screenConfigurationObject]="cfgNames.LineQuantityToInvoice"
|
|
22278
|
-
[(model)]="
|
|
22376
|
+
[(model)]="localAmountSelected"
|
|
22279
22377
|
[decimals]="decimals"
|
|
22280
22378
|
[min]="1"
|
|
22281
22379
|
[max]="transactionLineService?.lineQuantityToInvoice"
|
|
22282
|
-
[
|
|
22283
|
-
(modelChange)="updateSelectedQuantity()"
|
|
22380
|
+
[forceReadonly]="(!transactionLine.selected) || transactionLineService?.lineQuantityToInvoice === 0 || readonly || !transactionInfo.allowPartialDelivery"
|
|
22381
|
+
(modelChange)="updateSelectedQuantity(localAmountSelected)"
|
|
22284
22382
|
>
|
|
22285
22383
|
</co-input-number-picker>
|
|
22286
22384
|
</div>
|
|
@@ -22552,7 +22650,7 @@ TransactionCardInvoiceComponent.decorators = [
|
|
|
22552
22650
|
[min]="1"
|
|
22553
22651
|
[max]="transactionLine.amount"
|
|
22554
22652
|
[readonly]="readonly"
|
|
22555
|
-
(modelChange)="updateSelectedQuantity()">
|
|
22653
|
+
(modelChange)="updateSelectedQuantity(transactionLine.amountSelected)">
|
|
22556
22654
|
</co-input-number-picker>
|
|
22557
22655
|
</div>
|
|
22558
22656
|
</co-transaction-card-header>
|
|
@@ -26893,7 +26991,7 @@ class TransactionMappingService {
|
|
|
26893
26991
|
// {title: 'DELIVERY_NOTE', icon: Icon.MemoCircleCheckRegular, category: TransactionTypeCategory.SalesOrderDeliveryNote, component: TransactionSalesDeliveryButtonBarButtonComponent, cfgName: this.cfgNames.RubricDelivery},
|
|
26894
26992
|
//]],
|
|
26895
26993
|
[TransactionKind.ServiceOrder, [
|
|
26896
|
-
{ title: 'SERVICE', icon: Icon.
|
|
26994
|
+
{ title: 'SERVICE', icon: Icon.ScrewdriverWrenchRegular, category: TransactionTypeCategory.ServiceOrderService, component: TransactionServiceServiceButtonBarButtonComponent },
|
|
26897
26995
|
{ title: 'OVERVIEW', icon: Icon.CartShoppingRegular, category: TransactionTypeCategory.ServiceOrderOverview, component: TransactionSalesOverviewButtonBarButtonComponent, cfgName: this.cfgNames.RubricOverview },
|
|
26898
26996
|
{ title: 'PURCHASE', icon: Icon.PalletBoxesSharpRegular, category: TransactionTypeCategory.ServiceOrderPurchase, component: TransactionSalesPurchaseButtonBarButtonComponent, cfgName: this.cfgNames.RubricPurchase },
|
|
26899
26997
|
{ title: 'ALLOCATION', icon: Icon.ShelvesRegular, category: TransactionTypeCategory.ServiceOrderAllocation, component: TransactionSalesAllocationButtonBarButtonComponent, cfgName: this.cfgNames.RubricAllocate },
|
|
@@ -52909,8 +53007,73 @@ ShoppingCartComponent.propDecorators = {
|
|
|
52909
53007
|
showClass: [{ type: HostBinding, args: ['class.co-shopping-cart',] }]
|
|
52910
53008
|
};
|
|
52911
53009
|
|
|
53010
|
+
class LineSelectionService {
|
|
53011
|
+
constructor(_transactionEventService, _transactionService) {
|
|
53012
|
+
this._transactionEventService = _transactionEventService;
|
|
53013
|
+
this._transactionService = _transactionService;
|
|
53014
|
+
this._subs = [];
|
|
53015
|
+
this._selectedLineUuidsForDelivery = [];
|
|
53016
|
+
this._selectedLineUuidsForInvoice = [];
|
|
53017
|
+
this._subs.push(this._transactionEventService.lineSelectedForDelivery.subscribe((data) => {
|
|
53018
|
+
if (this._checkAllLinesSelectedForDelivery(data)) {
|
|
53019
|
+
this._selectedLineUuidsForDelivery.length = 0;
|
|
53020
|
+
this._transactionEventService.allLinesSelectedForDelivery.next();
|
|
53021
|
+
}
|
|
53022
|
+
}), this._transactionEventService.lineSelectedForInvoice.subscribe((data) => {
|
|
53023
|
+
if (this._checkAllLinesSelectedForInvoice(data)) {
|
|
53024
|
+
this._selectedLineUuidsForInvoice.length = 0;
|
|
53025
|
+
this._transactionEventService.allLinesSelectedForInvoice.next();
|
|
53026
|
+
}
|
|
53027
|
+
}));
|
|
53028
|
+
}
|
|
53029
|
+
ngOnDestroy() {
|
|
53030
|
+
this._subs.forEach(s => s.unsubscribe());
|
|
53031
|
+
}
|
|
53032
|
+
_checkAllLinesSelectedForDelivery(data) {
|
|
53033
|
+
if (data && data.lineUuid) {
|
|
53034
|
+
if (!data.selected) {
|
|
53035
|
+
return true;
|
|
53036
|
+
}
|
|
53037
|
+
this._selectedLineUuidsForDelivery.push(data.lineUuid);
|
|
53038
|
+
let transactionLinesForDelivery = this._transactionService.currentTransaction.transactionLines.filter(l => l.articleLineStatus && l.articleLineStatus.quantityToDeliver !== 0);
|
|
53039
|
+
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
53040
|
+
transactionLinesForDelivery = transactionLinesForDelivery.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
53041
|
+
}
|
|
53042
|
+
const notFound = transactionLinesForDelivery.filter(l => this._selectedLineUuidsForDelivery.indexOf(l.uuid) < 0);
|
|
53043
|
+
return notFound.length === 0;
|
|
53044
|
+
}
|
|
53045
|
+
return false;
|
|
53046
|
+
}
|
|
53047
|
+
_checkAllLinesSelectedForInvoice(data) {
|
|
53048
|
+
if (data && data.lineUuid) {
|
|
53049
|
+
if (!data.selected) {
|
|
53050
|
+
return true;
|
|
53051
|
+
}
|
|
53052
|
+
this._selectedLineUuidsForInvoice.push(data.lineUuid);
|
|
53053
|
+
let transactionLinesForInvoice = this._transactionService.currentTransaction.transactionLines.filter(l => l.articleLineStatus && l.articleLineStatus.quantityToInvoice !== 0);
|
|
53054
|
+
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
53055
|
+
transactionLinesForInvoice = transactionLinesForInvoice.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
53056
|
+
}
|
|
53057
|
+
const notFound = transactionLinesForInvoice.filter(l => this._selectedLineUuidsForInvoice.indexOf(l.uuid) < 0);
|
|
53058
|
+
return notFound.length === 0;
|
|
53059
|
+
}
|
|
53060
|
+
return false;
|
|
53061
|
+
}
|
|
53062
|
+
}
|
|
53063
|
+
LineSelectionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LineSelectionService_Factory() { return new LineSelectionService(i0.ɵɵinject(TransactionEventService), i0.ɵɵinject(TransactionService)); }, token: LineSelectionService, providedIn: "root" });
|
|
53064
|
+
LineSelectionService.decorators = [
|
|
53065
|
+
{ type: Injectable, args: [{
|
|
53066
|
+
providedIn: "root"
|
|
53067
|
+
},] }
|
|
53068
|
+
];
|
|
53069
|
+
LineSelectionService.ctorParameters = () => [
|
|
53070
|
+
{ type: TransactionEventService },
|
|
53071
|
+
{ type: TransactionService }
|
|
53072
|
+
];
|
|
53073
|
+
|
|
52912
53074
|
class TransactionInternalComponent {
|
|
52913
|
-
constructor(iconCacheService, service, transactionEventService, _transactionConnectorService, _transactionEventService, _screenConfigurationService, _dialogService, _purchaseConfirmationService, _deliveryPlanningService, _transactionBaseService, _changeDetector, _transactionHeaderService
|
|
53075
|
+
constructor(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.
|
|
53076
|
+
) {
|
|
52914
53077
|
this.iconCacheService = iconCacheService;
|
|
52915
53078
|
this.service = service;
|
|
52916
53079
|
this.transactionEventService = transactionEventService;
|
|
@@ -52923,6 +53086,7 @@ class TransactionInternalComponent {
|
|
|
52923
53086
|
this._transactionBaseService = _transactionBaseService;
|
|
52924
53087
|
this._changeDetector = _changeDetector;
|
|
52925
53088
|
this._transactionHeaderService = _transactionHeaderService;
|
|
53089
|
+
this._lineSelection = _lineSelection;
|
|
52926
53090
|
this.categories = TransactionTypeCategory;
|
|
52927
53091
|
this.viewModes = ContentViewMode;
|
|
52928
53092
|
this.icons = Icon;
|
|
@@ -53050,7 +53214,14 @@ class TransactionInternalComponent {
|
|
|
53050
53214
|
// this.service.relation = relation;
|
|
53051
53215
|
// }
|
|
53052
53216
|
handleButtonBarButtonClicked(button) {
|
|
53053
|
-
this
|
|
53217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53218
|
+
//when we switcch categories we need to reset any amounts selected on lines as we are switching to a different instance of said lines.
|
|
53219
|
+
//Amounts that could be selected for delivery may not match those of invoice for examples. So a reset needs to happen.
|
|
53220
|
+
if (this.activeCategory !== button.category && this.transaction) {
|
|
53221
|
+
yield this.service.updateQuantitySelectNone(this.transaction.transactionInfo.uuid, false, false);
|
|
53222
|
+
}
|
|
53223
|
+
this.activeCategory = button.category;
|
|
53224
|
+
});
|
|
53054
53225
|
}
|
|
53055
53226
|
handleShowSidePanel(line, force = false) {
|
|
53056
53227
|
if (line || force) {
|
|
@@ -53417,7 +53588,8 @@ TransactionInternalComponent.ctorParameters = () => [
|
|
|
53417
53588
|
{ type: DeliveryPlanningService },
|
|
53418
53589
|
{ type: TransactionBaseService },
|
|
53419
53590
|
{ type: ChangeDetectorRef },
|
|
53420
|
-
{ type: TransactionHeaderService }
|
|
53591
|
+
{ type: TransactionHeaderService },
|
|
53592
|
+
{ type: LineSelectionService }
|
|
53421
53593
|
];
|
|
53422
53594
|
TransactionInternalComponent.propDecorators = {
|
|
53423
53595
|
sidePanelComponents: [{ type: ViewChildren, args: [TransactionLineSidePanelComponent,] }],
|
|
@@ -59361,19 +59533,22 @@ TransactionCashRegisterDialogModule.decorators = [
|
|
|
59361
59533
|
];
|
|
59362
59534
|
|
|
59363
59535
|
class TransactionCreateWizardComponent {
|
|
59364
|
-
constructor(createService, relationService, transactionScreenConfigurationService) {
|
|
59536
|
+
constructor(createService, relationService, transactionScreenConfigurationService, _headerService) {
|
|
59365
59537
|
this.createService = createService;
|
|
59366
59538
|
this.relationService = relationService;
|
|
59367
59539
|
this.transactionScreenConfigurationService = transactionScreenConfigurationService;
|
|
59540
|
+
this._headerService = _headerService;
|
|
59368
59541
|
this.transKind = TransactionKind;
|
|
59369
59542
|
this.Icon = Icon;
|
|
59370
59543
|
this.transactionFinished = new EventEmitter();
|
|
59371
59544
|
//This can be an input once the component is adjusted to work to create more transactions.
|
|
59372
59545
|
this.transactionType = TransactionKind.ServiceOrder;
|
|
59373
59546
|
this.noLockOnCustomerSet = false;
|
|
59547
|
+
this.isReady = false;
|
|
59374
59548
|
this._externallyProvidedTransaction = null;
|
|
59375
59549
|
//for bundle puroses where an new, non transaction based, service should always start with the customer already set
|
|
59376
59550
|
this._externallyProvidedCustomer = null;
|
|
59551
|
+
this._subs = [];
|
|
59377
59552
|
}
|
|
59378
59553
|
set externallyProvidedTransaction(transaction) {
|
|
59379
59554
|
this._externallyProvidedTransaction = transaction;
|
|
@@ -59389,6 +59564,11 @@ class TransactionCreateWizardComponent {
|
|
|
59389
59564
|
}
|
|
59390
59565
|
ngOnInit() {
|
|
59391
59566
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59567
|
+
this._subs.push(this.createService.transactionUpdated.subscribe((transaction) => {
|
|
59568
|
+
if (transaction) {
|
|
59569
|
+
this._headerService.transaction = transaction;
|
|
59570
|
+
}
|
|
59571
|
+
}));
|
|
59392
59572
|
yield this.createService.prepareAfterSalesSystemParam();
|
|
59393
59573
|
if (this.createService.afterSalesSystemParam) {
|
|
59394
59574
|
this.skipWizard();
|
|
@@ -59397,6 +59577,14 @@ class TransactionCreateWizardComponent {
|
|
|
59397
59577
|
this.createService.transactionKind = this.transactionType;
|
|
59398
59578
|
this.createService.createNewRelation();
|
|
59399
59579
|
this._processExternalSettings();
|
|
59580
|
+
this._headerService.relation = new CustomerFullObject();
|
|
59581
|
+
this._headerService.createCloneRelation();
|
|
59582
|
+
this.isReady = true;
|
|
59583
|
+
});
|
|
59584
|
+
}
|
|
59585
|
+
ngOnDestroy() {
|
|
59586
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59587
|
+
this._subs.forEach(s => s.unsubscribe());
|
|
59400
59588
|
});
|
|
59401
59589
|
}
|
|
59402
59590
|
handleRelationValidation() {
|
|
@@ -59534,40 +59722,44 @@ TransactionCreateWizardComponent.decorators = [
|
|
|
59534
59722
|
selector: "co-transaction-create-wizard",
|
|
59535
59723
|
template: `
|
|
59536
59724
|
<co-click-block></co-click-block>
|
|
59537
|
-
<
|
|
59538
|
-
|
|
59539
|
-
|
|
59540
|
-
<co-
|
|
59541
|
-
|
|
59542
|
-
|
|
59543
|
-
|
|
59544
|
-
|
|
59545
|
-
|
|
59546
|
-
|
|
59547
|
-
|
|
59548
|
-
|
|
59549
|
-
|
|
59550
|
-
|
|
59551
|
-
|
|
59552
|
-
|
|
59553
|
-
|
|
59554
|
-
|
|
59555
|
-
|
|
59556
|
-
|
|
59557
|
-
|
|
59558
|
-
|
|
59559
|
-
|
|
59560
|
-
|
|
59561
|
-
|
|
59562
|
-
|
|
59563
|
-
|
|
59725
|
+
<ng-container *ngIf="isReady">
|
|
59726
|
+
<co-simple-vertical-stepper [stepButtonLabels]="['Volgende', 'Volgende', 'Volgende', 'Volgende', 'Afronden']"
|
|
59727
|
+
#stepper [titleIcon]="Icon.ServiceCartRegular" [title]="'CREATE_SERVICE' | localize" [doNotShowOKOnSteps]="[3]">
|
|
59728
|
+
<co-stepper-step #stepRelationSection [index]="1" [label]="'PERSONAL_DATA' | localize" (validateStep)="handleRelationValidation()">
|
|
59729
|
+
|
|
59730
|
+
<co-transaction-header-popup-relation #relationSection [noLockOnCustomerSet]="noLockOnCustomerSet" [forceReadonly]="noLockOnCustomerSet"
|
|
59731
|
+
*ngIf="stepRelationSection.show"
|
|
59732
|
+
class="category-content"
|
|
59733
|
+
[forceReadonly]="(createService.currentTransaction.transactionInfo.uuid !== undefined)"
|
|
59734
|
+
[showInvoiceAddress]="false" [showPrivacy]="false" [showMessageForChangeCustomer]="true"
|
|
59735
|
+
(changeCustomerRequested)="resetWizard()"
|
|
59736
|
+
></co-transaction-header-popup-relation>
|
|
59737
|
+
</co-stepper-step>
|
|
59738
|
+
<co-stepper-step #stepTransactionSection [index]="2" [label]="'HOW_TO_CREATE_SERVICE' | localize" (validateStep)="handleTransactionValidation()">
|
|
59739
|
+
<co-transaction-header-popup-create-service #transactionSection [relation]="createService.relation" [forceReadonly]="(createService.currentTransaction.transactionInfo.uuid !== undefined)"
|
|
59740
|
+
[afterSalesSystem]="createService.afterSalesSystemParam"></co-transaction-header-popup-create-service>
|
|
59741
|
+
</co-stepper-step>
|
|
59742
|
+
<co-stepper-step #stepWizardSection [index]="3" [label]="'SERVICE_WIZARD' | localize" (validateStep)="handleWizardValidation()">
|
|
59743
|
+
<co-transaction-header-popup-service-wizard #wizardSection (wizardFinished)="wizardFinished()" (skipWizard)="skipWizard()"></co-transaction-header-popup-service-wizard>
|
|
59744
|
+
</co-stepper-step>
|
|
59745
|
+
<co-stepper-step #stepServiceFieldsSection [index]="4" [label]="'SERVICE_INFO' | localize" (validateStep)="handleServiceInfoValidation()">
|
|
59746
|
+
<co-transaction-header-popup-service-fields #serviceFieldsSection></co-transaction-header-popup-service-fields>
|
|
59747
|
+
</co-stepper-step>
|
|
59748
|
+
<co-stepper-step [index]="5" [label]="'FINISH' | localize">
|
|
59749
|
+
</co-stepper-step>
|
|
59750
|
+
</co-simple-vertical-stepper>
|
|
59751
|
+
</ng-container>
|
|
59752
|
+
|
|
59753
|
+
`,
|
|
59754
|
+
providers: [TransactionCreateService, TransactionHeaderService],
|
|
59564
59755
|
encapsulation: ViewEncapsulation.None
|
|
59565
59756
|
},] }
|
|
59566
59757
|
];
|
|
59567
59758
|
TransactionCreateWizardComponent.ctorParameters = () => [
|
|
59568
59759
|
{ type: TransactionCreateService },
|
|
59569
59760
|
{ type: TransactionRelationService },
|
|
59570
|
-
{ type: TransactionScreenConfigurationService }
|
|
59761
|
+
{ type: TransactionScreenConfigurationService },
|
|
59762
|
+
{ type: TransactionHeaderService }
|
|
59571
59763
|
];
|
|
59572
59764
|
TransactionCreateWizardComponent.propDecorators = {
|
|
59573
59765
|
stepper: [{ type: ViewChild, args: ["stepper",] }],
|
|
@@ -59804,70 +59996,6 @@ SharedConnectorService.ctorParameters = () => [
|
|
|
59804
59996
|
{ type: TransactionSettingsService }
|
|
59805
59997
|
];
|
|
59806
59998
|
|
|
59807
|
-
class LineSelectionService {
|
|
59808
|
-
constructor(_transactionEventService, _transactionService) {
|
|
59809
|
-
this._transactionEventService = _transactionEventService;
|
|
59810
|
-
this._transactionService = _transactionService;
|
|
59811
|
-
this._subs = [];
|
|
59812
|
-
this._selectedLineUuidsForDelivery = [];
|
|
59813
|
-
this._selectedLineUuidsForInvoice = [];
|
|
59814
|
-
this._subs.push(this._transactionEventService.lineSelectedForDelivery.subscribe((data) => {
|
|
59815
|
-
if (this._checkAllLinesSelectedForDelivery(data)) {
|
|
59816
|
-
this._selectedLineUuidsForDelivery.length = 0;
|
|
59817
|
-
this._transactionEventService.allLinesSelectedForDelivery.next();
|
|
59818
|
-
}
|
|
59819
|
-
}), this._transactionEventService.lineSelectedForInvoice.subscribe((data) => {
|
|
59820
|
-
if (this._checkAllLinesSelectedForInvoice(data)) {
|
|
59821
|
-
this._selectedLineUuidsForInvoice.length = 0;
|
|
59822
|
-
this._transactionEventService.allLinesSelectedForInvoice.next();
|
|
59823
|
-
}
|
|
59824
|
-
}));
|
|
59825
|
-
}
|
|
59826
|
-
ngOnDestroy() {
|
|
59827
|
-
this._subs.forEach(s => s.unsubscribe());
|
|
59828
|
-
}
|
|
59829
|
-
_checkAllLinesSelectedForDelivery(data) {
|
|
59830
|
-
if (data && data.lineUuid) {
|
|
59831
|
-
if (!data.selected) {
|
|
59832
|
-
return true;
|
|
59833
|
-
}
|
|
59834
|
-
this._selectedLineUuidsForDelivery.push(data.lineUuid);
|
|
59835
|
-
let transactionLinesForDelivery = this._transactionService.currentTransaction.transactionLines.filter(l => l.articleLineStatus && l.articleLineStatus.quantityToDeliver !== 0);
|
|
59836
|
-
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
59837
|
-
transactionLinesForDelivery = transactionLinesForDelivery.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
59838
|
-
}
|
|
59839
|
-
const notFound = transactionLinesForDelivery.filter(l => this._selectedLineUuidsForDelivery.indexOf(l.uuid) < 0);
|
|
59840
|
-
return notFound.length === 0;
|
|
59841
|
-
}
|
|
59842
|
-
return false;
|
|
59843
|
-
}
|
|
59844
|
-
_checkAllLinesSelectedForInvoice(data) {
|
|
59845
|
-
if (data && data.lineUuid) {
|
|
59846
|
-
if (!data.selected) {
|
|
59847
|
-
return true;
|
|
59848
|
-
}
|
|
59849
|
-
this._selectedLineUuidsForInvoice.push(data.lineUuid);
|
|
59850
|
-
let transactionLinesForInvoice = this._transactionService.currentTransaction.transactionLines.filter(l => l.articleLineStatus && l.articleLineStatus.quantityToInvoice !== 0);
|
|
59851
|
-
if (this._transactionService.currentTransaction.deliveryCostLines) {
|
|
59852
|
-
transactionLinesForInvoice = transactionLinesForInvoice.concat(this._transactionService.currentTransaction.deliveryCostLines);
|
|
59853
|
-
}
|
|
59854
|
-
const notFound = transactionLinesForInvoice.filter(l => this._selectedLineUuidsForInvoice.indexOf(l.uuid) < 0);
|
|
59855
|
-
return notFound.length === 0;
|
|
59856
|
-
}
|
|
59857
|
-
return false;
|
|
59858
|
-
}
|
|
59859
|
-
}
|
|
59860
|
-
LineSelectionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LineSelectionService_Factory() { return new LineSelectionService(i0.ɵɵinject(TransactionEventService), i0.ɵɵinject(TransactionService)); }, token: LineSelectionService, providedIn: "root" });
|
|
59861
|
-
LineSelectionService.decorators = [
|
|
59862
|
-
{ type: Injectable, args: [{
|
|
59863
|
-
providedIn: "root"
|
|
59864
|
-
},] }
|
|
59865
|
-
];
|
|
59866
|
-
LineSelectionService.ctorParameters = () => [
|
|
59867
|
-
{ type: TransactionEventService },
|
|
59868
|
-
{ type: TransactionService }
|
|
59869
|
-
];
|
|
59870
|
-
|
|
59871
59999
|
/**
|
|
59872
60000
|
* Generated bundle index. Do not edit.
|
|
59873
60001
|
*/
|