summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-26 14:05:08 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-26 14:05:08 -0700
commit8c450aab9bae89373c2c1b35c85597bb52299de3 (patch)
tree62e7400162703ad0990f80a2d71b90fc1167e759 /httemplate/view
parent2528cc7b182781a82844d8bbb1b555560487abc7 (diff)
parentbd647f16de5352722baed016b45baa4e7c695278 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/cust_main/packages/status.html7
-rwxr-xr-xhttemplate/view/cust_main_statement-pdf.cgi6
2 files changed, 11 insertions, 2 deletions
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index 4aec90efb..e9017745b 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -73,7 +73,12 @@
<% pkg_status_row_changed( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %>
-% if ( $part_pkg->option('suspend_bill', 1) ) {
+% if ( $cust_pkg->option('suspend_bill', 1)
+% || ( $part_pkg->option('suspend_bill', 1)
+% && ! $cust_pkg->option('no_suspend_bill',1)
+% )
+% )
+% {
<% pkg_status_row_if( $cust_pkg, emt('Next bill'), 'bill', %opt, curuser=>$curuser ) %>
% }
<% pkg_status_row_if( $cust_pkg, emt('Will resume'), 'resume', %opt, curuser=>$curuser ) %>
diff --git a/httemplate/view/cust_main_statement-pdf.cgi b/httemplate/view/cust_main_statement-pdf.cgi
index 7a0e19838..7c2c20799 100755
--- a/httemplate/view/cust_main_statement-pdf.cgi
+++ b/httemplate/view/cust_main_statement-pdf.cgi
@@ -23,13 +23,17 @@ my $cust_main = qsearchs({
'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
});
die "Customer #$custnum not found!" unless $cust_main;
+my $cust_bill = ($cust_main->cust_bill)[-1]
+ or die "Customer #$custnum has no invoices!";
my $cust_statement = FS::cust_statement->new({
'custnum' => $custnum,
- 'statementnum' => 'ALL', #magic
+# 'statementnum' => 'ALL', #magic
+ 'invnum' => $cust_bill->invnum,
'_date' => time,
});
+
my $pdf = $cust_statement->print_pdf( '', $templatename );
http_header('Content-Type' => 'application/pdf' );