ticket: 27309; add accountcode

I tested this as best I could. I worked with my fake data. I accounted
for ' and blank lines, assuming terminal whitespace was irrelevant.
ticket: 27309; use dbh->quote

Sorry, I shouldn't have missed this. I've gotten used to using either
DBIx::Class to construct queries for me or using whole prepared statements,
which handle the quoting automagically.  I've gotten out of practice with
SQL created piecemeal.