@tomei/finance 0.6.99 → 0.6.102
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/.husky/commit-msg +12 -3
- package/.husky/pre-commit +4 -4
- package/configs/config.js +1 -1
- package/dist/account/account.d.ts +37 -37
- package/dist/account/account.js +251 -263
- package/dist/account/account.js.map +1 -1
- package/dist/account/account.repository.d.ts +5 -5
- package/dist/account/account.repository.js +11 -11
- package/dist/account/interfaces/account-attr.interface.d.ts +29 -29
- package/dist/account/interfaces/account-attr.interface.js +2 -2
- package/dist/account-system-entity/account-system-entity.d.ts +12 -12
- package/dist/account-system-entity/account-system-entity.js +55 -66
- package/dist/account-system-entity/account-system-entity.js.map +1 -1
- package/dist/account-system-entity/post-history.repository.d.ts +5 -5
- package/dist/account-system-entity/post-history.repository.js +11 -11
- package/dist/config.d.ts +1888 -1888
- package/dist/config.js +331 -331
- package/dist/config.js.map +1 -1
- package/dist/customer/customer.d.ts +44 -44
- package/dist/customer/customer.js +212 -234
- package/dist/customer/customer.js.map +1 -1
- package/dist/customer/finance-customer.repository.d.ts +5 -5
- package/dist/customer/finance-customer.repository.js +25 -25
- package/dist/customer/finance-customer.repository.js.map +1 -1
- package/dist/customer/interfaces/customer.repository.interface.d.ts +3 -3
- package/dist/customer/interfaces/customer.repository.interface.js +2 -2
- package/dist/customer/interfaces/finance-customer-attr.interface.d.ts +10 -10
- package/dist/customer/interfaces/finance-customer-attr.interface.js +2 -2
- package/dist/customer/interfaces/finance-customer.repository.interface.d.ts +3 -3
- package/dist/customer/interfaces/finance-customer.repository.interface.js +2 -2
- package/dist/database.d.ts +4 -4
- package/dist/database.js +46 -47
- package/dist/database.js.map +1 -1
- package/dist/document/document-item.d.ts +46 -46
- package/dist/document/document-item.js +122 -132
- package/dist/document/document-item.js.map +1 -1
- package/dist/document/document-item.repository.d.ts +5 -5
- package/dist/document/document-item.repository.js +11 -11
- package/dist/document/document.d.ts +87 -88
- package/dist/document/document.js +735 -766
- package/dist/document/document.js.map +1 -1
- package/dist/document/document.repository.d.ts +5 -5
- package/dist/document/document.repository.js +11 -11
- package/dist/document/interfaces/document-attr.interface.d.ts +27 -27
- package/dist/document/interfaces/document-attr.interface.js +6 -6
- package/dist/document/interfaces/document-find-all.interface.d.ts +13 -13
- package/dist/document/interfaces/document-find-all.interface.js +2 -2
- package/dist/document/interfaces/document-item-attr.interface.d.ts +26 -26
- package/dist/document/interfaces/document-item-attr.interface.js +6 -6
- package/dist/document/interfaces/document-item.repository.interface.d.ts +3 -3
- package/dist/document/interfaces/document-item.repository.interface.js +2 -2
- package/dist/enum/collect-payment-type.d.ts +4 -4
- package/dist/enum/collect-payment-type.js +8 -8
- package/dist/enum/collect-payment-type.js.map +1 -1
- package/dist/enum/doc-type.enum.d.ts +8 -8
- package/dist/enum/doc-type.enum.js +12 -12
- package/dist/enum/doc-type.enum.js.map +1 -1
- package/dist/enum/document-status.enum.d.ts +6 -6
- package/dist/enum/document-status.enum.js +10 -10
- package/dist/enum/document-status.enum.js.map +1 -1
- package/dist/enum/index.d.ts +9 -9
- package/dist/enum/index.js +19 -19
- package/dist/enum/payment-method.enum.d.ts +3 -3
- package/dist/enum/payment-method.enum.js +7 -7
- package/dist/enum/payment-method.enum.js.map +1 -1
- package/dist/enum/payment-status.enum.d.ts +10 -10
- package/dist/enum/payment-status.enum.js +15 -16
- package/dist/enum/payment-status.enum.js.map +1 -1
- package/dist/enum/payment-type.enum.d.ts +4 -4
- package/dist/enum/payment-type.enum.js +8 -8
- package/dist/enum/payment-type.enum.js.map +1 -1
- package/dist/enum/quick-book-client-scopes.enum.d.ts +13 -13
- package/dist/enum/quick-book-client-scopes.enum.js +18 -18
- package/dist/enum/quick-book-client-scopes.enum.js.map +1 -1
- package/dist/enum/transaction-type.enum.d.ts +4 -4
- package/dist/enum/transaction-type.enum.js +8 -8
- package/dist/enum/transaction-type.enum.js.map +1 -1
- package/dist/finance-company/finance-company.d.ts +88 -88
- package/dist/finance-company/finance-company.js +1533 -1576
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/finance-company/finance-company.repository.d.ts +5 -5
- package/dist/finance-company/finance-company.repository.js +11 -11
- package/dist/helpers/login-user.d.ts +13 -13
- package/dist/helpers/login-user.js +28 -28
- package/dist/helpers/login-user.js.map +1 -1
- package/dist/helpers/typeof.d.ts +1 -1
- package/dist/helpers/typeof.js +28 -29
- package/dist/helpers/typeof.js.map +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.js +32 -32
- package/dist/interfaces/account-system.interface.d.ts +30 -30
- package/dist/interfaces/account-system.interface.js +2 -2
- package/dist/interfaces/index.d.ts +2 -2
- package/dist/interfaces/index.js +2 -2
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.d.ts +12 -12
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.js +2 -2
- package/dist/journal-entry/journal-entry.d.ts +42 -42
- package/dist/journal-entry/journal-entry.js +216 -233
- package/dist/journal-entry/journal-entry.js.map +1 -1
- package/dist/journal-entry/journal-entry.repository.d.ts +6 -6
- package/dist/journal-entry/journal-entry.repository.js +16 -27
- package/dist/journal-entry/journal-entry.repository.js.map +1 -1
- package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.d.ts +17 -17
- package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.js +2 -2
- package/dist/ledger-transaction/interfaces/ledger-transaction.repository.interface.d.ts +5 -5
- package/dist/ledger-transaction/interfaces/ledger-transaction.repository.interface.js +2 -2
- package/dist/ledger-transaction/ledger-transaction.d.ts +54 -54
- package/dist/ledger-transaction/ledger-transaction.js +143 -164
- package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
- package/dist/ledger-transaction/ledger-transaction.repository.d.ts +6 -6
- package/dist/ledger-transaction/ledger-transaction.repository.js +16 -27
- package/dist/ledger-transaction/ledger-transaction.repository.js.map +1 -1
- package/dist/models/account.entity.d.ts +30 -30
- package/dist/models/account.entity.js +232 -232
- package/dist/models/account.entity.js.map +1 -1
- package/dist/models/customer.entity.d.ts +13 -13
- package/dist/models/customer.entity.js +109 -109
- package/dist/models/customer.entity.js.map +1 -1
- package/dist/models/document-item.entity.d.ts +31 -31
- package/dist/models/document-item.entity.js +200 -200
- package/dist/models/document-item.entity.js.map +1 -1
- package/dist/models/document.entity.d.ts +36 -36
- package/dist/models/document.entity.js +242 -242
- package/dist/models/document.entity.js.map +1 -1
- package/dist/models/finance-company.entity.d.ts +15 -15
- package/dist/models/finance-company.entity.js +93 -93
- package/dist/models/finance-company.entity.js.map +1 -1
- package/dist/models/journal-entry.entity.d.ts +16 -16
- package/dist/models/journal-entry.entity.js +127 -127
- package/dist/models/journal-entry.entity.js.map +1 -1
- package/dist/models/ledger-transaction.entity.d.ts +24 -24
- package/dist/models/ledger-transaction.entity.js +172 -172
- package/dist/models/ledger-transaction.entity.js.map +1 -1
- package/dist/models/payment-item.entity.d.ts +12 -12
- package/dist/models/payment-item.entity.js +75 -75
- package/dist/models/payment-item.entity.js.map +1 -1
- package/dist/models/payment-method-type.entity.d.ts +13 -13
- package/dist/models/payment-method-type.entity.js +85 -85
- package/dist/models/payment-method-type.entity.js.map +1 -1
- package/dist/models/payment-method.entity.d.ts +10 -10
- package/dist/models/payment-method.entity.js +62 -62
- package/dist/models/payment-method.entity.js.map +1 -1
- package/dist/models/payment-paid-with.entity.d.ts +24 -24
- package/dist/models/payment-paid-with.entity.js +158 -158
- package/dist/models/payment-paid-with.entity.js.map +1 -1
- package/dist/models/payment.entity.d.ts +29 -29
- package/dist/models/payment.entity.js +193 -193
- package/dist/models/payment.entity.js.map +1 -1
- package/dist/models/post-history.entity.d.ts +11 -11
- package/dist/models/post-history.entity.js +63 -63
- package/dist/models/post-history.entity.js.map +1 -1
- package/dist/models/tax.entity.d.ts +13 -13
- package/dist/models/tax.entity.js +89 -89
- package/dist/models/tax.entity.js.map +1 -1
- package/dist/payment/interfaces/payment-attr.interface.d.ts +22 -22
- package/dist/payment/interfaces/payment-attr.interface.js +6 -6
- package/dist/payment/interfaces/payment-params.interface.d.ts +7 -7
- package/dist/payment/interfaces/payment-params.interface.js +2 -2
- package/dist/payment/payment.d.ts +53 -53
- package/dist/payment/payment.js +186 -201
- package/dist/payment/payment.js.map +1 -1
- package/dist/payment/payment.repository.d.ts +5 -5
- package/dist/payment/payment.repository.js +11 -11
- package/dist/payment-item/interfaces/payment-item-attr.interface.d.ts +10 -10
- package/dist/payment-item/interfaces/payment-item-attr.interface.js +6 -6
- package/dist/payment-item/payment-item.d.ts +25 -25
- package/dist/payment-item/payment-item.js +111 -122
- package/dist/payment-item/payment-item.js.map +1 -1
- package/dist/payment-item/payment-item.repository.d.ts +5 -5
- package/dist/payment-item/payment-item.repository.js +11 -11
- package/dist/payment-method/interfaces/payment-method-attr.interface.d.ts +5 -5
- package/dist/payment-method/interfaces/payment-method-attr.interface.js +2 -2
- package/dist/payment-method/payment-method.d.ts +21 -21
- package/dist/payment-method/payment-method.js +104 -117
- package/dist/payment-method/payment-method.js.map +1 -1
- package/dist/payment-method/payment-method.repository.d.ts +5 -5
- package/dist/payment-method/payment-method.repository.js +11 -11
- package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.d.ts +8 -8
- package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.js +2 -2
- package/dist/payment-method-type/payment-method-type.d.ts +18 -18
- package/dist/payment-method-type/payment-method-type.js +65 -76
- package/dist/payment-method-type/payment-method-type.js.map +1 -1
- package/dist/payment-method-type/payment-method-type.repository.d.ts +5 -5
- package/dist/payment-method-type/payment-method-type.repository.js +11 -11
- package/dist/payment-paid-with/interfaces/payment-paid-with.interface.d.ts +19 -19
- package/dist/payment-paid-with/interfaces/payment-paid-with.interface.js +6 -6
- package/dist/payment-paid-with/payment-paid-with.d.ts +33 -33
- package/dist/payment-paid-with/payment-paid-with.js +56 -56
- package/dist/payment-paid-with/payment-paid-with.js.map +1 -1
- package/dist/payment-paid-with/payment-paid-with.repository.d.ts +5 -5
- package/dist/payment-paid-with/payment-paid-with.repository.js +11 -11
- package/dist/tax/interfaces/tax-attr.interface.d.ts +10 -10
- package/dist/tax/interfaces/tax-attr.interface.js +2 -2
- package/dist/tax/tax.d.ts +26 -26
- package/dist/tax/tax.js +51 -51
- package/dist/tax/tax.js.map +1 -1
- package/dist/tax/tax.repository.d.ts +5 -5
- package/dist/tax/tax.repository.js +11 -11
- package/dist/test-document.d.ts +3 -3
- package/dist/test-document.js +18 -18
- package/dist/test.d.ts +1 -1
- package/dist/test.js +6 -7
- package/dist/test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +58 -0
- package/invoice-template/assets/js/html2canvas.min.js +16 -16
- package/package.json +35 -41
- package/src/account/account.ts +2 -1
- package/src/customer/customer.ts +8 -7
- package/src/document/document-item.ts +3 -2
- package/src/document/document.ts +20 -13
- package/src/enum/collect-payment-type.ts +3 -3
- package/src/enum/payment-status.enum.ts +1 -1
- package/src/finance-company/finance-company.ts +5 -7
- package/src/journal-entry/journal-entry.ts +0 -1
- package/src/ledger-transaction/ledger-transaction.ts +4 -4
- package/src/payment-method-type/payment-method-type.ts +1 -1
- package/src/tax/tax.ts +0 -1
- package/tsconfig.json +4 -3
- package/.eslintrc.js +0 -72
- package/img.png +0 -0
- package/img_1.png +0 -0
- package/tslint.json +0 -18
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=account-system.interface.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IAccountSystem } from '../interfaces/account-system.interface';
|
|
2
|
-
export { IAccountSystem };
|
|
1
|
+
import { IAccountSystem } from '../interfaces/account-system.interface';
|
|
2
|
+
export { IAccountSystem };
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface IJournalEntryAttr {
|
|
2
|
-
CompanyId?: string;
|
|
3
|
-
JournalEntryId?: string;
|
|
4
|
-
Date?: Date;
|
|
5
|
-
Name?: string;
|
|
6
|
-
Description?: string;
|
|
7
|
-
AccSystemRefId?: string;
|
|
8
|
-
PostedToAccSystemYN?: string;
|
|
9
|
-
PostedById?: string;
|
|
10
|
-
PostedDateTime?: Date;
|
|
11
|
-
dbTransaction?: any;
|
|
12
|
-
}
|
|
1
|
+
export interface IJournalEntryAttr {
|
|
2
|
+
CompanyId?: string;
|
|
3
|
+
JournalEntryId?: string;
|
|
4
|
+
Date?: Date;
|
|
5
|
+
Name?: string;
|
|
6
|
+
Description?: string;
|
|
7
|
+
AccSystemRefId?: string;
|
|
8
|
+
PostedToAccSystemYN?: string;
|
|
9
|
+
PostedById?: string;
|
|
10
|
+
PostedDateTime?: Date;
|
|
11
|
+
dbTransaction?: any;
|
|
12
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=journal-entry-attr.interface.js.map
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { IJournalEntryAttr } from './interfaces/journal-entry-attr.interface';
|
|
2
|
-
import { TransactionTypeOptions } from '../enum';
|
|
3
|
-
import JournalEntryModel from '../models/journal-entry.entity';
|
|
4
|
-
import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
|
|
5
|
-
import LedgerTransaction from '../ledger-transaction/ledger-transaction';
|
|
6
|
-
import { JournalEntryRepository } from './journal-entry.repository';
|
|
7
|
-
export default class JournalEntry extends AccountSystemEntity {
|
|
8
|
-
private _JournalEntryId;
|
|
9
|
-
Date: Date;
|
|
10
|
-
Name: string;
|
|
11
|
-
Description: string;
|
|
12
|
-
protected _ObjectType: 'JournalEntry';
|
|
13
|
-
private static _RepositoryBase;
|
|
14
|
-
private static _LedgerTransactionRepository;
|
|
15
|
-
private _DbTransaction;
|
|
16
|
-
private _DebitTransactions;
|
|
17
|
-
private _CreditTransactions;
|
|
18
|
-
get JournalEntryId(): string;
|
|
19
|
-
private set JournalEntryId(value);
|
|
20
|
-
get ObjectType(): "JournalEntry";
|
|
21
|
-
get RepositoryBase(): JournalEntryRepository;
|
|
22
|
-
get TableName(): string;
|
|
23
|
-
get ObjectName(): string;
|
|
24
|
-
get ObjectId(): string;
|
|
25
|
-
constructor(dbTransaction?: any, journalEntryId?: string);
|
|
26
|
-
static initJournalEntry(dbTransaction?: any, journalEntryId?: string): Promise<JournalEntry>;
|
|
27
|
-
get DebitTransactions(): Promise<LedgerTransaction[]>;
|
|
28
|
-
get CreditTransactions(): Promise<LedgerTransaction[]>;
|
|
29
|
-
init(params: IJournalEntryAttr): void;
|
|
30
|
-
getData(): {
|
|
31
|
-
JournalEntryId: string;
|
|
32
|
-
Date: Date;
|
|
33
|
-
Name: string;
|
|
34
|
-
Description: string;
|
|
35
|
-
PostedById: string;
|
|
36
|
-
PostedToAccSystemYN: string;
|
|
37
|
-
PostedDateTime: Date;
|
|
38
|
-
};
|
|
39
|
-
create(dbTransaction?: any): Promise<JournalEntryModel>;
|
|
40
|
-
save(userId: string, dbTransaction?: any): Promise<JournalEntryModel>;
|
|
41
|
-
newLedgerTransaction(transactionType: TransactionTypeOptions): Promise<LedgerTransaction>;
|
|
42
|
-
}
|
|
1
|
+
import { IJournalEntryAttr } from './interfaces/journal-entry-attr.interface';
|
|
2
|
+
import { TransactionTypeOptions } from '../enum';
|
|
3
|
+
import JournalEntryModel from '../models/journal-entry.entity';
|
|
4
|
+
import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
|
|
5
|
+
import LedgerTransaction from '../ledger-transaction/ledger-transaction';
|
|
6
|
+
import { JournalEntryRepository } from './journal-entry.repository';
|
|
7
|
+
export default class JournalEntry extends AccountSystemEntity {
|
|
8
|
+
private _JournalEntryId;
|
|
9
|
+
Date: Date;
|
|
10
|
+
Name: string;
|
|
11
|
+
Description: string;
|
|
12
|
+
protected _ObjectType: 'JournalEntry';
|
|
13
|
+
private static _RepositoryBase;
|
|
14
|
+
private static _LedgerTransactionRepository;
|
|
15
|
+
private _DbTransaction;
|
|
16
|
+
private _DebitTransactions;
|
|
17
|
+
private _CreditTransactions;
|
|
18
|
+
get JournalEntryId(): string;
|
|
19
|
+
private set JournalEntryId(value);
|
|
20
|
+
get ObjectType(): "JournalEntry";
|
|
21
|
+
get RepositoryBase(): JournalEntryRepository;
|
|
22
|
+
get TableName(): string;
|
|
23
|
+
get ObjectName(): string;
|
|
24
|
+
get ObjectId(): string;
|
|
25
|
+
constructor(dbTransaction?: any, journalEntryId?: string);
|
|
26
|
+
static initJournalEntry(dbTransaction?: any, journalEntryId?: string): Promise<JournalEntry>;
|
|
27
|
+
get DebitTransactions(): Promise<LedgerTransaction[]>;
|
|
28
|
+
get CreditTransactions(): Promise<LedgerTransaction[]>;
|
|
29
|
+
init(params: IJournalEntryAttr): void;
|
|
30
|
+
getData(): {
|
|
31
|
+
JournalEntryId: string;
|
|
32
|
+
Date: Date;
|
|
33
|
+
Name: string;
|
|
34
|
+
Description: string;
|
|
35
|
+
PostedById: string;
|
|
36
|
+
PostedToAccSystemYN: string;
|
|
37
|
+
PostedDateTime: Date;
|
|
38
|
+
};
|
|
39
|
+
create(dbTransaction?: any): Promise<JournalEntryModel>;
|
|
40
|
+
save(userId: string, dbTransaction?: any): Promise<JournalEntryModel>;
|
|
41
|
+
newLedgerTransaction(transactionType: TransactionTypeOptions): Promise<LedgerTransaction>;
|
|
42
|
+
}
|
|
@@ -1,234 +1,217 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
get
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
get
|
|
26
|
-
return this.
|
|
27
|
-
}
|
|
28
|
-
get
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
this.
|
|
170
|
-
|
|
171
|
-
this.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
newLedgerTransaction(transactionType) {
|
|
218
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
-
const ledgerTransaction = new ledger_transaction_1.default(transactionType, this._DbTransaction);
|
|
220
|
-
ledgerTransaction.JournalEntryId = this.JournalEntryId;
|
|
221
|
-
if (transactionType === enum_1.TransactionTypeOptions.DEBIT) {
|
|
222
|
-
this._DebitTransactions.push(ledgerTransaction);
|
|
223
|
-
}
|
|
224
|
-
else if (transactionType === enum_1.TransactionTypeOptions.CREDIT) {
|
|
225
|
-
this._CreditTransactions.push(ledgerTransaction);
|
|
226
|
-
}
|
|
227
|
-
return ledgerTransaction;
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
exports.default = JournalEntry;
|
|
232
|
-
JournalEntry._RepositoryBase = new journal_entry_repository_1.JournalEntryRepository();
|
|
233
|
-
JournalEntry._LedgerTransactionRepository = new ledger_transaction_repository_1.LedgerTransactionRepository();
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const enum_1 = require("../enum");
|
|
4
|
+
const account_system_entity_1 = require("../account-system-entity/account-system-entity");
|
|
5
|
+
const ledger_transaction_repository_1 = require("../ledger-transaction/ledger-transaction.repository");
|
|
6
|
+
const ledger_transaction_1 = require("../ledger-transaction/ledger-transaction");
|
|
7
|
+
const journal_entry_repository_1 = require("./journal-entry.repository");
|
|
8
|
+
const record_not_found_error_1 = require("@tomei/general/dist/class/exceptions/record-not-found.error");
|
|
9
|
+
class JournalEntry extends account_system_entity_1.AccountSystemEntity {
|
|
10
|
+
get JournalEntryId() {
|
|
11
|
+
return this._JournalEntryId;
|
|
12
|
+
}
|
|
13
|
+
set JournalEntryId(id) {
|
|
14
|
+
this._JournalEntryId = id;
|
|
15
|
+
}
|
|
16
|
+
get ObjectType() {
|
|
17
|
+
return this._ObjectType;
|
|
18
|
+
}
|
|
19
|
+
get RepositoryBase() {
|
|
20
|
+
return JournalEntry._RepositoryBase;
|
|
21
|
+
}
|
|
22
|
+
get TableName() {
|
|
23
|
+
return 'finance_JournalEntry';
|
|
24
|
+
}
|
|
25
|
+
get ObjectName() {
|
|
26
|
+
return this.Name;
|
|
27
|
+
}
|
|
28
|
+
get ObjectId() {
|
|
29
|
+
return this._JournalEntryId;
|
|
30
|
+
}
|
|
31
|
+
constructor(dbTransaction, journalEntryId) {
|
|
32
|
+
super();
|
|
33
|
+
this._JournalEntryId = 'New';
|
|
34
|
+
this.Date = new Date();
|
|
35
|
+
this.Name = '';
|
|
36
|
+
this.Description = '';
|
|
37
|
+
this._DebitTransactions = [];
|
|
38
|
+
this._CreditTransactions = [];
|
|
39
|
+
if (dbTransaction) {
|
|
40
|
+
this._DbTransaction = dbTransaction;
|
|
41
|
+
}
|
|
42
|
+
if (!journalEntryId) {
|
|
43
|
+
this.init({
|
|
44
|
+
JournalEntryId: 'New',
|
|
45
|
+
CompanyId: '',
|
|
46
|
+
Date: new Date(),
|
|
47
|
+
Name: '',
|
|
48
|
+
Description: '',
|
|
49
|
+
AccSystemRefId: '',
|
|
50
|
+
PostedToAccSystemYN: 'N',
|
|
51
|
+
PostedById: '',
|
|
52
|
+
PostedDateTime: null,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static async initJournalEntry(dbTransaction, journalEntryId) {
|
|
57
|
+
try {
|
|
58
|
+
if (journalEntryId) {
|
|
59
|
+
const journalEntryData = await JournalEntry._RepositoryBase.findOne({
|
|
60
|
+
where: {
|
|
61
|
+
JournalEntryId: journalEntryId,
|
|
62
|
+
},
|
|
63
|
+
transaction: dbTransaction,
|
|
64
|
+
});
|
|
65
|
+
if (journalEntryData) {
|
|
66
|
+
const journalEntry = new JournalEntry();
|
|
67
|
+
journalEntry.init({
|
|
68
|
+
JournalEntryId: journalEntryData.JournalEntryId,
|
|
69
|
+
CompanyId: journalEntryData.CompanyId,
|
|
70
|
+
Date: new Date(),
|
|
71
|
+
Name: journalEntryData.Name,
|
|
72
|
+
Description: journalEntryData.Description,
|
|
73
|
+
AccSystemRefId: journalEntryData.AccSystemRefId,
|
|
74
|
+
PostedToAccSystemYN: journalEntryData.PostedToAccSystemYN,
|
|
75
|
+
PostedById: journalEntryData.PostedById,
|
|
76
|
+
PostedDateTime: journalEntryData.PostedDateTime,
|
|
77
|
+
});
|
|
78
|
+
return journalEntry;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const notFoundError = new record_not_found_error_1.RecordNotFoundError('JournalEntryErrMsg', 'No Record Found.');
|
|
82
|
+
throw notFoundError;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
const journalEntry = new JournalEntry(dbTransaction);
|
|
87
|
+
return journalEntry;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
get DebitTransactions() {
|
|
95
|
+
return new Promise((resolve, reject) => {
|
|
96
|
+
if (this.JournalEntryId !== 'New') {
|
|
97
|
+
JournalEntry._LedgerTransactionRepository
|
|
98
|
+
.findAll({
|
|
99
|
+
where: {
|
|
100
|
+
TransactionType: enum_1.TransactionTypeOptions.DEBIT,
|
|
101
|
+
},
|
|
102
|
+
transaction: this._DbTransaction,
|
|
103
|
+
})
|
|
104
|
+
.then((debitTransactions) => {
|
|
105
|
+
const debitTransactionObjects = debitTransactions.map((debitTransactionData) => new ledger_transaction_1.default(this._DbTransaction, debitTransactionData.LedgerNo));
|
|
106
|
+
return Promise.all(debitTransactionObjects);
|
|
107
|
+
})
|
|
108
|
+
.then((debitTransactionObjects) => {
|
|
109
|
+
this._DebitTransactions = debitTransactionObjects;
|
|
110
|
+
resolve(this._DebitTransactions);
|
|
111
|
+
})
|
|
112
|
+
.catch((err) => {
|
|
113
|
+
reject(err);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
resolve(this._DebitTransactions);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
get CreditTransactions() {
|
|
122
|
+
return new Promise((resolve, reject) => {
|
|
123
|
+
if (this.JournalEntryId !== 'New') {
|
|
124
|
+
JournalEntry._LedgerTransactionRepository
|
|
125
|
+
.findAll({
|
|
126
|
+
where: {
|
|
127
|
+
TransactionType: enum_1.TransactionTypeOptions.CREDIT,
|
|
128
|
+
},
|
|
129
|
+
transaction: this._DbTransaction,
|
|
130
|
+
})
|
|
131
|
+
.then((creditTransaction) => {
|
|
132
|
+
const creditTransactionObjects = creditTransaction.map((creditTransactionData) => new ledger_transaction_1.default(this._DbTransaction, creditTransactionData.LedgerNo));
|
|
133
|
+
return Promise.all(creditTransactionObjects);
|
|
134
|
+
})
|
|
135
|
+
.then((creditTransactionObjects) => {
|
|
136
|
+
this._CreditTransactions = creditTransactionObjects;
|
|
137
|
+
resolve(this._CreditTransactions);
|
|
138
|
+
})
|
|
139
|
+
.catch((err) => {
|
|
140
|
+
reject(err);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
resolve(this._CreditTransactions);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
init(params) {
|
|
149
|
+
if (params.JournalEntryId)
|
|
150
|
+
this.JournalEntryId = params.JournalEntryId;
|
|
151
|
+
if (params.CompanyId)
|
|
152
|
+
this.CompanyId = params.CompanyId;
|
|
153
|
+
if (params.Date)
|
|
154
|
+
this.Date = params.Date;
|
|
155
|
+
if (params.Name)
|
|
156
|
+
this.Name = params.Name;
|
|
157
|
+
if (params.Description)
|
|
158
|
+
this.Description = params.Description;
|
|
159
|
+
if (params.PostedById)
|
|
160
|
+
this.PostedById = params.PostedById;
|
|
161
|
+
if (params.PostedToAccSystemYN)
|
|
162
|
+
this.PostedToAccSystemYN = params.PostedToAccSystemYN;
|
|
163
|
+
if (params.PostedDateTime)
|
|
164
|
+
this.PostedDateTime = params.PostedDateTime;
|
|
165
|
+
}
|
|
166
|
+
getData() {
|
|
167
|
+
return {
|
|
168
|
+
JournalEntryId: this.JournalEntryId,
|
|
169
|
+
Date: this.Date,
|
|
170
|
+
Name: this.Name,
|
|
171
|
+
Description: this.Description,
|
|
172
|
+
PostedById: this.PostedById,
|
|
173
|
+
PostedToAccSystemYN: this.PostedToAccSystemYN,
|
|
174
|
+
PostedDateTime: this.PostedDateTime,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
async create(dbTransaction) {
|
|
178
|
+
return await this.RepositoryBase.create(this.getData, {
|
|
179
|
+
transaction: dbTransaction,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
async save(userId, dbTransaction) {
|
|
183
|
+
try {
|
|
184
|
+
const count = await this.RepositoryBase.count(dbTransaction);
|
|
185
|
+
this.JournalEntryId = `${count + 1}`;
|
|
186
|
+
const data = await this.RepositoryBase.create({
|
|
187
|
+
JournalEntryId: this.JournalEntryId,
|
|
188
|
+
CompanyId: this.CompanyId,
|
|
189
|
+
Date: this.Date,
|
|
190
|
+
Name: this.Name,
|
|
191
|
+
Description: this.Description,
|
|
192
|
+
PostedById: this.PostedToAccSystemYN == 'Y' ? userId : null,
|
|
193
|
+
PostedToAccSystemYN: this.PostedToAccSystemYN,
|
|
194
|
+
PostedDateTime: this.PostedToAccSystemYN == 'Y' ? this.PostedDateTime : null,
|
|
195
|
+
}, { transaction: dbTransaction });
|
|
196
|
+
return data;
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
throw error;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async newLedgerTransaction(transactionType) {
|
|
203
|
+
const ledgerTransaction = new ledger_transaction_1.default(transactionType, this._DbTransaction);
|
|
204
|
+
ledgerTransaction.JournalEntryId = this.JournalEntryId;
|
|
205
|
+
if (transactionType === enum_1.TransactionTypeOptions.DEBIT) {
|
|
206
|
+
this._DebitTransactions.push(ledgerTransaction);
|
|
207
|
+
}
|
|
208
|
+
else if (transactionType === enum_1.TransactionTypeOptions.CREDIT) {
|
|
209
|
+
this._CreditTransactions.push(ledgerTransaction);
|
|
210
|
+
}
|
|
211
|
+
return ledgerTransaction;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
JournalEntry._RepositoryBase = new journal_entry_repository_1.JournalEntryRepository();
|
|
215
|
+
JournalEntry._LedgerTransactionRepository = new ledger_transaction_repository_1.LedgerTransactionRepository();
|
|
216
|
+
exports.default = JournalEntry;
|
|
234
217
|
//# sourceMappingURL=journal-entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journal-entry.js","sourceRoot":"","sources":["../../src/journal-entry/journal-entry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"journal-entry.js","sourceRoot":"","sources":["../../src/journal-entry/journal-entry.ts"],"names":[],"mappings":";;AACA,kCAAiD;AAEjD,0FAAqF;AACrF,uGAAkG;AAClG,iFAAyE;AACzE,yEAAoE;AACpE,wGAAkG;AAElG,MAAqB,YAAa,SAAQ,2CAAmB;IAe3D,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAY,cAAc,CAAC,EAAU;QACnC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,YAAY,CAAC,eAAe,CAAC;IACtC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,sBAAsB,CAAC;IAChC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,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