moov-io / fincen

Fincen BSA E-Filing forms
https://moov-io.github.io/fincen/
Apache License 2.0
20 stars 7 forks source link

SAR Transmitter Party Identification max occurence #36

Closed mimy2001 closed 1 year ago

mimy2001 commented 1 year ago

FinCEN Version: 0.2.6

What were you trying to do? We were trying to use the moov library to generate a SAR report and filling out the transmitter section. The samples (from our bank) /XML user guide we got off of fincen indicates that there's two party identification under the Transmitter Party with code 35 but the moov library validation for this section says len(r.PartyIdentity) > 1 will throw an error

What did you expect to see? We expected this party section to be validated properly with two party identification types

What did you see? We got a validation error saying that partyidentity length > 1 (ie min/max range failed) in the fieldInclusion method

How can we reproduce the problem? Try to make an Activity with a Party for transmitter code 35 and add two party identity.

Here is the lines of code that's failing in suspicious_activity/activity.go case "35": if len(r.PartyName) != 1 || len(r.Address) != 1 || len(r.PhoneNumber) != 1 || len(r.PartyIdentification) != 1 { return fincen.NewErrValueInvalid("Party") }

adamdecaf commented 1 year ago

@mfdeveloper508 can you take a look?

mfdeveloper508 commented 1 year ago

@mimy2001 Thanks for report

image

minOccurs and maxOccurs of party identification is one if party type is "35" The element can exist several times if party type is "30"

mimy2001 commented 1 year ago

Let me tried to find the other section, so this is what it says in one section, but there's another part of the guide which contradicts this.

mimy2001 commented 1 year ago
Screen Shot 2022-11-07 at 9 21 54 AM

Take a look at this, this clearly shows two party identifications within party type 35 as a Transmitter Party Record Example

mimy2001 commented 1 year ago
Screen Shot 2022-11-07 at 9 24 15 AM

And this section here, it says there is a TCC and TIN required for the transmitter party identification. @mfdeveloper508

mimy2001 commented 1 year ago

Btw, just another question, how do we generate the xml file with the fc2 prefix? All the moov library XML files I have do not have fc2 in front.

mfdeveloper508 commented 1 year ago

changed the validation logic with following spec

image

mimy2001 commented 1 year ago

Btw, just another question, how do we generate the xml file with the fc2 prefix? All the moov library XML files I have do not have fc2 in front. @mfdeveloper508 sorry, just highlighting this question again. and thank you for being so prompt in fixing this bug.

mimy2001 commented 1 year ago

image

mimy2001 commented 1 year ago

Actually maybe I should open up a different issue. I'll close this one thanks

mfdeveloper508 commented 1 year ago

Thanks @mimy2001 we need to fix namespace prefix problem in this project I will create another issue for this

mimy2001 commented 1 year ago

@mfdeveloper508 thanks! I have another couple of issues lol and I'll slowly raise them all. I created another issue for the namespace prefix.