fix: 借贷记账,更新余额的时候,应当是本金加利息。
This commit is contained in:
@@ -657,12 +657,12 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor
|
||||
accountsTransferRecord.setInAccountId(debitCardVo.getId());
|
||||
accountsTransferRecord.setOutAccountId(lendVo.getId());
|
||||
accountsTransferRecord.setName(lendVo.getName()+"("+StringUtils.getLastNumberChars(3,lendVo.getCode())+")借款至"+debitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")");
|
||||
lendAccount.setBalance(lendAccount.getBalance()-accountsTransferRecord.getAmount());
|
||||
lendAccount.setBalance(lendAccount.getBalance()-accountsTransferRecord.getActualAmount());
|
||||
}else if(accountsTransferRecord.getDealType().equals("2")){
|
||||
accountsTransferRecord.setInAccountId(lendVo.getId());
|
||||
accountsTransferRecord.setOutAccountId(debitCardVo.getId());
|
||||
accountsTransferRecord.setName(debitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")还款至"+lendVo.getName()+"("+StringUtils.getLastNumberChars(3,lendVo.getCode())+")");
|
||||
lendAccount.setBalance(lendAccount.getBalance()+accountsTransferRecord.getAmount());
|
||||
lendAccount.setBalance(lendAccount.getBalance()+accountsTransferRecord.getActualAmount());
|
||||
}
|
||||
lendAccount.setAvailableLimit(lendAccount.getBalance());
|
||||
lendAccount.setUpdateTime(accountsTransferRecord.getCreateTime());
|
||||
|
||||
Reference in New Issue
Block a user