@colijnit/transaction 256.1.67 → 256.1.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/bundles/colijnit-transaction.umd.js +156 -59
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.js +69 -38
  5. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.module.js +4 -2
  6. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-overview/transaction-quick-access-overview.component.js +11 -2
  7. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.js +1 -13
  8. package/esm2015/lib/component/transaction-search/transaction-shipping-method-dialog/transaction-shipping-method-dialog.component.js +125 -105
  9. package/esm2015/lib/service/transaction-connector-adapter.service.js +13 -1
  10. package/esm2015/lib/service/transaction-connector.service.js +6 -1
  11. package/esm2015/lib/service/transaction.service.js +6 -1
  12. package/esm2015/lib/transaction-version.js +3 -3
  13. package/fesm2015/colijnit-transaction.js +225 -155
  14. package/fesm2015/colijnit-transaction.js.map +1 -1
  15. package/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.d.ts +6 -0
  16. package/lib/component/transaction-quick-access/transaction-quick-access-overview/transaction-quick-access-overview.component.d.ts +1 -0
  17. package/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.d.ts +0 -2
  18. package/lib/component/transaction-search/transaction-shipping-method-dialog/transaction-shipping-method-dialog.component.d.ts +12 -10
  19. package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
  20. package/lib/service/transaction-connector.service.d.ts +1 -0
  21. package/lib/service/transaction.service.d.ts +1 -0
  22. package/package.json +2 -2
@@ -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.67";
7
- this.publishDate = "14-3-2025 17:01:20";
6
+ this.symVer = "256.1.69";
7
+ this.publishDate = "18-3-2025 17:46:15";
8
8
  }
9
9
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsb0JBQW9CLENBQUM7SUFDNUMsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU2LjEuNjdcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIxNC0zLTIwMjUgMTc6MDE6MjBcIjtcbn0iXX0=
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsb0JBQW9CLENBQUM7SUFDNUMsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU2LjEuNjlcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIxOC0zLTIwMjUgMTc6NDY6MTVcIjtcbn0iXX0=
@@ -283,8 +283,8 @@ class Version {
283
283
  constructor() {
284
284
  this.name = "@colijnit/transaction";
285
285
  this.description = "Colijn IT transaction package";
286
- this.symVer = "256.1.67";
287
- this.publishDate = "14-3-2025 17:01:20";
286
+ this.symVer = "256.1.69";
287
+ this.publishDate = "18-3-2025 17:46:15";
288
288
  }
289
289
  }
290
290
 
@@ -5047,6 +5047,18 @@ class TransactionConnectorAdapterService {
5047
5047
  }
5048
5048
  });
5049
5049
  }
