gemcap-be-common 1.4.233 → 1.4.235
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/helpers/bank-reference.helper.js +1 -2
- package/helpers/bank-reference.helper.ts +1 -2
- package/models/LoanTransaction.model.d.ts +1 -0
- package/models/LoanTransaction.model.js +5 -0
- package/models/LoanTransaction.model.ts +6 -0
- package/models/_index.d.ts +6 -6
- package/package.json +1 -1
- package/services/bank-uploaded-transactions.service.js +1 -0
- package/services/bank-uploaded-transactions.service.ts +1 -0
- package/services/loan-transactions.service.d.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -12,8 +12,7 @@ const extractReferenceValue = (reference, key) => {
|
|
|
12
12
|
return '';
|
|
13
13
|
}
|
|
14
14
|
let value = match[1].trim();
|
|
15
|
-
|
|
16
|
-
value = value.split('/')[0].trim();
|
|
15
|
+
value = value.trim();
|
|
17
16
|
// Remove NOTPROVIDED if present
|
|
18
17
|
value = value.replace(/NOTPROVIDED/gi, '').trim();
|
|
19
18
|
// Collapse multiple spaces (incl. tabs) into a single space
|
|
@@ -14,8 +14,7 @@ const extractReferenceValue = (reference: string, key: string): string => {
|
|
|
14
14
|
|
|
15
15
|
let value = match[1].trim();
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
value = value.split('/')[0].trim();
|
|
17
|
+
value = value.trim();
|
|
19
18
|
|
|
20
19
|
// Remove NOTPROVIDED if present
|
|
21
20
|
value = value.replace(/NOTPROVIDED/gi, '').trim();
|
|
@@ -61,6 +61,7 @@ export interface ILoanTransaction {
|
|
|
61
61
|
amount: number;
|
|
62
62
|
description: string;
|
|
63
63
|
reference: string;
|
|
64
|
+
referenceRaw?: string;
|
|
64
65
|
customerId: string;
|
|
65
66
|
bankId: mongoose.Types.ObjectId;
|
|
66
67
|
transactionType: ELoanTransactionTypes;
|
|
@@ -159,6 +160,11 @@ export const LoanTransactionSchema = new mongoose.Schema<ILoanTransactionDoc, IL
|
|
|
159
160
|
type: String,
|
|
160
161
|
trim: true,
|
|
161
162
|
},
|
|
163
|
+
referenceRaw: {
|
|
164
|
+
type: String,
|
|
165
|
+
trim: true,
|
|
166
|
+
required: false,
|
|
167
|
+
},
|
|
162
168
|
customerId: {
|
|
163
169
|
type: String,
|
|
164
170
|
trim: true,
|
package/models/_index.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ export declare const allSchemas: {
|
|
|
31
31
|
createdAt: NativeDate;
|
|
32
32
|
updatedAt: NativeDate;
|
|
33
33
|
} & {
|
|
34
|
-
|
|
34
|
+
amount: number;
|
|
35
35
|
order: number;
|
|
36
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
36
37
|
apDate: Date;
|
|
37
|
-
amount: number;
|
|
38
38
|
__v?: number;
|
|
39
39
|
poNumber?: string;
|
|
40
40
|
customerName?: string;
|
|
@@ -45,10 +45,10 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
|
|
48
|
+
amount: number;
|
|
49
49
|
order: number;
|
|
50
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
50
51
|
apDate: Date;
|
|
51
|
-
amount: number;
|
|
52
52
|
__v?: number;
|
|
53
53
|
poNumber?: string;
|
|
54
54
|
customerName?: string;
|
|
@@ -59,10 +59,10 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
-
|
|
62
|
+
amount: number;
|
|
63
63
|
order: number;
|
|
64
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
64
65
|
apDate: Date;
|
|
65
|
-
amount: number;
|
|
66
66
|
__v?: number;
|
|
67
67
|
poNumber?: string;
|
|
68
68
|
customerName?: string;
|
package/package.json
CHANGED
|
@@ -316,6 +316,7 @@ class BankUploadedTransactionsService {
|
|
|
316
316
|
effectiveDate: null,
|
|
317
317
|
productId: foundCashAllocationProduct.productId,
|
|
318
318
|
reference: splitTransaction ? splitTransaction.memo : (0, bank_reference_helper_1.convertBankReferenceToTransactionReference)(transactionToConvert.reference),
|
|
319
|
+
referenceRaw: splitTransaction ? splitTransaction.memo : transactionToConvert.reference,
|
|
319
320
|
transactionType: transaction.amount > 0 ? LoanTransaction_model_1.ELoanTransactionTypes.COLLECTION : LoanTransaction_model_1.ELoanTransactionTypes.DISBURSEMENT,
|
|
320
321
|
balance: 0,
|
|
321
322
|
floatedBalance: 0,
|
|
@@ -354,6 +354,7 @@ export class BankUploadedTransactionsService {
|
|
|
354
354
|
effectiveDate: null,
|
|
355
355
|
productId: foundCashAllocationProduct.productId,
|
|
356
356
|
reference: splitTransaction ? splitTransaction.memo : convertBankReferenceToTransactionReference(transactionToConvert.reference),
|
|
357
|
+
referenceRaw: splitTransaction ? splitTransaction.memo : transactionToConvert.reference,
|
|
357
358
|
transactionType: transaction.amount > 0 ? ELoanTransactionTypes.COLLECTION : ELoanTransactionTypes.DISBURSEMENT,
|
|
358
359
|
balance: 0,
|
|
359
360
|
floatedBalance: 0,
|
|
@@ -155,7 +155,7 @@ export declare class LoanTransactionsService {
|
|
|
155
155
|
getTransactionReport(transactionIds: string[], borrowerId: string, effectiveDate: Date): Promise<{
|
|
156
156
|
transactionIdsToMark: string[];
|
|
157
157
|
transactions: {
|
|
158
|
-
[x: string]: (string | number |
|
|
158
|
+
[x: string]: (string | number | string[] | Date)[];
|
|
159
159
|
}[];
|
|
160
160
|
}>;
|
|
161
161
|
getBorrowerIdsForFile(transactionFileId: string): Promise<{
|