taxtank-core 0.4.1 → 0.5.2-1
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 +122 -2
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/income-source.collection.js +1 -1
- package/esm2015/lib/db/Enums/income-source-type.enum.js +2 -1
- package/esm2015/lib/db/Enums/tank-type.enum.js +1 -1
- package/esm2015/lib/db/Models/income-source.js +1 -1
- package/esm2015/lib/db/Models/sole-forecast.js +3 -0
- package/esm2015/lib/interfaces/income-source-forecast.interface.js +1 -1
- package/esm2015/lib/models/income-source/income-source-forecast.js +1 -1
- package/esm2015/lib/models/income-source/income-source-type.js +6 -1
- package/esm2015/lib/models/income-source/income-source.js +9 -2
- package/esm2015/lib/models/income-source/salary-forecast.js +1 -1
- package/esm2015/lib/models/income-source/sole-forecast.js +10 -0
- package/esm2015/lib/services/income-source/sole-forecast.service.js +87 -0
- package/esm2015/lib/services/transaction/transaction-allocation.service.js +8 -2
- package/esm2015/public-api.js +3 -2
- package/fesm2015/taxtank-core.js +106 -3
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/income-source.collection.d.ts +2 -2
- package/lib/db/Enums/income-source-type.enum.d.ts +2 -1
- package/lib/db/Models/income-source.d.ts +2 -0
- package/lib/db/Models/sole-forecast.d.ts +8 -0
- package/lib/interfaces/income-source-forecast.interface.d.ts +5 -2
- package/lib/models/income-source/income-source-forecast.d.ts +1 -2
- package/lib/models/income-source/income-source-type.d.ts +1 -0
- package/lib/models/income-source/income-source.d.ts +4 -2
- package/lib/models/income-source/salary-forecast.d.ts +1 -2
- package/lib/models/income-source/sole-forecast.d.ts +10 -0
- package/lib/services/income-source/sole-forecast.service.d.ts +33 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
- package/esm2015/lib/interfaces/salary-forecast.interface.js +0 -2
- package/lib/interfaces/salary-forecast.interface.d.ts +0 -16
|
@@ -2,7 +2,7 @@ import { Collection } from './collection';
|
|
|
2
2
|
import { IncomeSource } from '../models/income-source/income-source';
|
|
3
3
|
import { TankTypeEnum } from '../db/Enums/tank-type.enum';
|
|
4
4
|
import { IncomeSourceTypeEnum } from '../db/Enums/income-source-type.enum';
|
|
5
|
-
import {
|
|
5
|
+
import { IIncomeSourceForecast } from '../interfaces/income-source-forecast.interface';
|
|
6
6
|
/**
|
|
7
7
|
* Collection of income sources
|
|
8
8
|
*/
|
|
@@ -21,5 +21,5 @@ export declare class IncomeSourceCollection extends Collection<IncomeSource> {
|
|
|
21
21
|
/**
|
|
22
22
|
* Get income sources list of forecasts
|
|
23
23
|
*/
|
|
24
|
-
get forecasts():
|
|
24
|
+
get forecasts(): IIncomeSourceForecast[];
|
|
25
25
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { User } from './user';
|
|
2
2
|
import { SalaryForecast } from './salary-forecast';
|
|
3
|
+
import { SoleForecast } from './sole-forecast';
|
|
3
4
|
import { IncomeSourceForecast } from './income-source-forecast';
|
|
4
5
|
import { IncomeSourceTypeEnum } from '../Enums/income-source-type.enum';
|
|
5
6
|
export declare class IncomeSource {
|
|
@@ -15,6 +16,7 @@ export declare class IncomeSource {
|
|
|
15
16
|
user?: User;
|
|
16
17
|
salaryForecasts?: SalaryForecast[];
|
|
17
18
|
incomeSourceForecasts?: IncomeSourceForecast[];
|
|
19
|
+
soleForecasts?: SoleForecast[];
|
|
18
20
|
createdBy?: User;
|
|
19
21
|
updatedBy?: User;
|
|
20
22
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { IncomeSource } from "../models/income-source/income-source";
|
|
1
2
|
/**
|
|
2
3
|
* Interface for income source forecasts
|
|
3
4
|
*/
|
|
4
5
|
export interface IIncomeSourceForecast {
|
|
5
|
-
id
|
|
6
|
-
|
|
6
|
+
id?: number;
|
|
7
|
+
financialYear?: number;
|
|
8
|
+
incomeSource?: IncomeSource;
|
|
9
|
+
netPay?: number;
|
|
7
10
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { IncomeSourceForecast as IncomeSourceForecastBase } from '../../db/Models/income-source-forecast';
|
|
2
2
|
import { SalaryForecastFrequencyEnum } from '../../db/Enums/salary-forecast-frequency.enum';
|
|
3
3
|
import { IIncomeSourceForecast } from '../../interfaces/income-source-forecast.interface';
|
|
4
|
-
import { ISalaryForecast } from '../../interfaces/salary-forecast.interface';
|
|
5
4
|
import { IncomeSourceType } from './income-source-type';
|
|
6
5
|
import { IncomeSource } from './income-source';
|
|
7
|
-
export declare class IncomeSourceForecast extends IncomeSourceForecastBase implements IIncomeSourceForecast
|
|
6
|
+
export declare class IncomeSourceForecast extends IncomeSourceForecastBase implements IIncomeSourceForecast {
|
|
8
7
|
id: number;
|
|
9
8
|
incomeSourceType: IncomeSourceType;
|
|
10
9
|
tax: number;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { IncomeSource as IncomeSourceBase } from '../../db/Models/income-source';
|
|
2
|
-
import { ISalaryForecast } from '../../interfaces/salary-forecast.interface';
|
|
3
2
|
import { IIncomeSourceForecast } from '../../interfaces/income-source-forecast.interface';
|
|
4
3
|
import { SalaryForecast } from './salary-forecast';
|
|
4
|
+
import { SoleForecast } from './sole-forecast';
|
|
5
5
|
import { IncomeSourceForecast } from './income-source-forecast';
|
|
6
6
|
export declare class IncomeSource extends IncomeSourceBase {
|
|
7
7
|
salaryForecasts: SalaryForecast[];
|
|
8
|
+
soleForecasts: SoleForecast[];
|
|
8
9
|
incomeSourceForecasts: IncomeSourceForecast[];
|
|
9
10
|
dateFrom: Date;
|
|
10
11
|
dateTo: Date;
|
|
11
12
|
isSalaryIncome(): boolean;
|
|
13
|
+
isSoleIncome(): boolean;
|
|
12
14
|
isWorkIncome(): boolean;
|
|
13
15
|
isOtherIncome(): boolean;
|
|
14
16
|
/**
|
|
15
17
|
* Get salary and other income forecasts
|
|
16
18
|
*/
|
|
17
|
-
get forecasts():
|
|
19
|
+
get forecasts(): IIncomeSourceForecast[];
|
|
18
20
|
/**
|
|
19
21
|
* Get actual (1st from the list) forecast
|
|
20
22
|
*/
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SalaryForecast as SalaryForecastBase } from '../../db/Models/salary-forecast';
|
|
2
|
-
import { ISalaryForecast } from '../../interfaces/salary-forecast.interface';
|
|
3
2
|
import { SalaryForecastFrequencyEnum } from '../../db/Enums/salary-forecast-frequency.enum';
|
|
4
3
|
import { IncomeSource } from './income-source';
|
|
5
4
|
import { IIncomeSourceForecast } from '../../interfaces/income-source-forecast.interface';
|
|
6
|
-
export declare class SalaryForecast extends SalaryForecastBase implements IIncomeSourceForecast
|
|
5
|
+
export declare class SalaryForecast extends SalaryForecastBase implements IIncomeSourceForecast {
|
|
7
6
|
id: number;
|
|
8
7
|
grossAmount: number;
|
|
9
8
|
tax: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IncomeSource } from './income-source';
|
|
2
|
+
import { SoleForecast as SoleForecastBase } from "../../db/Models/sole-forecast";
|
|
3
|
+
import { IIncomeSourceForecast } from "../../interfaces/income-source-forecast.interface";
|
|
4
|
+
export declare class SoleForecast extends SoleForecastBase implements IIncomeSourceForecast {
|
|
5
|
+
financialYear?: number;
|
|
6
|
+
amount?: number;
|
|
7
|
+
taxInstalments?: number;
|
|
8
|
+
id?: number;
|
|
9
|
+
incomeSource: IncomeSource;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { SoleForecast as SoleForecastBase } from '../../db/Models/sole-forecast';
|
|
3
|
+
import { BaseRestService } from '../base-rest.service';
|
|
4
|
+
import { SoleForecast } from '../../models/income-source/sole-forecast';
|
|
5
|
+
import { EventDispatcherService } from '../event/event-dispatcher.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class SoleForecastService extends BaseRestService<SoleForecastBase, SoleForecast> {
|
|
8
|
+
protected http: HttpClient;
|
|
9
|
+
protected eventDispatcherService: EventDispatcherService;
|
|
10
|
+
protected environment: any;
|
|
11
|
+
modelClass: typeof SoleForecast;
|
|
12
|
+
url: string;
|
|
13
|
+
constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
|
|
14
|
+
/**
|
|
15
|
+
* Listen to Income Sources events
|
|
16
|
+
*/
|
|
17
|
+
listenEvents(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Listen to EventDispatcherService event related to added Income Sources
|
|
20
|
+
*/
|
|
21
|
+
private listenToAddedIncomeSources;
|
|
22
|
+
/**
|
|
23
|
+
* Listen to EventDispatcherService event related to updated Income Sources
|
|
24
|
+
*/
|
|
25
|
+
private listenToUpdatedIncomeSources;
|
|
26
|
+
/**
|
|
27
|
+
* Assign sole forecasts based on provided income sources
|
|
28
|
+
* @param incomeSources by which sole forecasts will be assigned
|
|
29
|
+
*/
|
|
30
|
+
private assignSoleForecasts;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SoleForecastService, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SoleForecastService>;
|
|
33
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -183,6 +183,7 @@ export * from './lib/models/income-source/income-source-chart-data';
|
|
|
183
183
|
export * from './lib/models/income-source/income-source-forecast';
|
|
184
184
|
export * from './lib/models/income-source/income-source-type';
|
|
185
185
|
export * from './lib/models/income-source/salary-forecast';
|
|
186
|
+
export * from './lib/models/income-source/sole-forecast';
|
|
186
187
|
export * from './lib/models/loan/loan';
|
|
187
188
|
export * from './lib/models/loan/loan-max-number-of-payments.enum';
|
|
188
189
|
export * from './lib/models/loan/loan-payment';
|
|
@@ -281,6 +282,7 @@ export * from './lib/services/header-title/header-title.service';
|
|
|
281
282
|
export * from './lib/services/income-source/income-source.service';
|
|
282
283
|
export * from './lib/services/income-source/income-source-forecast.service';
|
|
283
284
|
export * from './lib/services/income-source/salary-forecast.service';
|
|
285
|
+
export * from './lib/services/income-source/sole-forecast.service';
|
|
284
286
|
export * from './lib/services/intercom/intercom.service';
|
|
285
287
|
export * from './lib/services/loan/loan.service';
|
|
286
288
|
export * from './lib/services/notification/notification.service';
|
|
@@ -325,7 +327,6 @@ export * from './lib/interfaces/income-source-forecast.interface';
|
|
|
325
327
|
export * from './lib/interfaces/option.interface';
|
|
326
328
|
export * from './lib/interfaces/photoable';
|
|
327
329
|
export * from './lib/interfaces/receipt.interface';
|
|
328
|
-
export * from './lib/interfaces/salary-forecast.interface';
|
|
329
330
|
export * from './lib/interfaces/tank.interface';
|
|
330
331
|
/**
|
|
331
332
|
* Functions
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FsYXJ5LWZvcmVjYXN0LmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9pbnRlcmZhY2VzL3NhbGFyeS1mb3JlY2FzdC5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFNhbGFyeUZvcmVjYXN0RnJlcXVlbmN5RW51bSB9IGZyb20gJy4uL2RiL0VudW1zL3NhbGFyeS1mb3JlY2FzdC1mcmVxdWVuY3kuZW51bSc7XG5pbXBvcnQgeyBJbmNvbWVTb3VyY2UgfSBmcm9tICcuLi9tb2RlbHMvaW5jb21lLXNvdXJjZS9pbmNvbWUtc291cmNlJztcblxuLyoqXG4gKiBJbnRlcmZhY2UgZm9yIGluY29tZSBzb3VyY2UgZm9yZWNhc3RzIHRoYXQgcmVsYXRlZCB0byBTYWxhcnkgY2F0ZWdvcnlcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBJU2FsYXJ5Rm9yZWNhc3Qge1xuICBpZDogbnVtYmVyO1xuICB0YXg6IG51bWJlcjtcbiAgbmV0UGF5OiBudW1iZXI7XG4gIGdyb3NzQW1vdW50OiBudW1iZXI7XG4gIHBheWdJbmNvbWU6IG51bWJlcjtcbiAgZmluYW5jaWFsWWVhcjogbnVtYmVyO1xuICBmcmVxdWVuY3k6IFNhbGFyeUZvcmVjYXN0RnJlcXVlbmN5RW51bTtcbiAgaXNUYXhGcmVlOiBib29sZWFuO1xuICBpbmNvbWVTb3VyY2U6IEluY29tZVNvdXJjZTtcbn1cbiJdfQ==
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SalaryForecastFrequencyEnum } from '../db/Enums/salary-forecast-frequency.enum';
|
|
2
|
-
import { IncomeSource } from '../models/income-source/income-source';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for income source forecasts that related to Salary category
|
|
5
|
-
*/
|
|
6
|
-
export interface ISalaryForecast {
|
|
7
|
-
id: number;
|
|
8
|
-
tax: number;
|
|
9
|
-
netPay: number;
|
|
10
|
-
grossAmount: number;
|
|
11
|
-
paygIncome: number;
|
|
12
|
-
financialYear: number;
|
|
13
|
-
frequency: SalaryForecastFrequencyEnum;
|
|
14
|
-
isTaxFree: boolean;
|
|
15
|
-
incomeSource: IncomeSource;
|
|
16
|
-
}
|