RT# 74537 - Added new selfservice config option to make ECHECK readonly on selfservic...
[freeside.git] / FS / FS / Conf.pm
index 07042e5..77add5d 100644 (file)
@@ -9,6 +9,7 @@ use Carp;
 use IO::File;
 use File::Basename;
 use MIME::Base64;
+use Email::Address;
 use FS::ConfItem;
 use FS::ConfDefaults;
 use FS::Conf_compat17;
@@ -605,10 +606,12 @@ based on their current values.
 
 sub invoice_from_full {
   my ($self, $agentnum) = @_;
-  return $self->config('invoice_from_name', $agentnum ) ?
-         $self->config('invoice_from_name', $agentnum ) . ' <' .
-         $self->config('invoice_from', $agentnum ) . '>' :
-         $self->config('invoice_from', $agentnum );
+
+  my $name =  $self->config('invoice_from_name', $agentnum)
+           || $self->config('company_name', $agentnum);
+
+  Email::Address->new( $name => $self->config('invoice_from', $agentnum ) )
+    ->format;
 }
 
 =back
@@ -1643,6 +1646,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'quotation_disable_after_days',
+    'section'     => '',
+    'description' => 'The number of days, if set, after which a non-converted quotation will be automatically disabled.',
+    'type'        => 'text'
+  },
+
+  {
     'key'         => 'invoice_print_pdf',
     'section'     => 'invoicing',
     'description' => 'For all invoice print operations, store postal invoices for download in PDF format rather than printing them directly.',
@@ -5126,6 +5136,7 @@ and customer address. Include units.',
                        'Change billing address',
                        'Change service address',
                        'Change payment information',
+                       'Change packages',
                        'Change password(s)',
                        'Logout',
                      ],
@@ -6098,6 +6109,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'selfservice-ACH_info_readonly',
+    'section'     => 'self-service',
+    'description' => 'make ACH on self service portal read only',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'selfservice-announcement',
     'section'     => 'self-service',
     'description' => 'HTML announcement to display to all authenticated users on account overview page',