Skip to content

Commit 39cfbee

Browse files
authored
chore: clean up commented code (#736)
1 parent 5b6aab5 commit 39cfbee

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

pkg/controllers/import.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -144,38 +144,6 @@ func (co Controller) ImportYnabImportPreview(c *gin.Context) {
144144
return
145145
}
146146

147-
/*
148-
149-
func (b Budget) Income(db *gorm.DB, month types.Month) (income decimal.Decimal, err error) {
150-
var transactions []Transaction
151-
152-
err = db.
153-
Joins("JOIN accounts source_account ON transactions.source_account_id = source_account.id AND source_account.deleted_at IS NULL").
154-
Joins("JOIN accounts destination_account ON transactions.destination_account_id = destination_account.id AND destination_account.deleted_at IS NULL").
155-
Where("source_account.external = 1").
156-
Where("destination_account.external = 0").
157-
Where("transactions.envelope_id IS NULL").
158-
Where("transactions.available_from >= date(?) AND transactions.available_from < date(?)", month, month.AddDate(0, 1)).
159-
Where(&Transaction{
160-
TransactionCreate: TransactionCreate{
161-
BudgetID: b.ID,
162-
},
163-
}).
164-
Find(&transactions).
165-
Error
166-
if err != nil {
167-
return decimal.Zero, err
168-
}
169-
170-
for _, t := range transactions {
171-
income = income.Add(t.Amount)
172-
}
173-
174-
return
175-
}
176-
177-
*/
178-
179147
// Get all rename rules for the budget that the import target account is part of
180148
var renameRules []models.RenameRule
181149
err = co.DB.

0 commit comments

Comments
 (0)