-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add guide for calculating effective entry date #1515
docs: add guide for calculating effective entry date #1515
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those build errors are from a linter we enabled this morning. I'll fix them up in a separate PR, so this one can be rebased prior to merge.
```go | ||
now := base.Now() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add imports. The code can be in main()
so it's runnable for people.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be overthinking this a little bit, but I'm trying to imagine how a user would run this in a standalone context outlined in this document.
Becuase the Effective Entry Date comes from the batch header, to calculate it, we need to look across all entries in the batch and verify that none of these entries exceed $1,000,000. However it kind of leads to this edge case where even if we find a single entry that exceeds the limit, we could still set the EED to the current day and all that would happen is the single entry would process on the next banking day and the remaining entries would process same day (this is probably what the institution would want).
This edge case doesn't exist if both the total credit and total debit is under $1,000,000 (which is like 99% of batches). So we could use the bc.TotalDebitEntryDollarAmount and bc.TotalCreditEntryDollarAmount to form our amount value but this would kind of be a misapplication of how EED actually works.
In my commit I went with a simpler approach that inserts a sample amount.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess my final thought on it is, if we identify a batch that isn't eligible for same day processing, there's a few different ways to handle it that probably fall outside the scope of "Calculating Effective Entry Date".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, that code also assumes you're processing a file rather than creating a new entry.
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
Co-authored-by: Adam Shannon <[email protected]>
…, added function links, simplified logic, improved examples.
Thanks for your help! I've pushed this live at https://moov-io.github.io/ach/calculating-effective-entry-date/ |
Adds documentation for calculating ACH effective entry dates using moov-io/base functions, covering:
Fixes: #1118