[freeside] print_text usage
ivan
ivan at 420.am
Wed Sep 26 20:59:40 PDT 2001
On Wed, Sep 26, 2001 at 08:57:01PM -0700, Christopher Brill wrote:
> this is a test script i whipped up trying to test this stuff out:
>
> use FS::cust_bill;
>
> $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
> @lines = $cust_bill->print_text;
> print @lines;
>
> it complains about method table being called with an undefined variable (i
> think $table).. am i missing something?..
In the future, report please report exact error messages, with cut and
paste.
Try adding:
use FS::UID qw(adminsuidsetup);
adminsuidsetup('user');
to the top of your script, where 'user' is a user from your mapsecrets
file.
> sorry to bother you guys with such
> a simple question.
>
> -Chris
>
> -----Original Message-----
> From: ivan [mailto:ivan at 420.am]
> Sent: Wednesday, September 26, 2001 7:15 PM
> To: ivan-freeside at sisd.com
> Subject: Re: [freeside] print_text usage
>
>
> On Wed, Sep 26, 2001 at 07:05:21PM -0700, Christopher Brill wrote:
> > What is the correct format for calling the print_text sub in cust_bill..
> > what args do I have to have present or pass to it?
>
> That's a method call on an FS::cust_bill object, not a subroutine. See
> the FS::cust_bill manpage:
>
> @lines = $cust_bill->print_text;
> @lines = $cust_bill->print_text $time;
>
>
> print_text [TIME];
> Returns an text invoice, as a list of lines.
>
> TIME an optional value used to control the printing of
> overdue messages. The default is now. It isn't the
> date of the invoice; that's the `_date' field. It is
> specified as a UNIX timestamp; see the time entry in
> the perlfunc manpage. Also see the Time::Local man
> page and the Date::Parse manpage for conversion func
> tions.
>
> > I am using this to print an invoice to stdout which is then dumped to
> > an outbound email script that delivers a post payment invoice via email
> >
> > -Chris
> >
> > ---
> >
> > .--------------------------------------------------.
> > | Christopher Brill Majornet Internet Services |
> > | System Administrator 4417 Peralta Blvd |
> > | cb at majornet.com Fremont, CA 94536 |
> > | Phone: 510-796-0603 |
> > | Fax: 510-894-0038 |
> > '--------------------------------------------------'
> >
>
> --
> _ivan
>
--
_ivan
More information about the freeside-users
mailing list