[freeside] 1.4.1beta7 Invoice Templates

ivan at 420.am ivan at 420.am
Sun Mar 23 14:16:59 PST 2003


On Fri, Mar 14, 2003 at 10:55:48PM -0500, Stephen Bechard wrote:
> I am looking for some more information on creating/modifying
> invoice templates.  I am looking to add more customer information
> on them, such as the customer number, and adding net 30 days to the
> output for invoice due date. I think I got the net 30 piece down.
> 
> I found a couple posts in the lists referring to customer number hack
> for 1.4.0pre11, however, doesn't seem to work in 1.4.1beta7 

I doubt it worked for 1.4.0pre11 either, the code in question hasn't
changed.

> Just looking for the best way to achieve this.
> 
> Here is a snip of what I found:
> --------------
> If I interpret the doc correctly, I can gain access to the FS::cust_bill
> object for the invoice being printed (eg, to print the customer ID) using
> FS::Record->qsearchs('cust_bill', {'invnum' => $invnum}).
> --------------

Dunno.  I'd change the code that prepares variables for the template
rather than overload the template itself with code.

> I also want to create a custom invoice_template that I can attach to
> the Invoice Event Listings that will remind the customers after the
> invoice is overdue by 20 days.  I do not want to create a new invoice
> just attach a message heading reminding them and include the balance
> due or the original outstanding invoice...

Create the invoice event and the template will then be available for you
to edit.

> Also looking for a way to incorporate a custom subject for each type
> of invoice. I know this is hard-coded in cust_bill.pm, but wasn't sure
> about the best way to make it a variable. 

I hadn't given it much thought.  Let us know what you come up with.

> If you can point me in the correct direction I don't mind providing
> diffs with the new features if required. 

Don't you have CVS access already?  In fact, aren't we already waiting
for you to check in your last set of changes?  :)

-- 
_ivan



More information about the freeside-users mailing list