taxtank-core 0.30.1 → 0.30.3
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/esm2020/lib/collections/collection.mjs +1 -1
- package/esm2020/lib/db/Models/transaction/transaction-base.mjs +5 -1
- package/esm2020/lib/db/static/chart-accounts/chart-accounts-value.json +376 -0
- package/esm2020/lib/db-static/chart-accounts/chart-accounts-values.mjs +6 -0
- package/esm2020/lib/forms/transaction/work/work-transaction.form.mjs +2 -1
- package/esm2020/lib/models/chart-accounts/chart-accounts.mjs +16 -2
- package/esm2020/lib/models/transaction/transaction.mjs +4 -4
- package/esm2020/lib/services/http/rest/rest-old.service.mjs +13 -3
- package/esm2020/lib/services/http/transaction/transaction.service.mjs +10 -10
- package/esm2020/lib/services/pdf/index.mjs +2 -1
- package/esm2020/lib/services/pdf/js-pdf.mjs +8 -0
- package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.mjs +5 -6
- package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.mjs +4 -5
- package/fesm2015/taxtank-core.mjs +4351 -3868
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +4321 -3838
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/collection.d.ts +1 -1
- package/lib/db/Models/transaction/transaction-base.d.ts +4 -0
- package/lib/db-static/chart-accounts/chart-accounts-values.d.ts +3 -0
- package/lib/models/chart-accounts/chart-accounts.d.ts +1 -0
- package/lib/models/transaction/transaction.d.ts +5 -5
- package/lib/services/http/rest/rest-old.service.d.ts +9 -1
- package/lib/services/http/transaction/transaction.service.d.ts +2 -1
- package/lib/services/pdf/index.d.ts +1 -0
- package/lib/services/pdf/js-pdf.d.ts +9 -0
- package/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectionDictionary } from './collection-dictionary';
|
|
2
|
-
import { AbstractModel } from '../db/Models
|
|
2
|
+
import { AbstractModel } from '../db/Models';
|
|
3
3
|
/**
|
|
4
4
|
* Base collection class. Contains common properties and methods for all collections
|
|
5
5
|
*/
|
|
@@ -23,6 +23,10 @@ export declare class TransactionBase extends ObservableModel {
|
|
|
23
23
|
claimPercent?: number;
|
|
24
24
|
get claimRatio(): number;
|
|
25
25
|
get tankType(): TankTypeEnum;
|
|
26
|
+
/**
|
|
27
|
+
* @TODO remove when AllocateForm is refactored and not merging with Transaction class which cause the issue
|
|
28
|
+
*/
|
|
29
|
+
set tankType(tankType: TankTypeEnum);
|
|
26
30
|
/**
|
|
27
31
|
* Check if current tank is Property
|
|
28
32
|
*/
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Transaction as TransactionBase } from '../../db/Models/transaction/transaction';
|
|
2
2
|
import { ChartAccountsCategoryEnum, ChartAccountsMetadataListEnum } from '../../db/Enums';
|
|
3
3
|
import { TransactionOperationEnum } from '../../db/Enums/transaction-operation.enum';
|
|
4
|
-
import { Property } from '../property
|
|
4
|
+
import { Property } from '../property';
|
|
5
5
|
import { TransactionReceipt } from './transaction-receipt';
|
|
6
6
|
import { ChartAccounts } from '../chart-accounts';
|
|
7
7
|
import { IncomeSource } from '../income-source/income-source';
|
|
8
8
|
import { TransactionMetadata } from './transaction-metadata';
|
|
9
|
-
import { Loan } from '../loan
|
|
9
|
+
import { Loan } from '../loan';
|
|
10
10
|
import { TransactionAllocation } from './transaction-allocation';
|
|
11
|
-
import { IReceipt } from '../../interfaces
|
|
11
|
+
import { IReceipt } from '../../interfaces';
|
|
12
12
|
import { TransactionAllocationCollection } from '../../collections';
|
|
13
|
-
import { Depreciation } from '../depreciation
|
|
14
|
-
import { Expense } from '../../interfaces
|
|
13
|
+
import { Depreciation } from '../depreciation';
|
|
14
|
+
import { Expense } from '../../interfaces';
|
|
15
15
|
import { SoleInvoiceItem } from '../sole';
|
|
16
16
|
export declare class Transaction extends TransactionBase implements Expense, IReceipt {
|
|
17
17
|
transactions: Transaction[];
|
|
@@ -99,8 +99,16 @@ export declare abstract class RestService<BaseModel, Model extends BaseModel> im
|
|
|
99
99
|
* Create new instance of class
|
|
100
100
|
* @param model The class for which you want to create an instance
|
|
101
101
|
* @param baseModel base model instance that we will use as constructor options
|
|
102
|
+
* @param data additional data
|
|
102
103
|
*/
|
|
103
|
-
protected createModelInstance(model: new (bm: BaseModel) => Model, baseModel: BaseModel): Model;
|
|
104
|
+
protected createModelInstance(model: new (bm: BaseModel) => Model, baseModel: BaseModel, data?: object): Model;
|
|
105
|
+
/**
|
|
106
|
+
* @TODO Alex is there any point to pass model param instead of this.modelClass?
|
|
107
|
+
* Create new instance of class
|
|
108
|
+
* @param baseModel base model instance that we will use as constructor options
|
|
109
|
+
* @param data additional data
|
|
110
|
+
*/
|
|
111
|
+
protected createModelInstance2(baseModel: object, data?: object): Model;
|
|
104
112
|
/**
|
|
105
113
|
* Method that call all listeners. Empty by default. Should be redefined by child services if required
|
|
106
114
|
*/
|
|
@@ -7,7 +7,7 @@ import { TransactionReceiptService } from './transaction-receipt/transaction-rec
|
|
|
7
7
|
import { HttpClient } from '@angular/common/http';
|
|
8
8
|
import { EventDispatcherService } from '../../event';
|
|
9
9
|
import { ToastService } from '../../toast';
|
|
10
|
-
import { IEventListener } from '../../../interfaces
|
|
10
|
+
import { IEventListener } from '../../../interfaces';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
/**
|
|
13
13
|
* Service for transactions business logic
|
|
@@ -94,6 +94,7 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
|
|
|
94
94
|
private listenPropertyForecastUpdate;
|
|
95
95
|
private replaceInCache;
|
|
96
96
|
private listenInvoicesPublish;
|
|
97
|
+
protected createModelInstance2(baseModel: object, data?: object): Transaction;
|
|
97
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<TransactionService, never>;
|
|
98
99
|
static ɵprov: i0.ɵɵInjectableDeclaration<TransactionService>;
|
|
99
100
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsPDF } from 'jspdf';
|
|
2
|
+
import { UserOptions } from 'jspdf-autotable';
|
|
3
|
+
/**
|
|
4
|
+
* jspdf-autotable is a plugin, adding table functionality to jspdf object without new class,
|
|
5
|
+
* we need to let ts knows about that by defining an interface and extending jsPdf class (to avoid ts error)
|
|
6
|
+
*/
|
|
7
|
+
export declare class JsPdf extends jsPDF {
|
|
8
|
+
autoTable: (options: UserOptions) => jsPDF;
|
|
9
|
+
}
|
package/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExportDataTable } from '../../../../models/export/export-data-table';
|
|
2
2
|
import { PdfSettings } from '../../../../models/pdf/pdf-settings';
|
|
3
|
-
import { ExportFormatterService } from '../../../export
|
|
3
|
+
import { ExportFormatterService } from '../../../export';
|
|
4
4
|
import { PdfFromTableService } from '../pdf-from-table.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taxtank-core",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/compiler": "^15.1.5",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"moment": "^2.29.4",
|
|
19
19
|
"moment-range": "^4.0.2",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
|
-
"jspdf": "^2.
|
|
21
|
+
"jspdf": "^2.5.1",
|
|
22
22
|
"html2pdf.js": "^0.10.1",
|
|
23
|
-
"jspdf-autotable": "^3.5.
|
|
23
|
+
"jspdf-autotable": "^3.5.28",
|
|
24
24
|
"rxjs": "~6.6.0",
|
|
25
25
|
"xlsx": "^0.17.4",
|
|
26
26
|
"file-saver": "^2.0.5"
|