taxtank-core 0.29.29 → 0.29.31
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 +2921 -2836
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/allocation-group.collection.js +9 -0
- package/esm2015/lib/collections/collection.js +2 -1
- package/esm2015/lib/collections/index.js +2 -1
- package/esm2015/lib/db/Models/transaction/transaction.js +1 -1
- package/esm2015/lib/models/bank/allocation-group.js +57 -0
- package/esm2015/lib/models/bank/index.js +2 -1
- package/esm2015/lib/models/endpoint/endpoints.const.js +3 -1
- package/esm2015/lib/models/transaction/transaction.js +9 -1
- package/fesm2015/taxtank-core.js +2294 -2223
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/allocation-group.collection.d.ts +5 -0
- package/lib/collections/index.d.ts +1 -0
- package/lib/db/Models/transaction/transaction.d.ts +2 -0
- package/lib/models/bank/allocation-group.d.ts +34 -0
- package/lib/models/bank/index.d.ts +1 -0
- package/lib/models/transaction/transaction.d.ts +3 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ export * from './subscription';
|
|
|
9
9
|
export * from './tax-summary';
|
|
10
10
|
export * from './transaction';
|
|
11
11
|
export * from './vehicle';
|
|
12
|
+
export * from './allocation-group.collection';
|
|
12
13
|
export * from './account-setup-item.collection';
|
|
13
14
|
export * from './bank-account.collection';
|
|
14
15
|
export * from './bank-transaction.collection';
|
|
@@ -12,6 +12,7 @@ import { TransactionBase } from './transaction-base';
|
|
|
12
12
|
import { Property } from '../property/property';
|
|
13
13
|
import { Depreciation } from '../depreciation/depreciation';
|
|
14
14
|
import { SoleBusiness } from '../sole/sole-business';
|
|
15
|
+
import { SoleInvoiceItem } from '../sole/sole-invoice-item';
|
|
15
16
|
export declare class Transaction extends TransactionBase {
|
|
16
17
|
id?: number;
|
|
17
18
|
type?: TransactionTypeEnum;
|
|
@@ -43,4 +44,5 @@ export declare class Transaction extends TransactionBase {
|
|
|
43
44
|
updatedBy?: User;
|
|
44
45
|
business?: SoleBusiness;
|
|
45
46
|
isGST?: boolean;
|
|
47
|
+
soleInvoiceItem?: SoleInvoiceItem;
|
|
46
48
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SoleInvoice } from '../sole';
|
|
2
|
+
import { Transaction } from '../transaction';
|
|
3
|
+
import { AbstractModel } from '../../db/Models';
|
|
4
|
+
import { TransactionOperationEnum } from '../../db/Enums/transaction-operation.enum';
|
|
5
|
+
import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
|
|
6
|
+
import { BankTransactionCollection, TransactionAllocationCollection, TransactionCollection } from '../../collections';
|
|
7
|
+
/**
|
|
8
|
+
* User knows nothing about invoiceItem transaction/allocation, it's encapsulated. That's why we need an extra model to hide technical complication from user
|
|
9
|
+
* @TODO Alex: we use category and invoice number in the same place: think about common name and unite 2 fields in 1
|
|
10
|
+
* @TODO Alex: think: move check operation methods to some common class (with transaction)
|
|
11
|
+
* @TODO Alex: isTransactionChangeable method's name is breaking abstraction
|
|
12
|
+
*/
|
|
13
|
+
export declare class AllocationGroup extends AbstractModel {
|
|
14
|
+
operation: TransactionOperationEnum;
|
|
15
|
+
date: Date;
|
|
16
|
+
amount: number;
|
|
17
|
+
description: string;
|
|
18
|
+
category?: string;
|
|
19
|
+
tankType: TankTypeEnum;
|
|
20
|
+
childTransactions?: TransactionCollection;
|
|
21
|
+
invoiceNumber?: number;
|
|
22
|
+
allocations: TransactionAllocationCollection;
|
|
23
|
+
bankTransactions: BankTransactionCollection;
|
|
24
|
+
static fromInvoice(invoice: SoleInvoice, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): AllocationGroup;
|
|
25
|
+
static fromTransaction(transaction: Transaction, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): AllocationGroup;
|
|
26
|
+
isFindMatch(): boolean;
|
|
27
|
+
isMatchInvoice(): boolean;
|
|
28
|
+
isTransfer(): boolean;
|
|
29
|
+
isAllocate(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* user can edit/delete (via redo all) transaction only for allocate and find and match operations
|
|
32
|
+
*/
|
|
33
|
+
isTransactionChangeable(): boolean;
|
|
34
|
+
}
|
|
@@ -12,6 +12,7 @@ import { IReceipt } from '../../interfaces/receipt.interface';
|
|
|
12
12
|
import { TransactionAllocationCollection } from '../../collections';
|
|
13
13
|
import { Depreciation } from '../depreciation/depreciation';
|
|
14
14
|
import { Expense } from '../../interfaces/expense.interface';
|
|
15
|
+
import { SoleInvoiceItem } from '../sole';
|
|
15
16
|
export declare class Transaction extends TransactionBase implements Expense, IReceipt {
|
|
16
17
|
transactions: Transaction[];
|
|
17
18
|
property: Property;
|
|
@@ -23,6 +24,7 @@ export declare class Transaction extends TransactionBase implements Expense, IRe
|
|
|
23
24
|
loan: Loan;
|
|
24
25
|
date: Date;
|
|
25
26
|
allocations: TransactionAllocation[];
|
|
27
|
+
soleInvoiceItem: SoleInvoiceItem;
|
|
26
28
|
tax: number;
|
|
27
29
|
operation: TransactionOperationEnum;
|
|
28
30
|
allocatedAmount: number;
|
|
@@ -30,6 +32,7 @@ export declare class Transaction extends TransactionBase implements Expense, IRe
|
|
|
30
32
|
isSelected: boolean;
|
|
31
33
|
claimPercent: number;
|
|
32
34
|
amount: number;
|
|
35
|
+
get invoiceId(): number;
|
|
33
36
|
isDebit(): boolean;
|
|
34
37
|
isCredit(): boolean;
|
|
35
38
|
/**
|