Skip to content

Commit

Permalink
Merge pull request #158 from FOREGG-DEV/dev
Browse files Browse the repository at this point in the history
♻️ refactor: 가계부 에러 수정
  • Loading branch information
DongJun1110 authored Sep 11, 2024
2 parents 31f9bee + a13b1ce commit 057c1e2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ public static LedgerRequestDTO toLedgerRequestDTO(Ledger ledger) {
List<Expenditure> expenditureList = ledger.getExpenditureList();
List<ExpenditureRequestDTO> expenditureRequestDTOList = new ArrayList<>();
for (Expenditure expenditure : expenditureList) {
SubsidyColorType color = SubsidyColorType.RED;
if (!expenditure.getName().equals("개인")) {
color = expenditure.getSubsidy().getColor();
}
expenditureRequestDTOList.add(ExpenditureRequestDTO.builder()
.amount(expenditure.getAmount())
.name(expenditure.getName())
.color(expenditure.getSubsidy().getColor())
.color(color)
.build());
}

Expand Down

0 comments on commit 057c1e2

Please sign in to comment.