@tomei/finance 0.5.0 → 0.5.2
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/dist/account/account.d.ts +35 -35
- package/dist/account/account.js +233 -231
- 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 +11 -11
- package/dist/account-system-entity/account-system-entity.js +66 -66
- 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/customer/customer.d.ts +43 -41
- package/dist/customer/customer.js +236 -214
- 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/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 +14 -14
- package/dist/document/document-item.d.ts +38 -38
- package/dist/document/document-item.js +83 -83
- 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 +76 -76
- package/dist/document/document.js +566 -566
- 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-item-attr.interface.d.ts +22 -22
- 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/doc-type.enum.d.ts +8 -8
- package/dist/enum/doc-type.enum.js +12 -12
- package/dist/enum/document-status.enum.d.ts +6 -6
- package/dist/enum/document-status.enum.js +10 -10
- package/dist/enum/index.d.ts +8 -8
- package/dist/enum/index.js +17 -17
- package/dist/enum/payment-method.enum.d.ts +3 -3
- package/dist/enum/payment-method.enum.js +7 -7
- package/dist/enum/payment-status.enum.d.ts +4 -4
- package/dist/enum/payment-status.enum.js +8 -8
- package/dist/enum/payment-type.enum.d.ts +4 -4
- package/dist/enum/payment-type.enum.js +8 -8
- 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/transaction-type.enum.d.ts +4 -4
- package/dist/enum/transaction-type.enum.js +8 -8
- package/dist/finance-company/finance-company.d.ts +57 -57
- package/dist/finance-company/finance-company.js +1192 -1192
- package/dist/finance-company/finance-company.repository.d.ts +5 -5
- package/dist/finance-company/finance-company.repository.js +11 -11
- package/dist/helpers/typeof.d.ts +1 -1
- package/dist/helpers/typeof.js +26 -26
- package/dist/index.d.ts +17 -17
- package/dist/index.js +32 -32
- package/dist/interfaces/account-system.interface.d.ts +13 -13
- 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 +11 -11
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.js +2 -2
- package/dist/journal-entry/journal-entry.d.ts +39 -39
- package/dist/journal-entry/journal-entry.js +215 -215
- package/dist/journal-entry/journal-entry.repository.d.ts +5 -5
- package/dist/journal-entry/journal-entry.repository.js +11 -11
- 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 +48 -48
- package/dist/ledger-transaction/ledger-transaction.js +155 -155
- package/dist/ledger-transaction/ledger-transaction.repository.d.ts +5 -5
- package/dist/ledger-transaction/ledger-transaction.repository.js +11 -11
- 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/document-item.entity.d.ts +27 -27
- package/dist/models/document-item.entity.js +172 -172
- package/dist/models/document.entity.d.ts +36 -36
- package/dist/models/document.entity.js +242 -242
- package/dist/models/finance-company.entity.d.ts +9 -9
- package/dist/models/finance-company.entity.js +44 -44
- package/dist/models/journal-entry.entity.d.ts +16 -16
- package/dist/models/journal-entry.entity.js +127 -127
- package/dist/models/ledger-transaction.entity.d.ts +24 -24
- package/dist/models/ledger-transaction.entity.js +172 -172
- package/dist/models/payment-item.entity.d.ts +12 -12
- package/dist/models/payment-item.entity.js +75 -75
- 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.entity.d.ts +10 -10
- package/dist/models/payment-method.entity.js +62 -62
- 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.entity.d.ts +27 -27
- package/dist/models/payment.entity.js +188 -188
- package/dist/models/post-history.entity.d.ts +11 -11
- package/dist/models/post-history.entity.js +63 -63
- 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 +51 -51
- package/dist/payment/payment.js +179 -179
- 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 +23 -23
- package/dist/payment-item/payment-item.js +115 -115
- 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 +18 -18
- package/dist/payment-method/payment-method.js +98 -98
- 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 +16 -16
- package/dist/payment-method-type/payment-method-type.js +70 -70
- 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 +31 -31
- package/dist/payment-paid-with/payment-paid-with.js +52 -52
- 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/test-document.d.ts +3 -3
- package/dist/test-document.js +18 -18
- package/dist/test.d.ts +1 -1
- package/dist/test.js +7 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/account/account.ts +3 -1
- package/src/customer/customer.ts +40 -0
- package/src/models/account.entity.ts +1 -1
- package/dist/account/interfaces/account.repository.interface.d.ts +0 -3
- package/dist/account/interfaces/account.repository.interface.js +0 -3
- package/dist/account/interfaces/account.repository.interface.js.map +0 -1
- package/dist/document/interfaces/document.repository.interface.d.ts +0 -3
- package/dist/document/interfaces/document.repository.interface.js +0 -3
- package/dist/document/interfaces/document.repository.interface.js.map +0 -1
- package/dist/journal-entry/interfaces/journal-entry.repository.interface.d.ts +0 -10
- package/dist/journal-entry/interfaces/journal-entry.repository.interface.js +0 -3
- package/dist/journal-entry/interfaces/journal-entry.repository.interface.js.map +0 -1
- package/dist/payment/interfaces/payment-item-attr.interface.d.ts +0 -7
- package/dist/payment/interfaces/payment-item-attr.interface.js +0 -7
- package/dist/payment/interfaces/payment-item-attr.interface.js.map +0 -1
- package/dist/payment/interfaces/payment-item.repository.interface.d.ts +0 -3
- package/dist/payment/interfaces/payment-item.repository.interface.js +0 -3
- package/dist/payment/interfaces/payment-item.repository.interface.js.map +0 -1
- package/dist/payment/interfaces/payment.repository.interface.d.ts +0 -3
- package/dist/payment/interfaces/payment.repository.interface.js +0 -3
- package/dist/payment/interfaces/payment.repository.interface.js.map +0 -1
- package/dist/payment/payment-item.repository.d.ts +0 -17
- package/dist/payment/payment-item.repository.js +0 -51
- package/dist/payment/payment-item.repository.js.map +0 -1
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { IAddress, IRepositoryBase, IPerson, LoginUserBase } from '@tomei/general';
|
|
2
|
-
import FinanceCustomerModel from '../models/customer.entity';
|
|
3
|
-
import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
|
|
4
|
-
import { FinanceCustomerRepository } from './finance-customer.repository';
|
|
5
|
-
import Account from '../account/account';
|
|
6
|
-
export default abstract class FinanceCustomerBase extends AccountSystemEntity implements IPerson {
|
|
7
|
-
CustomerId: string;
|
|
8
|
-
CustSystemCode: string;
|
|
9
|
-
CustSystemRefId: string;
|
|
10
|
-
protected abstract ParentARAccountNo: string;
|
|
11
|
-
protected abstract ParentAPAccountNo: string;
|
|
12
|
-
protected abstract ARAccountNo: string;
|
|
13
|
-
protected abstract APAccountNo: string;
|
|
14
|
-
abstract FullName: string;
|
|
15
|
-
abstract IDNo: string;
|
|
16
|
-
abstract IDType: string;
|
|
17
|
-
abstract ContactNo: string;
|
|
18
|
-
abstract Email: string;
|
|
19
|
-
abstract DefaultAddress: IAddress;
|
|
20
|
-
private _AccountReceivable;
|
|
21
|
-
private _AccountPayable;
|
|
22
|
-
protected _DbTransaction: any;
|
|
23
|
-
private static _AccountRepository;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
get
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { IAddress, IRepositoryBase, IPerson, LoginUserBase } from '@tomei/general';
|
|
2
|
+
import FinanceCustomerModel from '../models/customer.entity';
|
|
3
|
+
import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
|
|
4
|
+
import { FinanceCustomerRepository } from './finance-customer.repository';
|
|
5
|
+
import Account from '../account/account';
|
|
6
|
+
export default abstract class FinanceCustomerBase extends AccountSystemEntity implements IPerson {
|
|
7
|
+
CustomerId: string;
|
|
8
|
+
CustSystemCode: string;
|
|
9
|
+
CustSystemRefId: string;
|
|
10
|
+
protected abstract ParentARAccountNo: string;
|
|
11
|
+
protected abstract ParentAPAccountNo: string;
|
|
12
|
+
protected abstract ARAccountNo: string;
|
|
13
|
+
protected abstract APAccountNo: string;
|
|
14
|
+
abstract FullName: string;
|
|
15
|
+
abstract IDNo: string;
|
|
16
|
+
abstract IDType: string;
|
|
17
|
+
abstract ContactNo: string;
|
|
18
|
+
abstract Email: string;
|
|
19
|
+
abstract DefaultAddress: IAddress;
|
|
20
|
+
private _AccountReceivable;
|
|
21
|
+
private _AccountPayable;
|
|
22
|
+
protected _DbTransaction: any;
|
|
23
|
+
private static _AccountRepository;
|
|
24
|
+
private static _LedgerTransactionRepository;
|
|
25
|
+
getDetails(): Promise<{
|
|
26
|
+
FullName: string;
|
|
27
|
+
IDNo: string;
|
|
28
|
+
IDType: string;
|
|
29
|
+
Email: string;
|
|
30
|
+
ContactNo: string;
|
|
31
|
+
}>;
|
|
32
|
+
protected static _FinanceCustomerRepository: FinanceCustomerRepository;
|
|
33
|
+
RepositoryBase: IRepositoryBase<any>;
|
|
34
|
+
constructor(custSystemRefId?: string, custSystemCode?: string, sFinanceCompanyId?: string);
|
|
35
|
+
static initCustomer<C extends FinanceCustomerBase>(this: new () => C, custSystemRefId: string, custSystemCode: string, sFinanceCompanyId: string, dbTransaction?: any): Promise<C>;
|
|
36
|
+
get AccountReceivable(): Promise<Account>;
|
|
37
|
+
get AccountPayable(): Promise<Account>;
|
|
38
|
+
abstract getBillingAddress(params: any): Promise<IAddress>;
|
|
39
|
+
init(person: LoginUserBase): void;
|
|
40
|
+
save(accSystemRefId: string, custSystemCode: string, custSystemRefId: string, dbTransaction?: any): Promise<FinanceCustomerModel>;
|
|
41
|
+
static isFinanceCustomerExist(custSystemRefId: string, custSystemCode: string, sFinanceCompanyId: string): Promise<boolean>;
|
|
42
|
+
getOutstandingBalance(dbTransaction: any): Promise<number>;
|
|
43
|
+
}
|
|
@@ -1,215 +1,237 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const general_1 = require("@tomei/general");
|
|
13
|
-
const account_system_entity_1 = require("../account-system-entity/account-system-entity");
|
|
14
|
-
const finance_customer_repository_1 = require("./finance-customer.repository");
|
|
15
|
-
const cuid = require("cuid");
|
|
16
|
-
const account_1 = require("../account/account");
|
|
17
|
-
const account_repository_1 = require("../account/account.repository");
|
|
18
|
-
const typeof_1 = require("../helpers/typeof");
|
|
19
|
-
const FinanceDb = require("../database");
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
self
|
|
72
|
-
self.
|
|
73
|
-
self.
|
|
74
|
-
self.
|
|
75
|
-
self.
|
|
76
|
-
self.
|
|
77
|
-
self.
|
|
78
|
-
self.
|
|
79
|
-
self.
|
|
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
|
-
this._AccountReceivable.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this._AccountReceivable.
|
|
112
|
-
this._AccountReceivable.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
this._AccountReceivable.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this._AccountReceivable.
|
|
120
|
-
this._AccountReceivable.
|
|
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
|
-
this._AccountPayable.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this._AccountPayable.
|
|
154
|
-
this._AccountPayable.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this._AccountPayable.
|
|
159
|
-
this._AccountPayable.
|
|
160
|
-
this._AccountPayable.
|
|
161
|
-
this._AccountPayable.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
177
|
-
this.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
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
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const general_1 = require("@tomei/general");
|
|
13
|
+
const account_system_entity_1 = require("../account-system-entity/account-system-entity");
|
|
14
|
+
const finance_customer_repository_1 = require("./finance-customer.repository");
|
|
15
|
+
const cuid = require("cuid");
|
|
16
|
+
const account_1 = require("../account/account");
|
|
17
|
+
const account_repository_1 = require("../account/account.repository");
|
|
18
|
+
const typeof_1 = require("../helpers/typeof");
|
|
19
|
+
const FinanceDb = require("../database");
|
|
20
|
+
const ledger_transaction_repository_1 = require("../ledger-transaction/ledger-transaction.repository");
|
|
21
|
+
class FinanceCustomerBase extends account_system_entity_1.AccountSystemEntity {
|
|
22
|
+
getDetails() {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return {
|
|
25
|
+
FullName: this.FullName,
|
|
26
|
+
IDNo: this.IDNo,
|
|
27
|
+
IDType: this.IDType,
|
|
28
|
+
Email: this.Email,
|
|
29
|
+
ContactNo: this.ContactNo,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
constructor(custSystemRefId, custSystemCode, sFinanceCompanyId) {
|
|
34
|
+
super();
|
|
35
|
+
this.CustomerId = 'New';
|
|
36
|
+
this.CustSystemCode = '';
|
|
37
|
+
this.CustSystemRefId = '';
|
|
38
|
+
if (custSystemRefId && custSystemCode && sFinanceCompanyId) {
|
|
39
|
+
const financeCustomerData = FinanceCustomerBase._FinanceCustomerRepository.findOne({
|
|
40
|
+
where: {
|
|
41
|
+
CompanyId: sFinanceCompanyId,
|
|
42
|
+
CustSystemCode: custSystemCode,
|
|
43
|
+
CustSystemRefId: custSystemRefId,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
if (financeCustomerData) {
|
|
47
|
+
this.CompanyId = sFinanceCompanyId;
|
|
48
|
+
this.CustSystemCode = custSystemCode;
|
|
49
|
+
this.CustSystemRefId = custSystemRefId;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const notFoundError = new general_1.RecordNotFoundError('No Record Found');
|
|
53
|
+
throw notFoundError;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static initCustomer(custSystemRefId, custSystemCode, sFinanceCompanyId, dbTransaction) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (!dbTransaction) {
|
|
60
|
+
dbTransaction = yield FinanceDb.getConnection().transaction();
|
|
61
|
+
}
|
|
62
|
+
const financeCustomerData = yield FinanceCustomerBase._FinanceCustomerRepository.findOne({
|
|
63
|
+
where: {
|
|
64
|
+
CompanyId: sFinanceCompanyId,
|
|
65
|
+
CustSystemCode: custSystemCode,
|
|
66
|
+
CustSystemRefId: custSystemRefId,
|
|
67
|
+
},
|
|
68
|
+
transaction: dbTransaction,
|
|
69
|
+
});
|
|
70
|
+
if (financeCustomerData) {
|
|
71
|
+
const self = new this();
|
|
72
|
+
self._DbTransaction = dbTransaction;
|
|
73
|
+
self.CustomerId = financeCustomerData.CustomerId;
|
|
74
|
+
self.CompanyId = sFinanceCompanyId;
|
|
75
|
+
self.CustSystemCode = custSystemCode;
|
|
76
|
+
self.CustSystemRefId = custSystemRefId;
|
|
77
|
+
self.AccSystemRefId = financeCustomerData.AccSystemRefId;
|
|
78
|
+
self.PostedToAccSystemYN = financeCustomerData.PostedToAccSystemYN;
|
|
79
|
+
self.PostedById = financeCustomerData.PostedById;
|
|
80
|
+
self.PostedDateTime = financeCustomerData.PostedDateTime;
|
|
81
|
+
return self;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
const notFoundError = new general_1.RecordNotFoundError('No Record Found');
|
|
85
|
+
throw notFoundError;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
get AccountReceivable() {
|
|
90
|
+
return new Promise((resolve, reject) => {
|
|
91
|
+
let transaction = this._DbTransaction;
|
|
92
|
+
if (this._AccountReceivable) {
|
|
93
|
+
resolve(this._AccountReceivable);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return (FinanceCustomerBase._AccountRepository
|
|
97
|
+
.findOne({
|
|
98
|
+
where: {
|
|
99
|
+
AccountType: 'Account Receivable',
|
|
100
|
+
OwnerId: this.CustomerId,
|
|
101
|
+
OwnerType: (0, typeof_1.type)(this),
|
|
102
|
+
},
|
|
103
|
+
transaction,
|
|
104
|
+
})
|
|
105
|
+
.then((accountData) => {
|
|
106
|
+
this._AccountReceivable = new account_1.default(transaction);
|
|
107
|
+
if (accountData) {
|
|
108
|
+
this._AccountReceivable.AccountNo = accountData.AccountNo;
|
|
109
|
+
this._AccountReceivable.ParentAccountNo =
|
|
110
|
+
accountData.ParentAccountNo;
|
|
111
|
+
this._AccountReceivable.AccountType = accountData.AccountType;
|
|
112
|
+
this._AccountReceivable.OwnerId = accountData.OwnerId;
|
|
113
|
+
this._AccountReceivable.OwnerType = accountData.OwnerType;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this._AccountReceivable.AccountNo = this.ARAccountNo;
|
|
117
|
+
this._AccountReceivable.ParentAccountNo =
|
|
118
|
+
this.ParentARAccountNo;
|
|
119
|
+
this._AccountReceivable.AccountType = 'Account Receivable';
|
|
120
|
+
this._AccountReceivable.OwnerId = this.CustomerId;
|
|
121
|
+
this._AccountReceivable.OwnerType = (0, typeof_1.type)(this);
|
|
122
|
+
}
|
|
123
|
+
resolve(this._AccountReceivable);
|
|
124
|
+
})
|
|
125
|
+
.catch((err) => {
|
|
126
|
+
reject(err);
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
get AccountPayable() {
|
|
132
|
+
return new Promise((resolve, reject) => {
|
|
133
|
+
let transaction = this._DbTransaction;
|
|
134
|
+
if (this._AccountPayable) {
|
|
135
|
+
resolve(this._AccountPayable);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
return (FinanceCustomerBase._AccountRepository
|
|
139
|
+
.findOne({
|
|
140
|
+
where: {
|
|
141
|
+
AccountType: 'Account Payable',
|
|
142
|
+
OwnerId: this.CustomerId,
|
|
143
|
+
OwnerType: (0, typeof_1.type)(this),
|
|
144
|
+
},
|
|
145
|
+
transaction,
|
|
146
|
+
})
|
|
147
|
+
.then((accountData) => {
|
|
148
|
+
this._AccountPayable = new account_1.default(transaction);
|
|
149
|
+
if (accountData) {
|
|
150
|
+
this._AccountPayable.AccountNo = accountData.AccountNo;
|
|
151
|
+
this._AccountPayable.ParentAccountNo =
|
|
152
|
+
accountData.ParentAccountNo;
|
|
153
|
+
this._AccountPayable.AccountType = accountData.AccountType;
|
|
154
|
+
this._AccountPayable.OwnerId = accountData.OwnerId;
|
|
155
|
+
this._AccountPayable.OwnerType = accountData.OwnerType;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
this._AccountPayable.AccountNo = this.APAccountNo;
|
|
159
|
+
this._AccountPayable.ParentAccountNo = this.ParentAPAccountNo;
|
|
160
|
+
this._AccountPayable.AccountType = 'Account Payable';
|
|
161
|
+
this._AccountPayable.OwnerId = this.CustomerId;
|
|
162
|
+
this._AccountPayable.OwnerType = (0, typeof_1.type)(this);
|
|
163
|
+
}
|
|
164
|
+
resolve(this._AccountPayable);
|
|
165
|
+
})
|
|
166
|
+
.catch((err) => {
|
|
167
|
+
reject(err);
|
|
168
|
+
}));
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
init(person) {
|
|
173
|
+
this.FullName = person.FullName;
|
|
174
|
+
this.IDNo = person.IDNo;
|
|
175
|
+
this.IDType = person.IDType;
|
|
176
|
+
this.Email = person.Email;
|
|
177
|
+
this.ContactNo = person.ContactNo;
|
|
178
|
+
this.DefaultAddress = person.DefaultAddress;
|
|
179
|
+
}
|
|
180
|
+
save(accSystemRefId, custSystemCode, custSystemRefId, dbTransaction) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
this.CustSystemCode = custSystemCode;
|
|
183
|
+
this.CustSystemRefId = custSystemRefId;
|
|
184
|
+
this.AccSystemRefId = accSystemRefId;
|
|
185
|
+
this.PostedToAccSystemYN = 'Y';
|
|
186
|
+
const data = yield FinanceCustomerBase._FinanceCustomerRepository.create({
|
|
187
|
+
CompanyId: this.CompanyId,
|
|
188
|
+
CustomerId: cuid(),
|
|
189
|
+
CustSystemCode: this.CustSystemCode,
|
|
190
|
+
CustSystemRefId: this.CustSystemRefId,
|
|
191
|
+
AccSystemRefId: this.AccSystemRefId,
|
|
192
|
+
PostedToAccSystemYN: this.PostedToAccSystemYN,
|
|
193
|
+
}, { transaction: dbTransaction });
|
|
194
|
+
return data;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
static isFinanceCustomerExist(custSystemRefId, custSystemCode, sFinanceCompanyId) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const data = yield FinanceCustomerBase._FinanceCustomerRepository.findAll({
|
|
200
|
+
where: {
|
|
201
|
+
CustSystemRefId: custSystemRefId,
|
|
202
|
+
CustSystemCode: custSystemCode,
|
|
203
|
+
CompanyId: sFinanceCompanyId,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
if (data.length > 0) {
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
return false;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
getOutstandingBalance(dbTransaction) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
if (!dbTransaction) {
|
|
215
|
+
dbTransaction = yield FinanceDb.getConnection().transaction();
|
|
216
|
+
}
|
|
217
|
+
const ledgerTransactions = yield FinanceCustomerBase._LedgerTransactionRepository.findAll({
|
|
218
|
+
where: {
|
|
219
|
+
AccountNo: (yield this.AccountReceivable).AccountNo,
|
|
220
|
+
},
|
|
221
|
+
transaction: dbTransaction,
|
|
222
|
+
});
|
|
223
|
+
const totalDebitAmount = ledgerTransactions.reduce((accumulator, currentValue) => accumulator + +currentValue.DebitAmount, 0);
|
|
224
|
+
const totalCreditAmount = ledgerTransactions.reduce((accumulator, currentValue) => accumulator + +currentValue.CreditAmount, 0);
|
|
225
|
+
if (totalCreditAmount > totalDebitAmount) {
|
|
226
|
+
return 0;
|
|
227
|
+
}
|
|
228
|
+
const balance = totalDebitAmount - totalCreditAmount;
|
|
229
|
+
return balance;
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
exports.default = FinanceCustomerBase;
|
|
234
|
+
FinanceCustomerBase._AccountRepository = new account_repository_1.AccountRepository();
|
|
235
|
+
FinanceCustomerBase._LedgerTransactionRepository = new ledger_transaction_repository_1.LedgerTransactionRepository();
|
|
236
|
+
FinanceCustomerBase._FinanceCustomerRepository = new finance_customer_repository_1.FinanceCustomerRepository();
|
|
215
237
|
//# sourceMappingURL=customer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/customer/customer.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4CAMwB;AAExB,0FAAqF;AACrF,+EAA0E;AAC1E,6BAA6B;AAC7B,gDAAyC;AACzC,sEAAkE;AAClE,8CAAyC;AACzC,yCAAyC;
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/customer/customer.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4CAMwB;AAExB,0FAAqF;AACrF,+EAA0E;AAC1E,6BAA6B;AAC7B,gDAAyC;AACzC,sEAAkE;AAClE,8CAAyC;AACzC,yCAAyC;AACzC,uGAAkG;AAGlG,MAA8B,mBAC5B,SAAQ,2CAAmB;IA6BrB,UAAU;;YAOd,OAAO;gBACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC;QACJ,CAAC;KAAA;IAKD,YACE,eAAwB,EACxB,cAAuB,EACvB,iBAA0B;QAE1B,KAAK,EAAE,CAAC;QAlDV,eAAU,GAAG,KAAK,CAAC;QACnB,mBAAc,GAAG,EAAE,CAAC;QACpB,oBAAe,GAAG,EAAE,CAAC;QAiDnB,IAAI,eAAe,IAAI,cAAc,IAAI,iBAAiB,EAAE;YAC1D,MAAM,mBAAmB,GACvB,mBAAmB,CAAC,0BAA0B,CAAC,OAAO,CAAC;gBACrD,KAAK,EAAE;oBACL,SAAS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EAAE,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS;iBACpD;gBACD,WAAW,EAAE,aAAa;aAC3B,CAAC,CAAC;YAEL,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,MAAM,CAChD,CAAC,WAAW,EAAE,YAAY,EAAE,EAAE,CAAC,WAAW,GAAG,CAAC,YAAY,CAAC,WAAW,EACtE,CAAC,CACF,CAAC;YAEF,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,MAAM,CACjD,CAAC,WAAW,EAAE,YAAY,EAAE,EAAE,CAAC,WAAW,GAAG,CAAC,YAAY,CAAC,YAAY,EACvE,CAAC,CACF,CAAC;YAEF,IAAI,iBAAiB,GAAG,gBAAgB,EAAE;gBACxC,OAAO,CAAC,CAAC;aACV;YAED,MAAM,OAAO,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;YACrD,OAAO,OAAO,CAAC;QACjB,CAAC;KAAA;;AAxSH,sCAySC;AAhRgB,sCAAkB,GAAG,IAAI,sCAAiB,EAAE,CAAC;AAC7C,gDAA4B,GACzC,IAAI,2DAA2B,EAAE,CAAC;AAmBnB,8CAA0B,GAAG,IAAI,uDAAyB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
-
import FinanceCustomerModel from '../models/customer.entity';
|
|
3
|
-
export declare class FinanceCustomerRepository extends RepositoryBase<FinanceCustomerModel> implements IRepositoryBase<FinanceCustomerModel> {
|
|
4
|
-
constructor();
|
|
5
|
-
}
|
|
1
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import FinanceCustomerModel from '../models/customer.entity';
|
|
3
|
+
export declare class FinanceCustomerRepository extends RepositoryBase<FinanceCustomerModel> implements IRepositoryBase<FinanceCustomerModel> {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|