summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-03-06 20:27:57 -0800
committerIvan Kohler <ivan@freeside.biz>2017-03-06 20:27:57 -0800
commit2fa0baa6657146fc3569e620945a8fa3dcc9e23d (patch)
treecfc1cd9d18d875ee0bb96090c16d31c290aded1b /httemplate/misc
parentace5df96f846d02ef044d67c89667d7d23c47f75 (diff)
fix agent-virt of invoice_from and company_name on statement send, RT#74943, RT#34078
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/email-customer-statement.html17
1 files changed, 6 insertions, 11 deletions
diff --git a/httemplate/misc/email-customer-statement.html b/httemplate/misc/email-customer-statement.html
index 7ed380b58..6b88f7942 100644
--- a/httemplate/misc/email-customer-statement.html
+++ b/httemplate/misc/email-customer-statement.html
@@ -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',
- '<P>' .
- $opt{'conf'}->config('company_name') .
- ' statement of charges and payments for ' .
- $summary_text .
- "</P>" .
+ "<P>$subject</P>".
include('/elements/customer-statement.html',
'history' => [
$cust_main->payment_history(