SDF57 fixed empty Dt_in/Kt_in bugfix
This commit is contained in:
parent
ef9f9b3ca2
commit
78b511c321
1 changed files with 7 additions and 5 deletions
|
|
@ -638,16 +638,18 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
}
|
||||
|
||||
private BigDecimal getExpectedBalance(Registry rgs, SDf57 sDf57) {
|
||||
BigDecimal res;
|
||||
if (rgs.getAccount().equals(sDf57.getAcc_deb().trim())) {
|
||||
return BigDecimalUtil.parse(sDf57.getDt_in());
|
||||
}
|
||||
if (rgs.getAccount().equals(sDf57.getAcc_kr().trim())) {
|
||||
return BigDecimalUtil.parse(sDf57.getKt_in());
|
||||
res = BigDecimalUtil.parse(sDf57.getDt_in());
|
||||
} else if (rgs.getAccount().equals(sDf57.getAcc_kr().trim())) {
|
||||
res = BigDecimalUtil.parse(sDf57.getKt_in());
|
||||
} else {
|
||||
log.warn("{}.id={} sdf57.id={} couldn't determine value for 'in' check balance, setting 0.",
|
||||
rgs.getRegistryCode(), rgs.getId(), sDf57.getId());
|
||||
return BigDecimal.ZERO;
|
||||
res = BigDecimal.ZERO;
|
||||
}
|
||||
if (res == null) res = BigDecimal.ZERO;
|
||||
return res;
|
||||
}
|
||||
|
||||
private void updateReg(Statement s, Registry r, SDf57 sdf57) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue