пересчет F = T-B при обработке sdf08
This commit is contained in:
parent
72d9896fca
commit
6883496845
1 changed files with 2 additions and 0 deletions
|
|
@ -160,6 +160,8 @@ public class Sdf08Executor extends AbstractExecutor<SDf08> {
|
|||
updateReg(stmt, rgs);
|
||||
Registry registryUnitB = findRegByUnit(company.getId(), account.getId(), stmt.getContract(), rgs, RegistryUnit.B).orElse(copyRegB(rgs));
|
||||
Registry registryUnitF = findRegByUnit(company.getId(), account.getId(), stmt.getContract(), rgs, RegistryUnit.F).orElse(copyRegF(rgs, null)); //передаю null т.к. отнимется ниже по коду
|
||||
registryUnitF.setBalance(rgs.getBalance().subtract(registryUnitB.getBalance()));
|
||||
registryUnitF.setUpdated(Instant.now());
|
||||
if (registryUnitF.getId() == null) {
|
||||
registryImdg.insert(registryUnitF);
|
||||
log.debug("stmt.id={}, new AM*F.id={}", stmt.getId(), registryUnitF.getId());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue