do-my-invoice

You are currently browsing the archive for the do-my-invoice category.

I’ve just fixed (rather hurriedly) an annoying bug in domyinvoice.com. Invoices generated for a project with a daily rate (rather than hourly) were calculating the days incorrectly — basing the calculation on the number of tasks rather than the distinct list of days. Easy to fix, but since I haven’t been doing any Python for the last couple of months, it took a few hours longer than it should have.

Do My Invoice, my web-based, RESTful invoicing solution, has been live for a couple of months now. Admittedly there hasn’t yet been a large number of registrations, probably because I haven’t really promoted it other than through this low-traffic blog, and because I hope that word-of-mouth may eventually kick in and result in a few more paying customers.

Interestingly though, I’ve somehow made the second page of Google results (currently sitting at position 16) for the keywords “web based invoicing”.
However, for the term “web based invoice”, the site is either so far down the list it can’t be found, or it doesn’t appear at all.

Also interesting: 3 weeks ago, DMI was at position 83 for the search term “invoices”, yet I can’t find it anywhere in the first 100 pages now — obviously we hit a broken rung in the Google ladder and fell down a few hundred feet.

Completely off-topic, but one thing this has highlighted as a gap in Google’s toolset is “Search Within”. It would be really useful to enter a few search terms, then find exactly where another term sat in those results. In other words being able to enter something like: “domyinvoice within: web based invoicing“, which gave you the results found within a set of results, along with the index positions. Seems like a killer Google feature for web developers, marketers and the like.

A recent release of Do My Invoice was a minor update to add more documentation for the various resources used in the application. DMI is a REST application — well, at the very least, that was the initial design goal — so there are some basic access points for most system resources.

For example, you may call GET to request your user profile:

    http://www.domyinvoice.com/resources/[username]/profile

Using CURL the request:

curl -X GET -u joebloggs:password http://www.domyinvoice.com/resources/joebloggs/profile

…will return something like…

<profile>
    <username>joebloggs</username>
	<email_address>joe@bloggs.com</email_address>
	<first_name>Joe</first_name>
	<last_name>Bloggs</last_name>
</profile>

Resources in DMI are self-describing, thus with the addition of a single parameter, you can view the documentation for that resource. Thus the url…

http://www.domyinvoice.com/resources/joebloggs/profile?help

…returns a list of the HTTP verbs accepted by the resource, basic description and more detailed information about each verb. If you don’t have an account (it’s free for the first month, by the way), you can see a static version of this help information here.

Another example, is the clients resource. You can GET a list of clients:

curl -X GET -u joebloggs:password http://www.domyinvoice.com/resources/joebloggs/clients
<clients>
	<client id="76">
		<client-name>test company</client-name>
		<address1>address line 1</address1>
		<address2>address line 2</address2>
		<city>London</city>
		<postcode>sa1 sa2</postcode>
		<country>United Kingdom</country>
	</client>
</clients>

A client can be added with the use of an HTTP PUT:

curl -X PUT -u joebloggs:password http://www.domyinvoice.com/resources/joebloggs/clients/test+company+2 -d @-

address_1=23+Wrights+Lane&address_2=Kensington&city=London&postcode=W8+6TA&country=GB&currency_symbol=£&currency_format=1&sales_tax_label=VAT&sales_tax=0.175

Which also returns the created client (assuming nothing went wrong):

<clients>
	<client id="80">
		<client-name>test+company+2</client-name>
		<address1>23 Wrights Lane</address1>
		<address2>Kensington</address2>
		<city>London</city>
		<postcode>W8 6TA</postcode>
		<country>United Kingdom</country>
	</client>
</clients>

Said client could then be deleted with the use of the DELETE verb:

curl -X DELETE -u joebloggs:password http://www.domyinvoice.com/resources/joebloggs/clients/test+company+2

The obvious advantage of using RESTful resources internally is that I’m effectively providing an external API for free — in other words, without requiring any additional development effort.

Disappointingly, but perhaps unsurprisingly, there are no plugins for WordPress which provide bug-tracking capabilities. Well, at least none that I’ve been able to find. I did consider the possibility of developing one myself, but I have enough to do in my spare time as it is. The family would probably kick me out of the house, if I started another project…

