X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=639f06baa5297b09a78a0cdc5ecebaa88bfb7fa7;hb=dbb388836b7951a3db49deda05a1ff9ba5125c17;hp=706a42225512f6f449cfa1b3a2e658db446d0b2e;hpb=7c0ec6fb521584a93a93e456dbb923870f059308;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 706a42225..639f06baa 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1,6 +1,6 @@ package FS::Conf; -use vars qw($default_dir @config_items $DEBUG ); +use vars qw($default_dir @config_items @card_types $DEBUG ); use IO::File; use File::Basename; use FS::ConfItem; @@ -284,6 +284,20 @@ httemplate/docs/config.html =cut +#Business::CreditCard +@card_types = ( + "VISA card", + "MasterCard", + "Discover card", + "American Express card", + "Diner's Club/Carte Blanche", + "enRoute", + "JCB", + "BankCard", + "Switch", + "Solo", +); + @config_items = map { new FS::ConfItem $_ } ( { @@ -999,6 +1013,13 @@ httemplate/docs/config.html 'type' => 'checkbox', }, + { + 'key' => 'unsuspend-always_adjust_next_bill_date', + 'section' => 'billing', + 'description' => 'Global override that causes unsuspensions to always adjust the next bill date under any circumstances. This is now controlled on a per-package bases - probably best not to use this option unless you are a legacy installation that requires this behaviour.', + 'type' => 'checkbox', + }, + { 'key' => 'usernamemin', 'section' => 'username', @@ -1188,15 +1209,63 @@ httemplate/docs/config.html { 'key' => 'signup_server-default_agentnum', 'section' => '', - 'description' => 'Default agentnum for the signup server', - 'type' => 'text', + 'description' => 'Default agent for the signup server', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::agent; + map { $_->agentnum => $_->agent } + FS::Record::qsearch('agent', { disabled=>'' } ); + }, + 'option_sub' => sub { require FS::Record; + require FS::agent; + my $agent = FS::Record::qsearchs( + 'agent', { 'agentnum'=>shift } + ); + $agent ? $agent->agent : ''; + }, }, { 'key' => 'signup_server-default_refnum', 'section' => '', - 'description' => 'Default advertising source number for the signup server', - 'type' => 'text', + 'description' => 'Default advertising source for the signup server', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::part_referral; + map { $_->refnum => $_->referral } + FS::Record::qsearch( 'part_referral', + { 'disabled' => '' } + ); + }, + 'option_sub' => sub { require FS::Record; + require FS::part_referral; + my $part_referral = FS::Record::qsearchs( + 'part_referral', { 'refnum'=>shift } ); + $part_referral ? $part_referral->referral : ''; + }, + }, + + { + 'key' => 'signup_server-default_pkgpart', + 'section' => '', + 'description' => 'Default pakcage for the signup server', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::part_pkg; + map { $_->pkgpart => $_->pkg.' - '.$_->comment } + FS::Record::qsearch( 'part_pkg', + { 'disabled' => ''} + ); + }, + 'option_sub' => sub { require FS::Record; + require FS::part_pkg; + my $part_pkg = FS::Record::qsearchs( + 'part_pkg', { 'pkgpart'=>shift } + ); + $part_pkg + ? $part_pkg->pkg.' - '.$part_pkg->comment + : ''; + }, }, { @@ -1213,24 +1282,41 @@ httemplate/docs/config.html 'type' => 'checkbox', }, { - key => 'signup_server-classnum2', - section => '', - description => 'Package Class for first optional purchase', - type => 'select-sub', - options_sub => sub { my @o = map { $_->{classnum} => $_->{classname} } map { $_->hashref } FS::Record::qsearch('pkg_class',{}); - } , - option_sub => sub { return map { $_->hashref->{classname}} FS::Record::qsearchs('pkg_class', { classnum => shift } ); }, - - }, - - { - key => 'signup_server-classnum3', - section => '', - description => 'Package Class for second optional purchase', - type => 'select-sub', - options_sub => sub { my @o = map { $_->{classnum} => $_->{classname} } map { $_->hashref } FS::Record::qsearch('pkg_class',{}); - } , - option_sub => sub { return map { $_->hashref->{classname}} FS::Record::qsearchs('pkg_class', { classnum => shift } ); }, + 'key' => 'signup_server-classnum2', + 'section' => '', + 'description' => 'Package Class for first optional purchase', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::pkg_class; + map { $_->classnum => $_->classname } + FS::Record::qsearch('pkg_class', {} ); + }, + 'option_sub' => sub { require FS::Record; + require FS::pkg_class; + my $pkg_class = FS::Record::qsearchs( + 'pkg_class', { 'classnum'=>shift } + ); + $pkg_class ? $pkg_class->classname : ''; + }, + }, + + { + 'key' => 'signup_server-classnum3', + 'section' => '', + 'description' => 'Package Class for second optional purchase', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::pkg_class; + map { $_->classnum => $_->classname } + FS::Record::qsearch('pkg_class', {} ); + }, + 'option_sub' => sub { require FS::Record; + require FS::pkg_class; + my $pkg_class = FS::Record::qsearchs( + 'pkg_class', { 'classnum'=>shift } + ); + $pkg_class ? $pkg_class->classname : ''; + }, }, { @@ -1332,6 +1418,42 @@ httemplate/docs/config.html 'select_enum' => [ 'text/plain', 'text/html' ], }, + { + 'key' => 'warning_email', + 'section' => '', + 'description' => 'Template file for warning email. Warning emails are sent to the customer email invoice destination(s) each time a svc_acct record has its usage drop below a threshold or 0. See the Text::Template documentation for details on the template substitution language. The following variables are available
$username
$password
$first
$last
$pkg
$column
$amount
$threshold