freeside/httemplate/misc fax-invoice.cgi,NONE,1.1
Kristian Hoffmann
khoff at pouncequick.420.am
Mon Mar 21 14:13:42 PST 2005
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory pouncequick:/tmp/cvs-serv1286/httemplate/misc
Added Files:
fax-invoice.cgi
Log Message:
Added support for FAX invoice destinations using a HylaFAX server.
Faxing plain text invoices is not supported.
--- NEW FILE: fax-invoice.cgi ---
<%
my $conf = new FS::Conf;
my $lpr = $conf->config('lpr');
#untaint invnum
my($query) = $cgi->keywords;
$query =~ /^(\d*)$/;
my $invnum = $1;
my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
die "Can't find invoice!\n" unless $cust_bill;
my $error = &FS::Misc::send_fax(
dialstring => $cust_bill->cust_main->getfield('fax'),
docdata => [ $cust_bill->print_ps ],
);
die $error if $error;
my $custnum = $cust_bill->getfield('custnum');
print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
%>
More information about the freeside-commits
mailing list