Skip to content

feat(ach): ACH-specific defaults and originator metadata (closes #66)#88

Merged
tswarren merged 4 commits intomainfrom
feature/66-ach-default-reference
Mar 9, 2026
Merged

feat(ach): ACH-specific defaults and originator metadata (closes #66)#88
tswarren merged 4 commits intomainfrom
feature/66-ach-default-reference

Conversation

@tswarren
Copy link
Contributor

@tswarren tswarren commented Mar 9, 2026

Summary

  • Add ACH-specific defaults: batch reference ACHyymmddhhmmss, memo {Company Name} - {Reference Number} when blank
  • Add originator metadata fields: company name and identification number, persisted via TransactionReference
  • Default reference format ACH-{trace}-{YYMMDD}-{HHMMSS} to avoid duplicate reference collisions
  • Preserve operator editability; workstation autofill only when blank and not user-edited

Test plan

  • bundle exec rails test test/controllers/transactions_controller_test.rb test/services/transaction_entry/request_test.rb passes
  • Manual: create ACH with blank memo/batch/ref → defaults populate; edit and confirm preserved
  • Manual: create two ACH entries with same trace+effective date → both post without uniqueness error

Schema / migration impact

None. Uses existing transaction_references table with new reference types: ach_company_name, ach_identification_number.

Financial logic risk

Low. Changes are to operational metadata and defaulting; posting engine behavior unchanged.

Made with Cursor

Thomas Sycko-Miller added 4 commits March 9, 2026 21:49
…e and date present (#66) - Add ACH-{trace}-{YYMMDD} format for ACH_CREDIT/ACH_DEBIT when both fields filled - Fall back to MAN-{code}-{timestamp} when trace or effective date missing - Wire workstation to sync reference on ACH trace/effective date input - Add request and controller tests for ACH defaults, fallback, override, preview Made-with: Cursor
- Add company_name and identification_number to TransactionReference - Default ACH batch reference to ACHyymmddhhmmss when blank - Default ACH memo to (Company Name) - (Identification Number) when blank - Wire workstation autofill for batch and memo from originator fields - Persist originator metadata via AchEntryService reference_attributes Made-with: Cursor
- Use ACH trace as memo reference instead of identification number - Skip default when company name or trace is blank Made-with: Cursor
- Prevents 'Reference number has already been taken' when same trace/date used - Format: ACH-{trace}-{YYMMDD}-{HHMMSS} Made-with: Cursor
@tswarren tswarren linked an issue Mar 9, 2026 that may be closed by this pull request
@tswarren tswarren merged commit 757f925 into main Mar 9, 2026
4 checks passed
@tswarren tswarren deleted the feature/66-ach-default-reference branch March 9, 2026 22:54
@tswarren tswarren linked an issue Mar 9, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant