SDF57 fix registry#balance NLP

This commit is contained in:
ialbert 2023-05-30 17:52:34 +03:00
parent 475d19f1d8
commit c0a88239a0

View file

@ -330,11 +330,11 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
InOutDirection direction = IEnumKey.getEnumByKey(InOutDirection.class, s.getInOutDirection());
switch (direction) {
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())));
}
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())));
}
}