gemcap-be-common 1.3.5 → 1.3.7
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/package.json
CHANGED
|
@@ -893,9 +893,11 @@ class LoanTransactionsService {
|
|
|
893
893
|
const dailyTransactions = await this.getUnsentTransactionForDate(borrower._id.toString(), effectiveDate);
|
|
894
894
|
const transactionIds = dailyTransactions.map((tr) => tr._id.toString());
|
|
895
895
|
const { transactions, transactionIdsToMark, } = await this.getTransactionReport(transactionIds, borrower._id.toString(), effectiveDate);
|
|
896
|
-
|
|
896
|
+
console.log(borrower.name, transactionIdsToMark.length);
|
|
897
|
+
if (transactionIdsToMark.length === 0) {
|
|
897
898
|
return;
|
|
898
899
|
}
|
|
900
|
+
console.log(borrower.name, '========> will be sent');
|
|
899
901
|
const attachedFile = await this.uploadsService.convertDataToFile(transactions);
|
|
900
902
|
const attachment = { filename: `${fileName}.xlsx`, content: attachedFile };
|
|
901
903
|
const attachedPDFs = await this.attachedFilesService.getAttachedRealFilesByTransactionFileId(borrower._id.toString(), (0, dayjs_1.default)(effectiveDate).format('YYYY-MM-DD'));
|
|
@@ -994,9 +994,11 @@ export class LoanTransactionsService {
|
|
|
994
994
|
transactions,
|
|
995
995
|
transactionIdsToMark,
|
|
996
996
|
} = await this.getTransactionReport(transactionIds, borrower._id.toString(), effectiveDate);
|
|
997
|
-
|
|
997
|
+
console.log(borrower.name, transactionIdsToMark.length);
|
|
998
|
+
if (transactionIdsToMark.length === 0) {
|
|
998
999
|
return;
|
|
999
1000
|
}
|
|
1001
|
+
console.log(borrower.name, '========> will be sent');
|
|
1000
1002
|
const attachedFile = await this.uploadsService.convertDataToFile(transactions);
|
|
1001
1003
|
const attachment = { filename: `${fileName}.xlsx`, content: attachedFile };
|
|
1002
1004
|
const attachedPDFs = await this.attachedFilesService.getAttachedRealFilesByTransactionFileId(borrower._id.toString(), dayjs(effectiveDate).format('YYYY-MM-DD'));
|