[freeside-commits] freeside/httemplate/misc download-bill_batch.html, NONE,

Mark Wells mark at wavetail.420.am
Sat Jul 30 16:20:39 PDT 2011

Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv20096/httemplate/misc

Added Files:
      Tag: FREESIDE_2_1_BRANCH
Log Message:
rearrange flow of batch download, #947

--- NEW FILE: download-bill_batch.html ---
die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('View invoices');
my ($batchnum) = $cgi->keywords;
$batchnum =~ /^\d+$/ or die "invalid batchnum '$batchnum'";
my $batch = FS::bill_batch->by_key($batchnum)
  or die "Batch $batchnum not found";

# send the batch
my $content = $batch->pdf;
$r->headers_out->add( 'Content-Disposition' => 

my $error = $batch->replace;
warn "error deleting cached PDF: '$error'\n" if $error;

More information about the freeside-commits mailing list