diff options
author | cvs2git <cvs2git> | 2004-02-12 06:31:38 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2004-02-12 06:31:38 +0000 |
commit | 1158b98b59803b3bc05a38f73e639fc6b2b8799e (patch) | |
tree | 3f5ec60d200fc9b6c6b544fb9703e5ac65987ff1 /httemplate | |
parent | 1386545d35b11c45e1bf23dcd4a3eb329e42af15 (diff) | |
parent | f4ffa3596c3b8bfc9e862c2a7e8efc68f86207ab (diff) |
This commit was manufactured by cvs2svn to create branch
'FREESIDE_1_4_BRANCH'.
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/misc/email-invoice.cgi | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/httemplate/misc/email-invoice.cgi b/httemplate/misc/email-invoice.cgi new file mode 100755 index 000000000..7ab1613ee --- /dev/null +++ b/httemplate/misc/email-invoice.cgi @@ -0,0 +1,23 @@ +<% + +my $conf = new FS::Conf; + +#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 = send_email( + 'from' => $conf->config('invoice_from'), + 'to' => [ grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ], + 'subject' => 'Invoice', + 'body' => [ $cust_bill->print_text ], +); +eidiot($error) if $error; + +my $custnum = $cust_bill->getfield('custnum'); +print $cgi->redirect("${p}view/cust_main.cgi?$custnum"); + +%> |