Forums » Community Projects

Transaction Ledger plugin

Nov 30, 2010 draugath link
The goal for this plugin is to be able to log and view all monetary transactions that you perform.

- Track Buy/Sell at stations, /givemoney, and ship repairs.
- View filtering
- Sorting
- Notes entry
- Search

Features in testing:
- Mission transaction support


/ledger - open GUI
/ledger reset - reset transaction history

Download link:
Note2: Due to a bug that was found in v0.4.2 (and possibly earlier) some blank entries may have been created which can cause the GUI to generate a Lua error. If you are having this problem, you can use the command "/ledger fix042" to delete these blank entries

Known Issues: If you buy back your last ship, and the current station doesn't sell everything, but you have everything in stock, it will still create a note saying the purchase failed, even though your ship is fully customized.

+ Window should now be sized proportional to your screen resolution
+ Added date filters
+ Added an options dialog

+ Fixed a parsing issue causing corrupted data

+ Changed the filters from lists to toggles. This will give greater granularity
+ Code optimizations

+ Fixed sorting the matrix on opening the ledger GUI
+ Added logging of guild bank transfers

+ Added the ability to modify notes for a ledger entry
+ Added searching
+ Made a few GUI modifications
+ Fixed a lua error when buying last ship and not all items were available.

+ Added the ability to sort the ledger list by clicking on a heading

+ Added an additional filter
+ Cleaned up the interface

+ Added Filters

+ Initial testing release. Only logging and display.
Dec 01, 2010 Thetis link
I have been running around now for a couple of days with the plugin. It has been really interesting to look at my daily habits. Couple of suggestions.
1. add a filter under ships for purchases.
2. be able to set the recording amount. Example 1 day or 1 week type of thing. As it may cause a problem if the transaction list gets too long.
Think it is a good solid interface. Look forward to your enhancements.
Dec 13, 2010 draugath link
Version 0.3.0 has been released.
Dec 13, 2010 space999999 link
Link didn't work.
Dec 13, 2010 draugath link
link works now.
Dec 27, 2010 draugath link
I have the foundation for editing notes on entries working. However, I'm currently trying to pin down a CPU utilization problem that I've recently noticed on my system in conjunction with having the ledger window open. If I make the window fullscreen, it shouldn't impact gameplay at all, and just end up being a nuisance to me. In fact, I've just decided that so long as it's not causing the game to crash, I'm not going to worry about it. If anyone notices any problems being caused by this, please let me know and I'll look into it more.
Dec 29, 2010 draugath link
Version 0.4.0 has been released.
Dec 29, 2010 draugath link
I feel like such a putz at times. Well, I discovered I'd broken sorting of the matrix on opening the GUI, so I took the time to also add in logging of guild bank transactions while I was fixing that.

Version 0.4.1 has been released.
Jan 14, 2011 draugath link
Version 0.4.3 has been released. This is mainly a bugfix version.
Jan 22, 2011 meridian link
I just took a quick look at this plug-in. For starters, I see that you are missing a few ships names in your list. Exact names are:
'Vulture - Anniversary Edition'
'Corvus Vulturius - Anniversary Edition'
'TPG Raptor Mark II'
'Behemoth Heavy Miner MkII'

Also 'UIT Territorial Defender' s/b 'Warthog Territorial Defender'

If I were writing this plug-in, some things I would add:
1) Filter entries by date range. In addition, it would be nice to have a set of radio buttons to choose between all entries, this month, this week, today, and this session (at least since reload of interface).
2) Include the sector where the transaction occurred for each entry (well, maybe not for guild bank transactions)
3) From my work on SLM I have learned that saving the version in the system notes is a great step in handling potential incompatibilities with future versions

Jan 23, 2011 draugath link
Thank you for taking the time, meridian. Your insight is always appreciated.
Jan 29, 2011 draugath link
Version 0.4.4 has now been released.
Feb 08, 2011 meridian link
After thinking about it some more, I think it would be helpful to have the number of results found indicated when using the filter (i.e. XX of TOTAL records). For example, since I happened to have Ledger installed on my test client, I was able to see that I destroyed 149 ships in my testing for my latest SLM update (but I had to count the entries manually to arrive at that number). Also, having the total count is useful for getting an idea of when it's time to do some spring cleaning of records.

I'd also like to see a button in the GUI to erase all records since I'll never remember the command for /ledger reset. Obviously add a confirmation dialog, and adding it to the options tab would probably be a good idea too to help reduce accidental mis-clicks.
Feb 09, 2011 draugath link
Sounds good. I'll look at putting that into the mix. I'm also going to be separating out quantity into a separate field. I've been slacking on the mission tracking work though. So that's still a ways out.
May 28, 2011 draugath link
I've finally gotten around to working on adding mission support. I've uploaded an unstable version for people who are interested in testing this out.

Since my record count has gotten to be rather high, I've noticed some instabilities in the matrix when it's displayed. So I'll be moving to limit the number of displayed records in some way.

My first thought was to only show records for the current day. This would be the easiest to do.
My second thought was to try and create a dynamic moving window of displayed records. This would be harder, but it could potentially create a more seamless user experience.

I'm going to try and make my second thought a reality.

If you get the error (plugins/ledger/main.lua:137: attempt to concatenate local 'notes' (a nil value)) I think I fixed it already. Since I didn't anticipate anyone having already downloaded the unstable version, I just re-uploaded it with the same file name. Download it again and it should go away.

If you got the error ( plugins/ledger/ui_options.lua:134: bad argument #1 to 'ipairs' (table expected, got nil) ), this should be fixed now. Download a2.
Jul 15, 2011 freeroam link
I can't remember it was a while back when I noticed but I'm pretty sure this ledger doesn't take into account being paid bounties, just a heads up. Either that or it was a bug. So guess that's a feature request, Draug.
Jul 16, 2011 draugath link
At this point in time, I don't have any event data pertaining to bounties. If you wanted to gather the CHAT_MSG_SECTORD_MISSION and CHAT_MSG_CONFIRMATION events for a bounty award, I would be willing to add them in.
Sep 21, 2011 larrystorch link
Getting this error on start up using (unstable):

plugins/ledger/main.lua:46: attempt to read from undeclared variable store_purchase
stack traceback:
[C]: in function 'error'
vo/vo.lua:552: in function <vo/vo.lua:547>
plugins/ledger/main.lua:46: in function 'object'
vo/vo_event.lua:23: in function <vo/vo_event.lua:22>
[C]: in function 'xpcall'
vo/vo_event.lua:87: in function '_do_event'
vo/vo_event.lua:108: in function 'ProcessEvent'
vo/vo_addons.lua:11: in function 'Add'
vo/vo_gameevent.lua:156: in function 'func'
vo/vo_gameevent.lua:1367: in function <vo/vo_gameevent.lua:1360>

Executing /lua ReloadInterface() after the game loads does not bring up the error.
Dec 28, 2015 Michael144 link
Is this post up to date?
Dec 28, 2015 draugath link
It's as up to date as the post you replied to.