Skip to content

Commit

Permalink
refactor: totalBalance update 로직을 LedgerDetailService에서 처리한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarltj committed Apr 29, 2024
1 parent ce4c809 commit 301050c
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ public LedgerDetailInfoView createLedger(
// === 권한 ===
validateStaffUserRole(agencyUser.getAgencyUserRole());

// 장부 totalBalance 업데이트
int newAmount = AmountCalculatorByFundType.calculate(
createLedgerRequest.getFundType(),
createLedgerRequest.getAmount()
);

ledger.updateTotalBalance(newAmount);

// 장부 내역 등록
LedgerDetail ledgerDetail = ledgerDetailService.createLedgerDetail(
ledger,
Expand Down

0 comments on commit 301050c

Please sign in to comment.