taxtank-core 0.28.113 → 0.28.115

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.
@@ -28,7 +28,7 @@ export declare class Collection<Model extends AbstractModel> implements Iterable
28
28
  /**
29
29
  * Get total sum of items by field
30
30
  */
31
- sumBy(path: string): number;
31
+ sumBy(path: string, abs?: boolean): number;
32
32
  groupBy(path?: string): CollectionDictionary<this>;
33
33
  indexBy(path: string): object;
34
34
  filter(callback: (item: Model) => boolean): this;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * most of chartAccounts could have only negative or positive amount,
3
+ * but there are exceptions like advance income (free loan from company u work for), it's positive number when you receive it,
4
+ * and negative when you pay it back (still income, but with negative amount)
5
+ */
6
+ export declare enum ChartAccountsKeepSign {
7
+ ADVANCE = 556
8
+ }
@@ -10,3 +10,4 @@ export * from './chart-accounts-metadata-type.enum';
10
10
  export * from './chart-accounts-salary-adjustments-list.enum';
11
11
  export * from './chart-accounts-salary-included-list.enum';
12
12
  export * from './chart-accounts-type.enum';
13
+ export * from './chart-accounts-keep-sign.enum';
@@ -10,7 +10,6 @@ export declare abstract class AbstractForm<Model> extends FormGroup {
10
10
  * Initial form value for comparison with changes to check saved/unsaved state
11
11
  */
12
12
  initialValue: Model;
13
- submitDisabledFields: boolean;
14
13
  protected modelClass: Type<Model>;
15
14
  model: Model;
16
15
  submitted: boolean;
@@ -29,8 +28,9 @@ export declare abstract class AbstractForm<Model> extends FormGroup {
29
28
  * Check validation and return a new instance of generic model.
30
29
  * Merge form value to initial object
31
30
  * @param data Additional data object which be merged to form value
31
+ * @param includeDisabledFields ignore disabled fields
32
32
  */
33
- submit(data?: object): Model;
33
+ submit(data?: object, includeDisabledFields?: boolean): Model;
34
34
  addControl(name: string, control: AbstractControl, options?: {
35
35
  emitEvent?: boolean;
36
36
  }): this;
@@ -8,9 +8,9 @@ import { DepreciationCollection } from '../../collections/depreciation.collectio
8
8
  */
9
9
  export declare class BasReportForm extends AbstractForm<BasReport> {
10
10
  private report;
11
- submitDisabledFields: boolean;
12
11
  /**
13
12
  * @TODO vik TransactionBaseCollection here and everywhere
14
13
  */
15
14
  constructor(report: BasReport, transactions: TransactionCollection, allocations: TransactionAllocationCollection, depreciations: DepreciationCollection);
15
+ submit(data?: object): BasReport;
16
16
  }
@@ -95,4 +95,9 @@ export declare class Transaction extends TransactionBase implements Expense, IRe
95
95
  * ie user received 1000$ salary including 100$ tips. NetAmount=1000$, amount=900$, tips=100$
96
96
  */
97
97
  get netAmount(): number;
98
+ /**
99
+ * most of the transactions could have only positive or negative amount depends on chartAccounts, so we ignore
100
+ * user's choice and transform amount, but there are exceptions like advance (negative or positive amount)
101
+ */
102
+ ignoreSign(): boolean;
98
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.113",
3
+ "version": "0.28.115",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",