[freeside-commits] freeside/FS/FS Conf.pm, 1.261, 1.262 cust_credit.pm, 1.36, 1.37 cust_pay.pm, 1.68, 1.69 cust_bill.pm, 1.234, 1.235

Ivan,,, ivan at wavetail.420.am
Mon Feb 9 06:05:32 PST 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv17630/FS/FS

Modified Files:
	Conf.pm cust_credit.pm cust_pay.pm cust_bill.pm 
Log Message:
rest of per-agent config for company_name, company_address, logo, etc.. RT#3989

Index: cust_pay.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay.pm,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- cust_pay.pm	5 Jun 2008 05:06:35 -0000	1.68
+++ cust_pay.pm	9 Feb 2009 14:05:30 -0000	1.69
@@ -220,7 +220,8 @@
       $payby =~ s/^CHEK$/Electronic check/;
 
       $error = send_email(
-        'from'    => $conf->config('invoice_from'), #??? well as good as any
+        'from'    => $conf->config('invoice_from', $self->cust_main->agentnum),
+                                   #invoice_from??? well as good as any
         'to'      => \@invoicing_list,
         'subject' => 'Payment receipt',
         'body'    => [ $receipt_template->fill_in( HASH => {
@@ -344,7 +345,8 @@
     my $cust_main = $self->cust_main;
 
     my $error = send_email(
-      'from'    => $conf->config('invoice_from'), #??? well as good as any
+      'from'    => $conf->config('invoice_from', $self->cust_main->agentnum),
+                                 #invoice_from??? well as good as any
       'to'      => $conf->config('deletepayments'),
       'subject' => 'FREESIDE NOTIFICATION: Payment deleted',
       'body'    => [

Index: cust_credit.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_credit.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- cust_credit.pm	22 Nov 2008 22:17:26 -0000	1.36
+++ cust_credit.pm	9 Feb 2009 14:05:30 -0000	1.37
@@ -229,7 +229,8 @@
     my $cust_main = $self->cust_main;
 
     my $error = send_email(
-      'from'    => $conf->config('invoice_from'), #??? well as good as any
+      'from'    => $conf->config('invoice_from', $self->cust_main->agentnum),
+                                 #invoice_from??? well as good as any
       'to'      => $conf->config('deletecredits'),
       'subject' => 'FREESIDE NOTIFICATION: Credit deleted',
       'body'    => [

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -d -r1.261 -r1.262
--- Conf.pm	5 Feb 2009 16:57:34 -0000	1.261
+++ Conf.pm	9 Feb 2009 14:05:30 -0000	1.262
@@ -108,7 +108,11 @@
   my $self = shift;
   return $self->_usecompat('config', @_) if use_confcompat;
 
-  my($name,$agentnum)=@_;
+  my($name, $agentnum)=@_;
+
+  carp "FS::Conf->config($name, $agentnum) called"
+    if $DEBUG > 1;
+
   my $cv = $self->_config($name, $agentnum) or return;
 
   if ( wantarray ) {
@@ -146,7 +150,11 @@
   my $self = shift;
   return $self->_usecompat('exists', @_) if use_confcompat;
 
-  my($name,$agentnum)=@_;
+  my($name, $agentnum)=@_;
+
+  carp "FS::Conf->exists($name, $agentnum) called"
+    if $DEBUG > 1;
+
   defined($self->_config($name, $agentnum));
 }
 
@@ -556,6 +564,7 @@
     'section'     => 'billing',
     'description' => 'Template file for billing method expiration alerts.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Credit_cards_and_Electronic_checks">billing documentation</a> for details.',
     'type'        => 'textarea',
+    'per-agent'   => 1,
   },
 
   {
@@ -1823,7 +1832,7 @@
     'section'     => 'required',
     'description' => 'Your company name',
     'type'        => 'text',
-    'per_agent'   => 1,
+    'per_agent'   => 1, #XXX just FS/FS/ClientAPI/Signup.pm
   },
 
   {
@@ -2270,15 +2279,18 @@
   {
     'key'         => 'logo.png',
     'section'     => 'billing',  #? 
-    'description' => 'An image to include in some types of invoices',
-    'type'        => 'binary',
+    'description' => 'Company logo for HTML invoices and the backoffice interface, in PNG format.  Suggested size somewhere near 92x62.',
+    'type'        => 'image',
+    'per_agent'   => 1, #XXX just view/logo.cgi, which is for the global
+                        #old-style editor anyway...?
   },
 
   {
     'key'         => 'logo.eps',
     'section'     => 'billing',  #? 
-    'description' => 'An image to include in some types of invoices',
+    'description' => 'Company logo for printed and PDF invoices, in EPS format.',
     'type'        => 'binary',
+    'per_agent'   => 1, #XXX as above, kinda
   },
 
   {

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -d -r1.234 -r1.235
--- cust_bill.pm	26 Jan 2009 02:14:04 -0000	1.234
+++ cust_bill.pm	9 Feb 2009 14:05:30 -0000	1.235
@@ -1637,7 +1637,6 @@
 =cut
 
 sub print_latex {
-
   my( $self, $today, $template ) = @_;
 
   my %params = ( 'format' => 'latex' );
@@ -1653,11 +1652,13 @@
                            UNLINK   => 0,
                          ) or die "can't open temp file: $!\n";
 
-  if ($template && $conf->exists("logo_${template}.eps")) {
-    print $lh $conf->config_binary("logo_${template}.eps")
+  my $agentnum = $self->cust_main->agentnum;
+
+  if ( $template && $conf->exists("logo_${template}.eps", $agentnum) ) {
+    print $lh $conf->config_binary("logo_${template}.eps", $agentnum)
       or die "can't write temp file: $!\n";
-  }else{
-    print $lh $conf->config_binary('logo.eps')
+  } else {
+    print $lh $conf->config_binary('logo.eps', $agentnum)
       or die "can't write temp file: $!\n";
   }
   close $lh;



More information about the freeside-commits mailing list