[freeside-devel] putting the balance_due value in templates

Luke S Crawford lsc at prgmr.com
Tue May 13 01:38:40 PDT 2008


I'm setting up a new system using freeside 1.7.3 -

I've been trying to get the balance_due in my invoice template
(because I'm trying to send a paypal url, and I need the amount)  

After reading up on the templating stuff, it seems that the  balance due
isn't in scope for the template.  I have a simple diff for cust_bill.pm 
that puts it in scope below.  Is this the correct way to do it?



debian64:~/freeside/FS/FS$ diff cust_bill.pm cust_bill.pm.lsc
1661a1662
>   $FS::cust_bill::_template::balance_due = $self->owed + $pr_total;


this works with a billing template that includes the string:

teststring{$balance_due;}endteststring  -  it now inserts the balance due
where you would expect.


I think this might be useful for many of the 'push' billing types (like
paypal, e-gold, etc...)  


More information about the freeside-devel mailing list