5050
+ isPrintIsDefaultSendMethodForPurchaseOrder(transactionId) {
5051
+ return __awaiter(this, void 0, void 0, function* () {
5052
+ const response = yield this.connector.isPrintIsDefaultSendMethodForPurchaseOrder(transactionId);
5053
+ if (response && response.validationResult && response.validationResult.success) {
5054
+ return response.resultObject;
5055
+ }
5056
+ else {
5057
+ this._handleExceptionFromResponse(response);
5058
+ return null;
5059
+ }
5060
+ });
5061
+ }
5050
5062
  getPurchaseOrderEmailLayouts(transactionUUID) {
5051
5063
  return __awaiter(this, void 0, void 0, function* () {
5052
5064
  const response = yield this.connector.getPurchaseOrderEmailLayouts(transactionUUID);
@@ -7804,6 +7816,11 @@ class TransactionConnectorService {
7804
7816
  return this._adapterService.functionCall(this._adapterService.canPurchaseOrderBeSendByWebservice, [transactionId]);
7805
7817
  });
7806
7818
  }
7819
+ isPrintIsDefaultSendMethodForPurchaseOrder(transactionId) {
7820
+ return __awaiter(this, void 0, void 0, function* () {
7821
+ return this._adapterService.functionCall(this._adapterService.isPrintIsDefaultSendMethodForPurchaseOrder, [transactionId]);
7822
+ });
7823
+ }
7807
7824
  getPurchaseOrderEmailLayouts(transactionUUID) {
7808
7825
  return __awaiter(this, void 0, void 0, function* () {
7809
7826
  return this._adapterService.functionCall(this._adapterService.getPurchaseOrderEmailLayouts, [transactionUUID]);
@@ -12901,6 +12918,11 @@ class TransactionService extends PendingReasonService {
12901
12918
  return yield this.connector.getPurchaseOrderDefaultSendMethod(relationId);
12902
12919
  });
12903
12920
  }
12921
+ isPrintIsDefaultSendMethodForPurchaseOrder(transactionId) {
12922
+ return __awaiter(this, void 0, void 0, function* () {
12923
+ return yield this.connector.isPrintIsDefaultSendMethodForPurchaseOrder(transactionId);
12924
+ });
12925
+ }
12904
12926
  generateAndSendPurchaseOrdersForSalesOrder(request, version) {
12905
12927
  return __awaiter(this, void 0, void 0, function* () {
12906
12928
  const lockSuccess = yield this.tryToLockTransaction(request.transId, version);
@@ -19077,18 +19099,6 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
19077
19099
  }
19078
19100
  });
19079
19101
  }
19080
- onShowFilePreview(layoutCode) {
19081
- let reportId = 0;
19082
- this.defaultPrinterName = undefined;
19083
- if (layoutCode) {
19084
- this.transactionService.getDefaultPrinter(reportId, layoutCode).then((printer) => {
19085
- if (printer) {
19086
- this.defaultPrinterName = printer;
19087
- this.changeDetector.detectChanges();
19088
- }
19089
- });
19090
- }
19091
- }
19092
19102
  _prepareData() {
19093
19103
  this._getPrinters();
19094
19104
  this._getDefaultSendMethod();
@@ -19467,6 +19477,14 @@ class TransactionQuickAccessOverviewComponent extends TransactionQuickAccessSend
19467
19477
  }
19468
19478
  this.showSendMethodDialog = true;
19469
19479
  }
