Skip to content
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

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

Klasens
Copy link
Contributor

@Klasens Klasens commented Dec 3, 2024

Adds documentation for calculating ACH effective entry dates using moov-io/base functions, covering:

  • NACHA rules and Fed processing windows for Same-Day ACH
  • Transaction limits and settlement timing
  • Code examples using moov-io/base Time package
  • Edge cases and holiday/weekend handling

Fixes: #1118

@Klasens Klasens requested a review from adamdecaf as a code owner December 3, 2024 18:10
Copy link
Member

@adamdecaf adamdecaf left a 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.

docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
Comment on lines 92 to 93
```go
now := base.Now()
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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".

Copy link
Member

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.

docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
docs/calculating-effective-entry-date.md Outdated Show resolved Hide resolved
@adamdecaf adamdecaf merged commit 4e9ca5a into moov-io:master Dec 4, 2024
11 checks passed
@adamdecaf
Copy link
Member

Thanks for your help! I've pushed this live at https://moov-io.github.io/ach/calculating-effective-entry-date/

@Klasens Klasens deleted the docs-calculating-entry-date branch December 4, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: include page/section on Effective Entry Date calculation
2 participants