From 18c025613fa052cf4ba8d484f1296cc2a1719a24 Mon Sep 17 00:00:00 2001 From: khoff Date: Mon, 21 Mar 2005 22:13:39 +0000 Subject: Added support for FAX invoice destinations using a HylaFAX server. Faxing plain text invoices is not supported. --- httemplate/misc/fax-invoice.cgi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 httemplate/misc/fax-invoice.cgi (limited to 'httemplate/misc') diff --git a/httemplate/misc/fax-invoice.cgi b/httemplate/misc/fax-invoice.cgi new file mode 100755 index 000000000..46b2a1721 --- /dev/null +++ b/httemplate/misc/fax-invoice.cgi @@ -0,0 +1,25 @@ +<% + +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"); + +%> -- cgit v1.2.1