@colijnit/transaction 256.1.37 → 256.1.39
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 +269 -57
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction-256.1.39.tgz +0 -0
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/transaction-button-bar/transaction-button-bar.component.js +35 -26
- package/esm2015/lib/component/transaction-header-fields/transaction-header-remaining-amount.component.js +27 -8
- package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +1 -6
- package/esm2015/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.js +13 -6
- package/esm2015/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.js +13 -6
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-overview/transaction-quick-access-overview.component.js +6 -2
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.js +24 -1
- package/esm2015/lib/enum/transaction-cfg-name.enum.js +3 -1
- package/esm2015/lib/service/transaction-connector-adapter.service.js +13 -1
- package/esm2015/lib/service/transaction-connector.service.js +6 -1
- package/esm2015/lib/service/transaction.service.js +6 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +135 -50
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/transaction-button-bar/transaction-button-bar.component.d.ts +4 -3
- package/lib/component/transaction-header-fields/transaction-header-remaining-amount.component.d.ts +4 -1
- package/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.d.ts +1 -0
- package/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.d.ts +1 -0
- package/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.d.ts +8 -1
- package/lib/enum/transaction-cfg-name.enum.d.ts +3 -1
- 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 +1 -1
|
@@ -3,8 +3,8 @@ export class Version {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
this.name = "@colijnit/transaction";
|
|
5
5
|
this.description = "Colijn IT transaction package";
|
|
6
|
-
this.symVer = "256.1.
|
|
7
|
-
this.publishDate = "
|
|
6
|
+
this.symVer = "256.1.39";
|
|
7
|
+
this.publishDate = "7-1-2025 10:00:50";
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsbUJBQW1CLENBQUM7SUFDM0MsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU2LjEuMzlcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCI3LTEtMjAyNSAxMDowMDo1MFwiO1xufSJdfQ==
|
|
@@ -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.39";
|
|
285
|
+
this.publishDate = "7-1-2025 10:00:50";
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -6583,6 +6583,18 @@ class TransactionConnectorAdapterService {
|
|
|
6583
6583
|
}
|
|
6584
6584
|
}, 500);
|
|
6585
6585
|
}
|
|
6586
|
+
getTermsAndConditionsForm(transId) {
|
|
6587
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6588
|
+
const response = yield this.connector.getTermsAndConditionsForm(transId, true);
|
|
6589
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
6590
|
+
return response.resultObject;
|
|
6591
|
+
}
|
|
6592
|
+
else {
|
|
6593
|
+
this._handleExceptionFromResponse(response);
|
|
6594
|
+
return null;
|
|
6595
|
+
}
|
|
6596
|
+
});
|
|
6597
|
+
}
|
|
6586
6598
|
_openPdfContent(content) {
|
|
6587
6599
|
if (content) {
|
|
6588
6600
|
try {
|
|
@@ -8275,6 +8287,11 @@ class TransactionConnectorService {
|
|
|
8275
8287
|
return this._adapterService.functionCall(this._adapterService.getPlannedLinesForEmployee, [planningId, relationId, date]);
|
|
8276
8288
|
});
|
|
8277
8289
|
}
|
|
8290
|
+
getTermsAndConditionsForm(transId) {
|
|
8291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8292
|
+
return this._adapterService.getTermsAndConditionsForm(transId);
|
|
8293
|
+
});
|
|
8294
|
+
}
|
|
8278
8295
|
}
|
|
8279
8296
|
TransactionConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionConnectorService_Factory() { return new TransactionConnectorService(i0.ɵɵinject(TransactionConnectorAdapterService), i0.ɵɵinject(TransactionSelectSingleCacheService), i0.ɵɵinject(TransactionSelectMultipleCacheService), i0.ɵɵinject(TransactionSelectMultipleParameterizedCacheService), i0.ɵɵinject(TransactionSelectSingleParameterizedCacheService)); }, token: TransactionConnectorService, providedIn: "root" });
|
|
8280
8297
|
TransactionConnectorService.decorators = [
|
|
@@ -8527,6 +8544,8 @@ var TransactionCfgName;
|
|
|
8527
8544
|
TransactionCfgName["HeaderProductDetails"] = "headerProductDetails";
|
|
8528
8545
|
TransactionCfgName["HeaderOrderDetails"] = "headerOrderDetails";
|
|
8529
8546
|
TransactionCfgName["HeaderPurchaseDetails"] = "headerPurchaseDetails";
|
|
8547
|
+
TransactionCfgName["IsDocSignEnabled"] = "isDocSignEnabled";
|
|
8548
|
+
TransactionCfgName["IsAdditionalDocEnabled"] = "isAdditionalDocEnabled";
|
|
8530
8549
|
})(TransactionCfgName || (TransactionCfgName = {}));
|
|
8531
8550
|
|
|
8532
8551
|
class TransactionScreenConfigurationService extends BaseModuleScreenConfigService {
|
|
@@ -13416,6 +13435,11 @@ class TransactionService extends PendingReasonService {
|
|
|
13416
13435
|
return yield this.connector.getSLAProducts();
|
|
13417
13436
|
});
|
|
13418
13437
|
}
|
|
13438
|
+
getTermsAndConditionsForm(transId) {
|
|
13439
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13440
|
+
return yield this.connector.getTermsAndConditionsForm(transId);
|
|
13441
|
+
});
|
|
13442
|
+
}
|
|
13419
13443
|
_handleBeforeRememberCurrentTransaction(transactionInfoResponse) {
|
|
13420
13444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13421
13445
|
this.prepareManualSaveInternalParam();
|
|
@@ -18664,6 +18688,8 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
|
|
|
18664
18688
|
this.showSendMethodDialog = false;
|
|
18665
18689
|
this.sendMethods = sendMethodsWithIcon;
|
|
18666
18690
|
this.historicReports = [];
|
|
18691
|
+
this.additionalFileContents = '';
|
|
18692
|
+
this.additionalFileName = '';
|
|
18667
18693
|
}
|
|
18668
18694
|
ngOnInit() {
|
|
18669
18695
|
super.ngOnInit();
|
|
@@ -18671,6 +18697,11 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
|
|
|
18671
18697
|
this._getDefaultSendMethod();
|
|
18672
18698
|
this._getEmailLayouts();
|
|
18673
18699
|
this._getPrintLayouts();
|
|
18700
|
+
this.isDocSignEnabled = this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsDocSignEnabled).immediatelyVisible();
|
|
18701
|
+
this.isAdditionalDocEnabled = this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsAdditionalDocEnabled).immediatelyVisible();
|
|
18702
|
+
if (this.isAdditionalDocEnabled) {
|
|
18703
|
+
this._getTermsAndConditionsForm();
|
|
18704
|
+
}
|
|
18674
18705
|
}
|
|
18675
18706
|
transactionSet() {
|
|
18676
18707
|
this.reportDocumentEmailRequest.transId = this.transactionInfo.id;
|
|
@@ -18741,6 +18772,16 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
|
|
|
18741
18772
|
commitAndRefreshTransaction() {
|
|
18742
18773
|
this.transactionService.commitAndRefreshTransaction();
|
|
18743
18774
|
}
|
|
18775
|
+
upsertDocument(doc) {
|
|
18776
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18777
|
+
const response = yield this.transactionService.mergeDocumentOnTransaction(this.transactionInfo.id.toString(), doc);
|
|
18778
|
+
if (response) {
|
|
18779
|
+
this.showSendMethodDialog = false;
|
|
18780
|
+
yield this.dialogService.showToast('DATA_SAVED', true);
|
|
18781
|
+
this.dialogService.hideToastAfterMs(2000);
|
|
18782
|
+
}
|
|
18783
|
+
});
|
|
18784
|
+
}
|
|
18744
18785
|
_getPrinters() {
|
|
18745
18786
|
this.transactionService.getPrinters().then((printerList) => {
|
|
18746
18787
|
this.printerList = printerList;
|
|
@@ -18788,6 +18829,12 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
|
|
|
18788
18829
|
}
|
|
18789
18830
|
});
|
|
18790
18831
|
}
|
|
18832
|
+
_getTermsAndConditionsForm() {
|
|
18833
|
+
this.transactionService.getTermsAndConditionsForm(this.transactionInfo.id).then(result => {
|
|
18834
|
+
this.additionalFileContents = result;
|
|
18835
|
+
this.additionalFileName = this.transactionInfo.transactionKind + '_' + this.transactionInfo.transactionNr.toString();
|
|
18836
|
+
});
|
|
18837
|
+
}
|
|
18791
18838
|
}
|
|
18792
18839
|
TransactionQuickAccessSendMethodBaseComponent.decorators = [
|
|
18793
18840
|
{ type: Directive }
|
|
@@ -19195,10 +19242,14 @@ TransactionQuickAccessOverviewComponent.decorators = [
|
|
|
19195
19242
|
[emailAddresses]="emailAddresses"
|
|
19196
19243
|
[emailLayouts]="emailLayouts"
|
|
19197
19244
|
[printLayouts]="printLayouts"
|
|
19198
|
-
[isDocSignEnabled]="
|
|
19245
|
+
[isDocSignEnabled]="isDocSignEnabled"
|
|
19246
|
+
[isAdditionalDocEnabled]="isAdditionalDocEnabled"
|
|
19247
|
+
[additionalFileContents]="additionalFileContents"
|
|
19248
|
+
[additionalFileName]="additionalFileName"
|
|
19199
19249
|
[(reportingDocumentEmailRequest)]="reportDocumentEmailRequest"
|
|
19200
19250
|
[(reportingDocumentPrintRequest)]="reportDocumentPrintRequest"
|
|
19201
19251
|
[(reportingDocumentPdfRequest)]="reportDocumentPdfRequest"
|
|
19252
|
+
(additionalFileChangeEvent)="upsertDocument($event)"
|
|
19202
19253
|
(closeClick)="showSendMethodDialog = false"
|
|
19203
19254
|
(okClick)="handleSendMethodOkClick($event)"
|
|
19204
19255
|
></co-send-method-dialog>
|
|
@@ -19689,6 +19740,7 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19689
19740
|
constructor() {
|
|
19690
19741
|
super(...arguments);
|
|
19691
19742
|
this._subscriptions = [];
|
|
19743
|
+
this._initialized = false;
|
|
19692
19744
|
this.showCheckbox = false;
|
|
19693
19745
|
this.checkboxReadonly = false;
|
|
19694
19746
|
this.localAmountSelected = 0;
|
|
@@ -19704,6 +19756,7 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19704
19756
|
}
|
|
19705
19757
|
this.detectChanges();
|
|
19706
19758
|
}));
|
|
19759
|
+
this._initialized = true;
|
|
19707
19760
|
this._checkCheckbox();
|
|
19708
19761
|
this._checkAmounts();
|
|
19709
19762
|
}
|
|
@@ -19749,7 +19802,7 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19749
19802
|
this._checkAmounts();
|
|
19750
19803
|
}
|
|
19751
19804
|
_checkCheckbox() {
|
|
19752
|
-
if (this.transactionInfo && this.transactionLine) {
|
|
19805
|
+
if (this._initialized && this.transactionInfo && this.transactionLine) {
|
|
19753
19806
|
if (this.transactionInfo.allowPartialDelivery) {
|
|
19754
19807
|
this.showCheckbox = this.lineQuantityToDeliver !== 0 && !this.lineIsDelivered;
|
|
19755
19808
|
this.checkboxReadonly = !this.showCheckbox;
|
|
@@ -19757,15 +19810,20 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionLineBaseCompo
|
|
|
19757
19810
|
}
|
|
19758
19811
|
else {
|
|
19759
19812
|
this.showCheckbox = this.canAllLinesBeDelivered && !this.lineIsDelivered;
|
|
19760
|
-
this.
|
|
19761
|
-
|
|
19762
|
-
|
|
19813
|
+
if (this.showCheckbox) {
|
|
19814
|
+
this.selected = true;
|
|
19815
|
+
this.checkboxReadonly = true;
|
|
19816
|
+
this.transactionEventService.lineSelectedForDelivery.next({
|
|
19817
|
+
lineUuid: this.transactionLine.uuid,
|
|
19818
|
+
selected: this.transactionLine.selected
|
|
19819
|
+
});
|
|
19820
|
+
}
|
|
19763
19821
|
}
|
|
19764
19822
|
this.detectChanges();
|
|
19765
19823
|
}
|
|
19766
19824
|
}
|
|
19767
19825
|
_checkAmounts() {
|
|
19768
|
-
if (this.transactionInfo && this.transactionLine) {
|
|
19826
|
+
if (this._initialized && this.transactionInfo && this.transactionLine) {
|
|
19769
19827
|
if (this.transactionInfo.allowPartialDelivery) {
|
|
19770
19828
|
this.localAmountSelected = this.transactionLine.selected ? this.transactionLine.amountSelected : this.transactionLineService.lineQuantityToDeliver;
|
|
19771
19829
|
}
|
|
@@ -22469,6 +22527,7 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22469
22527
|
super(...arguments);
|
|
22470
22528
|
this.category = TransactionTypeCategory;
|
|
22471
22529
|
this._subscriptions = [];
|
|
22530
|
+
this._initialized = false;
|
|
22472
22531
|
this.showCheckbox = false;
|
|
22473
22532
|
this.checkboxReadonly = false;
|
|
22474
22533
|
this.localAmountSelected = 0;
|
|
@@ -22484,6 +22543,7 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22484
22543
|
}
|
|
22485
22544
|
this.detectChanges();
|
|
22486
22545
|
}));
|
|
22546
|
+
this._initialized = true;
|
|
22487
22547
|
this._checkCheckbox();
|
|
22488
22548
|
this._checkAmounts();
|
|
22489
22549
|
}
|
|
@@ -22521,7 +22581,7 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22521
22581
|
});
|
|
22522
22582
|
}
|
|
22523
22583
|
_checkCheckbox() {
|
|
22524
|
-
if (this.transactionInfo && this.transactionLine) {
|
|
22584
|
+
if (this._initialized && this.transactionInfo && this.transactionLine) {
|
|
22525
22585
|
if (this.transactionInfo.allowPartialDelivery) {
|
|
22526
22586
|
this.showCheckbox = (this.lineQuantityToInvoice !== 0 && !this.lineIsInvoiced);
|
|
22527
22587
|
this.checkboxReadonly = !this.showCheckbox;
|
|
@@ -22529,15 +22589,20 @@ class TransactionInvoiceLineBaseComponent extends TransactionLineBaseComponent {
|
|
|
22529
22589
|
}
|
|
22530
22590
|
else {
|
|
22531
22591
|
this.showCheckbox = this.canAllLinesBeInvoiced && !this.lineIsInvoiced;
|
|
22532
|
-
this.
|
|
22533
|
-
|
|
22534
|
-
|
|
22592
|
+
if (this.showCheckbox) {
|
|
22593
|
+
this.selected = true;
|
|
22594
|
+
this.checkboxReadonly = true;
|
|
22595
|
+
this.transactionEventService.lineSelectedForInvoice.next({
|
|
22596
|
+
lineUuid: this.transactionLine.uuid,
|
|
22597
|
+
selected: this.transactionLine.selected
|
|
22598
|
+
});
|
|
22599
|
+
}
|
|
22535
22600
|
}
|
|
22536
22601
|
this.detectChanges();
|
|
22537
22602
|
}
|
|
22538
22603
|
}
|
|
22539
22604
|
_checkAmounts() {
|
|
22540
|
-
if (this.transactionInfo && this.transactionLine) {
|
|
22605
|
+
if (this._initialized && this.transactionInfo && this.transactionLine) {
|
|
22541
22606
|
if (this.transactionInfo.allowPartialDelivery) {
|
|
22542
22607
|
this.localAmountSelected = this.transactionLine.selected ? this.transactionLine.amountSelected : this.transactionLineService.lineQuantityToInvoice;
|
|
22543
22608
|
}
|
|
@@ -33805,9 +33870,10 @@ TransactionReceivingGoodsHistoryModule.decorators = [
|
|
|
33805
33870
|
];
|
|
33806
33871
|
|
|
33807
33872
|
class TransactionButtonBarComponent {
|
|
33808
|
-
constructor(iconCacheService, transactionService, _transactionService, _mappingService, _changeDetector) {
|
|
33873
|
+
constructor(iconCacheService, transactionService, _transactionHeaderService, _transactionService, _mappingService, _changeDetector) {
|
|
33809
33874
|
this.iconCacheService = iconCacheService;
|
|
33810
33875
|
this.transactionService = transactionService;
|
|
33876
|
+
this._transactionHeaderService = _transactionHeaderService;
|
|
33811
33877
|
this._transactionService = _transactionService;
|
|
33812
33878
|
this._mappingService = _mappingService;
|
|
33813
33879
|
this._changeDetector = _changeDetector;
|
|
@@ -33822,7 +33888,6 @@ class TransactionButtonBarComponent {
|
|
|
33822
33888
|
this.categories = TransactionTypeCategory;
|
|
33823
33889
|
this.icons = Icon;
|
|
33824
33890
|
this.transactionBarDirection = TransactionBarDirection.Vertical;
|
|
33825
|
-
this.TransactionTypeCategory = TransactionTypeCategory;
|
|
33826
33891
|
this.sidePanel = false;
|
|
33827
33892
|
this.direction = TransactionBarDirection.Horizontal;
|
|
33828
33893
|
this.buttonClicked = new EventEmitter();
|
|
@@ -33866,19 +33931,26 @@ class TransactionButtonBarComponent {
|
|
|
33866
33931
|
this._subs.forEach(s => s.unsubscribe());
|
|
33867
33932
|
}
|
|
33868
33933
|
selectCategory(idx) {
|
|
33869
|
-
|
|
33870
|
-
|
|
33871
|
-
|
|
33872
|
-
|
|
33873
|
-
|
|
33874
|
-
|
|
33875
|
-
|
|
33876
|
-
|
|
33877
|
-
|
|
33878
|
-
|
|
33879
|
-
|
|
33880
|
-
|
|
33881
|
-
|
|
33934
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33935
|
+
if (idx > -1) {
|
|
33936
|
+
const buttonRubric = this.buttons[idx].category;
|
|
33937
|
+
this._transactionService.activeRubric = buttonRubric;
|
|
33938
|
+
}
|
|
33939
|
+
else {
|
|
33940
|
+
idx = this.buttons.findIndex(b => b.category === this._transactionService.activeRubric);
|
|
33941
|
+
}
|
|
33942
|
+
this._selectedCategory = this.buttons[Math.max(idx, 0)].category;
|
|
33943
|
+
//when we switch categories we need to reset any amounts selected on lines as we are switching to a different instance of said lines.
|
|
33944
|
+
//Amounts that could be selected for delivery may not match those of invoice for examples. So a reset needs to happen.
|
|
33945
|
+
if ((this._selectedCategory === this.categories.SalesOrderDeliveryNote || this._selectedCategory === this.categories.SalesOrderInvoice) && this._transactionHeaderService.transactionInfo) {
|
|
33946
|
+
yield this._transactionService.updateQuantitySelectNone(this._transactionHeaderService.transactionInfo.uuid, false, true);
|
|
33947
|
+
}
|
|
33948
|
+
this.buttonClicked.next(this.buttons[Math.max(idx, 0)]);
|
|
33949
|
+
if (this._selectedCategory === TransactionTypeCategory.SalesOrderDeliveryNote || this._selectedCategory === TransactionTypeCategory.SalesOrderInvoice) {
|
|
33950
|
+
this.transactionService.remainingAmount = 0;
|
|
33951
|
+
}
|
|
33952
|
+
this._detectChanges();
|
|
33953
|
+
});
|
|
33882
33954
|
}
|
|
33883
33955
|
handleButtonClicked(modifiedButton) {
|
|
33884
33956
|
this.selectedCategory = modifiedButton.category;
|
|
@@ -33899,16 +33971,16 @@ TransactionButtonBarComponent.decorators = [
|
|
|
33899
33971
|
template: `
|
|
33900
33972
|
<div class="button-bar-wrapper" [class.vertical]="direction === transactionBarDirection">
|
|
33901
33973
|
<co-transaction-button-bar-button *ngFor="let button of buttons; let index = index; trackBy: trackButton"
|
|
33902
|
-
|
|
33903
|
-
|
|
33904
|
-
|
|
33905
|
-
|
|
33906
|
-
|
|
33907
|
-
|
|
33908
|
-
|
|
33909
|
-
|
|
33910
|
-
|
|
33911
|
-
|
|
33974
|
+
[screenConfigurationObject]="button.cfgName"
|
|
33975
|
+
[transactionInfoResponse]="transactionInfoResponse"
|
|
33976
|
+
[component]="button.component"
|
|
33977
|
+
[hideButtonLoader]="hideButtonLoader"
|
|
33978
|
+
[class.hide]="direction === transactionBarDirection && button.category !== categories.SalesOrderDeliveryNote"
|
|
33979
|
+
[class.selected]="selectedCategory === button.category"
|
|
33980
|
+
[title]="button.title"
|
|
33981
|
+
[iconName]="button.icon"
|
|
33982
|
+
(buttonClicked)="handleButtonClicked($event)"
|
|
33983
|
+
(click)="selectCategory(index)"
|
|
33912
33984
|
></co-transaction-button-bar-button>
|
|
33913
33985
|
</div>
|
|
33914
33986
|
`,
|
|
@@ -33919,6 +33991,7 @@ TransactionButtonBarComponent.decorators = [
|
|
|
33919
33991
|
TransactionButtonBarComponent.ctorParameters = () => [
|
|
33920
33992
|
{ type: IconCacheService },
|
|
33921
33993
|
{ type: TransactionService },
|
|
33994
|
+
{ type: TransactionHeaderService },
|
|
33922
33995
|
{ type: TransactionService },
|
|
33923
33996
|
{ type: TransactionMappingService },
|
|
33924
33997
|
{ type: ChangeDetectorRef }
|
|
@@ -53385,11 +53458,6 @@ class TransactionInternalComponent {
|
|
|
53385
53458
|
// }
|
|
53386
53459
|
handleButtonBarButtonClicked(button) {
|
|
53387
53460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53388
|
-
//when we switcch categories we need to reset any amounts selected on lines as we are switching to a different instance of said lines.
|
|
53389
|
-
//Amounts that could be selected for delivery may not match those of invoice for examples. So a reset needs to happen.
|
|
53390
|
-
if (this.activeCategory !== button.category && this.transaction) {
|
|
53391
|
-
yield this.service.updateQuantitySelectNone(this.transaction.transactionInfo.uuid, false, false);
|
|
53392
|
-
}
|
|
53393
53461
|
this.activeCategory = button.category;
|
|
53394
53462
|
});
|
|
53395
53463
|
}
|
|
@@ -54387,8 +54455,9 @@ TransactionHeaderPaymentComponent.propDecorators = {
|
|
|
54387
54455
|
};
|
|
54388
54456
|
|
|
54389
54457
|
class TransactionHeaderRemainingAmountComponent {
|
|
54390
|
-
constructor(transactionService, _transactionEventService, _paymentConnectorService) {
|
|
54458
|
+
constructor(transactionService, _transactionHeaderService, _transactionEventService, _paymentConnectorService) {
|
|
54391
54459
|
this.transactionService = transactionService;
|
|
54460
|
+
this._transactionHeaderService = _transactionHeaderService;
|
|
54392
54461
|
this._transactionEventService = _transactionEventService;
|
|
54393
54462
|
this._paymentConnectorService = _paymentConnectorService;
|
|
54394
54463
|
this.remainingAmountChange = new EventEmitter();
|
|
@@ -54398,18 +54467,33 @@ class TransactionHeaderRemainingAmountComponent {
|
|
|
54398
54467
|
ngOnInit() {
|
|
54399
54468
|
this._subs.push(this._transactionEventService.quantitySelectedLineChanged.subscribe((changed) => {
|
|
54400
54469
|
if (changed && !this.transactionService.manualSaveParam) {
|
|
54401
|
-
|
|
54402
|
-
request.transactionUuid = this.transactionUuid;
|
|
54403
|
-
this._paymentConnectorService.calculateAmountToPayWithLineSelection(request).then((data) => {
|
|
54404
|
-
this.transactionService.remainingAmount = data ? data.amountToPay : 0;
|
|
54405
|
-
this.remainingAmountChange.next(data ? data.amountToPay : 0);
|
|
54406
|
-
});
|
|
54470
|
+
this._recalculatePayment();
|
|
54407
54471
|
}
|
|
54472
|
+
}), this._transactionEventService.transactionPaymentDone.subscribe(() => {
|
|
54473
|
+
this._recalculatePayment();
|
|
54408
54474
|
}));
|
|
54409
54475
|
}
|
|
54410
54476
|
ngOnDestroy() {
|
|
54411
54477
|
this._subs.forEach(s => s.unsubscribe());
|
|
54412
54478
|
}
|
|
54479
|
+
_recalculatePayment() {
|
|
54480
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54481
|
+
const request = new CalculateAmountToPayRequest();
|
|
54482
|
+
request.transactionUuid = this.transactionUuid;
|
|
54483
|
+
if (this._transactionHeaderService.transactionInfo.allowPartialDelivery) {
|
|
54484
|
+
this._paymentConnectorService.calculateAmountToPayWithLineSelection(request).then((data) => {
|
|
54485
|
+
this.transactionService.remainingAmount = data ? data.amountToPay : 0;
|
|
54486
|
+
this.remainingAmountChange.next(data ? data.amountToPay : 0);
|
|
54487
|
+
});
|
|
54488
|
+
}
|
|
54489
|
+
else {
|
|
54490
|
+
this._paymentConnectorService.calculateAmountToPay(request).then((data) => {
|
|
54491
|
+
this.transactionService.remainingAmount = data ? data.amountToPay : 0;
|
|
54492
|
+
this.remainingAmountChange.next(data ? data.amountToPay : 0);
|
|
54493
|
+
});
|
|
54494
|
+
}
|
|
54495
|
+
});
|
|
54496
|
+
}
|
|
54413
54497
|
}
|
|
54414
54498
|
TransactionHeaderRemainingAmountComponent.decorators = [
|
|
54415
54499
|
{ type: Component, args: [{
|
|
@@ -54426,6 +54510,7 @@ TransactionHeaderRemainingAmountComponent.decorators = [
|
|
|
54426
54510
|
];
|
|
54427
54511
|
TransactionHeaderRemainingAmountComponent.ctorParameters = () => [
|
|
54428
54512
|
{ type: TransactionService },
|
|
54513
|
+
{ type: TransactionHeaderService },
|
|
54429
54514
|
{ type: TransactionEventService },
|
|
54430
54515
|
{ type: TransactionPaymentConnectorService }
|
|
54431
54516
|
];
|