@colijnit/transaction 258.1.35 → 258.1.37

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 (20) hide show
  1. package/bundles/colijnit-transaction.umd.js +38 -10
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.js +3 -5
  5. package/esm2015/lib/component/deposit-payment/deposit-payment.component.js +5 -2
  6. package/esm2015/lib/component/payment/payment.component.js +10 -3
  7. package/esm2015/lib/component/relation/relation-address/relation-address.component.js +25 -15
  8. package/esm2015/lib/component/transaction-line/transaction-receive-goods-line/transaction-receive-goods-line-base.component.js +3 -1
  9. package/esm2015/lib/component/transaction-line/transaction-receive-goods-line/transaction-receive-goods-line.component.js +2 -3
  10. package/esm2015/lib/component/transaction-line-purchase-receive-goods/transaction-line-purchase-receive-goods.component.js +3 -3
  11. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.js +10 -2
  12. package/esm2015/lib/transaction-version.js +3 -3
  13. package/fesm2015/colijnit-transaction.js +53 -27
  14. package/fesm2015/colijnit-transaction.js.map +1 -1
  15. package/lib/component/deposit-payment/deposit-payment.component.d.ts +2 -1
  16. package/lib/component/payment/payment.component.d.ts +2 -0
  17. package/lib/component/relation/relation-address/relation-address.component.d.ts +5 -0
  18. package/lib/component/transaction-line/transaction-receive-goods-line/transaction-receive-goods-line-base.component.d.ts +1 -0
  19. package/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.d.ts +1 -0
  20. package/package.json +1 -1
@@ -294,8 +294,8 @@ class Version {
294
294
  constructor() {
295
295
  this.name = "@colijnit/transaction";
296
296
  this.description = "Colijn IT transaction package";
297
- this.symVer = "258.1.35";
298
- this.publishDate = "19-6-2025 10:49:58";
297
+ this.symVer = "258.1.37";
298
+ this.publishDate = "23-6-2025 11:42:41";
299
299
  }
300
300
  }
301
301
 
@@ -15312,9 +15312,7 @@ CheckoutOverviewRelationEditComponent.decorators = [
15312
15312
  (inputChangeForSuggestions)="handleInputChange($event)"
15313
15313
  ></co-relation-address>
15314
15314
  </div>
15315
- </div>
15316
- <div class="checkout-data-column" *ngIf="relationKind === relKind.Customer">
15317
- <div class="checkout-data-row">
15315
+ <div *ngIf="relationKind === relKind.Customer">
15318
15316
  <co-vat-payment [model]="vatPayment"
15319
15317
  [screenConfigurationObject]="cfgNames.RelationVatPayment"
15320
15318
  (modelChange)="handleVatPaymentChange($event)"
@@ -15323,7 +15321,7 @@ CheckoutOverviewRelationEditComponent.decorators = [
15323
15321
  [screenConfigurationObject]="cfgNames.RelationVatCode"
15324
15322
  (modelChange)="handleVatCodeChange($event)"
15325
15323
  ></co-vat-code>
15326
- </div>
15324
+ </div>
15327
15325
  </div>
15328
15326
  <ng-container *ngIf="showAddresses">
15329
15327
  <div class="checkout-data-column">
@@ -16878,7 +16876,7 @@ class RelationAddressComponent extends RelationBaseComponent {
16878
16876
  this.transactionService = transactionService;
16879
16877
  this.addressChange = new EventEmitter();
16880
16878
  this.countries = [];
16881
- // public addressTypes: CoDomainValue[] = [];
16879
+ this.addressTypes = [];
16882
16880
  this.fields = { text: "description", value: "code" };
16883
16881
  this.postalCodeCheckErrorMessage = "";
16884
16882
  this._prevPostalCodeForCheck = "";
@@ -16901,9 +16899,9 @@ class RelationAddressComponent extends RelationBaseComponent {
16901
16899
  this.countries = countries;
16902
16900
  this._setSelectedAddress();
16903
16901
  });
16904
- // this._connector.getAddressTypes('NL').then((codes: CoDomainValue[]) => {
16905
- // this.addressTypes = codes;
16906
- // });
16902
+ this._connector.getAddressTypes('NL').then((codes) => {
16903
+ this.addressTypes = codes;
16904
+ });
16907
16905
  });
16908
16906
  }
16909
16907
  checkForPostalCodeCheckError() {
@@ -16967,6 +16965,14 @@ class RelationAddressComponent extends RelationBaseComponent {
16967
16965
  this.inputChangeForSuggestions.next(this.suggestionRequest);
16968
16966
  }
16969
16967
  }
