diff --git a/server/src/config.yaml.template b/server/src/app/config.yaml.template similarity index 100% rename from server/src/config.yaml.template rename to server/src/app/config.yaml.template diff --git a/server/src/app/templates/overview.html b/server/src/app/templates/overview.html index 5930484..61f460a 100644 --- a/server/src/app/templates/overview.html +++ b/server/src/app/templates/overview.html @@ -14,7 +14,7 @@
- {{ values.0 }}x {{ item }} je {{ values.1 }}€ + {{ values.0 }}x {{ item }} je {{ values.1 }}
{% endfor %} diff --git a/server/src/app/views.py b/server/src/app/views.py index a8239d8..751b379 100644 --- a/server/src/app/views.py +++ b/server/src/app/views.py @@ -9,8 +9,8 @@ import logging DIR = dirname(__file__) + "/" -if not exists(DIR + "../logs"): - makedirs(DIR + "../logs") +if not exists(DIR + "../../logs"): + makedirs(DIR + "../../logs") LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -91,6 +91,7 @@ def group_results(results: tuple) -> dict: result_dict[result[0]][str(result[1])] = {} result_dict[result[0]][str(result[1])][result[2]] = ( result[3], result[4]) - result_dict[result[0]]["sum"] += (result[3] * (result[4] * 100)) / 100 + amount, price = int(result[3]), float(result[4].split(" ")[0].replace(",", ".")) + result_dict[result[0]]["sum"] += (amount * (price * 100)) / 100 LOGGER.debug("Grouped.") return result_dict \ No newline at end of file