@colijnit/transaction 262.1.20 → 262.1.21

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.
@@ -225,7 +225,6 @@ import { IonePaymentStatusCode } from '@colijnit/transactionapi/build/enum/ione-
225
225
  import { HttpClient } from '@angular/common/http';
226
226
  import { CashDrawersRequest } from '@colijnit/transactionapi/build/model/cash-drawers-request';
227
227
  import { PspType } from '@colijnit/transactionapi/build/enum/psp-type.enum';
228
- import { CalculateAmountToPayRequest } from '@colijnit/transactionapi/build/model/calculate-amount-to-pay-request';
229
228
  import { DateUtils } from '@colijnit/ioneconnector/build/utils/date-utils';
230
229
  import { ImageUtils } from '@colijnit/ioneconnector/build/utils/image-utils';
231
230
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -275,6 +274,7 @@ import { TrueFalseDbType } from '@colijnit/mainapi/build/enum/true-false-db-type
275
274
  import { OrderLineSetDTO } from '@colijnit/transactionapi/build/model/order-line-set-dto';
276
275
  import { TransactionAddOrderLineSetTextLineRequest } from '@colijnit/transactionapi/build/model/transaction-add-order-line-set-text-line-request';
277
276
  import { TransactionLineCopyRequest } from '@colijnit/transactionapi/build/model/transaction-line-copy-request.bo';
277
+ import { CalculateAmountToPayRequest } from '@colijnit/transactionapi/build/model/calculate-amount-to-pay-request';
278
278
  import { ExternalCatalogAddArticleRequest } from '@colijnit/transactionapi/build/model/external-catalog-add-article-request';
279
279
  import { CopyTransactionRequest } from '@colijnit/transactionapi/build/model/copy-transaction-request';
280
280
  import { ArrayUtils } from '@colijnit/ioneconnector/build/utils/array-utils';
@@ -355,8 +355,8 @@ import { DateField } from '@colijnit/ioneconnector/build/factory/decorators/date
355
355
  class Version {
356
356
  name = "@colijnit/transaction";
357
357
  description = "Colijn IT transaction package";
358
- symVer = "262.1.20";
359
- publishDate = "16-6-2026, 17:44:35";
358
+ symVer = "262.1.21";
359
+ publishDate = "17/06/2026, 14:12:01";
360
360
  }
361
361
 
362
362
  class CheckoutModuleService extends BaseModuleService {
@@ -7799,6 +7799,16 @@ class TransactionConnectorAdapterService {
7799
7799
  return "";
7800
7800
  }
7801
7801
  }