19480
+ loadDefaultPrinterName(reportId) {
19481
+ this.transactionService.getDefaultPrinter(reportId, LayoutCode.OrderConfirmation).then((printerName) => {
19482
+ if (printerName && this.printerList.find((printer) => printer.name === printerName)) {
19483
+ this.defaultPrinterName = printerName;
19484
+ this.changeDetector.detectChanges();
19485
+ }
19486
+ });
19487
+ }
19470
19488
  emailDocument(request) {
19471
19489
  return __awaiter(this, void 0, void 0, function* () {
19472
19490
  if (this.sendDocumentsComponent.selected) {
@@ -19576,7 +19594,8 @@ TransactionQuickAccessOverviewComponent.decorators = [
19576
19594
  (additionalFileChangeEvent)="upsertDocument($event)"
19577
19595
  (closeClick)="showSendMethodDialog = false"
19578
19596
  (okClick)="handleSendMethodOkClick($event)"
19579
- (showFilePreview)="onShowFilePreview(LayoutCode.OrderConfirmation)"
19597
+ [defaultPrinterName]="defaultPrinterName"
19598
+ (loadDefaultPrinterName)="loadDefaultPrinterName($event)"
19580
19599
  ></co-send-method-dialog>
19581
19600
  <co-digital-signature
19582
19601
  [documentId]="signatureDocumentId"
@@ -21051,6 +21070,8 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
21051
21070
  super(searchService, transactionHeaderService, transactionEventService, iconCacheService, screenConfigService, imageService, dictionaryService, transactionService, changeDetector, dialogService);
21052
21071
  this.salesReservationService = salesReservationService;
21053
21072
  this.canGenerate = false;
21073
+ this.showShippingMethodDialog = false;
21074
+ this.selectedTransactions = [];
21054
21075
  this.reportDocumentEmailRequest = new ReportingDocumentEmailSignDocBaseRequest();
21055
21076
  this.reportDocumentPrintRequest = new ReportingDocumentPrintSignDocBaseRequest();
21056
21077
  this.reportDocumentPdfRequest = new ReportingDocumentPdfBaseRequest();
@@ -21061,9 +21082,9 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
21061
21082
  }
21062
21083
  ngOnInit() {
21063
21084
  super.ngOnInit();
21064
- this._subs.push(this.transactionEventService.transactionLineChanged.subscribe((line) => {
21065
- this._checkPurchaseOrders();
21066
- }));
21085
+ this._subs.push(this.transactionEventService.transactionLineChanged.subscribe(() => this._checkPurchaseOrders()));
21086
+ const transItem = this.transaction;
21087
+ this.selectedTransactions.push(transItem);
21067
21088
  }
21068
21089
  ngOnDestroy() {
21069
21090
  this._subs.forEach(s => s.unsubscribe());
@@ -21074,7 +21095,15 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
21074
21095
  }
21075
21096
  handleSend(method) {
21076
21097
  return __awaiter(this, void 0, void 0, function* () {
21077
- this.showSendMethodDialog = true;
21098
+ const isPrintDefaultMethod = yield this.transactionService.isPrintIsDefaultSendMethodForPurchaseOrder(this.transactionInfo.id);
21099
+ if (isPrintDefaultMethod) {
21100
+ this.showShippingMethodDialog = true;
21101
+ this.changeDetector.detectChanges();
21102
+ }
21103
+ else {
21104
+ yield this.printDocument(this.reportDocumentPrintRequest);
21105
+ this._setDefaultMethod(method);
21106
+ }
21078
21107
  });
21079
21108
  }
21080
21109
  handleSendMethodOkClick(method) {
@@ -21084,6 +21113,14 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
21084
21113
  this._setDefaultMethod(method);
21085
21114
  });
21086
21115
  }
21116
+ handleShippingMethodOkClick(request) {
21117
+ return __awaiter(this, void 0, void 0, function* () {
21118
+ this.showShippingMethodDialog = false;
21119
+ this.reportDocumentPrintRequest.printerName = request.printerName;
21120
+ yield this.printDocument(this.reportDocumentPrintRequest);
21121
+ this._setDefaultMethod(this.defaultSendMethod);
21122
+ });
21123
+ }
21087
21124
  handleReservationModeClick() {
21088
21125
  var _a, _b;
21089
21126
  return __awaiter(this, void 0, void 0, function* () {
@@ -21104,9 +21141,12 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
21104
21141
  super.transactionSet();
21105
21142
  this._checkPurchaseOrders();
21106
21143
  }
21144
+ openSendDialog() {
21145
+ this.showShippingMethodDialog = true;
21146
+ }
21107
21147
  _checkPurchaseOrders() {
21108
21148
  this.canGenerate = this.transactionLines &&
21109
- this.transactionLines.filter(l => l.commissionCode === "0" && (l.articleLineStatus && l.articleLineStatus.quantityOrdered !== l.amount)).length > 0;
21149
+ this.transactionLines.filter(l => l.commissionCode === '0' && (l.articleLineStatus && l.articleLineStatus.quantityOrdered !== l.amount)).length > 0;
21110
21150
  }
21111
21151
  getDefaultEmailAddressList() {
21112
21152
  return Promise.resolve([]);
@@ -21133,40 +21173,50 @@ class TransactionQuickAccessOrderPurchaseComponent extends TransactionQuickAcces
21133
21173
  }
21134
21174
  TransactionQuickAccessOrderPurchaseComponent.decorators = [
21135
21175
  { type: Component, args: [{
21136
- selector: "co-transaction-quick-access-order-purchase",
21176
+ selector: 'co-transaction-quick-access-order-purchase',
21137
21177
  template: `
21138
- <div class="quick-access-content-wrapper" *ngIf="canGenerate && transactionInfo.transactionDefinitive">
21139
- <div class="select-all-wrapper">
21140
- <co-input-checkbox
21141
- [label]="'SELECT_ALL_LINES' | localize"
21142
- (modelChange)="handleSelectAllLines($event)"
21143
- ></co-input-checkbox>
21144
- </div>
21145
- <co-quick-send-button
21146
- [showSendMethodIcon]="false"
21147
- [showSendMethodDialogIcon]="false"
21148
- [showLoader]="showLoader"
21149
- (sendIconClicked)="handleSend(defaultSendMethod)"
21150
- ></co-quick-send-button>
21178
+ <div class="quick-access-content-wrapper" *ngIf="canGenerate && transactionInfo.transactionDefinitive">
21179
+ <div class="select-all-wrapper">
21180
+ <co-input-checkbox
21181
+ [label]="'SELECT_ALL_LINES' | localize"
21182
+ (modelChange)="handleSelectAllLines($event)">
21183
+ </co-input-checkbox>
21184
+ </div>
21185
+ <co-quick-send-button
21186
+ [defaultMethodIcon]="defaultSendMethodIcon"
21187
+ [showLoader]="showLoader"
21188
+ (sendIconClicked)="handleSend(defaultSendMethod)"
21189
+ (openSendMethodDialog)="openSendDialog()">
21190
+ </co-quick-send-button>
21191
+
21192
+ <span class="button" [class.selected]="transactionHeaderService.reservationMode">
21193
+ <co-icon (click)="handleReservationModeClick()" [iconData]="iconCacheService.getIcon(icons.PalletBoxesRotate)"></co-icon>
21194
+ </span>
21195
+ </div>
21196
+ <co-send-method-dialog
21197
+ *ngIf="showSendMethodDialog"
21198
+ [printerList]="printerList"
21199
+ [headerTitle]="'CREATE_PURCHASE_ORDER' | localize"
21200
+ [defaultSendMethod]="defaultSendMethod"
21201
+ [visibleMethods]="[sendMethodType.Print]"
21202
+ [emailAddresses]="emailAddresses"
21203
+ [emailLayouts]="emailLayouts"
21204
+ [isPrinterLayoutsEnabled]="false"
21205
+ [isDocSignEnabled]="false"
21206
+ [(reportingDocumentEmailRequest)]="reportDocumentEmailRequest"
21207
+ [(reportingDocumentPrintRequest)]="reportDocumentPrintRequest"
21208
+ [(reportingDocumentPdfRequest)]="reportDocumentPdfRequest"
21209
+ (closeClick)="showSendMethodDialog = false"
21210
+ (okClick)="handleSendMethodOkClick($event)">
21211
+ </co-send-method-dialog>
21151
21212
 
21152
- <span class="button" [class.selected]="transactionHeaderService.reservationMode"><co-icon (click)="handleReservationModeClick()"
21153
- [iconData]="iconCacheService.getIcon(icons.PalletBoxesRotate)"></co-icon></span>
21154
- </div>
21155
- <co-send-method-dialog *ngIf="showSendMethodDialog"
21156
- [printerList]="printerList"
21157
- [headerTitle]="'CREATE_PURCHASE_ORDER' | localize"
21158
- [defaultSendMethod]="defaultSendMethod"
21159
- [visibleMethods]="[sendMethodType.Print]"
21160
- [emailAddresses]="emailAddresses"
21161
- [emailLayouts]="emailLayouts"
21162
- [isPrinterLayoutsEnabled]="false"
21163
- [isDocSignEnabled]="false"
21164
- [(reportingDocumentEmailRequest)]="reportDocumentEmailRequest"
21165
- [(reportingDocumentPrintRequest)]="reportDocumentPrintRequest"
21166
- [(reportingDocumentPdfRequest)]="reportDocumentPdfRequest"
21167
- (closeClick)="showSendMethodDialog = false"
21168
- (okClick)="handleSendMethodOkClick($event)"
21169
- ></co-send-method-dialog>
21213
+ <co-shipping-method-dialog
21214
+ *ngIf="showShippingMethodDialog"
21215
+ [category]="'purchase'"
21216
+ [selectedTransactions]="selectedTransactions"
21217
+ (cancelClicked)="showShippingMethodDialog = false"
21218
+ (saveClicked)="handleShippingMethodOkClick($event)">
21219
+ </co-shipping-method-dialog>
21170
21220
  `,
21171
21221
  encapsulation: ViewEncapsulation.None
21172
21222
  },] }
@@ -21185,7 +21235,7 @@ TransactionQuickAccessOrderPurchaseComponent.ctorParameters = () => [
21185
21235
  { type: TransactionSalesReservationService }
21186
21236
  ];
21187
21237
  TransactionQuickAccessOrderPurchaseComponent.propDecorators = {
21188
- showClass: [{ type: HostBinding, args: ["class.co-transaction-quick-access-order-purchase",] }]
21238
+ showClass: [{ type: HostBinding, args: ['class.co-transaction-quick-access-order-purchase',] }]
21189
21239
  };
21190
21240
 
21191
21241
  class TransactionButtonBarButtonBaseComponent {
@@ -42832,9 +42882,10 @@ QuickSendButtonModule.decorators = [
42832
42882
  ];
42833
42883
 
42834
42884
  class ShippingMethodDialogComponent {
42835
- constructor(iconService, transactionService) {
42885
+ constructor(iconService, transactionService, changeDetector) {
42836
42886
  this.iconService = iconService;
42837
42887
  this.transactionService = transactionService;
42888
+ this.changeDetector = changeDetector;
42838
42889
  this.saveClicked = new EventEmitter();
42839
42890
  this.cancelClicked = new EventEmitter();
42840
42891
  this.icons = Icon;
@@ -42845,9 +42896,9 @@ class ShippingMethodDialogComponent {
42845
42896
  this.printerList = [];
42846
42897
  this.batchTransactionSendingRequest = new BatchTransactionSendingRequest();
42847
42898
  this.overruleOptions = [
42848
- { code: 1, description: "Print" },
42849
- { code: 2, description: "E-mail" },
42850
- { code: 3, description: "EDI" }
42899
+ { code: 1, description: 'Print' },
42900
+ { code: 2, description: 'E-mail' },
42901
+ { code: 3, description: 'EDI' }
42851
42902
  ];
42852
42903
  }
42853
42904
  showClass() {
@@ -42864,9 +42915,11 @@ class ShippingMethodDialogComponent {
42864
42915
  this.batchTransactionSendingRequest.useRelationSpecificReports = this.useDefaultLayout;
42865
42916
  this.batchTransactionSendingRequest.useRelationSpecificSendMethods = this.useDefaultShippingMethods;
42866
42917
  this.batchTransactionSendingRequest.transIds = [];
42867
- this.selectedTransactions.forEach(transaction => {
42868
- this.batchTransactionSendingRequest.transIds.push(transaction.transId);
42869
- });
42918
+ if (!(this.selectedTransactions instanceof TransactionInfoResponse)) {
42919
+ this.selectedTransactions.forEach(transaction => {
42920
+ this.batchTransactionSendingRequest.transIds.push(transaction.transId);
42921
+ });
42922
+ }
42870
42923
  if (!this.useDefaultShippingMethods) {
42871
42924
  this.batchTransactionSendingRequest.overruleSendMethodForEmail = (_a = this.overruledEmail) === null || _a === void 0 ? void 0 : _a.code;
42872
42925
  this.batchTransactionSendingRequest.overruleSendMethodForPrinting = (_b = this.overruledPrint) === null || _b === void 0 ? void 0 : _b.code;
@@ -42883,6 +42936,9 @@ class ShippingMethodDialogComponent {
42883
42936
  if (this.category === 'overview' || this.category === 'overzicht') {
42884
42937
  reportLayoutResult = yield this.transactionService.getOrderConfirmationPrintLayouts('');
42885
42938
  }
42939
+ else if (this.category === 'purchase' || this.category === 'inkoop') {
42940
+ reportLayoutResult = yield this.transactionService.getPurchaseOrderPrintLayouts('');
42941
+ }
42886
42942
  else if (this.category === 'delivery order' || this.category === 'afleverbon') {
42887
42943
  reportLayoutResult = yield this.transactionService.getDeliveryNotePrintLayouts('');
42888
42944
  }
@@ -42900,6 +42956,7 @@ class ShippingMethodDialogComponent {
42900
42956
  }
42901
42957
  }
42902
42958
  }
42959
+ this.changeDetector.detectChanges();
42903
42960
  return reportLayoutResult;
42904
42961
  });
42905
42962
  }
@@ -42909,6 +42966,9 @@ class ShippingMethodDialogComponent {
42909
42966
  if (this.category === 'overview' || this.category === 'overzicht') {
42910
42967
  reportLayoutResult = yield this.transactionService.getOrderConfirmationEmailLayouts('');
42911
42968
  }
42969
+ else if (this.category === 'purchase' || this.category === 'inkoop') {
42970
+ reportLayoutResult = yield this.transactionService.getPurchaseOrderEmailLayouts('');
42971
+ }
42912
42972
  else if (this.category === 'delivery order' || this.category === 'afleverbon') {
42913
42973
  reportLayoutResult = yield this.transactionService.getDeliveryNoteEmailLayouts('');
42914
42974
  }
@@ -42926,6 +42986,7 @@ class ShippingMethodDialogComponent {
42926
42986
  }
42927
42987
  }
42928
42988
  }
42989
+ this.changeDetector.detectChanges();
42929
42990
  return reportLayoutResult;
42930
42991
  });
42931
42992
  }
@@ -42942,16 +43003,22 @@ class ShippingMethodDialogComponent {
42942
43003
  }
42943
43004
  }
42944
43005
  }
43006
+ this.changeDetector.detectChanges();
42945
43007
  return success;
42946
43008
  });
