skip to content

DerekAllard.com : CodeIgniter, ExpressionEngine, and the World of Web Design

BambooInvoice 0.8.2 released

September 14th, 2007

BambooInvoice logo
There’s a new release of BambooInvoice available.  To update, do a full backup, then replace all files except your config directory, and then run the update script.

I really wanted to get 2 new features in there before I released this version, but as the changes started mounting, and my time started dwindling, I figured I should just get this out there.  Most notable is the reduced code (mostly due to the new CodeIgniter Session Library) and the final-I-swear-its-squashed-now-and-will-never-return fix of your company logo not appearing on the PDFs.

Under the hood, there was substantial restructuring of the database (do a backup both before and after you update), some speed enhancements, some file restructuring, and most importantly, I’ve laid some foundation for the some new features that I think will be a big hit.

The 2 new features planned for the next release:
1) Itemized invoices (you know… 1 “item” at “unit cost” type thing); and
2) Sexier PDF invoices.  Here’s a preview so far.
new BambooInvoice tempalte preview

I’m not totally sold on it… but anything beats the boring invoice I’ve been using so far. I’ve been also thinking about building in some type of invoice template system, so that people could submit their designs, and they could be offered as add ons, or installation time choices perhaps… not sure about that one yet.

With respects to the itemized invoices, this database changes this time around include a new field (“itemized”) for this, and I’ll probably just store things in a serialized array.  I’ve been playing with the javascript I want to use to add in the extra items, and this will be really the first feature that Bamboo will have that will only be accessible to javascript-enabled users.  I don’t feel this conflicts with accessibility though, as non-js users will still be able to use the traditional form.  It will simply be an enhanced experience for js users.

I’ve also been asked if I’d be willing to set up support forums for Bamboo.  I’d be an idiot to burn the goodwill of people who want to help (public thanks go to Marc Arbour for his role in this regard, and for his evangelising of BambooInvoice.  Thanks Marc… I appreciate it).

To that end, one of the things I’ve been thinking about lately is the installation and update procedures.  BambooInvoice is at the point now where it is not longer only attracting CodeIgniter/ExpressionEngine/PHP nerds; and as people with less technical experience start using it I want the experience to be as positive as possible for them.  I’d welcome (with open arms) and suggestions for improvements in this area.

This entry was made on September 14th, 2007 @ 8:29 and filed into BambooInvoice.

Comments

Marcus wrote on September 14th, 2007 @ 12:47

I just want to say thanks.  Bamboo Invoice has made running my business much smoother and easier.  I’ve actually caught 2 overdue invoices in the last month.  Those in the past would have slipped by, but thanks to this, they didn’t!

Eric Davis wrote on September 14th, 2007 @ 13:26

I like the new invoice look.  Two recommendations I would make are:

* Allow basic HTML in the body (li, hr, em, strong)
* Larger textarea to enter the invoice description.  Some JavaScript links for “larger” / “smaller” would be killer.

If you setup some simple forums, I will offer my help.  A short screencast of installing Bamboo might be great to help new people get up and running.

Eric

Lee wrote on September 14th, 2007 @ 19:10

Hey I like the idea of forums, and I am sure it will cut down your inbox levels as well.

In the process of tearing it appart I have themed it and made changes as what not.. I would love to have somewhere where I could submit the modified template files as a theme if the licensing allows for that.

rob wrote on September 15th, 2007 @ 12:01

I’ve tried the update procedure 2 times and it doesn’t appear to work. 

After i run update.php, the page presents a link that tells me i can “login”.  That link keeps wanting to point to my previous install login page.

If i manually type in the correct login link to the new installation.  The minute i login, i’m routed back to the old installation???

any thoughts?

rob wrote on September 15th, 2007 @ 12:34

I figured it out.

Your “update” documentation needs some updating. ;-)

You mention that one should replace the new config directory with the old.  The problem is the config.php file needs its $config[‘base_url’] manually updated to reflect the new base url.

This normally won’t need to be changed if you place the your new version in the old install directory (e.g. the base path stays the same).

However, if you create NEW directories for subsequent installs as i do (bbi_081, bbi_082) just so i can keep track of what my current version is, your update procedure breaks until you change the base_url.

At this stage of maturity for your product, i’m surprised nobody has brought this very obvious missing step to your attention.

It’s hard to believe that nobody has downloaded BBI and tried to install subsequent versions in separate directories but it’s entirely possible! :-)

You might also want to add in documentation for updates that if one changes the invoice “views” and adds a logo, that those items should also be manually migrated to the new installation. 

Unless of course you’ve radically changed the templates in which case you should inform a user that they will need to MERGE changes with the new templates and NOT simply replace them.

For instance, i spent a lot of time tweeking my pdf and view templates for the last version.  I saved the original templates before making my changes.  Their are slight differences between the old default and new templates.  Can i just plug my old templates into place or am i missing some new feature or variable you inserted in the new templates????

