Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ local model through Ollama. Your data never leaves your computer unless you conn

- **Kaspi Gold PDF statements** — parsed by text coordinates and reconciled with the statement
header totals to the tiyn; re-importing or overlapping statements never duplicates operations.
Pick or drop several at once: they are collected with a preview (card, period, operations,
totals, whose, already imported) and imported, oldest first, when you press Import.
- **Batched questions** — the local model guesses the category of each new merchant, questions
pile up in batches, and a whole batch is answered at once; answered merchants are categorized automatically.
- **Home dashboard** — this month so far against the same days of the last one, the month's pace,
Expand Down
17 changes: 14 additions & 3 deletions internal/web/gate.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,15 @@ func (g *Gate) drop(id string) {
// there and signs this browser in to it.
func (g *Gate) importNewAccount(w http.ResponseWriter, r *http.Request, v viewer, list []accounts.Account) {
ctx := r.Context()
upload := r.PostFormValue("upload")
b, err := g.held(upload)
// a held upload, or a statement from the list of ones waiting
upload, staged := r.PostFormValue("upload"), r.PostFormValue("staged")
var b []byte
var err error
if staged != "" {
b, err = g.stagedBytes(v.Account.ID, staged)
} else {
b, err = g.held(upload)
}
if err != nil {
http.Redirect(w, r, "/ui?msg="+urlq("The uploaded statement is gone (they are kept for an hour). Upload it again."), http.StatusSeeOther)
return
Expand Down Expand Up @@ -593,7 +600,11 @@ func (g *Gate) importNewAccount(w http.ResponseWriter, r *http.Request, v viewer
return
}
}
g.drop(upload)
if staged != "" {
g.unstage(v.Account.ID, staged)
} else {
g.drop(upload)
}
if err := g.startSession(w, r, na.ID); err != nil {
g.fail(w, err)
return
Expand Down
Loading
Loading