42947
43009
  }
42948
43010
  _getDefaultSendMethod() {
42949
43011
  return __awaiter(this, void 0, void 0, function* () {
42950
- const relationId = this.selectedTransactions[0].relationNr;
43012
+ const relationId = (this.category === 'purchase' || this.category === 'inkoop') ?
43013
+ this.selectedTransactions[0].transactionInfo.relation.relationNr :
43014
+ this.selectedTransactions[0].relationNr;
42951
43015
  let sendMethod;
42952
43016
  if (this.category === 'overview' || this.category === 'overzicht') {
42953
43017
  sendMethod = yield this.transactionService.getOrderConfirmationDefaultSendMethod(relationId);
42954
43018
  }
43019
+ else if (this.category === 'purchase' || this.category === 'inkoop') {
43020
+ sendMethod = yield this.transactionService.getPurchaseOrderDefaultSendMethod(relationId);
43021
+ }
42955
43022
  else if (this.category === 'delivery order' || this.category === 'afleverbon') {
42956
43023
  sendMethod = yield this.transactionService.getDeliveryNoteDefaultSendMethod(relationId);
42957
43024
  }
@@ -42961,123 +43028,125 @@ class ShippingMethodDialogComponent {
42961
43028
  if (sendMethod) {
42962
43029
  this.useDefaultShippingMethods = true;
42963
43030
  }
43031
+ this.changeDetector.detectChanges();
42964
43032
  return sendMethod;
42965
43033
  });
42966
43034
  }
42967
43035
  }
