alfhou / hammond Goto Github PK
View Code? Open in Web Editor NEWThis project forked from akhilrex/hammond
Self hosted vehicle and expense management system. Like Clarkson, but better
License: GNU Affero General Public License v3.0
This project forked from akhilrex/hammond
Self hosted vehicle and expense management system. Like Clarkson, but better
License: GNU Affero General Public License v3.0
running latest docker i experience issues upon using the generic import function
The parsing of the date fields fails with this error:
2023/09/18 22:21:17 [Recovery] 2023/09/18 - 22:21:17 panic recovered:
time: missing Location in call to Date
/usr/local/go/src/time/time.go:1469 (0x4cea48)
/usr/local/go/src/time/format.go:1398 (0x4c896b)
/usr/local/go/src/time/format.go:1029 (0x4c672a)
/api/service/genericImportService.go:15 (0x97621e)
/api/service/importService.go:125 (0x977536)
/api/controllers/import.go:68 (0x97dbe9)
....
it’s hard to find a description on how the csv fields have to be coded. I have this as a date field:
"2023-09-15T14:28:00.000Z" as have found that format in the code. It doesn’t look like that causes the problem here tough.
Occurs in firefox and chromium
As title says, I am not able to import my fillups using neither drivvo nor generic CSV import option. I even have tried modifying csv output, left only 2 lines in it, changed decimal point from . to , but I always get generic error saying to check logs. Seeing these errors in docker:
2023/12/02 04:11:32 /api/service/userService.go:29
[0.752ms] [rows:2] SELECT * FROM `user_vehicles` WHERE `user_vehicles`.`user_id` = "21c16e1e-d186-49a4-adc7-495538da4493"
2023/12/02 04:11:32 /api/service/userService.go:29
[0.833ms] [rows:2] SELECT * FROM `vehicles` WHERE `vehicles`.`id` IN ("33d6cc9c-102f-4296-b99b-6b3a8e5c9a89","6cd88aff-dfca-455e-836e-daf39b1276b0")
2023/12/02 04:11:32 /api/service/userService.go:29
[2.590ms] [rows:1] SELECT * FROM `users` WHERE `ID` = "21c16e1e-d186-49a4-adc7-495538da4493" ORDER BY `users`.`id` LIMIT 1
2023/12/02 04:11:32 [Recovery] 2023/12/02 - 04:11:32 panic recovered:
time: missing Location in call to Date
/usr/local/go/src/time/time.go:1469 (0x4cea48)
/usr/local/go/src/time/format.go:1398 (0x4c896b)
/usr/local/go/src/time/format.go:1029 (0x4c672a)
/api/service/genericImportService.go:15 (0x97621e)
/api/service/importService.go:125 (0x977536)
/api/controllers/import.go:68 (0x97dbe9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x953aa1)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x953a8c)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x98ac63)
/api/main.go:69 (0x98ac4a)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x953aa1)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x953a8c)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x952c06)
/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0x952be9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x951cbd)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0x95196b)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0x9514a4)
/usr/local/go/src/net/http/server.go:2936 (0x6bdb75)
/usr/local/go/src/net/http/server.go:1995 (0x6b9091)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x46f120)
[GIN] 2023/12/02 - 04:11:32 | 500 | 10.389503ms | 192.168.X.X | POST "/api/import/generic"
My CSV is pretty basic, for instance just 2 lines:
"Tachometer (km)","Dátum","Palivo","Cena / L","Celková cena","Objem","Plná nádrž","Druhé palivo","Cena / L","Celková cena","Objem","Plná nádrž" 2,"Tretie palivo","Cena / L","Celková cena","Objem","Plná nádrž" 3,"Účinnosť paliva","Vzdialenosť","Čerpacia stanica","Vodič","Dôvod","Spôsob platby","Poznámky"
"79785.0","2023-11-27 14:08:51","Benzín","1.569","44.983","28.67","Áno","","0","0","0","Nie","","0","0","0","Nie","0 L/100km","","INE","Name Name","","",""
"79377.0","2023-11-15 23:41:38","Benzín","1.599","43.797","27.39","Áno","","0","0","0","Nie","","0","0","0","Nie","7,027 L/100km","408.0","INE","Name Name","","",""
From akhilrex#46
It would be nice if I could use a MariaDB/MySQL server instead of the SQLite database. I'm storing my data on a NAS, and IME SQLite doesn't play nicely with remote storage.
Hi @akhilrex, I saw you used
gorm
. Shouldn't it be relatively easy to support other DBs asgorm
already has support for PSQL and whatnot? If I can find some spare time I'll try to put up a draft PR and do some tests. 😊
I'm happy to take a look at how we can use gorm to implement db support but not very experienced with go.
Describe the bug
It would be nice to have a free-form text field to add notes to a vehicle. Currently there is no way to add a note.
Good night
I don't know if this happens to anyone else or if you have already found a solution, I have been searching to avoid repeating the issue.
When trying to create a new user it gives me error 422
TY
Please complete the following information
Describe the bug
Currently there is no way to delete users
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be a delete icon next to each user that allows an admin to remove users.
For each fuel entry, an automatically calculated MPG (or whatever preferred efficiency values)
I imported a list of my fillups. The time stamps are in Europe/Berlin time zone, but not designated as such.
After importing, any fillup less than 1h ( 2h in summer) from midnight shows as the wrong date in the ui.
The database seems (unsure about DST) to contain the UTC value, but the gui doesn’t show the value in my time zone.
sqlite:
|Total|c10d2a00-ea20-4f80-a232-01cfad6ad0f6|2022-10-21 22:26:00+02:00|euros (EUR)|1|Generic Import|
from csv i imported:
"2022-10-22 00:26:00"
I achivied to construct a standard CSV in order to import data from the APP "Ecodrive" where I have data from 8 years, simulating the file exported from Fuelly
Attached a screenshot about the problem. In the csv when I fix a value for a fuel price, allways the data is imported wihtout decimals. I tested several ways but no way
In order to make it easy for users to set up this project with docker, we should set up a pipeline that publishes an image of this repo to a docker repository. e.g. Docker Hub
Hi, I have a car with gasoline/petrol with a GPL (LGP) system, so I would like to enter both the fill-up.
I normally put a full tank of GPL/LGP when it's almost empty, and I keep the gasoline/petrol tank between 1/4 and 2/4.
So I would like to be able to add another tank in a car to track different fuel type.
So after that i can see the km/l for the gpl/lpg and a different km/l statistic for the gasoline/petrol.
Let us link attachments with certain expenses or fill ups.
So you can eg. save a scan of an repair invoice or photo of a fill up check
The version of go on the backend is 1.16
. We should upgrade that to the newest avaliable
this is on the vehigcle detail page.
i'd suggest adding more granularity by making a proper datetime value for a filling and sorting by it, or just sort by odometer
I've been using the old version (from which this was forked) but I see this new version is under active development and I've love to change over and also help with development. So I was just wondering if it's being built and pushed to dockerhub?
Working on transitioning the UI to Vue 3, state management to pinia, and to Vite instead of webpack.
Reason:
Vue 2 is EOL as of Dec 31, 2023
Pinia simplifies state management
Vite allows for less dependencies and less setup.
Some of the dependencies are pretty outdated (for example npm which specifies version 10 which was released in 2018). There are also a lot of build warnings about deprecated packages. These dependencies should be updated.
Hello,
This looks like a well maintained project and would like to self-host it. Got it up and running using docker image, but now I wish to import from some site I was using before (poraba.com).
I have all the data in csv but everytime I try to import I get an error (There was some issue with importing the file. Please check the error message). But log shows no error.
Can you provide a sample CSV that actually imports so I can edit mine with same column names, delimiter and proper values?
Find my latest csv attempt that failes to import here:
Thank you.
I'm unable to import a "Fuelly" CSV and get the following error
2023/02/21 23:38:07 [Recovery] 2023/02/21 - 23:38:07 panic recovered:
No Locale Info Found
/go/pkg/mod/github.com/leekchan/[email protected]/unformatnumber.go:21 (0x9cd71a)
/api/service/fuellyImportService.go:66 (0x9d2152)
/api/service/importService.go:101 (0x9d4b05)
/api/controllers/import.go:22 (0x9dc60d)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9b1cf9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x9b1ce0)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9ed60b)
/api/main.go:68 (0x9ed5ed)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9b1cf9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x9b1ce0)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9b0dd3)
/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0x9b0d92)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9a7589)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0x9a756f)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0x9a705b)
/usr/local/go/src/net/http/server.go:2887 (0x6b5b22)
/usr/local/go/src/net/http/server.go:1952 (0x6b0f4c)
/usr/local/go/src/runtime/asm_amd64.s:1371 (0x473e60)
This happens with either of the example exports from the akhilrex repo as well as my hand-formatted example from another app.
Using latest docker image
For some reason, the project uses both yarn and npm. These should not be mixed in a single project. Settle on one of them, and remove the other from the project.
Please complete the following information
Describe the bug
It would be nice to be able to archive a vehicle. Currently there is no way to archive/hide a vehicle that may have been sold.
Before creating a bug report please make sure you are using the latest docker image / code base.
Please complete the following information
Expected behavior
Clearly defined roles, the ones I would image are:
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Could we add imperial gallons for MPG as well as US gallons, 4.54609 litres per gallon as this is what's used in UK. Two options to select milage, MPG US and MPG UK
thanks
We are currently getting error in our CI pipeline for testing the UI. We should take a deeper look why that is, and try to get it up and running
When vehicle type set to "Gallons", you are unable to enter a fill-up log with the fuel quantity value set to "Liters", If you do, the generated fuel economy graph gives implausible values.
The calculated fill value should be units X quantity and this should then be entered.
This may be an outlying use case, but in the UK we measure our fuel economy in Miles per (imperial) gallon, but measure and pay for fuel in Liters and £ per litre (which is silly I know).
This means that the fuel economy screen on the vehicle summary shows Miles per Litre which is an unusual unit here.
I think a workaround is to change fuel unit under vehicle to "Gallons" to show MPG chart, then back to "Liters" for day to day filling, but I do not know if this has other implications.
Changing the fuel type after adding fill-ups only changes the graph labelling, so not a suitable workaround.
Please complete the following information
Describe the bug
Deutsche Überetzung:
Das Feld "Hubraum" heißt ebenfalls "Jahr der Erstzulassung"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should be 'Hubraum in ccm' - the translation is correct, must be in the Code.
Screenshots
There is an error using fontawesome 6 icons in buefy, where their scale is off. I added a temporary solution for it in index.html
, however, when the issue is resolved on buefy's end, the temporary fix should be removed from the project.
Hi,
i would like to add recurring expenses which would make it much easier.
For example every year new tires, maintenance costs, insurances, planned fuel, etc.
So i also could add everything and could see what my car will cost me the next year/months.
So we can use the tool for planning future costs in the next months/years.
I'm trying to import my own data (own SQL table) to Hammond, but I don't have a clue how the CSV should look like.
Maybe describe how the CSV should look like for an import (or maybe making 2 example CSV's in the repo), so people can modify/change/create their own CSV to import to the system.
It would be nice to be able to use an existing external authentication provider, especially valuable for anyone running their own SSO. Obviously this could take a few different forms but options I've seen from other projects include:
Any of the above would allow users to take advantage of external providers and not have to have another separate account just for Hammond.
I understand that would be a lot of work, just haven't seen another request for this feature so thought I'd put it out there.
Not sure what is going on - I am using docker image on my Unraid server. About 2 days ago, everything worked fine. Today, i was not able to load UI anymore. I thought OK - maybe something went wrong with the docker image. I redownloaded image, no luck. Tried resotirng backup of database from few days ago (multiple versions) - no luck either.
I decided to spin new docker image - but issue remains - when I open web page, it is just blank.
This is all I get in logs:
2024/01/05 20:41:08 /config/hammond.db
2024/01/05 20:41:08 Config Dir: /config
2024/01/05 20:41:08 Assets Dir: /assets
2024/01/05 20:41:08 /api/db/migrations.go:39 record not found
[0.078ms] [rows:0] SELECT * FROM `migrations` WHERE name="2022_03_08_13_16_AddVIN" ORDER BY `migrations`.`id` LIMIT 1
ALTER TABLE vehicles ADD COLUMN vin text
2024/01/05 20:41:08 /api/db/migrations.go:42 duplicate column name: vin
[0.008ms] [rows:0] ALTER TABLE vehicles ADD COLUMN vin text
[GIN] 2024/01/05 - 20:41:16 | 200 | 1.740205ms | 192.168.88.154 | GET "/api/system/status"
[GIN] 2024/01/05 - 20:46:10 | 304 | 1.354889ms | 192.168.88.154 | GET "/"
[GIN] 2024/01/05 - 20:46:10 | 200 | 1.633959ms | 192.168.88.154 | GET "/api/system/status"
I did not have any other updates.
I also noticed that docker image has been updated yesterday, so I tried to use version before that - alfhou/hammond:v0.0.21
but result is the same. i am clueless.
Anyone has any idea?
Hi, I would like to be able to add additional info to my cars, things like wheel size, oil type, whiper size etc.
This could be either a semi custom table or a notes field
Before creating a bug report please make sure you are using the latest docker image / code base.
Please complete the following information
Describe the bug
When adding a vehicle year of manufacture is duplicated, I believe on the original version this was engine size
A suggestion. On the main vehicle details page, it would be good to have AVG fuel economy instead of "AVG Fillup QTY" which seems to be information that is not usefull.
Additionally, as fuel fillups are primarily used for cost and economy tracking why not display the tank fuel economy on each fillup row?
When adding a fillup/expense users could save time after selecting a car,
if we copy the latest odometer numbers into the new forms' odometer-input "value" attribute.
Before creating a bug report please make sure you are using the latest docker image / code base.
Please complete the following information
Describe the bug
Thanks for releasing v0.0.4 👍 I noticed that the Docker image tag v0.0.4
isn't available on Docker Hub, and it's because the image has failed to build: https://github.com/AlfHou/hammond/actions/runs/5592418036
I don't know anything about npm but hopefully it's just something to do with the dependency resolution
Title says it.
Possibility to switch between dark and light mode would be nice
Before creating a bug report please make sure you are using the latest docker image / code base.
Please complete the following information
Describe the bug
Currently there is no way to add an attachment to an expense record - we can only add files using the quick-entry.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should be able to add an attachment/screenshot of an invoice or expense document
Please complete the following information
Describe the bug
After install, it would be nice to feel the branding of the organisations.
Could it be possible to upload a logo, or just change the name of the page?
Thanks for that great work!
Would it be possible to add TOTP support?
This would add some security, as well as some peace of mind.
This allows login using Google Authenticator or other TOTP applications
Original by @KLMors3 from the original repo
Adding fuel economy based on users currency/fuel metric to the Summary card and Details page would be very beneficial for quick glances if the data is available.
I think the logic could be to subtract the second to the last complete fuel up (as marked by the "Tank Full" toggle) from the last complete fuel up, and then divide that amount traveled by the Last Fuel Qty.
If there is not concurrent complete fuel up data to calculate the last fuel economy it could simply say "NA" or "Partially Filled Up"
This method removes the need for a static fuel tank size to be stored
Here are Screenshots of what I had in mind.
I replaced the currency with AVG Fuel Economy as the currency is always static for my uses, so I don't need to know that info at a glance. Additionally, is it possible to limit the number length display to 5 characters? "AVG Fillup QTY" is longer than it needs to be.
I have mocked up what the details page could look like.
The "Fuel Economy" can be calculated like I mentioned above for each entry, and the "AVG Fuel Economy" is calculated by adding all of the completed fuel economy values and then dividing that number by the total completed amount of entries.
For example: 19.246+15.976+18.651 / 3 = "17.957"
I would like to see an option to add a discount in price and subtract it from the total amount.
Before creating a bug report please make sure you are using the latest docker image / code base.
Please complete the following information
Describe the bug
A clear and concise description of what the bug is.
If I add fillups there is no mileage shown.
No matter what I am choosing (l/km etc.)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
When adding a quick entry an option to add a note.
When I take a picture of either the receipt or the pump, the odometer data is not included. You only see the amount of fuel and the price. I would like to add the odometer data to a quick entry photo with, for example, a note. Or if there is another way to solve the problem, please let me know.
Hi!
As i imported my data i longed for some sanity checks.
i have some lost entries / rented out my car / have someone else fill up and not log the data, so the L/100km graph will show artifacts.
The app could show a greyed out row (missed fillup) when there’s a large difference (larger than the average distance between fillups) in km between two fill ups to show the user that we're probably missing some data here.
The user can then check the "missed fillup" field with a button "likely missed fillup. fix?"
The CI step for testing the frontend was removed as there are some errors related to the mixing of package managers (see #11).
Once that's resolved the frontend testing step should be reintroduced.
Hello,
Just finished Slovenian translation. Can you please add it to the next release.
Thank you.
Now that we've added translations, there should be a way to switch language either in the settings or in the menu bar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.