taxtank-core 0.28.43 → 0.28.44

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.
@@ -1 +1,2 @@
1
+ export * from './sole-business-losses.collection';
1
2
  export * from './sole-invoice.collection';
@@ -0,0 +1,9 @@
1
+ import { Collection } from '../collection';
2
+ import { SoleBusinessLoss } from '../../models';
3
+ import { TransactionBaseCollection } from '../transaction';
4
+ export declare class SoleBusinessLossesCollection extends Collection<SoleBusinessLoss> {
5
+ /**
6
+ * Calculate business losses applied to the current year
7
+ */
8
+ calculateBusinessLossApplied(transactions: TransactionBaseCollection): number;
9
+ }
@@ -1,6 +1,9 @@
1
1
  import { TransactionBase } from '../../db/Models/transaction/transaction-base';
2
2
  import { Collection } from '../collection';
3
- import { SoleBusiness } from '../../models';
4
3
  export declare class TransactionBaseCollection extends Collection<TransactionBase> {
5
- getClaimAmountByBusiness(business: SoleBusiness): number;
4
+ getClaimAmountByBusinessId(businessId: number): number;
5
+ /**
6
+ * Get business related transactions
7
+ */
8
+ getWithBusiness(): this;
6
9
  }
@@ -1,8 +1,5 @@
1
1
  import { AbstractForm } from '../../abstract.form';
2
2
  import { MyTaxLosses } from '../../../models/report/my-tax/my-tax-losses/my-tax-losses';
3
- /**
4
- * @Todo waiting for Sole tank implementation
5
- */
6
3
  export declare class MyTaxLossesForm extends AbstractForm<MyTaxLosses> {
7
4
  constructor(losses: MyTaxLosses);
8
5
  }
@@ -1,8 +1,18 @@
1
- import { TransactionCollection } from '../../../../collections/transaction/transaction.collection';
1
+ import { TransactionBaseCollection, SoleBusinessLossesCollection } from '../../../../collections';
2
2
  /**
3
- * @Todo waiting for Sole tank implementation
3
+ * Sole business losses report
4
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Losses" section)
4
5
  */
5
6
  export declare class MyTaxLosses {
6
- transactions: TransactionCollection;
7
- constructor(transactions: TransactionCollection);
7
+ private transactions;
8
+ private businessLosses;
9
+ /**
10
+ * Losses carried forward from earlier income years
11
+ */
12
+ businessLossDeferred: number;
13
+ /**
14
+ * Losses applied to the current year (until profit gets to $0)
15
+ */
16
+ businessLossApplied: number;
17
+ constructor(transactions: TransactionBaseCollection, businessLosses: SoleBusinessLossesCollection);
8
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.43",
3
+ "version": "0.28.44",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",