freeside/FS/FS cust_bill.pm,1.122,1.123

Ivan Kohler ivan at pouncequick.420.am
Wed Jun 8 23:00:05 PDT 2005


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv28390

Modified Files:
	cust_bill.pm 
Log Message:
make sure invoice_(latex|html)returnaddress is configurable per-agent

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- cust_bill.pm	9 Jun 2005 05:34:06 -0000	1.122
+++ cust_bill.pm	9 Jun 2005 05:59:57 -0000	1.123
@@ -1336,11 +1336,10 @@
   }
 
   my $returnaddress;
-  if ( $conf->exists('invoice_latexreturnaddress')
-       && length($conf->exists('invoice_latexreturnaddress'))
-     )
-  {
-    $returnaddress = join("\n", $conf->config('invoice_latexreturnaddress') );
+  if ( length($conf->config_orbase('invoice_latexreturnaddress', $template) ) {
+    $returnaddress = join("\n",
+      $conf->config_orbase('invoice_latexreturnaddress', $template)
+    );
   } else {
     $returnaddress = '~';
   }
@@ -1762,16 +1761,17 @@
 #    'conf_dir'     => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
   );
 
-  $invoice_data{'returnaddress'} = $conf->exists('invoice_htmlreturnaddress')
-    ? join("\n", $conf->config('invoice_htmlreturnaddress') )
-    : join("\n", map { 
-                       s/~/ /g;
-                       s/\\\\\*?\s*$/<BR>/;
-                       s/\\hyphenation\{[\w\s\-]+\}//;
-                       $_;
-                     }
-                     $conf->config('invoice_latexreturnaddress')
-          );
+  $invoice_data{'returnaddress'} =
+    length( $conf->config_orbase('invoice_htmlreturnaddress', $template) )
+      ? join("\n", $conf->config('invoice_htmlreturnaddress', $template) )
+      : join("\n", map { 
+                         s/~/&nbsp;/g;
+                         s/\\\\\*?\s*$/<BR>/;
+                         s/\\hyphenation\{[\w\s\-]+\}//;
+                         $_;
+                       }
+                       $conf->config_orbase('invoice_latexreturnaddress', $template)
+            );
 
   my $countrydefault = $conf->config('countrydefault') || 'US';
   if ( $cust_main->country eq $countrydefault ) {




More information about the freeside-commits mailing list