Skip to content

Commit

Permalink
Merge pull request #47 from moov-io/fix-sar-ein
Browse files Browse the repository at this point in the history
fix sar ein
  • Loading branch information
wadearnold authored Nov 16, 2022
2 parents 7a1eb68 + da9c11e commit 5fe7122
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/samples/sar_batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</Address>
<PartyIdentification SeqNum="33">
<PartyIdentificationNumberText>458789856</PartyIdentificationNumberText>
<PartyIdentificationTypeCode>4</PartyIdentificationTypeCode>
<PartyIdentificationTypeCode>2</PartyIdentificationTypeCode>
</PartyIdentification>
<PartyIdentification SeqNum="34">
<PartyIdentificationNumberText>5589887789</PartyIdentificationNumberText>
Expand Down
5 changes: 3 additions & 2 deletions pkg/suspicious_activity/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
PartyBranch = "46"
PartyITCTCC = "28"
PartyITCTIN = "4"
PartyITCFIN = "2"
)

func NewActivity() *ActivityType {
Expand Down Expand Up @@ -263,7 +264,7 @@ func (r PartyType) fieldInclusion() error {
if len(r.PartyIdentification) < 1 || len(r.PartyIdentification) > 3 {
return fincen.NewErrValueInvalid("PartyIdentification")
}
if !existed[PartyITCTIN] {
if !existed[PartyITCFIN] {
return fincen.NewErrValueInvalid("PartyIdentification")
}
case PartyContactOffice:
Expand All @@ -284,7 +285,7 @@ func (r PartyType) fieldInclusion() error {
if len(r.PartyIdentification) < 1 || len(r.PartyIdentification) > 3 {
return fincen.NewErrValueInvalid("PartyIdentification")
}
if !existed[PartyITCTIN] {
if !existed[PartyITCFIN] {
return fincen.NewErrValueInvalid("PartyIdentification")
}
case PartySubject:
Expand Down
2 changes: 1 addition & 1 deletion pkg/suspicious_activity/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func mocParties() map[string][]byte {
</Address>
<PartyIdentification SeqNum="33">
<PartyIdentificationNumberText>458789856</PartyIdentificationNumberText>
<PartyIdentificationTypeCode>4</PartyIdentificationTypeCode>
<PartyIdentificationTypeCode>2</PartyIdentificationTypeCode>
</PartyIdentification>
<PartyIdentification SeqNum="34">
<PartyIdentificationNumberText>5589887789</PartyIdentificationNumberText>
Expand Down

0 comments on commit 5fe7122

Please sign in to comment.