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.
- package/bundles/taxtank-core.umd.js +56 -38
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection.js +3 -3
- package/esm2015/lib/db/Enums/chart-accounts/chart-accounts-keep-sign.enum.js +10 -0
- package/esm2015/lib/db/Enums/chart-accounts/chart-accounts-salary-adjustments-list.enum.js +1 -1
- package/esm2015/lib/db/Enums/chart-accounts/chart-accounts-salary-included-list.enum.js +1 -1
- package/esm2015/lib/db/Enums/chart-accounts/index.js +2 -1
- package/esm2015/lib/forms/abstract.form.js +4 -5
- package/esm2015/lib/forms/sole/bas-report.form.js +4 -2
- package/esm2015/lib/forms/transaction/transaction-base.form.js +4 -7
- package/esm2015/lib/forms/transaction/transaction.form.js +15 -12
- package/esm2015/lib/forms/transaction/work-income.form.js +11 -15
- package/esm2015/lib/models/transaction/transaction.js +11 -3
- package/fesm2015/taxtank-core.js +54 -39
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +1 -1
- package/lib/db/Enums/chart-accounts/chart-accounts-keep-sign.enum.d.ts +8 -0
- package/lib/db/Enums/chart-accounts/index.d.ts +1 -0
- package/lib/forms/abstract.form.d.ts +2 -2
- package/lib/forms/sole/bas-report.form.d.ts +1 -1
- package/lib/models/transaction/transaction.d.ts +5 -0
- package/package.json +1 -1
|
@@ -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
|
}
|