7802
+ async roundUp(amount, paymentMethodCode, showLoader) {
7803
+ const response = await this.connector.roundUp(amount, paymentMethodCode, showLoader);
7804
+ if (response && response.validationResult && response.validationResult.success) {
7805
+ return response.resultObject;
7806
+ }
7807
+ else {
7808
+ this._handleExceptionFromResponse(response);
7809
+ return 0;
7810
+ }
7811
+ }
7802
7812
  _openPdfContent(content) {
7803
7813
  if (content) {
7804
7814
  try {
@@ -9475,6 +9485,9 @@ class TransactionConnectorService {
9475
9485
  async createQRCode(width, height, data) {
9476
9486
  return await this._adapterService.createQRCode(width, height, data);
9477
9487
  }
9488
+ async roundUp(amount, paymentMethodCode, showLoader) {
9489
+ return await this._adapterService.roundUp(amount, paymentMethodCode, showLoader);
9490
+ }
9478
9491
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TransactionConnectorService, deps: [{ token: TransactionConnectorAdapterService }, { token: TransactionSelectSingleCacheService }, { token: TransactionSelectMultipleCacheService }, { token: TransactionSelectMultipleParameterizedCacheService }, { token: TransactionSelectSingleParameterizedCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
9479
9492
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TransactionConnectorService, providedIn: "root" });
9480
9493
  }
@@ -13211,6 +13224,9 @@ class TransactionService extends PendingReasonService {
13211
13224
  async createQRCode(width, height, data) {
13212
13225
  return await this.connector.createQRCode(width, height, data);
13213
13226
  }
13227
+ async roundUp(amount, paymentMethodCode, showLoader) {
13228
+ return await this.connector.roundUp(amount, paymentMethodCode, showLoader);
13229
+ }
13214
13230
  async _handleBeforeRememberCurrentTransaction(transactionInfoResponse) {
13215
13231
  this.prepareManualSaveInternalParam();
13216
13232
  this.prepareMLocatInternalParam();
@@ -34670,6 +34686,9 @@ class TransactionPaymentService {
34670
34686
  showPaymentMethodMessage = false;
34671
34687
  set currentPaymentMethod(value) {
34672
34688
  this._currentPaymentMethod = value;
34689
+ if (value.roundUp && this.amountToPay > 0) {
34690
+ this._roundUp();
34691
+ }
34673
34692
  this.statusMessage = '';
34674
34693
  }
34675
34694
  get currentPaymentMethod() {
@@ -34792,7 +34811,6 @@ class TransactionPaymentService {
34792
34811
  }
34793
34812
  else {
34794
34813
  this.pspTransactionUuid = await this._paymentConnectorService.doPayment(request);
34795
- await this._triggerCalculateAmountToPay();
34796
34814
  }
34797
34815
  if (this.pspTransactionUuid) {
34798
34816
  this._paymentStatusPollIntervalCount = 0;
@@ -34800,13 +34818,15 @@ class TransactionPaymentService {
34800
34818
  }
34801
34819
  }
34802
34820
  else {
34821
+ if (this._currentPaymentMethod.roundUp && this.amountToPay > 0) {
34822
+ this._roundUp();
34823
+ }
34803
34824
  this._paymentConnectorService.doPayment(request).then(async () => {
34804
34825
  await this.preparePaymentInfo();
34805
34826
  if (this.currentPaymentMethod.voucher) {
34806
34827
  this._transactionEventService.posOrderVoucherPayment.next();
34807
34828
  }
34808
34829
  else {
34809
- await this._triggerCalculateAmountToPay();
34810
34830
  }
34811
34831
  this._handlePayment(false);
34812
34832
  if (this.amountToPay === 0) {
@@ -34819,6 +34839,9 @@ class TransactionPaymentService {
34819
34839
  async cancelPayment() {
34820
34840
  await this._transactionService.cancelPspTransaction(this.pspTransactionUuid);
34821
34841
  }
34842
+ async roundUp() {
34843
+ await this._roundUp();
34844
+ }
34822
34845
  async preparePaymentInfo() {
34823
34846
  if (!this.transactionUuid) {
34824
34847
  return;
@@ -34945,14 +34968,14 @@ class TransactionPaymentService {
34945
34968
  }
34946
34969
  });
34947
34970
  }
34948
- async _triggerCalculateAmountToPay() {
34949
- const amountToPayRequest = new CalculateAmountToPayRequest();
34950
- amountToPayRequest.transactionUuid = this.transactionUuid;
34951
- amountToPayRequest.paymentMethodCode = this.currentPaymentMethod.code;
34952
- this._paymentConnectorService.calculateAmountToPay(amountToPayRequest).then((result) => {
34953
- this.amountToPay = result.amountToPay;
34954
- });
34955
- }
34971
+ // private async _triggerCalculateAmountToPay(): Promise<void> {
34972
+ // const amountToPayRequest: CalculateAmountToPayRequest = new CalculateAmountToPayRequest();
34973
+ // amountToPayRequest.transactionUuid = this.transactionUuid;
34974
+ // amountToPayRequest.paymentMethodCode = this.currentPaymentMethod.code;
34975
+ // this._paymentConnectorService.calculateAmountToPay(amountToPayRequest).then((result: AmountToPay) => {
34976
+ // this.amountToPay = result.amountToPay;
34977
+ // });
34978
+ // }
34956
34979
  async _handleCashLimitCheck() {
34957
34980
  let payedAmount = await this._transactionService.getCashPaymentValueByTransId(this.transId);
34958
34981
  const limit = await this._transactionService.getCashLimitValue(InternalParam.ThresholdCashPaymentMessage);
@@ -34965,6 +34988,13 @@ class TransactionPaymentService {
34965
34988
  }
34966
34989
  return true;
34967
34990
  }
34991
+ async _roundUp() {
34992
+ if (this._currentPaymentMethod.roundUp && this.amountToPay > 0) {
34993
+ this._transactionService.roundUp(this.amountToPay, this._currentPaymentMethod.code).then((amount) => {
34994
+ this.amountToPay = amount;
34995
+ });
34996
+ }
34997
+ }
34968
34998
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TransactionPaymentService, deps: [{ token: TransactionEventService }, { token: TransactionPaymentConnectorService }, { token: DictionaryService }, { token: TransactionDialogService }, { token: TransactionService }, { token: i2$1.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable });
34969
34999
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TransactionPaymentService });
34970
35000
  }
@@ -35161,6 +35191,9 @@ class TransactionPaymentBaseComponent {
35161
35191
  paymentMethodSelected(method, index) {
35162
35192
  this.paymentMethodIdx = index;
35163
35193
  this.currentPaymentMethod = this.paymentMethods[this.paymentMethodIdx].payment;
35194
+ if (method.roundUp && this.paymentService.amountToPay > 0) {
35195
+ this.paymentService.roundUp();
35196
+ }
35164
35197
  }
35165
35198
  cashRegisterSelected(cashRegister, index) {
35166
35199
  this.cashRegisterIdx = index;
@@ -67935,6 +67968,8 @@ class TransactionSalesOrderFilterContentLogisticsComponent extends TransactionFi
67935
67968
  }
67936
67969
  deliveryMethods = [];
67937
67970
  deliveryMethodFields = { text: "description", value: "code" };
67971
+ districts = [];
67972
+ districtFields = { text: "description", value: "districtId" };
67938
67973
  hasPreferredDeliveryDate;
67939
67974
  hasPreferredDeliveryDateFields = { text: "description", value: "code" };
67940
67975
  deliveryDateFinal;
@@ -67953,6 +67988,7 @@ class TransactionSalesOrderFilterContentLogisticsComponent extends TransactionFi
67953
67988
  toBeOrderedFields = { text: "description", value: "code" };
67954
67989
  loadCollections() {
67955
67990
  this._setDeliveryMethods();
67991
+ this._setDistricts();
67956
67992
  this._setDeliveryDateFinal();
67957
67993
  this._sethasPreferredDeliveryDate();
67958
67994
  this._setTobeDelivered();
@@ -67968,6 +68004,12 @@ class TransactionSalesOrderFilterContentLogisticsComponent extends TransactionFi
67968
68004
  this.deliveryMethods = new FilterViewmodel(deliveryMethods, this.deliveryMethodFields).filterItems;
67969
68005
  });
67970
68006
  }
68007
+ //Districts (Rayons)
68008
+ _setDistricts() {
68009
+ this.transactionService.getDistricts().then((districts) => {
68010
+ this.districts = new FilterViewmodel(districts, this.districtFields).filterItems;
68011
+ });
68012
+ }
67971
68013
  //hasPreferredDeliveryDate
67972
68014
  _sethasPreferredDeliveryDate() {
67973
68015
  this.transactionService.getYesNo("NL").then((deliveryDateFinal) => {
@@ -68027,6 +68069,25 @@ class TransactionSalesOrderFilterContentLogisticsComponent extends TransactionFi
68027
68069
  </co-transaction-filter-item>
68028
68070
  </div>
68029
68071
 
68072
+ <!--Rayon-->
68073
+ <div class="filter-item-wrapper">
68074
+ <co-transaction-filter-item [placeholder]="'DISTRICT'"
68075
+ [collection]="districts"
68076
+ [(model)]="searchService.searchRequest.rangeDistrict"
68077
+ [mode]="modes.Filterlist"
68078
+ (activeFilterCountChange)="onActiveFilterCountChanged($event)">
68079
+ </co-transaction-filter-item>
68080
+ </div>
68081
+
68082
+ <!--Postcode-->
68083
+ <div class="filter-item-wrapper">
68084
+ <co-transaction-filter-item [placeholder]="'POSTAL_CODE'"
68085
+ [(model)]="searchService.searchRequest.postalCodeTr"
68086
+ [mode]="modes.TextField"
68087
+ (activeFilterCountChange)="onActiveFilterCountChanged($event)">
68088
+ </co-transaction-filter-item>
68089
+ </div>
68090
+
68030
68091
  <!--Voorkeurs Datum-->
68031
68092
  <div class="filter-item-wrapper">
68032
68093
  <co-transaction-filter-item [placeholder]="'PREFERRED_DELIVERY_DATE'"
@@ -68210,6 +68271,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
68210
68271
  </co-transaction-filter-item>
68211
68272
  </div>
68212
68273
 
68274
+ <!--Rayon-->
68275
+ <div class="filter-item-wrapper">
68276
+ <co-transaction-filter-item [placeholder]="'DISTRICT'"
68277
+ [collection]="districts"
68278
+ [(model)]="searchService.searchRequest.rangeDistrict"
68279
+ [mode]="modes.Filterlist"
68280
+ (activeFilterCountChange)="onActiveFilterCountChanged($event)">
68281
+ </co-transaction-filter-item>
68282
+ </div>
68283
+
68284
+ <!--Postcode-->
68285
+ <div class="filter-item-wrapper">
68286
+ <co-transaction-filter-item [placeholder]="'POSTAL_CODE'"
68287
+ [(model)]="searchService.searchRequest.postalCodeTr"
68288
+ [mode]="modes.TextField"
68289
+ (activeFilterCountChange)="onActiveFilterCountChanged($event)">
68290
+ </co-transaction-filter-item>
68291
+ </div>
68292
+
68213
68293
  <!--Voorkeurs Datum-->
68214
68294
  <div class="filter-item-wrapper">
68215
68295
  <co-transaction-filter-item [placeholder]="'PREFERRED_DELIVERY_DATE'"
@@ -74234,10 +74314,13 @@ class TransactionSalesQuotationFilterContentLogisticsComponent extends Transacti
74234
74314
  }
74235
74315
  deliveryMethods = [];
74236
74316
  deliveryMethodFields = { text: "description", value: "code" };
74317
+ districts = [];
74318
+ districtFields = { text: "description", value: "districtId" };
74237
74319
  warehouses;
74238
74320
  warehouseFields = { text: "description", value: "warehouseNo" };
74239
74321
  loadCollections() {
74240
74322
  this._setDeliveryMethods();
74323
+ this._setDistricts();
74241
74324
  this._setWarehouses();
74242
74325
  }
74243
74326
  //Delivery Methods
@@ -74246,6 +74329,12 @@ class TransactionSalesQuotationFilterContentLogisticsComponent extends Transacti
74246
74329
  this.deliveryMethods = new FilterViewmodel(deliveryMethods, this.deliveryMethodFields).filterItems;
74247
74330
  });
74248
74331
  }
74332
+ //Districts (Rayons)
74333
+ _setDistricts() {
74334
+ this.transactionService.getDistricts().then((districts) => {
74335
+ this.districts = new FilterViewmodel(districts, this.districtFields).filterItems;
74336
+ });
74337
+ }
74249
74338
  //Warehouses
74250
74339
  _setWarehouses() {
74251
74340
  this.transactionService.getWarehouses().then((warehouses) => {
@@ -74266,6 +74355,24 @@ class TransactionSalesQuotationFilterContentLogisticsComponent extends Transacti
74266
74355
  </co-transaction-filter-item>
74267
74356
  </div>
74268
74357
 
74358
+ <!--Rayon-->
74359
+ <div class="filter-item-wrapper">
74360
+ <co-transaction-filter-item [placeholder]="'DISTRICT'"
74361
+ [collection]="districts"
74362
+ [(model)]="searchRequest.rangeDistrict"
74363
+ [mode]="modes.Filterlist"
74364
+ >
74365
+ </co-transaction-filter-item>
74366
+ </div>
74367
+
74368
+ <!--Postcode-->
74369
+ <div class="filter-item-wrapper">
74370
+ <co-transaction-filter-item [placeholder]="'POSTAL_CODE'"
74371
+ [(model)]="searchRequest.postalCodeTr"
74372
+ [mode]="modes.TextField">
74373
+ </co-transaction-filter-item>
74374
+ </div>
74375
+
74269
74376
  <!--Leverdatum definitief-->
74270
74377
  <div class="filter-item-wrapper">
74271
74378
  <co-transaction-filter-item [placeholder]="'DELIVERY_DATE_FINAL'"
@@ -74320,6 +74427,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
74320
74427
  </co-transaction-filter-item>
74321
74428
  </div>
74322
74429
 
74430
+ <!--Rayon-->
74431
+ <div class="filter-item-wrapper">
74432
+ <co-transaction-filter-item [placeholder]="'DISTRICT'"
74433
+ [collection]="districts"
74434
+ [(model)]="searchRequest.rangeDistrict"
74435
+ [mode]="modes.Filterlist"
74436
+ >
74437
+ </co-transaction-filter-item>
74438
+ </div>
74439
+
74440
+ <!--Postcode-->
74441
+ <div class="filter-item-wrapper">
74442
+ <co-transaction-filter-item [placeholder]="'POSTAL_CODE'"
74443
+ [(model)]="searchRequest.postalCodeTr"
74444
+ [mode]="modes.TextField">
74445
+ </co-transaction-filter-item>
74446
+ </div>
74447
+
74323
74448
  <!--Leverdatum definitief-->
74324
74449
  <div class="filter-item-wrapper">
74325
74450
  <co-transaction-filter-item [placeholder]="'DELIVERY_DATE_FINAL'"
@@ -76420,6 +76545,8 @@ class TransactionServiceOrderFilterContentLogisticsComponent extends Transaction
76420
76545
  }
76421
76546
  deliveryMethods = [];
76422
76547
  deliveryMethodFields = { text: "description", value: "code" };
76548
+ districts = [];
76549
+ districtFields = { text: "description", value: "districtId" };
76423
76550
  deliveryDateFinal;
76424
76551
  deliveryDateFinalFields = { text: "description", value: "code" };
76425
76552
  toBeDelivered;
@@ -76436,6 +76563,7 @@ class TransactionServiceOrderFilterContentLogisticsComponent extends Transaction
76436
76563
  toBeOrderedFields = { text: "description", value: "code" };
76437
76564
  loadCollections() {
76438
76565
  this._setDeliveryMethods();
76566
+ this._setDistricts();
76439
76567
  this._setDeliveryDateFinal();
76440
76568
  this._setTobeDelivered();
76441
76569
  this._setWarehouses();
@@ -76450,6 +76578,12 @@ class TransactionServiceOrderFilterContentLogisticsComponent extends Transaction
76450
76578
  this.deliveryMethods = new FilterViewmodel(deliveryMethods, this.deliveryMethodFields).filterItems;
76451
76579
  });
76452
76580
  }
76581
+ //Districts (Rayons)
76582
+ _setDistricts() {
76583
+ this.transactionService.getDistricts().then((districts) => {
76584
+ this.districts = new FilterViewmodel(districts, this.districtFields).filterItems;
76585
+ });
76586
+ }
76453
76587
  //Delivery date final
76454
76588
  _setDeliveryDateFinal() {
76455
76589
  this.transactionService.getYesNo("NL").then((deliveryDateFinal) => {
@@ -76503,6 +76637,25 @@ class TransactionServiceOrderFilterContentLogisticsComponent extends Transaction
76503
76637
  </co-transaction-filter-item>
76504
76638
  </div>
76505
76639
 
76640
+ <!--Rayon-->
76641
+ <div class="filter-item-wrapper">
76642
+ <co-transaction-filter-item [placeholder]="'DISTRICT'"
76643
+ [collection]="districts"
76644
+ [(model)]="searchService.searchRequest.rangeDistrict"
76645
+ [mode]="modes.Filterlist"
76646
+ >
76647
+ </co-transaction-filter-item>
76648
+ </div>
76649
+
76650
+ <!--Postcode-->
76651
+ <div class="filter-item-wrapper">
76652
+ <co-transaction-filter-item [placeholder]="'POSTAL_CODE'"
76653
+ [(model)]="searchService.searchRequest.postalCodeTr"
76654
+ [mode]="modes.TextField"
76655
+ >
76656
+ </co-transaction-filter-item>
76657
+ </div>
76658
+
76506
76659
  <!--Leverdatum definitief-->
76507
76660
  <div class="filter-item-wrapper">
76508
76661
  <co-transaction-filter-item [placeholder]="'DELIVERY_DATE_FINAL'"
@@ -76652,6 +76805,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
76652
76805
  </co-transaction-filter-item>
76653
76806
  </div>
76654
76807
 
76808
+ <!--Rayon-->
76809
+ <div class="filter-item-wrapper">
76810
+ <co-transaction-filter-item [placeholder]="'DISTRICT'"
76811
+ [collection]="districts"
76812
+ [(model)]="searchService.searchRequest.rangeDistrict"
76813
+ [mode]="modes.Filterlist"
76814
+ >
76815
+ </co-transaction-filter-item>
76816
+ </div>
76817
+
76818
+ <!--Postcode-->
76819
+ <div class="filter-item-wrapper">
76820
+ <co-transaction-filter-item [placeholder]="'POSTAL_CODE'"
76821
+ [(model)]="searchService.searchRequest.postalCodeTr"
76822
+ [mode]="modes.TextField"
76823
+ >
76824
+ </co-transaction-filter-item>
76825
+ </div>
76826
+
76655
76827
  <!--Leverdatum definitief-->
76656
76828
  <div class="filter-item-wrapper">
76657
76829
  <co-transaction-filter-item [placeholder]="'DELIVERY_DATE_FINAL'"