-
Notifications
You must be signed in to change notification settings - Fork 8
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
Updated fees register contract api version and fixed incorrect fee issue #116
Conversation
unPopulatedFee.setNaturalAccountCode(fee.getNaturalAccountCode()); | ||
Fee2Dto feeFromFeesRegister = feesDataMap.get(unPopulatedFee.getCode()); | ||
if(null!=feeFromFeesRegister) { | ||
if(unPopulatedFee.getVersion().equals(feeFromFeesRegister.getCurrentVersion().getVersion())) { |
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.
fix the name pls, unpopulted doesn't makes any sense
unPopulatedFee.setNaturalAccountCode(fee.getNaturalAccountCode()); | ||
Fee2Dto feeFromFeesRegister = feesDataMap.get(unPopulatedFee.getCode()); | ||
if(null!=feeFromFeesRegister) { | ||
if(unPopulatedFee.getVersion().equals(feeFromFeesRegister.getCurrentVersion().getVersion())) { |
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.
pls remove this whole method. in toCSV it should retrieve individual value from map i.e. lazy initialization from fees register at repo level only when needed
return matchingFeeVersion; | ||
} | ||
|
||
public List<PaymentDto> getMemolineAndNacForReconciliation(List<PaymentDto> payments) { |
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.
remove this method and replace it wih a map lookup using key like feecode_version and FeeVersionDTO as value. i.e. prepare the map once retrieved from the fees register
} | ||
|
||
|
||
public FeeVersionDto getFeeVersion(String feeCode, String feeVersion) { |
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.
remove this method, replace with it wih a map lookup using key like feecode_version and FeeVersionDTO as value. i.e. prepare the map once retrieved from the fees register
|
||
feeSb.add(fee.getCode()).add(fee.getVersion()).add(fee.getCalculatedAmount().toString()); | ||
String memolineWithQuotes=""; | ||
if (null!=fee.getMemoLine()){ |
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.
is it good idea to do it with Optional?
Map<String, FeeVersionDto> feeVersionsDtoMapForAFeeCode = getFeesVersionsData().get(feeCode); | ||
FeeVersionDto matchingFeeDtoVersion = null; | ||
if (null != feeVersionsDtoMapForAFeeCode) { | ||
matchingFeeDtoVersion = feeVersionsDtoMapForAFeeCode.get(version); |
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.
can we use Optional here?
No description provided.