However, I did want a basic bug tracking system for Do My Invoice, and it makes sense to also use it for YAK (and perhaps some of my other low volume projects).

After a bit of searching, I came across Mantis, a PHP bug tracking system which looks simple enough for my needs, and perhaps approachable enough for other users to easily post their issues and feature requests. It was certainly easy to install, which makes it one of the more attractive candidates… (that said, I wouldn’t have minded using FogBugz, but don’t have the budget for the moment).

So if you have features or bugs for Do My Invoice, or for the YAK shopping cart plugin, please sign up for a new account at:

http://www.briggs.net.nz/bugtrack/

In the case of YAK, the comments on the project page is still the place for support issues and, in the case of DMI, the email for support requests can be found on the dashboard after you’ve logged in.

Assumption is the mother of all screw-ups.

Like assuming that IE cache settings haven’t been touched since the last time you tested. Assuming that a final check on a test server is good enough and forgetting the final check in production, is another good example.

Unfortunately the D.E.Y. attitude (Do Everything Yourself) means that I’ve got no one to blame but myself.

So if you’ve tried Do My Invoice lately in IE and had nothing but errors, try again with a CTRL+Refresh (to ensure that IE reloads all files from the server instead of using its annoyingly aggressive cache). You should have a bit more success…

I’ve just updated Do My Invoice with a few minor bug fixes, and some new functionality in the form of a download facility for project tasks (download for expenses is coming soon). Download in XML format took no time at all, since the functionality was basically already there, but a few changes were needed for supporting CSV output. Also included in this release were “presets” for the invoice date input fields (because, yes, I am that lazy), and a bug fix for the daily email service (which wasn’t working quite as well as expected). Behind the scenes, I’ve also finally -completed- the automated test scripts (thanks to Selenium), that will hopefully notify me when I’ve broken something. Nothing like a bit of a safety net to make you feel a little more comfortable.

Next task on the list is to fully document the (REST) API, which will actually also require some minor code updates, because of the way I want to do it. Not to be unnecessarily cryptic, but more on that later…

We’ve thrown a few ideas around at the office, for development projects we could do after hours. The idea was to come up with something interesting (i.e. techie) that’s different enough from the contract we’re working on that we’d be able to keep motivated.

Most of the ideas were far too ambitious (i.e. would require the resources of a Google, or significantly more development effort than we could commit), until someone came up with the idea of designing something we ourselves would find useful. Which is one of those simple, rather obvious ideas which we probably should’ve started with from the beginning.

That opened up a whole different “can of discussion worms”, with the end result being that a few of the guys went in one direction, and I went in another. Which is a roundabout way of bringing me to: “Do My Invoice“.

What I decided I really needed was a simple way to record timesheet information (outside of the client’s timesheet system), which could then be converted into an invoice at the end of the month. To me “record timesheet information” means a simple email interface, because if I leave this stuff until the end of the week, it’s invariably a time-wasting struggle to remember everything I’ve been doing (of course, that’s not all there is to it… but it is the fundamentals of the idea).

Now, you might argue that any number of packages can be used to accomplish the invoicing side of things: MYOB, Quickbooks, and so on. But since the number of invoices I’m generating in a year numbers in the teens, my accountant has me working from a spreadsheet-based cashbook. His argument is why waste the money and effort on an expensive package I’ll hardly be using — I couldn’t agree more.

I’m equally sure there are other web-based, invoicing systems out there (I already came across one three-quarters of the way through the development), but I have yet to see something cheap and simple enough to satisfy my purposes.

Hence Do My Invoice is a cheap and simple (I hope, user-friendly) web-based invoicing system, with hopefully enough features to make it attractive to spend the US$50 subscription per year. In true eat-your-own-dog-food fashion, I’m using my own application, so new features will be added as, and where, I discover the lack — and so feature requests are welcome. At some point, over the next few weeks, I’ll get some sort of bug tracking software installed so requests can go there (in the meantime info ‘at’ domyinvoice.com will go to the right place).

Feedback and critique welcome — except if it’s regarding the web design (which will be fixed as soon as I have more than just myself as a paying subscriber…)