got transactions into rows in transactions.html, now gotta fix column with for description then go for editable
All checks were successful
cicd / ci (push) Successful in 55s
All checks were successful
cicd / ci (push) Successful in 55s
This commit is contained in:
@@ -94,16 +94,18 @@ func (router Router) APITransactions(w http.ResponseWriter, r *http.Request) {
|
||||
houseRelatedDeltas := deltas.Like(ledger.LikeTransactions(
|
||||
deltas.Like(ledger.LikeName(`^House`))...,
|
||||
))
|
||||
sixMonths := time.Hour * 24 * 365 / 2
|
||||
recent := time.Hour * 24 * 365 / 6
|
||||
|
||||
json.NewEncoder(w).Encode(map[string]any{
|
||||
"deltas": houseRelatedDeltas.
|
||||
Like(ledger.LikeAfter(time.Now().Add(-1 * sixMonths).Format("2006-01"))),
|
||||
Like(ledger.LikeAfter(time.Now().Add(-1 * recent).Format("2006-01"))),
|
||||
"balances": houseRelatedDeltas.Balances().
|
||||
Like(`^(Zach|Bel|House[^:]*:Debts:)`).
|
||||
Group(`^[^:]*`).
|
||||
WithBPIs(bpis),
|
||||
"transactions": houseRelatedDeltas.Transactions(),
|
||||
"transactions": houseRelatedDeltas.
|
||||
Like(ledger.LikeAfter(time.Now().Add(-1 * recent).Format("2006-01"))).
|
||||
Transactions(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user