make company_phonenum available to templates, #12363
authormark <mark>
Tue, 12 Apr 2011 20:56:48 +0000 (20:56 +0000)
committermark <mark>
Tue, 12 Apr 2011 20:56:48 +0000 (20:56 +0000)
FS/FS/cust_bill.pm
FS/FS/msg_template.pm
httemplate/edit/msg_template.html

index a2754fd..fed1066 100644 (file)
@@ -2553,6 +2553,7 @@ sub print_generic {
     #invoice from info
     'company_name'    => scalar( $conf->config('company_name', $agentnum) ),
     'company_address' => join("\n", $conf->config('company_address', $agentnum) ). "\n",
+    'company_phonenum'=> $conf->config('company_phonenum', $agentnum),
     'returnaddress'   => $returnaddress,
     'agent'           => &$escape_function($cust_main->agent->agent),
 
index 0b9746a..73284d1 100644 (file)
@@ -387,6 +387,9 @@ sub substitutions {
       [ company_address   => sub {
           $conf->config('company_address', shift->agentnum)
         } ],
+      [ company_phonenum  => sub {
+          $conf->config('company_phonenum', shift->agentnum)
+        } ],
     ],
     # next_bill_date
     'cust_pkg'  => [qw( 
index 8e859e6..758aab6 100644 (file)
@@ -55,6 +55,7 @@ my %substitutions = (
     '$cust_statuscolor'     => 'Status color code',
     '$company_name'   => 'Our company name',
     '$company_address'=> 'Our company address',
+    '$company_phonenum' => 'Our phone number',
   ],
   'contact' => [ # duplicate this for shipping
     '$name'           => 'Company and contact name',