[freeside] Any ideas

Ivan Kohler ivan at sisd.com
Thu Nov 4 03:55:04 PST 1999


On Tue, Sep 28, 1999 at 06:10:46PM -0600, Ben Leibig wrote:
> I got a few things I need to do was wondering if anyone had any ideas.
> 
> 
> 1: Create a printout of overdue invoices(invoices which were issued more
> then 15 days from the current date and have not yet been paid)

Take the current time, as a UNIX timestamp (number of seconds since Jan 1,
1970) - 941616000. I have the following alias defined: 

alias str2time='perl -e '\''use Date::Parse; print str2time($ARGV[0]),"\n";'\'''

So I just do

$str2time 11/3/99

Take this number, and subtract 15 days (15 * 24 * 60 * 60 = 1296000) -
940320000.

Then use SQL:

SELECT * FROM cust_bill WHERE _date < 940320000 AND owed > 0;

(of course, all that can be done in a program)

> 2: Create an invoice which pro-rates all accounts and charges them, then
> creates a next bill date which is on the same day of the month for all
> packages.
> 
> 3: Anyone figured out a way to use TeX to create a more elegent invoice. If
> I were to make a TeK macro with some sort of tag where specific text should
> be inputted, would someone be wlling to do the perl work?
> 

-- 
Ivan Kohler <ivan at sisd.com> - finger for PGP key - <moc.dsis at navi> Relhok Navi
Open-source billing and administration for ISPs - http://www.sisd.com/freeside
20 4,16 * * * saytime # please don't be surprised if you find me dreaming too



More information about the freeside-users mailing list