X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Femail-customer-statement.html;h=6b88f7942bbfc50aabb9c17fd0a345bb176f1636;hp=39c99e515a0b066d9646a21d2b4b8991409b831b;hb=560af69840e7e3fcebf65d5d56ca4efc0851efec;hpb=dacfac92a13152bb3060ac000121b41ffc8d877f diff --git a/httemplate/misc/email-customer-statement.html b/httemplate/misc/email-customer-statement.html index 39c99e515..6b88f7942 100644 --- a/httemplate/misc/email-customer-statement.html +++ b/httemplate/misc/email-customer-statement.html @@ -25,9 +25,9 @@ my $alternate_form = sub { my $label = ucfirst($_); $label =~ s/_/ /; include('/elements/tr-input-date-field.html',{ - 'name' => $_, - 'value' => $cgi->param($_) || '', - 'label' => $label, + 'name' => $_, + 'value' => ( scalar($cgi->param($_)) || '' ), + 'label' => $label, 'noinit' => $noinit++ }); } @@ -53,7 +53,7 @@ my $post_search_hook = sub { # set from/subject/html_body based on date range $cgi->param('from', - $opt{'conf'}->config('invoice_from') + $opt{'conf'}->config('invoice_from', $cust_main->agentnum) ); # shortcut for common text @@ -63,18 +63,13 @@ my $post_search_hook = sub { ($cgi->param('end_date') ? ' through ' : '') . $cgi->param('end_date'); - $cgi->param('subject', - $opt{'conf'}->config('company_name') . - ' statement for ' . - $summary_text - ); + my $company_name = $opt{'conf'}->config('company_name', $cust_main->agentnum); + my $subject = "$company_name statement for $summary_text"; + + $cgi->param('subject', $subject); $cgi->param('body', - '

' . - $opt{'conf'}->config('company_name') . - ' statement of charges and payments for ' . - $summary_text . - "

" . + "

$subject

". include('/elements/customer-statement.html', 'history' => [ $cust_main->payment_history(