/reg is broken

main
Bel LaPointe 2023-10-26 07:50:47 -06:00
parent e1b601a130
commit e9117a12a5
1 changed files with 9 additions and 0 deletions

View File

@ -115,6 +115,15 @@ func main() {
if r.URL.Query().Get("bpi") != "" { if r.URL.Query().Get("bpi") != "" {
register = register.WithBPIs(bpis) register = register.WithBPIs(bpis)
} }
if zoomStart, err := time.ParseInLocation("2006-01", r.URL.Query().Get("zoomStart"), time.Local); err == nil {
result := make(ledger.Register)
for d := range register {
if d >= zoomStart.Format("2006-01") {
result[d] = register[d]
}
}
register = result
}
// /MODIFIERS // /MODIFIERS
nameCurrencyDateValue := map[string]map[ledger.Currency]map[string]float64{} nameCurrencyDateValue := map[string]map[ledger.Currency]map[string]float64{}