all repos — piggy @ c2a637dc976e428beb8360bd0f74f777ea984b36

Dead simple finance manager in Go, HTML and JS.

more tweaks
Marco Andronaco andronacomarco@gmail.com
Sun, 06 Oct 2024 16:06:20 +0200
commit

c2a637dc976e428beb8360bd0f74f777ea984b36

parent

8a44cf228bb2b5d0998cbde296945e88dd4ca02d

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/app/records.gosrc/app/records.go

@@ -8,7 +8,7 @@

func (e *Entry) GetOdds() *uint { v := uint(100) for _, s := range e.SubEntries { - v *= s.Odds / 100 + v = v * s.Odds / 100 // for some reason, i can't use *= here } return &v }
M static/js/records-edit.jsstatic/js/records-edit.js

@@ -156,6 +156,9 @@ id: +node.getAttribute("data-id"),

bookmaker_id: +getInputValueFromNode(node, "entry-bookmaker_id"), account_id: +getInputValueFromNode(node, "entry-account_id"), amount: +getInputValueFromNode(node, "entry-amount"), + refund: +getInputValueFromNode(node, "entry-refund"), + bonus: +getInputValueFromNode(node, "entry-bonus"), + commission: +getInputValueFromNode(node, "entry-commission"), sub_entries: buildSubEntriesObject(node.getElementsByClassName("entry-subentries")[0]), }); }