taxtank-core 2.1.58 → 2.1.60

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/index.d.ts CHANGED
@@ -1518,7 +1518,6 @@ declare abstract class TransactionBase extends ObservableModel {
1518
1518
  chartAccounts?: ChartAccounts$1;
1519
1519
  description?: string;
1520
1520
  currency?: string;
1521
- foreignAmount?: number;
1522
1521
  exchangeRate?: number;
1523
1522
  /**
1524
1523
  * gst applies to sole trader expense/income, if he is registered and chartAccounts is eligible
@@ -1547,6 +1546,8 @@ declare abstract class TransactionBase extends ObservableModel {
1547
1546
  */
1548
1547
  get grossAmount(): number;
1549
1548
  get grossClaimAmount(): number;
1549
+ get isForeign(): boolean;
1550
+ get foreignAmount(): number;
1550
1551
  }
1551
1552
 
1552
1553
  declare enum DepreciationTypeEnum {
@@ -4086,11 +4087,13 @@ declare class BankAccount$1 extends BankAccount {
4086
4087
  bankAccountProperties: BankAccountProperty[];
4087
4088
  businessAllocations: SoleBusinessAllocation[];
4088
4089
  balances: BankAccountBalance[];
4090
+ currentBalance: number;
4089
4091
  loan: Loan;
4090
4092
  bankConnection: BankConnection$1;
4091
4093
  migrateFrom: Date;
4092
4094
  migrateTo: Date;
4093
4095
  currency: string;
4096
+ exchangeRate: number;
4094
4097
  get bank(): Bank;
4095
4098
  get bsb(): string;
4096
4099
  get number(): string;
@@ -4098,12 +4101,15 @@ declare class BankAccount$1 extends BankAccount {
4098
4101
  * Get last digits of account number
4099
4102
  */
4100
4103
  get partialAccountNumber(): string;
4104
+ /**
4105
+ * @TODO remove after tests
4106
+ */
4101
4107
  get balance(): number;
4102
4108
  getBadge(): Badge | null;
4103
4109
  /**
4104
4110
  * Get the current opening balance amount
4105
4111
  */
4106
- getOpeningBalance(year?: number): number;
4112
+ getOpeningBalance(year?: number, convertToAud?: boolean): number;
4107
4113
  /**
4108
4114
  * Get bank account balance for current financial year
4109
4115
  */
@@ -4176,6 +4182,7 @@ declare class BankAccount$1 extends BankAccount {
4176
4182
  isLoanPaid(taxTankBalance: number): boolean;
4177
4183
  isManual(): boolean;
4178
4184
  get isForeign(): boolean;
4185
+ get convertedBalance(): number;
4179
4186
  }
4180
4187
 
4181
4188
  declare class SoleBusinessAllocation extends SoleBusinessAllocation$1 {
@@ -8966,17 +8973,15 @@ declare class AssetsService {
8966
8973
  static ɵprov: i0.ɵɵInjectableDeclaration<AssetsService>;
8967
8974
  }
8968
8975
 
8976
+ /**
8977
+ * @TODO move to BankAccountCollection
8978
+ */
8969
8979
  declare class BankAccountCalculationService {
8970
8980
  /**
8971
8981
  * Sum of bank accounts opening balances and their bank transactions allocated amounts
8972
8982
  */
8973
- getTaxTankBalance(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection, exchangeRateByCurrency?: Dictionary<ExchangeRate>, excludeOpenBalance?: boolean): number;
8974
- getCashIn(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection, exchangeRateByCurrency: Dictionary<ExchangeRate>): number;
8975
- getCashOut(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection, exchangeRateByCurrency: Dictionary<ExchangeRate>): number;
8976
- /**
8977
- * get difference between total loans amount and total cash amount
8978
- */
8979
- getNetPosition(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): number;
8983
+ getTaxTankBalance(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection, convertToAud?: boolean): number;
8984
+ getAllocatedAmount(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection, convertToAud?: boolean): number;
8980
8985
  static ɵfac: i0.ɵɵFactoryDeclaration<BankAccountCalculationService, never>;
8981
8986
  static ɵprov: i0.ɵɵInjectableDeclaration<BankAccountCalculationService>;
8982
8987
  }
@@ -11331,6 +11336,7 @@ declare class BankAccount extends ObservableModel {
11331
11336
  bankTransactions?: BankTransaction$1[];
11332
11337
  balances?: BankAccountBalance[];
11333
11338
  loan?: Loan$1;
11339
+ exchangeRate: number;
11334
11340
  }
11335
11341
 
11336
11342
  declare class BankAccountBalance extends AbstractModel {
@@ -11449,6 +11455,7 @@ declare class Collection<Model extends object> implements Iterable<Model> {
11449
11455
  getIds(): number[];
11450
11456
  map(callback: (item: Model) => any): any[];
11451
11457
  mapBy(path: string): any[];
11458
+ uniqMapBy(path: string): any;
11452
11459
  sortBy(paths?: string | string[], order?: string | string[]): this;
11453
11460
  sort(callback: (a: Model, b: Model) => number): this;
11454
11461
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "2.1.58",
3
+ "version": "2.1.60",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.1.3",