ChoETL.NACHA icon indicating copy to clipboard operation
ChoETL.NACHA copied to clipboard

About batch number

Open alonstar opened this issue 7 years ago • 2 comments

Batch number is unique for daily. If I need to generate two file, how do I add batch number ?

thanks.

alonstar avatar Mar 08 '18 08:03 alonstar

Exposed BatchNumber property via Configuration, to set the custom value.

config.BatchNumber = "123456789";

Cinchoo avatar Mar 08 '18 14:03 Cinchoo

Thanks, the BatchNumberGenerator is great ! But I only want to set the "start" number. how about this code?

_fileRunningStatObject.NewBatch();

uint batchNumber = _configuration.BatchNumber;

if (_configuration.BatchNumberGenerator != null){
	batchNumber = _configuration.BatchNumberGenerator();
}else if(batchNumber > _fileRunningStatObject.BatchCount){
	_fileRunningStatObject.BatchCount = batchNumber;
}

_NACHABatchHeaderRecord.BatchNumber = _fileRunningStatObject.BatchCount;

alonstar avatar Mar 09 '18 03:03 alonstar