I've never been a fan of trying to build smart numbering systems for things like invoices or part numbers. It forces you to try to anticipate all your future requirements now and hope for the best.
For related idea in the world of part numbers, read the section titled "Significant numbering schemes are quite fragile
" here:
http://www.buyplm.com/plm-good-practice/part-numbering-system-software.aspx
In your example, you are limited to 99999 clients and they will probably not have more than one invoice in a single day. This makes your proposal very inefficient and sparsely populated.
Also, in a few years, you may wish that you had included something like "sub-client ID" in there.
I'm a proponent of "dumb" numbering schemes... Just pick a sequential integer series and pull from that pool.
You may wish to prepend a prefix such as "MCX-" for "my company x" to assist your clients in recognizing invoice numbers that belong to you.
You could also include a check digit at the end, to decrease the probability of Mis-typing a real invoice number... Or you could simply increment your integer series by a number greater than 1 (such as 19). These methods will 'waste' numbers and be less efficient, but have other benefits.