16968
+ handleAddressTypeChange(addressType) {
16969
+ if (Object.values(AddressType).includes(addressType.code)) {
16970
+ this.address.addressType = addressType.code;
16971
+ }
16972
+ }
16973
+ addressTypeForCode(addressType) {
16974
+ return this.addressTypes.find((addressTypeListItem) => addressTypeListItem.code === addressType);
16975
+ }
16970
16976
  _setSelectedAddress() {
16971
16977
  if (!this.address || !this.countries) {
16972
16978
  return;
@@ -17026,16 +17032,17 @@ RelationAddressComponent.decorators = [
17026
17032
  (modelChange)="handleCountryChange($event)"
17027
17033
  ></co-list-of-values>
17028
17034
  </div>
17029
- <!-- <div class="relation-address-data-row default single">-->
17030
- <!-- <co-list-of-values-->
17031
- <!-- [(model)]="address.addressType"-->
17032
- <!-- [collection]="addressTypes"-->
17033
- <!-- [displayField]="'description'"-->
17034
- <!-- [label]="'ADDRESS_TYPE' | localize"-->
17035
- <!-- [required]="true"-->
17036
- <!-- ></co-list-of-values>-->
17037
- <!-- </div>-->
17038
- <!-- -->
17035
+ <div class="relation-address-data-row default single">
17036
+ <co-list-of-values
17037
+ [model]="addressTypeForCode(address.addressType)"
17038
+ (modelChange)="handleAddressTypeChange($event)"
17039
+ [collection]="addressTypes"
17040
+ [displayField]="'description'"
17041
+ [label]="'ADDRESS_TYPE' | localize"
17042
+ [required]="true"
17043
+ ></co-list-of-values>
17044
+ </div>
17045
+
17039
17046
  `,
17040
17047
  encapsulation: ViewEncapsulation.None
17041
17048
  },] }
@@ -20302,6 +20309,7 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
20302
20309
  this.additionalFileName = '';
20303
20310
  this.pdfDoc = '';
20304
20311
  this.disablePdfPreview = false;
20312
+ this.isAdditionalDocAllowedByScreenConfig = false;
20305
20313
  }
20306
20314
  ngOnInit() {
20307
20315
  super.ngOnInit();
@@ -20390,6 +20398,9 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
20390
20398
  this.transactionService.getTermsAndConditionsForm(this.transactionInfo.id).then(result => {
20391
20399
  this.additionalFileContents = result;
20392
20400
  this.additionalFileName = this.transactionInfo.transactionKind + '_' + this.transactionInfo.transactionNr.toString();
20401
+ // @ts-ignore
20402
+ this.isAdditionalDocEnabled = this.isAdditionalDocAllowedByScreenConfig && !!result;
20403
+ this.detectChanges();
20393
20404
  });
20394
20405
  }
20395
20406
  upsertDocument(doc) {
@@ -20419,7 +20430,11 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
20419
20430
  this._getEmailLayouts();
20420
20431
  this._getPrintLayouts();
20421
20432
  this.isDocSignEnabled = this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsDocSignEnabled).immediatelyVisible();
20422
- this.isAdditionalDocEnabled = this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsAdditionalDocEnabled).immediatelyVisible();
20433
+ this.isAdditionalDocAllowedByScreenConfig =
20434
+ this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsAdditionalDocEnabled).immediatelyVisible();
20435
+ if (this.isAdditionalDocAllowedByScreenConfig) {
20436
+ this.getTermsAndConditionsForm();
20437
+ }
20423
20438
  this.getHistoricDocuments();
20424
20439
  }
20425
20440
  _getPrinters() {
@@ -21999,6 +22014,7 @@ class TransactionReceiveGoodsLineBaseComponent extends TransactionLineBaseCompon
21999
22014
  this.transactionTypeCategory = TransactionTypeCategory;
22000
22015
  this.warehouseLocationButtonDisabled = false;
22001
22016
  this.showCheckboxForLine = false;
22017
+ this.returnStockMode = false;
22002
22018
  this._subscriptions = [];
22003
22019
  }
22004
22020
  ngOnInit() {
@@ -22026,6 +22042,7 @@ class TransactionReceiveGoodsLineBaseComponent extends TransactionLineBaseCompon
22026
22042
  transactionLineSet() {
22027
22043
  super.transactionLineSet();
22028
22044
  this._handleTransactionLineSet(this.transactionLine);
22045
+ this.returnStockMode = this.transactionLine.amount < 0;
22029
22046
  }
22030
22047
  _handleTransactionLineSet(transLine) {
22031
22048
  this.warehouseLocationButtonDisabled = transLine.articleLineStatus.quantityReceived === transLine.amount ||
@@ -22112,9 +22129,8 @@ TransactionReceiveGoodsLineComponent.decorators = [
22112
22129
  <co-transaction-line-label [insideLabel]="'BATCH_NR'"></co-transaction-line-label>
22113
22130
  <co-input-text class="side-panel-input"
22114
22131
  [(model)]="transactionLine.batchNr"
22115
- [type]="'number'"
22116
22132
  [hideArrowButtons]="true"
22117
- [readonly]="true"
22133
+ [readonly]="this.returnStockMode || readonly"
22118
22134
  [required]="true"
22119
22135
  [customHeight]="true"
22120
22136
  ></co-input-text>
@@ -37482,7 +37498,8 @@ class TransactionLinePurchaseReceiveGoodsComponent extends TransactionLineBaseCo
37482
37498
  this.receiptDetails.lineNr = this.transactionLine.lineNr;
37483
37499
  this.receiptDetails.quantityToReceive = this.lineQuantityToReceive;
37484
37500
  this.receiptDetails.locationNr = this.transactionLine.locationNr;
37485
- this.returnStockMode === this.transactionLine.amount < 0;
37501
+ this.returnStockMode = this.transactionLine.amount < 0;
37502
+ this.receiptDetails.batchNr = this.transactionLine.batchNr;
37486
37503
  this.getGoodsReceiptHistory();
37487
37504
  }
37488
37505
  _getAvailableStock() {
@@ -37539,7 +37556,6 @@ TransactionLinePurchaseReceiveGoodsComponent.decorators = [
37539
37556
  ></co-transaction-labeled-warehouse-location-button>
37540
37557
  -->
37541
37558
  <co-input-text class="side-panel-input" [(model)]="receiptDetails.batchNr" *ngIf="transactionLine.isBatchNrRequired"
37542
- [type]="'number'"
37543
37559
  [hideArrowButtons]="true"
37544
37560
  [readonly]="readonly || returnStockMode"
37545
37561
  [disabled]="returnStockMode"
@@ -49751,6 +49767,9 @@ class PaymentComponent extends TransactionPaymentBaseComponent {
49751
49767
  super.cashRegisterSelected(cashRegister, index);
49752
49768
  this.activeCashRegister = cashRegister;
49753
49769
  }
49770
+ onDepositPaymentFetched(depositAmount) {
49771
+ this.depositAmount = depositAmount;
49772
+ }
49754
49773
  }
49755
49774
  PaymentComponent.decorators = [
49756
49775
  { type: Component, args: [{
@@ -49794,7 +49813,7 @@ PaymentComponent.decorators = [
49794
49813
  <div class="payment-to-pay-total">
49795
49814
  <div class="payment-to-pay-header">
49796
49815
  <span class="payment-header-title" [textContent]="'TOTAL_AMOUNT_TO_PAY' | localize"></span>
49797
- <span class="payment-total-pay" [textContent]="amount === 0 ? amount : (amount | coCurrency)"></span>
49816
+ <span class="payment-total-pay" [textContent]="depositAmount ? (depositAmount | coCurrency: true) : (paymentService.amount | coCurrency: true)"></span>
49798
49817
  </div>
49799
49818
  <div class="payment-input-button-wrapper">
49800
49819
  <div class="payment-input-button">
@@ -49817,7 +49836,11 @@ PaymentComponent.decorators = [
49817
49836
  </div>
49818
49837
 
49819
49838
  <div class="payment-deposit">
49820
- <co-deposit-payment [branch]="branch" [transactionUuid]="transactionUuid"></co-deposit-payment>
49839
+ <co-deposit-payment
49840
+ [branch]="branch"
49841
+ [transactionUuid]="transactionUuid"
49842
+ (depositPaymentFetched)="onDepositPaymentFetched($event)">
49843
+ </co-deposit-payment>
49821
49844
  </div>
49822
49845
  <co-key-pad class="payment-to-pay-keypad" *ngIf="showKeyPad"
49823
49846
  [showValue]="false"
@@ -49979,6 +50002,7 @@ class DepositPaymentComponent {
49979
50002
  this._transactionEventService = _transactionEventService;
49980
50003
  this.transKind = TransactionKind;
49981
50004
  this.showTitle = true;
50005
+ this.depositPaymentFetched = new EventEmitter();
49982
50006
  this.paymentMethods = [];
49983
50007
  this.depositPayments = [];
49984
50008
  this.showLoader = true;
@@ -50002,6 +50026,7 @@ class DepositPaymentComponent {
50002
50026
  this._paymentConnectorService.getDepositPaymentInfo(this.transactionUuid).then((info) => {
50003
50027
  this.depositPayments.length = 0;
50004
50028
  if (info && info.depositPayments) {
50029
+ this.depositPaymentFetched.emit(info.depositAmount);
50005
50030
  info.depositPayments.sort((a, b) => a.id > b.id ? 1 : -1);
50006
50031
  info.depositPayments.forEach((dp) => {
50007
50032
  const paymentMethod = this.paymentMethods.find(pm => pm.payment.code === dp.paymentMethodCode);
@@ -50055,6 +50080,7 @@ DepositPaymentComponent.propDecorators = {
50055
50080
  transactionKind: [{ type: Input }],
50056
50081
  showTitle: [{ type: Input }],
50057
50082
  transactionUuid: [{ type: Input }],
50083
+ depositPaymentFetched: [{ type: Output }],
50058
50084
  showClass: [{ type: HostBinding, args: ["class.co-deposit-payment",] }]
50059
50085
  };
50060
50086