42968
43036
  ShippingMethodDialogComponent.decorators = [
42969
43037
  { type: Component, args: [{
42970
- selector: "co-shipping-method-dialog",
43038
+ selector: 'co-shipping-method-dialog',
42971
43039
  template: `
42972
- <co-dialog
42973
- [headerTemplate]="headerTemplate"
42974
- [footerTemplate]="footerTemplate"
42975
- (closeClick)="cancelButtonClicked()"
42976
- id="shipping-method-dialog">
42977
- <ng-template #headerTemplate>
42978
- <h2 class="header" [textContent]="'SENDMETHODS' | localize"></h2>
42979
- </ng-template>
42980
-
42981
- <div class="save-dialog-contents">
42982
- <section>
42983
- <h3 [textContent]="'LAYOUT_SETTINGS' | localize"></h3>
42984
- <co-input-checkbox
42985
- [(model)]="useDefaultLayout"
42986
- [label]="'RELATION_LAYOUTS' | localize">
42987
- </co-input-checkbox>
42988
- <div class="info" [textContent]="'RELATION_LAYOUTS_MESSAGE' | localize"></div>
43040
+ <co-dialog
43041
+ [headerTemplate]="headerTemplate"
43042
+ [footerTemplate]="footerTemplate"
43043
+ (closeClick)="cancelButtonClicked()"
43044
+ id="shipping-method-dialog">
43045
+ <ng-template #headerTemplate>
43046
+ <h2 class="header" [textContent]="'SENDMETHODS' | localize"></h2>
43047
+ </ng-template>
42989
43048
 
42990
- <div class="layout-selection">
42991
- <co-list-of-values
42992
- [displayField]="'description'"
42993
- [(model)]="selectedPrintLayout"
42994
- [label]="'PRINTER_LAYOUT'| localize"
42995
- [collection]="printLayouts"
42996
- [disabled]="useDefaultLayout"
42997
- [readonly]="useDefaultLayout"
42998
- [required]="!useDefaultLayout">
42999
- </co-list-of-values>
43000
- <co-list-of-values
43001
- [displayField]="'description'"
43002
- [(model)]="selectedEmailLayout"
43003
- [label]="'EMAIL_LAYOUT'| localize"
43004
- [collection]="emailLayouts"
43005
- [disabled]="useDefaultLayout"
43006
- [readonly]="useDefaultLayout"
43007
- [required]="!useDefaultLayout">
43008
- </co-list-of-values>
43009
- <co-list-of-values
43010
- class="printers-list"
43011
- [displayField]="'name'"
43012
- [(model)]="selectedPrinter"
43013
- [label]="'PRINTER'| localize"
43014
- [collection]="printerList"
43015
- [disabled]="useDefaultLayout"
43016
- [readonly]="useDefaultLayout"
43017
- [required]="!useDefaultLayout">
43018
- </co-list-of-values>
43019
- </div>
43020
- </section>
43049
+ <div class="save-dialog-contents">
43050
+ <section>
43051
+ <h3 [textContent]="'LAYOUT_SETTINGS' | localize"></h3>
43052
+ <co-input-checkbox
43053
+ [(model)]="useDefaultLayout"
43054
+ [label]="'RELATION_LAYOUTS' | localize">
43055
+ </co-input-checkbox>
43056
+ <div class="info" [textContent]="'RELATION_LAYOUTS_MESSAGE' | localize"></div>
43057
+
43058
+ <div class="layout-selection">
43059
+ <co-list-of-values
43060
+ [displayField]="'description'"
43061
+ [(model)]="selectedPrintLayout"
43062
+ [label]="'PRINTER_LAYOUT'| localize"
43063
+ [collection]="printLayouts"
43064
+ [disabled]="useDefaultLayout"
43065
+ [readonly]="useDefaultLayout"
43066
+ [required]="!useDefaultLayout">
43067
+ </co-list-of-values>
43068
+ <co-list-of-values
43069
+ [displayField]="'description'"
43070
+ [(model)]="selectedEmailLayout"
43071
+ [label]="'EMAIL_LAYOUT'| localize"
43072
+ [collection]="emailLayouts"
43073
+ [disabled]="useDefaultLayout"
43074
+ [readonly]="useDefaultLayout"
43075
+ [required]="!useDefaultLayout">
43076
+ </co-list-of-values>
43077
+ <co-list-of-values
43078
+ class="printers-list"
43079
+ [displayField]="'name'"
43080
+ [(model)]="selectedPrinter"
43081
+ [label]="'PRINTER'| localize"
43082
+ [collection]="printerList"
43083
+ [disabled]="useDefaultLayout"
43084
+ [readonly]="useDefaultLayout"
43085
+ [required]="!useDefaultLayout">
43086
+ </co-list-of-values>
43087
+ </div>
43088
+ </section>
43021
43089
 
43022
- <section>
43023
- <h3 [textContent]="'SHIPPING_METHOD_SETTINGS' | localize"></h3>
43024
- <co-input-checkbox
43025
- [(model)]="useDefaultShippingMethods"
43026
- [label]="'SHIPPING_METHOD_STANDARD_SETTINGS' | localize">
43027
- </co-input-checkbox>
43090
+ <section>
43091
+ <h3 [textContent]="'SHIPPING_METHOD_SETTINGS' | localize"></h3>
43092
+ <co-input-checkbox
43093
+ [(model)]="useDefaultShippingMethods"
43094
+ [label]="'SHIPPING_METHOD_STANDARD_SETTINGS' | localize">
43095
+ </co-input-checkbox>
43028
43096
 
43029
- <div class="shipping-methods" *ngIf="!useDefaultShippingMethods">
43030
- <co-list-of-values
43031
- [displayField]="'description'"
43032
- [(model)]="overruledEmail"
43033
- [label]="'OVERRULE_VIA_EMAIL'| localize"
43034
- [collection]="overruleOptions">
43035
- </co-list-of-values>
43036
- <co-list-of-values
43037
- [displayField]="'description'"
43038
- [(model)]="overruledEdi"
43039
- [label]="'OVERRULE_VIA_EDI'| localize"
43040
- [collection]="overruleOptions">
43041
- </co-list-of-values>
43042
- <co-list-of-values
43043
- [displayField]="'description'"
43044
- [(model)]="overruledPrint"
43045
- [label]="'OVERRULE_VIA_PRINT'| localize"
43046
- [collection]="overruleOptions">
43047
- </co-list-of-values>
43097
+ <div class="shipping-methods" *ngIf="!useDefaultShippingMethods">
43098
+ <co-list-of-values
43099
+ [displayField]="'description'"
43100
+ [(model)]="overruledEmail"
43101
+ [label]="'OVERRULE_VIA_EMAIL'| localize"
43102
+ [collection]="overruleOptions">
43103
+ </co-list-of-values>
43104
+ <co-list-of-values
43105
+ [displayField]="'description'"
43106
+ [(model)]="overruledEdi"
43107
+ [label]="'OVERRULE_VIA_EDI'| localize"
43108
+ [collection]="overruleOptions">
43109
+ </co-list-of-values>
43110
+ <co-list-of-values
43111
+ [displayField]="'description'"
43112
+ [(model)]="overruledPrint"
43113
+ [label]="'OVERRULE_VIA_PRINT'| localize"
43114
+ [collection]="overruleOptions">
43115
+ </co-list-of-values>
43116
+ </div>
43117
+ </section>
43048
43118
  </div>
43049
- </section>
43050
- </div>
43051
43119
 
43052
- <ng-template #footerTemplate>
43053
- <div class="co-dialog-footer-button-wrapper">
43054
- <co-button
43055
- class="save-button"
43056
- [iconData]="iconService.getIcon(icons.CheckDuotone)"
43057
- (click)="saveButtonClicked()">
43058
- </co-button>
43059
- <co-button
43060
- class="close-button"
43061
- [iconData]="iconService.getIcon(icons.Crossskinny)"
43062
- (click)="cancelButtonClicked()">
43063
- </co-button>
43064
- </div>
43065
- </ng-template>
43066
- </co-dialog>
43120
+ <ng-template #footerTemplate>
43121
+ <div class="co-dialog-footer-button-wrapper">
43122
+ <co-button
43123
+ class="save-button"
43124
+ [iconData]="iconService.getIcon(icons.CheckDuotone)"
43125
+ (click)="saveButtonClicked()">
43126
+ </co-button>
43127
+ <co-button
43128
+ class="close-button"
43129
+ [iconData]="iconService.getIcon(icons.Crossskinny)"
43130
+ (click)="cancelButtonClicked()">
43131
+ </co-button>
43132
+ </div>
43133
+ </ng-template>
43134
+ </co-dialog>
43067
43135
  `,
43068
43136
  encapsulation: ViewEncapsulation.None
43069
43137
  },] }
43070
43138
  ];
