@ashray.mehta/statement-converter 1.4.0 → 1.4.1
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/adapters/MT940Adapter.js +9 -1
- package/package.json +1 -1
package/adapters/MT940Adapter.js
CHANGED
|
@@ -29,7 +29,15 @@ class MT940Adapter extends TransactionAdapter_1.TransactionAdapter {
|
|
|
29
29
|
const amount = row.amount;
|
|
30
30
|
const outflow = amount.isNegative() ? amount.abs().toNumber() : 0;
|
|
31
31
|
const inflow = amount.isPositive() ? amount.toNumber() : 0;
|
|
32
|
-
const memo =
|
|
32
|
+
const memo = (0, lodash_1.filter)([
|
|
33
|
+
row.bankReference,
|
|
34
|
+
row.details,
|
|
35
|
+
row.extraDetails,
|
|
36
|
+
row.reference,
|
|
37
|
+
(0, lodash_1.filter)(row.detailSegments, (0, lodash_1.negate)(lodash_1.isEmpty)).join(" - ")
|
|
38
|
+
], (0, lodash_1.negate)(lodash_1.isEmpty))
|
|
39
|
+
.join(" - ")
|
|
40
|
+
.trim();
|
|
33
41
|
return {
|
|
34
42
|
Payee: memo,
|
|
35
43
|
Outflow: outflow,
|