taxtank-core 2.0.29 → 2.0.30
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/fesm2022/taxtank-core.mjs +6 -4
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
@@ -24237,7 +24237,8 @@ class PropertyEditForm extends AbstractForm {
|
|
24237
24237
|
purchasePrice: new UntypedFormControl(property.purchasePrice, Validators.required),
|
24238
24238
|
contractDate: new UntypedFormControl(property.contractDate, [
|
24239
24239
|
Validators.required,
|
24240
|
-
maxDateValidator(new Date(), 'You cannot add a property with a contract date in future.')
|
24240
|
+
maxDateValidator(new Date(), 'You cannot add a property with a contract date in future.'),
|
24241
|
+
maxDateValidator(new FinancialYear().endDate, 'Looks like you’re in a financial year before this property’s contract date. Please move to the right year and try again.')
|
24241
24242
|
]),
|
24242
24243
|
settlementDate: new UntypedFormControl(property.settlementDate, [
|
24243
24244
|
Validators.required,
|
@@ -24345,7 +24346,8 @@ class PropertyAddForm extends AbstractForm {
|
|
24345
24346
|
purchasePrice: new FormControl(null, Validators.required),
|
24346
24347
|
contractDate: new FormControl(null, [
|
24347
24348
|
Validators.required,
|
24348
|
-
maxDateValidator(new Date(), 'You cannot add a property with a contract date in future.')
|
24349
|
+
maxDateValidator(new Date(), 'You cannot add a property with a contract date in future.'),
|
24350
|
+
maxDateValidator(new FinancialYear().endDate, 'Looks like you’re in a financial year before this property’s contract date. Please move to the right year and try again.')
|
24349
24351
|
]),
|
24350
24352
|
settlementDate: new FormControl(null, [
|
24351
24353
|
Validators.required,
|
@@ -25964,12 +25966,12 @@ class HoldingTradeForm extends AbstractForm {
|
|
25964
25966
|
ownershipPercent: new UntypedFormControl(holdingTrade.ownershipPercent || 100, Validators.required),
|
25965
25967
|
file: new UntypedFormControl(holdingTrade.file)
|
25966
25968
|
}, holdingTrade);
|
25967
|
-
this.
|
25969
|
+
this.total = 0;
|
25968
25970
|
this.listenEvents();
|
25969
25971
|
}
|
25970
25972
|
listenEvents() {
|
25971
25973
|
this.controlsChanges(['quantity', 'price', 'fee']).subscribe(([quantity, price, fee]) => {
|
25972
|
-
this.
|
25974
|
+
this.total = quantity * price + (this.model.isPurchase() ? fee : -fee);
|
25973
25975
|
});
|
25974
25976
|
this.get('category').valueChanges.subscribe(category => {
|
25975
25977
|
this.get('holdingType').reset();
|