@colijnit/transaction 256.1.2 → 256.1.4
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 +347 -138
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction-256.1.3.tgz +0 -0
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/avatar/avatar.component.js +15 -2
- package/esm2015/lib/component/checkout/checkout.component.js +17 -1
- package/esm2015/lib/component/core/base/transaction-base.component.js +9 -8
- package/esm2015/lib/component/core/base/transaction-payment-base.component.js +10 -1
- package/esm2015/lib/component/dialog/transaction-line/dialog-transaction-line-warehouse-cc/dialog-direct-sell.component.js +1 -1
- package/esm2015/lib/component/payment/payment.component.js +5 -1
- package/esm2015/lib/component/payment/payment.module.js +4 -3
- package/esm2015/lib/component/transaction/transaction.component.js +4 -5
- package/esm2015/lib/component/transaction-button-bar/transaction-button-bar-button/transaction-sales-overview-button-bar-button.component.js +6 -3
- package/esm2015/lib/component/transaction-card/transaction-card-margin/transaction-card-margin.component.js +10 -4
- package/esm2015/lib/component/transaction-header/transaction-header-payment/transaction-header-payment.component.js +3 -2
- package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +20 -13
- package/esm2015/lib/component/transaction-line/transaction-margin-info-line/transaction-margin-info-line.component.js +95 -92
- package/esm2015/lib/component/transaction-line-fields/transaction-line-drop-shipment-button.component.js +15 -11
- package/esm2015/lib/component/transaction-margin/transaction-margin.component.js +35 -3
- package/esm2015/lib/component/transaction-search/service/transaction-search.service.js +4 -1
- package/esm2015/lib/component/transaction-search/transaction-search-result/transaction-search-result.component.js +28 -14
- package/esm2015/lib/component/transaction-search/transaction-search-tile/transaction-search-sales-order-tile/transaction-search-sales-order-tile.component.js +1 -21
- package/esm2015/lib/component/transaction-send-documents/transaction-send-documents.component.js +2 -2
- package/esm2015/lib/service/transaction-base.service.js +41 -3
- package/esm2015/lib/service/transaction-connector-adapter.service.js +13 -1
- package/esm2015/lib/service/transaction-connector.service.js +28 -7
- package/esm2015/lib/service/transaction-mapping.service.js +2 -3
- package/esm2015/lib/service/transaction-relation-connector.service.js +14 -1
- package/esm2015/lib/service/transaction-relation.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 +347 -176
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/avatar/avatar.component.d.ts +1 -0
- package/lib/component/checkout/checkout.component.d.ts +1 -0
- package/lib/component/core/base/transaction-base.component.d.ts +0 -3
- package/lib/component/core/base/transaction-payment-base.component.d.ts +1 -0
- package/lib/component/transaction/transaction.component.d.ts +1 -0
- package/lib/component/transaction-button-bar/transaction-button-bar-button/transaction-sales-overview-button-bar-button.component.d.ts +2 -1
- package/lib/component/transaction-card/transaction-card-margin/transaction-card-margin.component.d.ts +3 -1
- package/lib/component/transaction-internal/transaction-internal.component.d.ts +4 -2
- package/lib/component/transaction-line/transaction-margin-info-line/transaction-margin-info-line.component.d.ts +6 -5
- package/lib/component/transaction-margin/transaction-margin.component.d.ts +20 -1
- package/lib/component/transaction-search/service/transaction-search.service.d.ts +3 -1
- package/lib/component/transaction-search/transaction-search-result/transaction-search-result.component.d.ts +2 -3
- package/lib/component/transaction-search/transaction-search-tile/transaction-search-sales-order-tile/transaction-search-sales-order-tile.component.d.ts +0 -3
- package/lib/service/transaction-base.service.d.ts +7 -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-relation-connector.service.d.ts +2 -0
- package/lib/service/transaction-relation.service.d.ts +2 -0
- package/lib/service/transaction.service.d.ts +1 -0
- package/package.json +3 -3
|
@@ -87,6 +87,7 @@ import { RelationListObject } from '@colijnit/relationapi/build/model/relation-l
|
|
|
87
87
|
import { BranchLov } from '@colijnit/relationapi/build/model/branch-lov.bo';
|
|
88
88
|
import { Address } from '@colijnit/relationapi/build/model/address.bo';
|
|
89
89
|
import { RelationSmallObject } from '@colijnit/mainapi/build/model/relation-small-object.bo';
|
|
90
|
+
import { SupplierLightObject } from '@colijnit/relationapi/build/model/supplier-light-object.bo';
|
|
90
91
|
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
91
92
|
import { StockLocation } from '@colijnit/articleapi/build/model/stock-location.bo';
|
|
92
93
|
import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
|
|
@@ -277,8 +278,8 @@ class Version {
|
|
|
277
278
|
constructor() {
|
|
278
279
|
this.name = "@colijnit/transaction";
|
|
279
280
|
this.description = "Colijn IT transaction package";
|
|
280
|
-
this.symVer = "256.1.
|
|
281
|
-
this.publishDate = "
|
|
281
|
+
this.symVer = "256.1.4";
|
|
282
|
+
this.publishDate = "23-10-2024 11:11:51";
|
|
282
283
|
}
|
|
283
284
|
}
|
|
284
285
|
|
|
@@ -1691,6 +1692,18 @@ class TransactionRelationConnectorService {
|
|
|
1691
1692
|
}
|
|
1692
1693
|
});
|
|
1693
1694
|
}
|
|
1695
|
+
getSupplierLightById(supplierId) {
|
|
1696
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1697
|
+
const result = yield this.connector.getSupplierLightById(supplierId);
|
|
1698
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1699
|
+
return this._boFactory.makeWithRawBackendData(SupplierLightObject, result.resultObject);
|
|
1700
|
+
}
|
|
1701
|
+
else {
|
|
1702
|
+
this._handleExceptionFromResponse(result);
|
|
1703
|
+
return null;
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1694
1707
|
getRelationListObjects(relationRequest) {
|
|
1695
1708
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1696
1709
|
const result = yield this.connector.getRelationListObjects(relationRequest);
|
|
@@ -5581,6 +5594,18 @@ class TransactionConnectorAdapterService {
|
|
|
5581
5594
|
}
|
|
5582
5595
|
});
|
|
5583
5596
|
}
|
|
5597
|
+
getReportHeadersByTransIdAndLayoutCode(transId, documentCode) {
|
|
5598
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5599
|
+
const response = yield this.connector.getReportHeadersByTransIdAndLayoutCode(transId, documentCode);
|
|
5600
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
5601
|
+
return this._boFactory.makeBOArrayFromRawBackendDataArray(HistoricReport, response.resultObject);
|
|
5602
|
+
}
|
|
5603
|
+
else {
|
|
5604
|
+
this._handleExceptionFromResponse(response);
|
|
5605
|
+
return null;
|
|
5606
|
+
}
|
|
5607
|
+
});
|
|
5608
|
+
}
|
|
5584
5609
|
getPackageStickerPrintLayouts() {
|
|
5585
5610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5586
5611
|
const response = yield this.mainConnector.getPackageStickerPrintLayouts();
|
|
@@ -6647,37 +6672,55 @@ class TransactionConnectorService {
|
|
|
6647
6672
|
}
|
|
6648
6673
|
getCommissionCodes(languageCode) {
|
|
6649
6674
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6650
|
-
const domainName = DomainName.CommissionCode;
|
|
6651
|
-
return this._selectMultipleParameterizedCacheService.requestCache(CoDomainValue, (languageCode, domainName) => {
|
|
6652
|
-
|
|
6653
|
-
}).getValue(languageCode, domainName);
|
|
6675
|
+
//const domainName: DomainName = DomainName.CommissionCode;
|
|
6676
|
+
//return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6677
|
+
return this._adapterService.getCommissionCodes(languageCode);
|
|
6678
|
+
//}).getValue(languageCode, domainName);
|
|
6654
6679
|
});
|
|
6655
6680
|
}
|
|
6656
6681
|
getInOutCollection(languageCode) {
|
|
6657
6682
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6683
|
+
//const domainName: DomainName = DomainName.InOutCollection;
|
|
6684
|
+
//return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6658
6685
|
return this._adapterService.getInOutCollection(languageCode);
|
|
6686
|
+
//}).getValue(languageCode, domainName);
|
|
6659
6687
|
});
|
|
6660
6688
|
}
|
|
6661
6689
|
getYesNoCollection(languageCode) {
|
|
6662
6690
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6691
|
+
//const domainName: DomainName = DomainName.YesNo;
|
|
6692
|
+
//return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6663
6693
|
return this._adapterService.getYesNoCollection(languageCode);
|
|
6694
|
+
//}).getValue(languageCode, domainName);
|
|
6664
6695
|
});
|
|
6665
6696
|
}
|
|
6666
6697
|
getPriceKindCollection(languageCode) {
|
|
6667
6698
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6699
|
+
//const domainName: DomainName = DomainName.PriceKind;
|
|
6700
|
+
//return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6668
6701
|
return this._adapterService.getPriceKindCollection(languageCode);
|
|
6702
|
+
//}).getValue(languageCode, domainName);
|
|
6669
6703
|
});
|
|
6670
6704
|
}
|
|
6671
6705
|
getPriorityCollection(languageCode) {
|
|
6672
6706
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6707
|
+
// const domainName: DomainName = DomainName.Priority;
|
|
6708
|
+
//return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6673
6709
|
return this._adapterService.getPriorityCollection(languageCode);
|
|
6710
|
+
// }).getValue(languageCode, domainName);
|
|
6674
6711
|
});
|
|
6675
6712
|
}
|
|
6676
6713
|
getEntryTypes(languageCode) {
|
|
6714
|
+
// const domainName: DomainName = DomainName.ServiceCommunicationType;
|
|
6715
|
+
//return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6677
6716
|
return this._adapterService.getEntryTypes(languageCode);
|
|
6717
|
+
//}).getValue(languageCode, domainName);
|
|
6678
6718
|
}
|
|
6679
6719
|
getDomainTypes(languageCode) {
|
|
6720
|
+
// const domainName: DomainName = DomainName.TransType;
|
|
6721
|
+
// return this._selectMultipleParameterizedCacheService.requestCache<CoDomainValue>(CoDomainValue, (languageCode: string, domainName: DomainName) => {
|
|
6680
6722
|
return this._adapterService.getDomainTypes(languageCode);
|
|
6723
|
+
//}).getValue(languageCode, domainName);
|
|
6681
6724
|
}
|
|
6682
6725
|
getCauseCodes() {
|
|
6683
6726
|
return this._adapterService.getCauseCodes();
|
|
@@ -7582,6 +7625,11 @@ class TransactionConnectorService {
|
|
|
7582
7625
|
return yield this._adapterService.getHistoricDocuments(transId, documentCode);
|
|
7583
7626
|
});
|
|
7584
7627
|
}
|
|
7628
|
+
getReportHeadersByTransIdAndLayoutCode(transId, documentCode) {
|
|
7629
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7630
|
+
return yield this._adapterService.getReportHeadersByTransIdAndLayoutCode(transId, documentCode);
|
|
7631
|
+
});
|
|
7632
|
+
}
|
|
7585
7633
|
getPackageStickerPrintLayouts() {
|
|
7586
7634
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7587
7635
|
return yield this._adapterService.getPackageStickerPrintLayouts();
|
|
@@ -8308,12 +8356,14 @@ class TransactionBaseComponent {
|
|
|
8308
8356
|
get transactionLine() {
|
|
8309
8357
|
return this._transactionLine;
|
|
8310
8358
|
}
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8359
|
+
// @Input()
|
|
8360
|
+
// public set transactionMarginInfo(marginInfo: TransactionMarginInfo) {
|
|
8361
|
+
// this._transactionMarginInfo = marginInfo;
|
|
8362
|
+
// }
|
|
8363
|
+
//
|
|
8364
|
+
// public get transactionMarginInfo(): TransactionMarginInfo {
|
|
8365
|
+
// return this._transactionMarginInfo;
|
|
8366
|
+
// }
|
|
8317
8367
|
set transactionInfo(value) {
|
|
8318
8368
|
if (value) {
|
|
8319
8369
|
this.headerReadonly = false;
|
|
@@ -8509,7 +8559,6 @@ TransactionBaseComponent.propDecorators = {
|
|
|
8509
8559
|
forceWritable: [{ type: Input }],
|
|
8510
8560
|
transaction: [{ type: Input }],
|
|
8511
8561
|
transactionLine: [{ type: Input }],
|
|
8512
|
-
transactionMarginInfo: [{ type: Input }],
|
|
8513
8562
|
transactionInfo: [{ type: Input }],
|
|
8514
8563
|
orderLineSets: [{ type: Input }],
|
|
8515
8564
|
transactionTotal: [{ type: Input }],
|
|
@@ -9260,6 +9309,11 @@ class TransactionRelationService {
|
|
|
9260
9309
|
return this._adapterService.getSupplierFullObject(relationNo);
|
|
9261
9310
|
// }).getValue();
|
|
9262
9311
|
}
|
|
9312
|
+
getSupplierLightById(supplierId) {
|
|
9313
|
+
// return this._selectSingleCacheService.requestCache<SupplierFullObject>(SupplierFullObject, relationNo, () => {
|
|
9314
|
+
return this._adapterService.getSupplierLightById(supplierId);
|
|
9315
|
+
// }).getValue();
|
|
9316
|
+
}
|
|
9263
9317
|
insertAddress(address) {
|
|
9264
9318
|
return this._adapterService.insertAddress(address);
|
|
9265
9319
|
}
|
|
@@ -9457,6 +9511,7 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
9457
9511
|
this.transactionUpdated = new BehaviorSubject(undefined);
|
|
9458
9512
|
this.relationUpdated = new BehaviorSubject(undefined);
|
|
9459
9513
|
this.transactionKindSet = new BehaviorSubject(false);
|
|
9514
|
+
this.transactionMargeViewClicked = new Subject();
|
|
9460
9515
|
this.currentBranch = "1"; // current user branch, needs to be set before we can do anything with transactions
|
|
9461
9516
|
this.autoSave = false;
|
|
9462
9517
|
this.manualSaveParam = false;
|
|
@@ -9464,6 +9519,14 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
9464
9519
|
this.invoiceAddressSameAsDelivery = true;
|
|
9465
9520
|
this.getRelationOnRememberCurrentTransaction = true;
|
|
9466
9521
|
this.currentTransaction = new TransactionInfoResponse();
|
|
9522
|
+
/*public set cashRegistersDirty(value: boolean) {
|
|
9523
|
+
this._cashRegistersDirty = value;
|
|
9524
|
+
//this.transactionEventService.transactionDirty.next(this._transactionDirty);
|
|
9525
|
+
}
|
|
9526
|
+
|
|
9527
|
+
public get cashRegistersDirty(): boolean {
|
|
9528
|
+
return this._cashRegistersDirty;
|
|
9529
|
+
}*/
|
|
9467
9530
|
this.purchasePortalLine = [];
|
|
9468
9531
|
this.docDeliveryBatch = new DocDeliveryBatch();
|
|
9469
9532
|
this.internalParameterAllowsDropShipment = false;
|
|
@@ -9489,6 +9552,7 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
9489
9552
|
this._invoiceCompleted = false;
|
|
9490
9553
|
this._alreadyLocked = false;
|
|
9491
9554
|
this._transactionDirty = false;
|
|
9555
|
+
this._cashRegistersDirty = false;
|
|
9492
9556
|
this._salesOrderConfirmationSent = false;
|
|
9493
9557
|
this._subs = [];
|
|
9494
9558
|
}
|
|
@@ -9518,6 +9582,12 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
9518
9582
|
get transactionKind() {
|
|
9519
9583
|
return this._transactionKind;
|
|
9520
9584
|
}
|
|
9585
|
+
set transactionLocalMarginInfo(marginInfo) {
|
|
9586
|
+
this._transactionMarginInfo = marginInfo;
|
|
9587
|
+
}
|
|
9588
|
+
get transactionLocalMarginInfo() {
|
|
9589
|
+
return this._transactionMarginInfo;
|
|
9590
|
+
}
|
|
9521
9591
|
set purchaseOrdersCompleted(value) {
|
|
9522
9592
|
this._purchaseOrdersCompleted = value;
|
|
9523
9593
|
this.transactionEventService.salesOrderGeneratePurchaseOrdersCompletedChanged.next(this._purchaseOrdersCompleted);
|
|
@@ -9876,6 +9946,13 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
9876
9946
|
this._alreadyLocked = false;
|
|
9877
9947
|
this.transactionDirty = false;
|
|
9878
9948
|
}
|
|
9949
|
+
loadTransactionMargeInfoList(uuid) {
|
|
9950
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9951
|
+
if (uuid) {
|
|
9952
|
+
return yield this.connector.getTransactionMarginInfo(uuid);
|
|
9953
|
+
}
|
|
9954
|
+
});
|
|
9955
|
+
}
|
|
9879
9956
|
_handleBeforeRememberCurrentTransaction(transactionInfoResponse) {
|
|
9880
9957
|
return Promise.resolve();
|
|
9881
9958
|
}
|
|
@@ -9944,8 +10021,9 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
9944
10021
|
this.currentTransaction.transactionInfo.transactionKind === TransactionKind.SalesQuotation);
|
|
9945
10022
|
}
|
|
9946
10023
|
}
|
|
10024
|
+
TransactionBaseService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionBaseService_Factory() { return new TransactionBaseService(i0.ɵɵinject(TransactionSettingsService), i0.ɵɵinject(DialogService), i0.ɵɵinject(TransactionConnectorService), i0.ɵɵinject(ArticleConnectorService), i0.ɵɵinject(DictionaryService), i0.ɵɵinject(TransactionEventService), i0.ɵɵinject(TransactionRelationService), i0.ɵɵinject(TransactionScreenConfigurationService), i0.ɵɵinject(i9.RelationService), i0.ɵɵinject(i10.SharedService)); }, token: TransactionBaseService, providedIn: "root" });
|
|
9947
10025
|
TransactionBaseService.decorators = [
|
|
9948
|
-
{ type: Injectable }
|
|
10026
|
+
{ type: Injectable, args: [{ providedIn: "root" },] }
|
|
9949
10027
|
];
|
|
9950
10028
|
TransactionBaseService.ctorParameters = () => [
|
|
9951
10029
|
{ type: TransactionSettingsService },
|
|
@@ -9958,7 +10036,10 @@ TransactionBaseService.ctorParameters = () => [
|
|
|
9958
10036
|
{ type: TransactionScreenConfigurationService },
|
|
9959
10037
|
{ type: RelationService },
|
|
9960
10038
|
{ type: SharedService }
|
|
9961
|
-
];
|
|
10039
|
+
];
|
|
10040
|
+
TransactionBaseService.propDecorators = {
|
|
10041
|
+
transactionLocalMarginInfo: [{ type: Input }]
|
|
10042
|
+
};
|
|
9962
10043
|
|
|
9963
10044
|
class PendingReasonService extends TransactionBaseService {
|
|
9964
10045
|
cancelAddTransactionLine(lineUuid) {
|
|
@@ -12154,6 +12235,11 @@ class TransactionService extends PendingReasonService {
|
|
|
12154
12235
|
return yield this.connector.getHistoricDocuments(transId, documentCode);
|
|
12155
12236
|
});
|
|
12156
12237
|
}
|
|
12238
|
+
getReportHeadersByTransIdAndLayoutCode(transId, documentCode) {
|
|
12239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12240
|
+
return yield this.connector.getReportHeadersByTransIdAndLayoutCode(transId, documentCode);
|
|
12241
|
+
});
|
|
12242
|
+
}
|
|
12157
12243
|
undoDeliveryByReportId(reportId) {
|
|
12158
12244
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12159
12245
|
return yield this.connector.undoDeliveryByReportId(reportId);
|
|
@@ -12684,12 +12770,28 @@ class CheckoutComponent {
|
|
|
12684
12770
|
if (this.checkoutRelation && this.stepRelation) {
|
|
12685
12771
|
const valid = this.checkoutRelation.submit();
|
|
12686
12772
|
if (valid) {
|
|
12773
|
+
this.checkForAndSetSearchAddress();
|
|
12687
12774
|
this.stepRelation.completed = yield this.saveRelation();
|
|
12688
12775
|
}
|
|
12689
12776
|
return valid;
|
|
12690
12777
|
}
|
|
12691
12778
|
});
|
|
12692
12779
|
}
|
|
12780
|
+
//If a relation has no search address set the first active address to be such.
|
|
12781
|
+
checkForAndSetSearchAddress() {
|
|
12782
|
+
if (this.service.relation.activeAddresses.length > 0) {
|
|
12783
|
+
let searchAddressFound = false;
|
|
12784
|
+
this.service.relation.activeAddresses.forEach(address => {
|
|
12785
|
+
if (address.searchAddress) {
|
|
12786
|
+
searchAddressFound = true;
|
|
12787
|
+
return;
|
|
12788
|
+
}
|
|
12789
|
+
});
|
|
12790
|
+
if (!searchAddressFound) {
|
|
12791
|
+
this.service.relation.activeAddresses[0].searchAddress = true;
|
|
12792
|
+
}
|
|
12793
|
+
}
|
|
12794
|
+
}
|
|
12693
12795
|
handleDeliveryValidation() {
|
|
12694
12796
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12695
12797
|
if (this.checkoutDelivery && this.stepDelivery) {
|
|
@@ -16523,6 +16625,8 @@ class TransactionSearchService {
|
|
|
16523
16625
|
[TransactionKind.CashDesk, "SEARCH_NUMBER_OR_CUSTOMER"]
|
|
16524
16626
|
]);
|
|
16525
16627
|
this.transactionsPerPage = 20;
|
|
16628
|
+
this.resultSubject = new BehaviorSubject(false);
|
|
16629
|
+
this.resultsUpdated = this.resultSubject.asObservable();
|
|
16526
16630
|
this._currentPage = 1;
|
|
16527
16631
|
this._transactionType = TransactionKind.SalesOrder;
|
|
16528
16632
|
this._subs = [];
|
|
@@ -16578,6 +16682,7 @@ class TransactionSearchService {
|
|
|
16578
16682
|
var _a, _b;
|
|
16579
16683
|
this.transactions = (_a = result.transactions) !== null && _a !== void 0 ? _a : [];
|
|
16580
16684
|
this.resultCount = (_b = result.count) !== null && _b !== void 0 ? _b : undefined;
|
|
16685
|
+
this.resultSubject.next(true);
|
|
16581
16686
|
});
|
|
16582
16687
|
this.setPreviousSearchRequest();
|
|
16583
16688
|
});
|
|
@@ -17095,25 +17200,6 @@ class TransactionSearchSalesOrderTileComponent extends TransactionSearchTileBase
|
|
|
17095
17200
|
statusBarGF: this.cfgNames.StatusBarGF
|
|
17096
17201
|
};
|
|
17097
17202
|
this.showAvatar = true;
|
|
17098
|
-
this.selectedTransactions = [];
|
|
17099
|
-
}
|
|
17100
|
-
onTransactionSelected(checked) {
|
|
17101
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17102
|
-
console.log(checked);
|
|
17103
|
-
console.log(this.transaction);
|
|
17104
|
-
// save selected transactions
|
|
17105
|
-
if (checked) {
|
|
17106
|
-
this.selectedTransactions.push(this.transaction);
|
|
17107
|
-
}
|
|
17108
|
-
else {
|
|
17109
|
-
// const transId = this.transaction.id;
|
|
17110
|
-
// const index = this.selectedTransactions.findIndex(transaction => transaction.id === transId);
|
|
17111
|
-
// if (index !== -1) {
|
|
17112
|
-
// this.selectedTransactions.splice(index, 1);
|
|
17113
|
-
// }
|
|
17114
|
-
}
|
|
17115
|
-
console.log(this.selectedTransactions);
|
|
17116
|
-
});
|
|
17117
17203
|
}
|
|
17118
17204
|
}
|
|
17119
17205
|
TransactionSearchSalesOrderTileComponent.decorators = [
|
|
@@ -17786,7 +17872,7 @@ class TransactionSendDocumentsComponent extends TransactionBaseComponent {
|
|
|
17786
17872
|
super.ngOnDestroy();
|
|
17787
17873
|
}
|
|
17788
17874
|
getHistoricDocuments() {
|
|
17789
|
-
this.transactionService.
|
|
17875
|
+
this.transactionService.getReportHeadersByTransIdAndLayoutCode(this.transactionInfo.id, this.getLayoutCode())
|
|
17790
17876
|
.then((result) => {
|
|
17791
17877
|
if (result) {
|
|
17792
17878
|
this.historicReports = result;
|
|
@@ -22138,7 +22224,7 @@ TransactionQuickAccessPickedComponent.propDecorators = {
|
|
|
22138
22224
|
};
|
|
22139
22225
|
|
|
22140
22226
|
class TransactionSalesOverviewButtonBarButtonComponent extends TransactionButtonBarButtonBaseComponent {
|
|
22141
|
-
constructor(iconCacheService, _transactionEventService, _mappingService, _dictionaryService, _screenConfigService, _transactionService, _elementRef, _renderer) {
|
|
22227
|
+
constructor(iconCacheService, _transactionEventService, _mappingService, _dictionaryService, _screenConfigService, _transactionService, _elementRef, _renderer, _transactionBaseService) {
|
|
22142
22228
|
super();
|
|
22143
22229
|
this.iconCacheService = iconCacheService;
|
|
22144
22230
|
this._transactionEventService = _transactionEventService;
|
|
@@ -22148,6 +22234,7 @@ class TransactionSalesOverviewButtonBarButtonComponent extends TransactionButton
|
|
|
22148
22234
|
this._transactionService = _transactionService;
|
|
22149
22235
|
this._elementRef = _elementRef;
|
|
22150
22236
|
this._renderer = _renderer;
|
|
22237
|
+
this._transactionBaseService = _transactionBaseService;
|
|
22151
22238
|
this.icons = Icon;
|
|
22152
22239
|
this.category = TransactionTypeCategory;
|
|
22153
22240
|
this.cfgNames = TransactionCfgName;
|
|
@@ -22203,6 +22290,7 @@ class TransactionSalesOverviewButtonBarButtonComponent extends TransactionButton
|
|
|
22203
22290
|
overviewButton.title = "MARGINS";
|
|
22204
22291
|
overviewButton.category = TransactionTypeCategory.SalesOrderMarginInfo;
|
|
22205
22292
|
this.buttonClicked.next(overviewButton);
|
|
22293
|
+
this._transactionBaseService.transactionMargeViewClicked.next(true);
|
|
22206
22294
|
}
|
|
22207
22295
|
else {
|
|
22208
22296
|
const marginButton = this._mappingService.getButtonBar(TransactionKind.SalesOrder)
|
|
@@ -22249,7 +22337,8 @@ TransactionSalesOverviewButtonBarButtonComponent.ctorParameters = () => [
|
|
|
22249
22337
|
{ type: TransactionScreenConfigurationService },
|
|
22250
22338
|
{ type: TransactionService },
|
|
22251
22339
|
{ type: ElementRef },
|
|
22252
|
-
{ type: Renderer2 }
|
|
22340
|
+
{ type: Renderer2 },
|
|
22341
|
+
{ type: TransactionService }
|
|
22253
22342
|
];
|
|
22254
22343
|
TransactionSalesOverviewButtonBarButtonComponent.propDecorators = {
|
|
22255
22344
|
showClass: [{ type: HostBinding, args: ['class.co-transaction-sales-overview-button-bar-button',] }]
|
|
@@ -24822,12 +24911,13 @@ TransactionSalesPlanningButtonBarButtonComponent.propDecorators = {
|
|
|
24822
24911
|
};
|
|
24823
24912
|
|
|
24824
24913
|
class TransactionMarginInfoLineComponent extends TransactionBaseComponent {
|
|
24825
|
-
constructor(transactionEventService, iconCacheService, screenConfigService, orderLineSetService, imageService, dictionaryService, transactionService, changeDetector) {
|
|
24914
|
+
constructor(transactionEventService, iconCacheService, screenConfigService, orderLineSetService, _transactionBaseService, imageService, dictionaryService, transactionService, changeDetector) {
|
|
24826
24915
|
super(transactionEventService, iconCacheService, screenConfigService, imageService, dictionaryService, transactionService, changeDetector);
|
|
24827
24916
|
this.transactionEventService = transactionEventService;
|
|
24828
24917
|
this.iconCacheService = iconCacheService;
|
|
24829
24918
|
this.screenConfigService = screenConfigService;
|
|
24830
24919
|
this.orderLineSetService = orderLineSetService;
|
|
24920
|
+
this._transactionBaseService = _transactionBaseService;
|
|
24831
24921
|
this.imageService = imageService;
|
|
24832
24922
|
this.dictionaryService = dictionaryService;
|
|
24833
24923
|
this.transactionService = transactionService;
|
|
@@ -24865,13 +24955,9 @@ class TransactionMarginInfoLineComponent extends TransactionBaseComponent {
|
|
|
24865
24955
|
handleMouseLeave(event) {
|
|
24866
24956
|
this.mouseOver = false;
|
|
24867
24957
|
}
|
|
24868
|
-
|
|
24869
|
-
|
|
24870
|
-
|
|
24871
|
-
this.transactionMarginInfo = marginInfo;
|
|
24872
|
-
this.lineMarginInfo = marginInfo.lineMarginInfos.find(line => line.lineNr === this.transactionLine.lineNr);
|
|
24873
|
-
});
|
|
24874
|
-
}
|
|
24958
|
+
get lineMarginInfo() {
|
|
24959
|
+
return this._transactionBaseService.transactionLocalMarginInfo.lineMarginInfos.find(line => line.lineNr === this.transactionLine.lineNr);
|
|
24960
|
+
;
|
|
24875
24961
|
}
|
|
24876
24962
|
handleCheckBoxValueChanged(value) {
|
|
24877
24963
|
if (value) {
|
|
@@ -24890,97 +24976,101 @@ TransactionMarginInfoLineComponent.decorators = [
|
|
|
24890
24976
|
{ type: Component, args: [{
|
|
24891
24977
|
selector: "co-transaction-overview-line",
|
|
24892
24978
|
template: `
|
|
24893
|
-
|
|
24894
|
-
|
|
24895
|
-
|
|
24896
|
-
|
|
24897
|
-
|
|
24898
|
-
|
|
24899
|
-
|
|
24900
|
-
|
|
24901
|
-
|
|
24902
|
-
|
|
24903
|
-
|
|
24904
|
-
|
|
24905
|
-
|
|
24906
|
-
|
|
24979
|
+
<co-transaction-base-line
|
|
24980
|
+
[transactionInfo]="transactionInfo"
|
|
24981
|
+
[transactionLine]="transactionLine"
|
|
24982
|
+
[preview]="false"
|
|
24983
|
+
[isFirst]="isFirst"
|
|
24984
|
+
[checkbox]="orderLineSetService.currentOrderLineSetCode && (!transactionLine.orderLineSetCode || transactionLine.orderLineSetCode === orderLineSetService.currentOrderLineSetCode)"
|
|
24985
|
+
[checkboxValue]="orderLineSetService.currentOrderLineSetCode === transactionLine.orderLineSetCode"
|
|
24986
|
+
(checkboxValueChanged)="handleCheckBoxValueChanged($event)"
|
|
24987
|
+
observeVisibility #observer=visibilityObserve
|
|
24988
|
+
(visibilityChange)="handleVisibilityChange(transactionLine, $event)">
|
|
24989
|
+
<ng-container *ngIf="transactionLine.isArticle">
|
|
24990
|
+
<div class="transaction-line-wrapper">
|
|
24991
|
+
<div *ngIf=!preview class="transaction-line-extended-wrapper">
|
|
24992
|
+
<div class="column1">
|
|
24907
24993
|
<span class="transaction-field-label" [textContent]="'COMMISSION_CODE' | localize"
|
|
24908
24994
|
*ngIf="isFirst"></span>
|
|
24909
|
-
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
|
|
24913
|
-
|
|
24914
|
-
|
|
24915
|
-
|
|
24995
|
+
<co-transaction-line-commission-button
|
|
24996
|
+
[screenConfigurationObject]="cfgNames.LineCommission"
|
|
24997
|
+
[transactionLine]="transactionLine"
|
|
24998
|
+
[transactionInfo]="transactionInfo"
|
|
24999
|
+
></co-transaction-line-commission-button>
|
|
25000
|
+
</div>
|
|
25001
|
+
<div class="column2">
|
|
24916
25002
|
<span class="transaction-field-label" [textContent]="'WAREHOUSE_AND_STATUS' | localize"
|
|
24917
25003
|
*ngIf="isFirst"></span>
|
|
24918
|
-
|
|
24919
|
-
|
|
24920
|
-
|
|
24921
|
-
|
|
24922
|
-
|
|
24923
|
-
|
|
24924
|
-
|
|
24925
|
-
|
|
24926
|
-
|
|
24927
|
-
|
|
24928
|
-
|
|
24929
|
-
|
|
24930
|
-
|
|
25004
|
+
<co-transaction-line-warehouse-button
|
|
25005
|
+
[screenConfigurationObject]="cfgNames.LineWarehouse"
|
|
25006
|
+
[transactionLine]="transactionLine"
|
|
25007
|
+
[transactionInfo]="transactionInfo"
|
|
25008
|
+
></co-transaction-line-warehouse-button>
|
|
25009
|
+
<co-transaction-line-statusbar
|
|
25010
|
+
[screenConfigurationObject]="cfgNames.StatusBar"
|
|
25011
|
+
[configNames]="statusBarConfigNames"
|
|
25012
|
+
[transactionInfo]="transactionInfo"
|
|
25013
|
+
[transactionLine]="transactionLine"
|
|
25014
|
+
[activeCategory]="category.SalesOrderOverview"></co-transaction-line-statusbar>
|
|
25015
|
+
</div>
|
|
25016
|
+
<div class="column3">
|
|
24931
25017
|
<span class="transaction-field-label" [textContent]="'DELIVERY_INFORMATION' | localize"
|
|
24932
25018
|
*ngIf="isFirst"></span>
|
|
24933
|
-
|
|
24934
|
-
|
|
24935
|
-
|
|
24936
|
-
|
|
24937
|
-
|
|
24938
|
-
|
|
24939
|
-
|
|
24940
|
-
|
|
24941
|
-
|
|
24942
|
-
|
|
24943
|
-
|
|
24944
|
-
|
|
24945
|
-
|
|
24946
|
-
|
|
24947
|
-
|
|
24948
|
-
|
|
24949
|
-
|
|
24950
|
-
|
|
24951
|
-
|
|
24952
|
-
|
|
24953
|
-
|
|
24954
|
-
|
|
24955
|
-
|
|
24956
|
-
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
24960
|
-
|
|
24961
|
-
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
|
|
24966
|
-
|
|
24967
|
-
|
|
24968
|
-
|
|
24969
|
-
|
|
24970
|
-
|
|
24971
|
-
|
|
24972
|
-
|
|
24973
|
-
|
|
24974
|
-
|
|
24975
|
-
|
|
24976
|
-
|
|
24977
|
-
|
|
24978
|
-
|
|
24979
|
-
</
|
|
24980
|
-
|
|
24981
|
-
|
|
25019
|
+
<co-transaction-line-delivery-button
|
|
25020
|
+
[screenConfigurationObject]="cfgNames.LineDeliveryMethod"
|
|
25021
|
+
[transactionLine]="transactionLine"
|
|
25022
|
+
[transactionInfo]="transactionInfo"
|
|
25023
|
+
></co-transaction-line-delivery-button>
|
|
25024
|
+
<co-transaction-line-delivery-date-button class="transaction-line-delivery-date two-column"
|
|
25025
|
+
[screenConfigurationObject]="cfgNames.LineDeliveryDate"
|
|
25026
|
+
[transactionInfo]="transactionInfo"
|
|
25027
|
+
[transactionLine]="transactionLine"
|
|
25028
|
+
></co-transaction-line-delivery-date-button>
|
|
25029
|
+
</div>
|
|
25030
|
+
</div>
|
|
25031
|
+
<div class="transaction-margin-section">
|
|
25032
|
+
<div class="transaction-line-section">
|
|
25033
|
+
<span class="transaction-field-label" *ngIf="isFirst" [textContent]="'NET_PURCHASE' | localize"></span>
|
|
25034
|
+
<co-editable-label class="transaction-line-totals-total price"
|
|
25035
|
+
[model]="lineMarginInfo?.calculationFactor | coCurrency: true"
|
|
25036
|
+
[editModel]="transactionLine.displayNetLineTotal"
|
|
25037
|
+
[readonly]="true"
|
|
25038
|
+
></co-editable-label>
|
|
25039
|
+
</div>
|
|
25040
|
+
<div class="transaction-line-section">
|
|
25041
|
+
<span class="transaction-field-label" *ngIf="isFirst"
|
|
25042
|
+
[textContent]="'GROSS_PROFIT_PERCENT' | localize"></span>
|
|
25043
|
+
<co-transaction-button [statusColor]="true"
|
|
25044
|
+
class="no-gap"
|
|
25045
|
+
[iconData]="iconCacheService.getIcon(icons.ChartPieSimpleRegular)"
|
|
25046
|
+
[title]="lineMarginInfo?.grossProfitPercentage / 100 | percent : '1.2-2'">
|
|
25047
|
+
</co-transaction-button>
|
|
25048
|
+
</div>
|
|
25049
|
+
<div class="transaction-line-section">
|
|
25050
|
+
<span class="transaction-field-label" *ngIf="isFirst"
|
|
25051
|
+
[textContent]="'GROSS_PROFIT_TOTAL' | localize"></span>
|
|
25052
|
+
<co-transaction-button [statusColor]="true"
|
|
25053
|
+
class="no-gap"
|
|
25054
|
+
[iconData]="iconCacheService.getIcon(icons.ChartPieSimpleRegular)"
|
|
25055
|
+
[title]="lineMarginInfo?.grossProfit | coCurrency: true">
|
|
25056
|
+
</co-transaction-button>
|
|
25057
|
+
</div>
|
|
25058
|
+
<div class="transaction-line-section">
|
|
25059
|
+
<span class="transaction-field-label" *ngIf="isFirst"
|
|
25060
|
+
[textContent]="'CALCULATION_FACTOR' | localize"></span>
|
|
25061
|
+
<co-transaction-button [statusColor]="true"
|
|
25062
|
+
class="no-gap"
|
|
25063
|
+
[iconData]="iconCacheService.getIcon(icons.ChartPieSimpleRegular)"
|
|
25064
|
+
[title]="lineMarginInfo?.calculationFactor | number">
|
|
25065
|
+
</co-transaction-button>
|
|
25066
|
+
</div>
|
|
25067
|
+
</div>
|
|
25068
|
+
</div>
|
|
25069
|
+
</ng-container>
|
|
25070
|
+
</co-transaction-base-line>
|
|
24982
25071
|
`,
|
|
24983
25072
|
encapsulation: ViewEncapsulation.None
|
|
25073
|
+
//changeDetection: ChangeDetectionStrategy.OnPush
|
|
24984
25074
|
},] }
|
|
24985
25075
|
];
|
|
24986
25076
|
TransactionMarginInfoLineComponent.ctorParameters = () => [
|
|
@@ -24988,6 +25078,7 @@ TransactionMarginInfoLineComponent.ctorParameters = () => [
|
|
|
24988
25078
|
{ type: IconCacheService },
|
|
24989
25079
|
{ type: TransactionScreenConfigurationService },
|
|
24990
25080
|
{ type: OrderLineSetService },
|
|
25081
|
+
{ type: TransactionBaseService },
|
|
24991
25082
|
{ type: TransactionImageService },
|
|
24992
25083
|
{ type: DictionaryService },
|
|
24993
25084
|
{ type: TransactionService },
|
|
@@ -25002,12 +25093,13 @@ TransactionMarginInfoLineComponent.propDecorators = {
|
|
|
25002
25093
|
};
|
|
25003
25094
|
|
|
25004
25095
|
class TransactionCardMarginComponent extends TransactionBaseComponent {
|
|
25005
|
-
constructor(transactionEventService, iconCacheService, screenConfigService, orderLineSetService, imageService, dictionaryService, transactionService, changeDetector) {
|
|
25096
|
+
constructor(transactionEventService, iconCacheService, screenConfigService, orderLineSetService, _transactionBaseService, imageService, dictionaryService, transactionService, changeDetector) {
|
|
25006
25097
|
super(transactionEventService, iconCacheService, screenConfigService, imageService, dictionaryService, transactionService, changeDetector);
|
|
25007
25098
|
this.transactionEventService = transactionEventService;
|
|
25008
25099
|
this.iconCacheService = iconCacheService;
|
|
25009
25100
|
this.screenConfigService = screenConfigService;
|
|
25010
25101
|
this.orderLineSetService = orderLineSetService;
|
|
25102
|
+
this._transactionBaseService = _transactionBaseService;
|
|
25011
25103
|
this.imageService = imageService;
|
|
25012
25104
|
this.dictionaryService = dictionaryService;
|
|
25013
25105
|
this.transactionService = transactionService;
|
|
@@ -25039,12 +25131,15 @@ class TransactionCardMarginComponent extends TransactionBaseComponent {
|
|
|
25039
25131
|
this.transactionEventService.openSidePanel.next(line);
|
|
25040
25132
|
}
|
|
25041
25133
|
ngAfterViewInit() {
|
|
25042
|
-
if (!this.
|
|
25134
|
+
if (!this._transactionBaseService.transactionLocalMarginInfo) {
|
|
25043
25135
|
this.transactionService.getTransactionMarginInfo(this.transactionInfo.uuid).then(marginInfo => {
|
|
25044
|
-
this.
|
|
25136
|
+
this._transactionBaseService.transactionLocalMarginInfo = marginInfo;
|
|
25045
25137
|
this.lineMarginInfo = marginInfo.lineMarginInfos.find(line => line.lineNr === this.transactionLine.lineNr);
|
|
25046
25138
|
});
|
|
25047
25139
|
}
|
|
25140
|
+
else {
|
|
25141
|
+
this.lineMarginInfo = this._transactionBaseService.transactionLocalMarginInfo.lineMarginInfos.find(line => line.lineNr === this.transactionLine.lineNr);
|
|
25142
|
+
}
|
|
25048
25143
|
}
|
|
25049
25144
|
}
|
|
25050
25145
|
TransactionCardMarginComponent.decorators = [
|
|
@@ -25114,6 +25209,7 @@ TransactionCardMarginComponent.ctorParameters = () => [
|
|
|
25114
25209
|
{ type: IconCacheService },
|
|
25115
25210
|
{ type: TransactionScreenConfigurationService },
|
|
25116
25211
|
{ type: OrderLineSetService },
|
|
25212
|
+
{ type: TransactionBaseService },
|
|
25117
25213
|
{ type: TransactionImageService },
|
|
25118
25214
|
{ type: DictionaryService },
|
|
25119
25215
|
{ type: TransactionService },
|
|
@@ -25230,7 +25326,6 @@ class TransactionMappingService {
|
|
|
25230
25326
|
]);
|
|
25231
25327
|
this._transactionLineComponent = new Map([
|
|
25232
25328
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderOverview }, TransactionOverviewLineComponent],
|
|
25233
|
-
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderMarginInfo }, TransactionMarginInfoLineComponent],
|
|
25234
25329
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderPurchase }, TransactionPurchaseLineComponent],
|
|
25235
25330
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderAllocation }, TransactionGoodsAllocationLineComponent],
|
|
25236
25331
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderDeliveryNote }, TransactionOrderDeliveryLineComponent],
|
|
@@ -25238,7 +25333,6 @@ class TransactionMappingService {
|
|
|
25238
25333
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderPicked }, TransactionPickedLineComponent],
|
|
25239
25334
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderToBePicked }, TransactionToBePickedLineComponent],
|
|
25240
25335
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderPlanning }, TransactionPlanningLineComponent],
|
|
25241
|
-
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderMarginInfo }, TransactionMarginInfoLineComponent],
|
|
25242
25336
|
[{ type: TransactionKind.PurchaseOrder, category: TransactionTypeCategory.PurchaseOrderOverview }, TransactionPurchaseOverviewLineComponent],
|
|
25243
25337
|
[{ type: TransactionKind.PurchaseOrder, category: TransactionTypeCategory.PurchaseOrderReceivedGoods }, TransactionReceiveGoodsLineComponent],
|
|
25244
25338
|
[{ type: TransactionKind.PurchaseOrder, category: TransactionTypeCategory.PurchaseOrderOrderConfirmation }, TransactionPurchaseOrderLineComponent],
|
|
@@ -25251,6 +25345,7 @@ class TransactionMappingService {
|
|
|
25251
25345
|
[{ type: TransactionKind.ServiceOrder, category: TransactionTypeCategory.ServiceOrderInvoice }, TransactionInvoiceLineComponent],
|
|
25252
25346
|
[{ type: TransactionKind.ServiceOrder, category: TransactionTypeCategory.ServiceOrderPicked }, TransactionPickedLineComponent],
|
|
25253
25347
|
[{ type: TransactionKind.ServiceOrder, category: TransactionTypeCategory.ServiceOrderToBePicked }, TransactionToBePickedLineComponent],
|
|
25348
|
+
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderMarginInfo }, TransactionMarginInfoLineComponent],
|
|
25254
25349
|
]);
|
|
25255
25350
|
this._transactionCardComponent = new Map([
|
|
25256
25351
|
[{ type: TransactionKind.SalesOrder, category: TransactionTypeCategory.SalesOrderOverview }, TransactionCardSalesOverviewComponent],
|
|
@@ -29023,17 +29118,21 @@ class TransactionLineDropShipmentButtonComponent extends TransactionBaseComponen
|
|
|
29023
29118
|
}
|
|
29024
29119
|
_getSupplierAllowsDropShipmentParameter() {
|
|
29025
29120
|
if (this.transactionLine && this.visible) {
|
|
29026
|
-
this._relationService.
|
|
29027
|
-
|
|
29028
|
-
|
|
29029
|
-
this._relationService.getSupplierFullObject(+relation.relationNr).then((result) => {
|
|
29030
|
-
if (result) {
|
|
29031
|
-
this.supplierAllowsDropShipment = result.dropshipment;
|
|
29032
|
-
this.detectChanges();
|
|
29033
|
-
}
|
|
29034
|
-
});
|
|
29035
|
-
}
|
|
29121
|
+
this._relationService.getSupplierLightById(this.transactionLine.supplierId).then(result => {
|
|
29122
|
+
this.supplierAllowsDropShipment = result.dropshipment;
|
|
29123
|
+
this.detectChanges();
|
|
29036
29124
|
});
|
|
29125
|
+
// this._relationService.getRelationById(this.transactionLine.supplierId).then((relations: RelationListObject[]) => {
|
|
29126
|
+
// const relation: RelationListObject = relations && relations.length > 0 ? relations[0] : null;
|
|
29127
|
+
// if (relation) {
|
|
29128
|
+
// this._relationService.getSupplierFullObject(+relation.relationNr).then((result) => {
|
|
29129
|
+
// if (result) {
|
|
29130
|
+
// this.supplierAllowsDropShipment = result.dropshipment;
|
|
29131
|
+
// this.detectChanges();
|
|
29132
|
+
// }
|
|
29133
|
+
// });
|
|
29134
|
+
// }
|
|
29135
|
+
// });
|
|
29037
29136
|
}
|
|
29038
29137
|
}
|
|
29039
29138
|
}
|
|
@@ -30803,7 +30902,20 @@ class AvatarComponent {
|
|
|
30803
30902
|
return this._initials;
|
|
30804
30903
|
}
|
|
30805
30904
|
ngOnInit() {
|
|
30806
|
-
this._setImageForAvatar();
|
|
30905
|
+
// this._setImageForAvatar();
|
|
30906
|
+
this._setAvatar();
|
|
30907
|
+
}
|
|
30908
|
+
_setAvatar() {
|
|
30909
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30910
|
+
if (this.image && this.image.documentId) {
|
|
30911
|
+
if (!(yield this._getImageContent(this.image.documentId))) {
|
|
30912
|
+
this._setRelationInitials();
|
|
30913
|
+
}
|
|
30914
|
+
}
|
|
30915
|
+
else {
|
|
30916
|
+
this._setRelationInitials();
|
|
30917
|
+
}
|
|
30918
|
+
});
|
|
30807
30919
|
}
|
|
30808
30920
|
_setImageForAvatar() {
|
|
30809
30921
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -31263,6 +31375,14 @@ class TransactionPaymentBaseComponent {
|
|
|
31263
31375
|
this.icons = Icon;
|
|
31264
31376
|
this.showKeyPad = true;
|
|
31265
31377
|
this._remainingPayment = false;
|
|
31378
|
+
/*@Input()
|
|
31379
|
+
public set showPaymentDate(value: boolean) {
|
|
31380
|
+
this._showPaymentDate = value;
|
|
31381
|
+
}
|
|
31382
|
+
|
|
31383
|
+
public get showPaymentDate(): boolean {
|
|
31384
|
+
return this._showPaymentDate;
|
|
31385
|
+
}*/
|
|
31266
31386
|
this.payed = new EventEmitter();
|
|
31267
31387
|
this.paymentMethodIdx = 0;
|
|
31268
31388
|
this.cashRegisterIdx = 0;
|
|
@@ -31277,6 +31397,7 @@ class TransactionPaymentBaseComponent {
|
|
|
31277
31397
|
// public statusMessage: string = "";
|
|
31278
31398
|
this.subs = [];
|
|
31279
31399
|
this._amount = 0;
|
|
31400
|
+
this._showPaymentDate = false;
|
|
31280
31401
|
}
|
|
31281
31402
|
set transId(value) {
|
|
31282
31403
|
this._transId = value;
|
|
@@ -31502,6 +31623,7 @@ class PaymentComponent extends TransactionPaymentBaseComponent {
|
|
|
31502
31623
|
super(...arguments);
|
|
31503
31624
|
this.showClass = true;
|
|
31504
31625
|
}
|
|
31626
|
+
/* public paymentDate:Date = new Date();*/
|
|
31505
31627
|
cashRegisterSelected(cashRegister, index) {
|
|
31506
31628
|
super.cashRegisterSelected(cashRegister, index);
|
|
31507
31629
|
this.activeCashRegister = cashRegister;
|
|
@@ -31560,6 +31682,9 @@ PaymentComponent.decorators = [
|
|
|
31560
31682
|
[disabled]="paymentService.amountToPay === 0"></co-button>
|
|
31561
31683
|
</div>
|
|
31562
31684
|
</div>
|
|
31685
|
+
<!--<div class="payment-bookdate" *ngIf="showPaymentDate">
|
|
31686
|
+
<co-input-date [(model)]="paymentDate"></co-input-date>
|
|
31687
|
+
</div>-->
|
|
31563
31688
|
<div class="payment-error-message" *ngIf="paymentService.statusMessage"
|
|
31564
31689
|
[textContent]="paymentService.statusMessage"></div>
|
|
31565
31690
|
</div>
|
|
@@ -31891,7 +32016,8 @@ PaymentModule.decorators = [
|
|
|
31891
32016
|
LoaderModule,
|
|
31892
32017
|
PaymentToPayModule,
|
|
31893
32018
|
IconModule,
|
|
31894
|
-
ListOfValuesModule
|
|
32019
|
+
ListOfValuesModule,
|
|
32020
|
+
InputDatePickerModule
|
|
31895
32021
|
],
|
|
31896
32022
|
declarations: [
|
|
31897
32023
|
PaymentComponent
|
|
@@ -39532,7 +39658,7 @@ LineSelectionService.ctorParameters = () => [
|
|
|
39532
39658
|
];
|
|
39533
39659
|
|
|
39534
39660
|
class TransactionInternalComponent {
|
|
39535
|
-
constructor(iconCacheService, service, transactionEventService, _appRef, _dynamicComponentService, _transactionConnectorService, _transactionEventService, _screenConfigurationService, _dialogService, _lineSelectionService, _purchaseConfirmationService, _deliveryPlanningService) {
|
|
39661
|
+
constructor(iconCacheService, service, transactionEventService, _appRef, _dynamicComponentService, _transactionConnectorService, _transactionEventService, _screenConfigurationService, _dialogService, _lineSelectionService, _purchaseConfirmationService, _deliveryPlanningService, _transactionBaseService) {
|
|
39536
39662
|
this.iconCacheService = iconCacheService;
|
|
39537
39663
|
this.service = service;
|
|
39538
39664
|
this.transactionEventService = transactionEventService;
|
|
@@ -39545,6 +39671,7 @@ class TransactionInternalComponent {
|
|
|
39545
39671
|
this._lineSelectionService = _lineSelectionService;
|
|
39546
39672
|
this._purchaseConfirmationService = _purchaseConfirmationService;
|
|
39547
39673
|
this._deliveryPlanningService = _deliveryPlanningService;
|
|
39674
|
+
this._transactionBaseService = _transactionBaseService;
|
|
39548
39675
|
this.categories = TransactionTypeCategory;
|
|
39549
39676
|
this.deliveryPlanningModes = DeliveryPlanningModes;
|
|
39550
39677
|
this.viewModes = ContentViewMode;
|
|
@@ -39587,18 +39714,22 @@ class TransactionInternalComponent {
|
|
|
39587
39714
|
this._subs = [];
|
|
39588
39715
|
this._transaction = new TransactionInfoResponse();
|
|
39589
39716
|
this._subs.push(this.service.transactionUpdated.subscribe((transaction) => {
|
|
39590
|
-
var _a, _b;
|
|
39591
39717
|
if (transaction) {
|
|
39592
39718
|
this.shouldShowSidePanel = false;
|
|
39593
39719
|
this._transaction = transaction;
|
|
39594
39720
|
this.updateTransactionLine();
|
|
39595
|
-
if (
|
|
39596
|
-
|
|
39597
|
-
}
|
|
39721
|
+
// if (transaction?.transactionInfo?.uuid) {
|
|
39722
|
+
// this.getTransactionMarginInfo(transaction?.transactionInfo?.uuid);
|
|
39723
|
+
// }
|
|
39598
39724
|
if ((transaction === null || transaction === void 0 ? void 0 : transaction.transactionInfo.id) && transaction.transactionInfo.transactionKind === TransactionKind.SalesOrder) {
|
|
39599
39725
|
this.getPlanOrderForTransaction(transaction);
|
|
39600
39726
|
}
|
|
39601
39727
|
}
|
|
39728
|
+
}), this.service.transactionMargeViewClicked.subscribe((load) => {
|
|
39729
|
+
var _a, _b, _c, _d;
|
|
39730
|
+
if (load && ((_b = (_a = this._transaction) === null || _a === void 0 ? void 0 : _a.transactionInfo) === null || _b === void 0 ? void 0 : _b.uuid)) {
|
|
39731
|
+
this.getTransactionMarginInfo((_d = (_c = this._transaction) === null || _c === void 0 ? void 0 : _c.transactionInfo) === null || _d === void 0 ? void 0 : _d.uuid);
|
|
39732
|
+
}
|
|
39602
39733
|
}), this.service.relationUpdated.subscribe((relation) => {
|
|
39603
39734
|
if (relation) {
|
|
39604
39735
|
this.relation = relation;
|
|
@@ -39841,11 +39972,12 @@ class TransactionInternalComponent {
|
|
|
39841
39972
|
// }
|
|
39842
39973
|
// }
|
|
39843
39974
|
getTransactionMarginInfo(transactionUUID) {
|
|
39844
|
-
|
|
39845
|
-
|
|
39846
|
-
|
|
39847
|
-
|
|
39848
|
-
|
|
39975
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39976
|
+
if (transactionUUID) {
|
|
39977
|
+
const result = yield this._transactionBaseService.loadTransactionMargeInfoList(transactionUUID);
|
|
39978
|
+
this._transactionBaseService.transactionLocalMarginInfo = result;
|
|
39979
|
+
}
|
|
39980
|
+
});
|
|
39849
39981
|
}
|
|
39850
39982
|
handleViewModeChange(mode) {
|
|
39851
39983
|
this.activeViewMode = mode;
|
|
@@ -39956,7 +40088,6 @@ TransactionInternalComponent.decorators = [
|
|
|
39956
40088
|
<div class="transaction-footer-center">
|
|
39957
40089
|
<co-transaction-margin *ngIf="activeCategory === categories.SalesOrderMarginInfo"
|
|
39958
40090
|
[transactionInfo]="transaction.transactionInfo"
|
|
39959
|
-
[transactionMarginInfo]="transactionMarginInfo"
|
|
39960
40091
|
></co-transaction-margin>
|
|
39961
40092
|
</div>
|
|
39962
40093
|
|
|
@@ -40048,7 +40179,8 @@ TransactionInternalComponent.ctorParameters = () => [
|
|
|
40048
40179
|
{ type: DialogService },
|
|
40049
40180
|
{ type: LineSelectionService },
|
|
40050
40181
|
{ type: PurchaseConfirmationService },
|
|
40051
|
-
{ type: DeliveryPlanningService }
|
|
40182
|
+
{ type: DeliveryPlanningService },
|
|
40183
|
+
{ type: TransactionBaseService }
|
|
40052
40184
|
];
|
|
40053
40185
|
TransactionInternalComponent.propDecorators = {
|
|
40054
40186
|
sidePanelComponents: [{ type: ViewChildren, args: [TransactionLineSidePanelComponent,] }],
|
|
@@ -40630,8 +40762,9 @@ TransactionHeaderPaymentComponent.decorators = [
|
|
|
40630
40762
|
[remainingPayment]="showRemainingPayment"
|
|
40631
40763
|
[currencyId]="transactionInfo.currencyId"
|
|
40632
40764
|
[doNotFetchAmountToPayForRemaining]="true"
|
|
40765
|
+
|
|
40633
40766
|
></co-payment>
|
|
40634
|
-
</co-dialog>
|
|
40767
|
+
</co-dialog> <!--[showPaymentDate]="true"-->
|
|
40635
40768
|
`,
|
|
40636
40769
|
providers: [
|
|
40637
40770
|
{ provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: forwardRef(() => TransactionHeaderPaymentComponent) }
|
|
@@ -47725,8 +47858,6 @@ class TransactionSearchResultComponent {
|
|
|
47725
47858
|
this.transactionClick = new EventEmitter();
|
|
47726
47859
|
this.screenConfigLoaded = false;
|
|
47727
47860
|
this.salesOrdersPageActive = false;
|
|
47728
|
-
this.batchDeliveryButtonLoader = true;
|
|
47729
|
-
this.selectAllOrders = false;
|
|
47730
47861
|
this.showProcessOrdersLoader = false;
|
|
47731
47862
|
this.selectedTransactions = [];
|
|
47732
47863
|
this._subs = [];
|
|
@@ -47765,6 +47896,10 @@ class TransactionSearchResultComponent {
|
|
|
47765
47896
|
if (config && config.length > 0) {
|
|
47766
47897
|
this.screenConfigLoaded = true;
|
|
47767
47898
|
}
|
|
47899
|
+
}), this.searchService.resultsUpdated.subscribe(() => {
|
|
47900
|
+
if (this.salesOrdersPageActive && this.batchCategory === 'levering') {
|
|
47901
|
+
this.markSelectedTransactions();
|
|
47902
|
+
}
|
|
47768
47903
|
}));
|
|
47769
47904
|
}
|
|
47770
47905
|
ngOnDestroy() {
|
|
@@ -47775,18 +47910,16 @@ class TransactionSearchResultComponent {
|
|
|
47775
47910
|
this.transactionClick.emit(transaction);
|
|
47776
47911
|
}
|
|
47777
47912
|
onSelectedClick(transaction) {
|
|
47778
|
-
console.log(transaction);
|
|
47779
47913
|
if (transaction.selected) {
|
|
47780
47914
|
this.selectedTransactions.push(transaction);
|
|
47781
47915
|
}
|
|
47782
47916
|
else {
|
|
47783
|
-
|
|
47784
|
-
|
|
47785
|
-
|
|
47786
|
-
|
|
47787
|
-
|
|
47917
|
+
const transId = transaction.transId;
|
|
47918
|
+
const index = this.selectedTransactions.findIndex(transaction => transaction.transId === transId);
|
|
47919
|
+
if (index !== -1) {
|
|
47920
|
+
this.selectedTransactions.splice(index, 1);
|
|
47921
|
+
}
|
|
47788
47922
|
}
|
|
47789
|
-
console.log(this.selectedTransactions);
|
|
47790
47923
|
}
|
|
47791
47924
|
onPreviousClick() {
|
|
47792
47925
|
this.searchService.currentPage -= 1;
|
|
@@ -47797,6 +47930,16 @@ class TransactionSearchResultComponent {
|
|
|
47797
47930
|
onPageClick(pageNr) {
|
|
47798
47931
|
this.searchService.currentPage = pageNr;
|
|
47799
47932
|
}
|
|
47933
|
+
markSelectedTransactions() {
|
|
47934
|
+
if (this.searchService.resultsUpdated) {
|
|
47935
|
+
this.searchService.transactions.forEach(transaction => {
|
|
47936
|
+
const matchingObject = this.selectedTransactions.find(selectedTransaction => selectedTransaction.transId === transaction.transId);
|
|
47937
|
+
if (matchingObject) {
|
|
47938
|
+
transaction.selected = true;
|
|
47939
|
+
}
|
|
47940
|
+
});
|
|
47941
|
+
}
|
|
47942
|
+
}
|
|
47800
47943
|
dragStarted(ev, transaction) {
|
|
47801
47944
|
this._deliveryPlanningService.dragging = true;
|
|
47802
47945
|
this._deliveryPlanningService.currentTransId = transaction.transId;
|
|
@@ -47834,7 +47977,7 @@ class TransactionSearchResultComponent {
|
|
|
47834
47977
|
printDeliveryNoteRequest = new PrintDeliveryNoteRequest();
|
|
47835
47978
|
}
|
|
47836
47979
|
this.transactionService.printDeliveryNotes(printDeliveryNotesRequest)
|
|
47837
|
-
.then((
|
|
47980
|
+
.then(() => {
|
|
47838
47981
|
this.showProcessOrdersLoader = false;
|
|
47839
47982
|
})
|
|
47840
47983
|
.catch(() => {
|
|
@@ -47842,8 +47985,12 @@ class TransactionSearchResultComponent {
|
|
|
47842
47985
|
});
|
|
47843
47986
|
});
|
|
47844
47987
|
}
|
|
47845
|
-
onSelectAllOrders() {
|
|
47846
|
-
this.searchService.transactions.forEach(item => item.selected = !
|
|
47988
|
+
onSelectAllOrders(allSelected) {
|
|
47989
|
+
this.searchService.transactions.forEach(item => item.selected = !allSelected);
|
|
47990
|
+
this.selectedTransactions = [];
|
|
47991
|
+
if (!allSelected) {
|
|
47992
|
+
this.selectedTransactions.push(...this.searchService.transactions);
|
|
47993
|
+
}
|
|
47847
47994
|
}
|
|
47848
47995
|
_createRequestLines(selectedLines) {
|
|
47849
47996
|
return selectedLines.map((line) => {
|
|
@@ -47865,7 +48012,7 @@ TransactionSearchResultComponent.decorators = [
|
|
|
47865
48012
|
<co-input-checkbox
|
|
47866
48013
|
[model]="checkIfAllSelected()"
|
|
47867
48014
|
[label]="'SELECT_ALL_ORDERS' | localize"
|
|
47868
|
-
(modelChange)="onSelectAllOrders()">
|
|
48015
|
+
(modelChange)="onSelectAllOrders(checkIfAllSelected())">
|
|
47869
48016
|
</co-input-checkbox>
|
|
47870
48017
|
<co-quick-send-button
|
|
47871
48018
|
*ngIf="checkIfSelected()"
|
|
@@ -54840,9 +54987,25 @@ TransactionCardsModule.decorators = [
|
|
|
54840
54987
|
];
|
|
54841
54988
|
|
|
54842
54989
|
class TransactionMarginComponent extends TransactionBaseComponent {
|
|
54990
|
+
constructor(transactionEventService, iconCacheService, screenConfigService, _transactionBaseService, imageService, dictionaryService, transactionService, changeDetector) {
|
|
54991
|
+
super(transactionEventService, iconCacheService, screenConfigService, imageService, dictionaryService, transactionService, changeDetector);
|
|
54992
|
+
this.transactionEventService = transactionEventService;
|
|
54993
|
+
this.iconCacheService = iconCacheService;
|
|
54994
|
+
this.screenConfigService = screenConfigService;
|
|
54995
|
+
this._transactionBaseService = _transactionBaseService;
|
|
54996
|
+
this.imageService = imageService;
|
|
54997
|
+
this.dictionaryService = dictionaryService;
|
|
54998
|
+
this.transactionService = transactionService;
|
|
54999
|
+
this.changeDetector = changeDetector;
|
|
55000
|
+
}
|
|
54843
55001
|
showClass() {
|
|
54844
55002
|
return true;
|
|
54845
55003
|
}
|
|
55004
|
+
get transactionMarginInfo() {
|
|
55005
|
+
return this._transactionBaseService.transactionLocalMarginInfo;
|
|
55006
|
+
}
|
|
55007
|
+
ngOnInit() {
|
|
55008
|
+
}
|
|
54846
55009
|
}
|
|
54847
55010
|
TransactionMarginComponent.decorators = [
|
|
54848
55011
|
{ type: Component, args: [{
|
|
@@ -54857,11 +55020,20 @@ TransactionMarginComponent.decorators = [
|
|
|
54857
55020
|
<co-transaction-margin-block [state]="true" [header]="'GROSS_PROFIT_PERCENTAGE' | localize" [originalValue]="transactionMarginInfo?.grossProfitPercentage" [value]="transactionMarginInfo?.grossProfitPercentage / 100 | percent : '1.2-2'" ></co-transaction-margin-block>
|
|
54858
55021
|
</div>
|
|
54859
55022
|
</div>
|
|
54860
|
-
|
|
54861
55023
|
`,
|
|
54862
55024
|
encapsulation: ViewEncapsulation.None
|
|
54863
55025
|
},] }
|
|
54864
55026
|
];
|
|
55027
|
+
TransactionMarginComponent.ctorParameters = () => [
|
|
55028
|
+
{ type: TransactionEventService },
|
|
55029
|
+
{ type: IconCacheService },
|
|
55030
|
+
{ type: TransactionScreenConfigurationService },
|
|
55031
|
+
{ type: TransactionBaseService },
|
|
55032
|
+
{ type: TransactionImageService },
|
|
55033
|
+
{ type: DictionaryService },
|
|
55034
|
+
{ type: TransactionService },
|
|
55035
|
+
{ type: ChangeDetectorRef }
|
|
55036
|
+
];
|
|
54865
55037
|
TransactionMarginComponent.propDecorators = {
|
|
54866
55038
|
showClass: [{ type: HostBinding, args: ["class.co-transaction-margin",] }]
|
|
54867
55039
|
};
|
|
@@ -55074,6 +55246,7 @@ class TransactionComponent {
|
|
|
55074
55246
|
this.saveCancelMovable = false;
|
|
55075
55247
|
this.transactionPlanning = false;
|
|
55076
55248
|
this.screenConfigLoaded = false;
|
|
55249
|
+
this._fetching = false;
|
|
55077
55250
|
}
|
|
55078
55251
|
set confirmationAnalysisId(value) {
|
|
55079
55252
|
this._confirmationAnalysisId = value;
|
|
@@ -55120,13 +55293,11 @@ class TransactionComponent {
|
|
|
55120
55293
|
return !(this.service.transactionDirty && this.service.manualSaveParam);
|
|
55121
55294
|
}
|
|
55122
55295
|
_getTransaction() {
|
|
55123
|
-
if (this.transactionKind) {
|
|
55296
|
+
if (this.transactionKind && this.transactionNr) {
|
|
55124
55297
|
this._transactionConnectorService.connectionInitialized.pipe(take(1)).subscribe((loaded) => {
|
|
55125
55298
|
if (loaded) {
|
|
55126
55299
|
this._screenConfigurationService.loadConfig([this.transactionKind]).then(() => __awaiter(this, void 0, void 0, function* () {
|
|
55127
|
-
|
|
55128
|
-
yield this.service.getTransactionByNrAndKind(this.transactionNr, this.transactionKind);
|
|
55129
|
-
}
|
|
55300
|
+
yield this.service.getTransactionByNrAndKind(this.transactionNr, this.transactionKind);
|
|
55130
55301
|
this._prepareHeader();
|
|
55131
55302
|
this.screenConfigLoaded = true;
|
|
55132
55303
|
}));
|