NOTE: this would be easier to determine on my own if i was running bbi on a NON-windows box where i had appropriate diff tools.  But unfortunately i’m not.

Clear as mud?

[pause]

fwiw, I just went and copied over my custom view and pdf templates.  Sure enough they did NOT work either for the pdf or the basic invoice display in the browser.  On the surface it looks like all the variables were changed?  e.g:

Message: Undefined property: stdClass::$amountPaid

Filename: invoices/view.php

However, when i compare the file variables they don’t look to have changed.. possibly they are not getting passed correctly?

========
Anxiously awaiting the next version.. have been wanting line items for awhile.

I imagine that the new templates WILL completely replace my modified old one in the next version meaning i should start from scratch???

Suggestion: I’m pretty good at styling the invoices myself.  I wish whatever pdf processor you use would support more advanced css / properties though.  That’s the major limitation in styling them.

thanks for the work you do on BBI

rob wrote on September 15th, 2007 @ 13:07

Well, it looks like you changed a whole slew of variable names…

I was able to get them all fixed but i’m still getting one error that i can’t fix.  my code looks identical to the original template:

A PHP Error was encountered

Severity: Warning

Message: implode() [function.implode]: Bad arguments.

Filename: invoices/view.php

Line Number: 162

Any thoughts???

Suggestions:

Unless you *really* need to change template vars, it would be great if you can keep template variable changes to a minimum in the future. 

I get the feeling you did so because of your up and coming proposed template changes in the next version.  But for those of us that modify your templates, it makes things more difficult.

Finally:  It would be really great if you can create a new and separate variable (totally contradict my last request ;-)) so that we can have TWO LOGOS!  One for the invoice and one for the pdf!

As it stand now, if you size the logo for the invoice, it’s too small for the pdf and vice versa.

This should be easy to do (or at least it’s a lot easier than trying to figure out what’s going on with your pdf processor).

It would go along way to simplifying the consistency between the invoice view and the pdf view which should be standard functionality for an invoice system.

thanks derek

Alex Williams wrote on September 15th, 2007 @ 16:41

Great job once again! Thanks!

dedenf wrote on September 18th, 2007 @ 1:48

hi Derek, well done, and thank for the bambooInvoice :D

i have a “correction” on the invoice_table.inc.php file, before <th> tags, it should be <thead> surrounding it, and <tbody> for the table body/content.
i know its minor :D

cheers

Derek wrote on September 18th, 2007 @ 5:02

Thanks all for your great comments, suggestions and contributions.  I can promise you that everything will get looked at, and much of what you’ve taken the time to write here, or write to me privately will make its way into Bamboo.

@defdef: there is a tbody in there already, but for practical reasons (the javascript ajax call that redraws table) I’m forced to leave it as it is.

Thanks again!  Keep those comments and suggestions coming! I’m also considering dropping DOMPDF for PDF generation, and switching to something else, as a few of you have been having trouble with DOM extensions on your server.  Perhaps Zend:PDF… stay tuned!

Derek wrote on September 18th, 2007 @ 15:31

Rob: sorry, meant to address you in my last comment.  The variables are pretty much set now, but yes, I did change them quite a bit to standardize the code.  All future changes in Invoice views will be carefully documented, but again, back up all work. :)

@Eric: I’m leaning against allowing HTML, but I might make that configurable, but I’m definately taking your suggestion of larger textarea into BI.  In fact, you’ve caused me to go on a bit of a tear learning how javascript interacts with textareas.

rob wrote on September 18th, 2007 @ 21:45

what about the dual logos to solve the view versus pdf logo size issue?

Derek wrote on September 19th, 2007 @ 5:55

I think this is a good idea. I’ve changed to logo retrieval code to allow for different images for PDFs as for web.

rob wrote on September 20th, 2007 @ 18:40

cool.. so are you saying i should REdownload 082 again to pick up the fix?

and if so, is it possible to copy only the files (maybe 1 or 2) that i need to in current 082 install?  if so which ones?

thanks derek

Derek wrote on September 20th, 2007 @ 19:14

Sure, actually the code is already in there.  Here’s a step by step for this version (next version will have an easier interface for this).

1) open /application/controllers/invoice.php
2) look around line 436 for the pdf() function.
3) Find this line

$data['company_logo'get_logo($this->settings_model->getSetting('logo')); 


and make it say

$data['company_logo'get_logo('logo_pdf.jpg'); 


4) Put the PDF image into img/logo, and make sure it is named “logo_pdf.jpg”

Ta da!  :)

rob wrote on September 20th, 2007 @ 19:59

got it..

thanks derek…

looking forward to that next release with “line items” and maybe the new pdf processor.

any **rough** eta?  i won’t hold you to it :-)  just trying to get an idea.

thanks again

Post a Comment

Sorry, comments are automatically closed after 45 days, or sooner if one entry gets targetted by spammers. Why not contact me directly?