taxtank-core 0.28.110 → 0.28.111

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.
@@ -19,9 +19,6 @@ export declare class TransactionCollection extends ExportableCollection<Transact
19
19
  constructor(transactions?: Transaction[], depreciations?: Depreciation[]);
20
20
  getSoleTransactions(): this;
21
21
  get amount(): number;
22
- /**
23
- * Difference between allocated amount and total amount
24
- */
25
22
  getUnallocatedAmount(allocations: TransactionAllocationCollection): number;
26
23
  /**
27
24
  * get date of the last transaction
@@ -11,16 +11,12 @@ export declare class WorkIncomeForm extends TransactionForm implements IEventLis
11
11
  */
12
12
  private buildMetadataForm;
13
13
  /**
14
- * @param transaction
15
- * @param includeAdjustments reduce result by adjustments included in salary if false or increase amount with included salary adjustments to match received payment if true,
16
- * salary/wage comes to bankAccount together with related chartAccounts like tips (kind of salary, but reported in different tax summary section),
14
+ * salary comes to bankAccount together with related transactions like tips (kind of salary, but reported in different tax summary section),
17
15
  * adjustments used to clarify received payment by separating it into multiple transactions,
18
- * formAmount always match received payment, it also matches parent transactionAmount when there are no adjustments,
19
- * otherwise it includes such adjustments, so we should exclude it from formAmount to create a salary transaction (on submit)
20
- * but include in form->amount to match bank transaction (on edit),
21
- * ie bankTransaction=1000$, it includes 900$ salary and 100$ tips (should be reported in different tax summary sections),
22
- * so we should show 1000$ in formAmount, but create 2 transactions with 900$ and 100$
16
+ * netAmount always match received payment and includes related adjustments
17
+ * amount calculated as netAmount - salary included adjustments
18
+ * ie bankTransaction=1000$ with 900$ salary and 100$ tips will create 2 transactions with 900$ and 100$
23
19
  */
24
- getAmount(transaction: Transaction, includeAdjustments?: boolean): number;
20
+ getAmount(): number;
25
21
  submit(data?: object): Transaction;
26
22
  }
@@ -85,12 +85,14 @@ export declare class Transaction extends TransactionBase implements Expense, IRe
85
85
  isAllocated(allocations: TransactionAllocationCollection): boolean;
86
86
  getAllocatedAmount(allocations: TransactionAllocationCollection): number;
87
87
  getAllocatedClaimAmount(allocations: TransactionAllocationCollection): number;
88
- /**
89
- * Get transaction unallocated amount
90
- */
91
88
  getUnallocatedAmount(allocations: TransactionAllocationCollection): number;
92
89
  /**
93
90
  * Total transaction amount including taxes and other additional amounts
94
91
  */
95
92
  get grossAmount(): number;
93
+ /**
94
+ * netAmount matches received payment (bankTransaction amount), includes gst and salary included adjustments
95
+ * ie user received 1000$ salary including 100$ tips. NetAmount=1000$, amount=900$, tips=100$
96
+ */
97
+ get netAmount(): number;
96
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.110",
3
+ "version": "0.28.111",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",