You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the file is getting parsed, we noticed that the batch numbers were incorrectly reassigned because of the <= logic here. In the loop, when we get to 3rd batch (batchSeq = 3) which is batch 1, the <= condition allows the if block to execute where we are resetting the batch number to 3. So we end up with 2 different batches set to the same batch number.
Note that we do have AllowUnorderedBatches validation option set to allow for random ordering of batches.
What did you expect to see?
Batch number should not be reset to 1 when the batches are in descending order
What did you see?
batch number 1 is reassigned to 3
How can we reproduce the problem?
Create a small file with descending batches and atleast one entry in each batch and run it through the parser.
The text was updated successfully, but these errors were encountered:
Interesting.. My recollection of the Nacha spec says batch numbers must be in ascending order, so this likely isn't handled. Go ahead and open a PR for this! How were you planning on fixing this?
Yeah Im digging more into this today. But the general direction im looking at is that, do not reassign a batch number unless its set to anything less than 1 instead of the current behavior which is resetting the value for anything <= 1.
ACH Version
v1.33.3
What were you trying to do?
We are trying to process a file that looks something like this:
When the file is getting parsed, we noticed that the batch numbers were incorrectly reassigned because of the
<=
logic here. In the loop, when we get to 3rd batch (batchSeq
=3
) which is batch1
, the<=
condition allows the if block to execute where we are resetting the batch number to 3. So we end up with 2 different batches set to the same batch number.AllowUnorderedBatches
validation option set to allow for random ordering of batches.What did you expect to see?
Batch number should not be reset to 1 when the batches are in descending order
What did you see?
batch number 1 is reassigned to 3
How can we reproduce the problem?
Create a small file with descending batches and atleast one entry in each batch and run it through the parser.
The text was updated successfully, but these errors were encountered: