SDF57 fix registry#balance NLP
This commit is contained in:
parent
475d19f1d8
commit
c0a88239a0
1 changed files with 2 additions and 2 deletions
|
|
@ -330,11 +330,11 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
||||||
InOutDirection direction = IEnumKey.getEnumByKey(InOutDirection.class, s.getInOutDirection());
|
InOutDirection direction = IEnumKey.getEnumByKey(InOutDirection.class, s.getInOutDirection());
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case in -> {
|
case in -> {
|
||||||
r.setBalance(r.getBalance().add(s.getAmount()));
|
r.setBalance(safeBD(r.getBalance()).add(safeBD(s.getAmount())));
|
||||||
r.setCredit(safeBD(r.getCredit()).add(safeBD(s.getAmount())));
|
r.setCredit(safeBD(r.getCredit()).add(safeBD(s.getAmount())));
|
||||||
}
|
}
|
||||||
case out -> {
|
case out -> {
|
||||||
r.setBalance(r.getBalance().subtract(s.getAmount()));
|
r.setBalance(safeBD(r.getBalance()).subtract(safeBD(s.getAmount())));
|
||||||
r.setDebit(safeBD(r.getDebit()).add(safeBD(s.getAmount())));
|
r.setDebit(safeBD(r.getDebit()).add(safeBD(s.getAmount())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue