Comparing version 0.1.1 to 0.1.2
@@ -48,3 +48,4 @@ 'use strict'; | ||
acceptanceDateTime: select('a:RltdDts/a:AccptncDtTm/text()', tElem).toString() | ||
} | ||
}, | ||
accountServicerReference: select('a:Refs/a:AcctSvcrRef/text()', tElem).toString(), | ||
}; | ||
@@ -51,0 +52,0 @@ }) |
@@ -16,3 +16,3 @@ 'use strict'; | ||
ret.originalMessageNameIdentification = select('/a:Document/a:CstmrPmtStsRpt/a:OrgnlGrpInfAndSts/a:OrgnlMsgNmId/text()', doc).toString(); | ||
ret.groupStatus = select('/a:Document/a:CstmrPmtStsRpt/a:OrgnlGrpInfAndSts/a:GrpSts/text()', doc).toString(); | ||
const groupStatus = ret.groupStatus = select('/a:Document/a:CstmrPmtStsRpt/a:OrgnlGrpInfAndSts/a:GrpSts/text()', doc).toString(); | ||
var stsRsnInf = select('/a:Document/a:CstmrPmtStsRpt/a:OrgnlGrpInfAndSts/a:StsRsnInf', doc); | ||
@@ -27,5 +27,8 @@ if (stsRsnInf[0]) { | ||
originalPaymentInformationId: select('a:OrgnlPmtInfId/text()', info).toString(), | ||
paymentInformationStatus: select('a:PmtInfSts/text()', info).toString() | ||
paymentInformationStatus: select('a:PmtInfSts/text()', info).toString() || groupStatus | ||
}; | ||
r.detailedPayments = Array.prototype.map.call(select('a:TxInfAndSts', info), function(txInfo) { | ||
const detailedPayments = Array.prototype.map.call(select('a:TxInfAndSts', info), function(txInfo) { | ||
if(!select('a:OrgnlEndToEndId/text()', txInfo).toString()){ | ||
return | ||
} | ||
var tr = { | ||
@@ -40,3 +43,6 @@ originalEndToEndId: select('a:OrgnlEndToEndId/text()', txInfo).toString(), | ||
return tr; | ||
}); | ||
}).filter(Boolean); | ||
if(detailedPayments.length) { | ||
r.detailedPayments = detailedPayments | ||
} | ||
var pStsRsnInf = select('a:StsRsnInf', info); | ||
@@ -43,0 +49,0 @@ if (pStsRsnInf[0]) { |
{ | ||
"name": "corporate", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A module for parsing (mostly) ISO20022 messages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172444
710