feat(BE): add grand total calculation to ExpenseListDTO and update CreateOne method in expense service

This commit is contained in:
aguhh18
2026-01-06 11:12:41 +07:00
parent c9ebd88e9d
commit d8fb427734
2 changed files with 28 additions and 0 deletions
@@ -211,6 +211,7 @@ func (s *expenseService) CreateOne(c *fiber.Ctx, req *validation.Create) (*expen
if !hasKandang && req.Category == string(utils.ExpenseCategoryBOP) {
projectFlockRepoTx := projectFlockKandangRepo.NewProjectflockRepository(dbTransaction)
activeProjectFlocks, err := projectFlockRepoTx.GetActiveByLocationID(c.Context(), req.LocationID)
if err != nil {
return fiber.NewError(fiber.StatusInternalServerError, "Failed to get active project flocks for location")
}