add per-agent invoice templates, add per-package suspend invoice events, fix automati...
[freeside.git] / FS / FS / Conf.pm
index d911480..e69a156 100644 (file)
@@ -108,6 +108,22 @@ sub exists {
   -e "$dir/$file";
 }
 
+=item config_orbase KEY SUFFIX
+
+Returns the configuration value or values (depending on context) for 
+KEY_SUFFIX, if it exists, otherwise for KEY
+
+=cut
+
+sub config_orbase {
+  my( $self, $file, $suffix ) = @_;
+  if ( $self->exists("${file}_$suffix") ) {
+    $self->config("${file}_$suffix");
+  } else {
+    $self->config($file);
+  }
+}
+
 =item touch KEY
 
 Creates the specified configuration key if it does not exist.
@@ -197,6 +213,18 @@ sub config_items {
                            'type'        => 'textarea',
                          }
       } glob($self->dir. '/invoice_latex_*')
+  ),
+  ( map { 
+        my $basename = basename($_);
+        $basename =~ /^(.*)$/;
+        $basename = $1;
+        new FS::ConfItem {
+                           'key'         => $basename,
+                           'section'     => 'billing',
+                           'description' => 'Alternate Notes section for LaTeX typeset PostScript invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
+                           'type'        => 'textarea',
+                         }
+      } glob($self->dir. '/invoice_latexnotes_*')
   );
 }
 
@@ -332,7 +360,14 @@ httemplate/docs/config.html
   {
     'key'         => 'deletepayments',
     'section'     => 'UI',
-    'description' => 'Enable deletion of unclosed payments.  Be very careful!  Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
+    'description' => 'Enable deletion of unclosed payments.  Be very careful!  Only delete payments that were data-entry errors, not adjustments.  Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
+    'type'        => [qw( checkbox text )],
+  },
+
+  {
+    'key'         => 'deletecredits',
+    'section'     => 'UI',
+    'description' => 'Enable deletion of unclosed credits.  Be very careful!  Only delete credits that were data-entry errors, not adjustments.  Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.',
     'type'        => [qw( checkbox text )],
   },
 
@@ -344,6 +379,13 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'unapplycredits',
+    'section'     => 'UI',
+    'description' => 'Enable "unapplication" of unclosed credits.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'dirhash',
     'section'     => 'shell',
     'description' => 'Optional numeric value to control directory hashing.  If positive, hashes directories for the specified number of levels from the front of the username.  If negative, hashes directories for the specified number of levels from the end of the username.  Some examples: <ul><li>1: user -> <a href="#home">/home</a>/u/user<li>2: user -> <a href="#home">/home</a>/u/s/user<li>-1: user -> <a href="#home">/home</a>/r/user<li>-2: user -> <a href="#home">home</a>/r/e/user</ul>',
@@ -483,12 +525,19 @@ httemplate/docs/config.html
     'type'        => 'textarea',
   },
 
+  {
+    'key'         => 'invoice_latexsmallfooter',
+    'section'     => 'billing',
+    'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
+    'type'        => 'textarea',
+  },
+
   { 
     'key'         => 'invoice_default_terms',
     'section'     => 'billing',
     'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
     'type'        => 'select',
-    'select_enum' => [ '', 'Payable upon receipt', 'Net 10', 'Net 15', 'Net 30', 'Net 45', 'Net 60' ],
+    'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 30', 'Net 45', 'Net 60' ],
   },
 
   {
@@ -913,6 +962,13 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'legacy_link-steal',
+    'section'     => 'UI',
+    'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'queue_dangerous_controls',
     'section'     => 'UI',
     'description' => 'Enable queue modification controls on account pages and for new jobs.  Unless you are a developer working on new export code, you should probably leave this off to avoid causing provisioning problems.',
@@ -1144,6 +1200,54 @@ httemplate/docs/config.html
                      ],
   },
 
+  {
+    'key'         => 'allow_negative_charges',
+    'section'     => 'billing',
+    'description' => 'Allow negative charges.  Normally not used unless importing data from a legacy system that requires this.',
+    'type'        => 'checkbox',
+  },
+  {
+      'key'         => 'auto_unset_catchall',
+      'section'     => '',
+      'description' => 'When canceling a svc_acct that is the email catchall for one or more svc_domains, automatically set their catchall fields to null.  If this option is not set, the attempt will simply fail.',
+      'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'system_usernames',
+    'section'     => 'username',
+    'description' => 'A list of system usernames that cannot be edited or removed, one per line.  Use a bare username to prohibit modification/deletion of the username in any domain, or username@domain to prohibit modification/deletetion of a specific username and domain.',
+    'type'        => 'textarea',
+  },
+
+  {
+    'key'         => 'cust_pkg-change_svcpart',
+    'section'     => '',
+    'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.  Use with caution!  No provision is made for export differences between the old and new service definitions.  Probably only should be used when your exports for all service definitions of a given svcdb are identical.",
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'disable_autoreverse',
+    'section'     => 'BIND',
+    'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'svc_www-enable_subdomains',
+    'section'     => '',
+    'description' => 'Enable selection of specific subdomains for virtual host creation.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'svc_www-usersvc_svcpart',
+    'section'     => '',
+    'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
+    'type'        => 'textarea',
+  },
+
 );
 
 1;