@colijnit/transaction 255.1.40 → 255.1.41

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.
@@ -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 = "255.1.40";
7
- this.publishDate = "23-9-2024 18:21:43";
6
+ this.symVer = "255.1.41";
7
+ this.publishDate = "25-9-2024 17:27:58";
8
8
  }
9
9
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsb0JBQW9CLENBQUM7SUFDNUMsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU1LjEuNDBcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIyMy05LTIwMjQgMTg6MjE6NDNcIjtcbn0iXX0=
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsb0JBQW9CLENBQUM7SUFDNUMsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU1LjEuNDFcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIyNS05LTIwMjQgMTc6Mjc6NThcIjtcbn0iXX0=
@@ -268,8 +268,8 @@ class Version {
268
268
  constructor() {
269
269
  this.name = "@colijnit/transaction";
270
270
  this.description = "Colijn IT transaction package";
271
- this.symVer = "255.1.40";
272
- this.publishDate = "23-9-2024 18:21:43";
271
+ this.symVer = "255.1.41";
272
+ this.publishDate = "25-9-2024 17:27:58";
273
273
  }
274
274
  }
275
275
 
@@ -10845,17 +10845,14 @@ class TransactionService extends PendingReasonService {
10845
10845
  }
10846
10846
  createSalesOrder(request) {
10847
10847
  return __awaiter(this, void 0, void 0, function* () {
10848
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
10849
- yield this.checkBranch();
10850
- if (!this.currentBranch) {
10851
- return reject();
10852
- }
10853
- request.branchNr = this.currentBranch;
10854
- this.connector.createSalesOrder(request).then((response) => {
10855
- this.rememberCurrentTransaction(response);
10856
- resolve(true);
10857
- });
10858
- }));
10848
+ yield this.checkBranch();
10849
+ if (!this.currentBranch) {
10850
+ return Promise.reject();
10851
+ }
10852
+ request.branchNr = this.currentBranch;
10853
+ const response = yield this.connector.createSalesOrder(request);
10854
+ yield this.rememberCurrentTransaction(response);
10855
+ return true;
10859
10856
  });
10860
10857
  }
10861
10858
  createCashRegisterOrder(request, saveTransaction = true) {
@@ -10870,17 +10867,14 @@ class TransactionService extends PendingReasonService {
10870
10867
  }
10871
10868
  createPurchaseOrder(request) {
10872
10869
  return __awaiter(this, void 0, void 0, function* () {
10873
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
10874
- yield this.checkBranch();
10875
- if (!this.currentBranch) {
10876
- return reject();
10877
- }
10878
- request.branchNr = this.currentBranch;
10879
- this.connector.createPurchaseOrder(request).then((response) => {
10880
- this.rememberCurrentTransaction(response);
10881
- resolve(true);
10882
- });
10883
- }));
10870
+ yield this.checkBranch();
10871
+ if (!this.currentBranch) {
10872
+ return Promise.reject();
10873
+ }
10874
+ request.branchNr = this.currentBranch;
10875
+ const response = yield this.connector.createPurchaseOrder(request);
10876
+ yield this.rememberCurrentTransaction(response);
10877
+ return true;
10884
10878
  });
10885
10879
  }
10886
10880
  createServiceOrder(request) {
@@ -10927,17 +10921,14 @@ class TransactionService extends PendingReasonService {
10927
10921
  }
10928
10922
  createSalesQuotation(request) {
10929
10923
  return __awaiter(this, void 0, void 0, function* () {
10930
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
10931
- yield this.checkBranch();
10932
- if (!this.currentBranch) {
10933
- return reject();
10934
- }
10935
- request.branchNr = this.currentBranch;
10936
- this.connector.createSalesQuotation(request).then((response) => {
10937
- this.rememberCurrentTransaction(response);
10938
- resolve(true);
10939
- });
10940
- }));
10924
+ yield this.checkBranch();
10925
+ if (!this.currentBranch) {
10926
+ return Promise.reject();
10927
+ }
10928
+ request.branchNr = this.currentBranch;
10929
+ const response = yield this.connector.createSalesQuotation(request);
10930
+ yield this.rememberCurrentTransaction(response);
10931
+ return true;
10941
10932
  });
10942
10933
  }
10943
10934
  addRelationToTransaction(relationId) {
@@ -12266,17 +12257,15 @@ class TransactionService extends PendingReasonService {
12266
12257
  _checkAndCreateTransaction() {
12267
12258
  return __awaiter(this, void 0, void 0, function* () {
12268
12259
  if (!this.currentTransaction || !this.currentTransaction.transactionInfo || !this.currentTransaction.transactionInfo.transactionNr) {
12269
- const createMethod = this._createTransactionMethods.get(this.transactionKind);
12260
+ const createMethod = this._createTransactionMethods.get(this.transactionKind || TransactionKind.SalesOrder);
12270
12261
  if (createMethod) {
12271
- return new Promise((resolve) => {
12272
- const request = new CreateTransactionRequest();
12273
- createMethod(request)
12274
- .then(() => {
12275
- resolve(true);
12276
- })
12277
- .catch(() => {
12278
- resolve(false);
12279
- });
12262
+ const request = new CreateTransactionRequest();
12263
+ return yield createMethod(request)
12264
+ .then(() => {
12265
+ return true;
12266
+ })
12267
+ .catch(() => {
12268
+ return false;
12280
12269
  });
12281
12270
  }
12282
12271
  else {
@@ -17660,7 +17649,7 @@ TransactionSendDocumentsComponent.decorators = [
17660
17649
  { type: Component, args: [{
17661
17650
  selector: "co-transaction-send-documents",
17662
17651
  template: `
17663
- <div class="send-documents-wrapper" *ngIf="historicReports.length > 0">
17652
+ <div class="send-documents-wrapper" *ngIf="historicReports?.length > 0">
17664
17653
  <div class="amount-send-indicator">
17665
17654
  <span [textContent]="historicReports.length"></span>
17666
17655
  </div>
@@ -40637,7 +40626,7 @@ TransactionUndoDeliveryComponent.decorators = [
40637
40626
  { type: Component, args: [{
40638
40627
  selector: "co-undo-delivery",
40639
40628
  template: `
40640
- <div class="send-documents-wrapper" *ngIf="historicReports.length > 0 && allowToUndoDelivery">
40629
+ <div class="send-documents-wrapper" *ngIf="historicReports?.length > 0 && allowToUndoDelivery">
40641
40630
  <div class="amount-send-indicator">
40642
40631
  <span [textContent]="historicReports.length"></span>
40643
40632
  </div>