43071
43139
  ShippingMethodDialogComponent.ctorParameters = () => [
43072
43140
  { type: IconCacheService },
43073
- { type: TransactionService }
43141
+ { type: TransactionService },
43142
+ { type: ChangeDetectorRef }
43074
43143
  ];
43075
43144
  ShippingMethodDialogComponent.propDecorators = {
43076
43145
  category: [{ type: Input }],
43077
43146
  selectedTransactions: [{ type: Input }],
43078
43147
  saveClicked: [{ type: Output }],
43079
43148
  cancelClicked: [{ type: Output }],
43080
- showClass: [{ type: HostBinding, args: ["class.co-shipping-method-dialog",] }]
43149
+ showClass: [{ type: HostBinding, args: ['class.co-shipping-method-dialog',] }]
43081
43150
  };
43082
43151
 
43083
43152
  class ShippingMethodDialogModule {
@@ -56143,7 +56212,8 @@ TransactionQuickAccessOrderPurchaseModule.decorators = [
56143
56212
  IconModule,
56144
56213
  PipeModule,
56145
56214
  SendMethodDialogModule,
56146
- QuickSendButtonModule
56215
+ QuickSendButtonModule,
56216
+ ShippingMethodDialogModule
56147
56217
  ],
56148
56218
  declarations: [
56149
56219
  TransactionQuickAccessOrderPurchaseComponent