summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/ClientAPI/Signup.pm4
-rw-r--r--FS/FS/Conf.pm3
-rw-r--r--FS/FS/cust_main.pm4
-rw-r--r--FS/FS/svc_acct.pm3
-rw-r--r--httemplate/edit/cust_main/billing.html5
-rw-r--r--httemplate/edit/cust_main/contact.html5
6 files changed, 19 insertions, 5 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index b026afd..d0d088a 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -186,7 +186,6 @@ sub signup_info {
'company_name' => scalar($conf->config('company_name')),
#per-agent?
'agent_ship_address' => scalar($conf->exists('agent-ship_address')),
- 'require_phone' => scalar($conf->exists('cust_main-require_phone')),
'logo' => scalar($conf->config_binary('logo.png')),
'prepaid_template_custnum' => $conf->exists('signup_server-prepaid-template-custnum'),
};
@@ -405,6 +404,9 @@ sub signup_info {
qw( head body_header body_footer ) ),
( map { $_ => join("\n", $conf->config("signup_server-$_", $agentnum ) ) }
qw( terms_of_service ) ),
+
+ ( map { $_ => scalar($conf->exists($_, $agentnum)) }
+ qw(cust_main-require_phone) ),
};
$cache->set("signup_info_cache_agent$agentnum", $signup_info_cache_agent);
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 9d81b75..4393dcf 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1786,6 +1786,7 @@ and customer address. Include units.',
'section' => 'username',
'description' => 'Allow uppercase characters in usernames. Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
@@ -3589,6 +3590,7 @@ and customer address. Include units.',
'section' => '',
'description' => 'Require daytime or night phone for all customer records.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
@@ -3596,6 +3598,7 @@ and customer address. Include units.',
'section' => '',
'description' => 'Email address field is required: require at least one invoicing email address for all customer records.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index f3f6602..1da788c 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1847,7 +1847,7 @@ sub check {
return $error if $error;
}
- if ( $conf->exists('cust_main-require_phone')
+ if ( $conf->exists('cust_main-require_phone', $self->agentnum)
&& ! length($self->daytime) && ! length($self->night) && ! length($self->mobile)
) {
@@ -3214,7 +3214,7 @@ sub check_invoicing_list {
}
return "Email address required"
- if $conf->exists('cust_main-require_invoicing_list_email')
+ if $conf->exists('cust_main-require_invoicing_list_email', $self->agentnum)
&& ! grep { $_ !~ /^([A-Z]+)$/ } @$arrayref;
'';
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 82a5a8a..139f927 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -1163,6 +1163,7 @@ sub check {
my $cust_pkg;
local $username_letter = $username_letter;
+ local $username_uppercase = $username_uppercase;
if ($self->svcnum) {
my $cust_svc = $self->cust_svc
or return "no cust_svc record found for svcnum ". $self->svcnum;
@@ -1174,6 +1175,8 @@ sub check {
if ($cust_pkg) {
$username_letter =
$conf->exists('username-letter', $cust_pkg->cust_main->agentnum);
+ $username_uppercase =
+ $conf->exists('username-uppercase', $cust_pkg->cust_main->agentnum);
}
my $ulen = $usernamemax || $self->dbdef_table->column('username')->length;
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 78fac6c..bf6c623 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -480,7 +480,8 @@
% unless ( $conf->exists('cust-email-high-visibility')) {
<TR>
<TD ALIGN="right" WIDTH="200">
- <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es)
+ <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
+ ? $r : '' %>Email address(es)
</TD>
<TD WIDTH="408"><INPUT TYPE="text" NAME="invoicing_list" VALUE="<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) %>"></TD>
</TR>
@@ -614,4 +615,6 @@ if ( $cust_main->custnum ) {
$show_term = $term_sth->fetchrow_arrayref->[0];
}
+my $agentnum = $cust_main->agentnum if $cust_main->custnum;
+
</%init>
diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html
index 51c0960..4912327 100644
--- a/httemplate/edit/cust_main/contact.html
+++ b/httemplate/edit/cust_main/contact.html
@@ -21,7 +21,8 @@
% if ( $conf->exists('cust-email-high-visibility') && !$pre ) {
<TR>
<TD ALIGN="right" WIDTH="200">
- <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es)
+ <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
+ ? $r : '' %>Email address(es)
</TD>
<TD bgcolor="#FFFF00">
<INPUT TYPE="text" NAME="invoicing_list" VALUE="<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) %>">
@@ -209,4 +210,6 @@ my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
my @invoicing_list = $cust_main->invoicing_list;
+my $agentnum = $cust_main->agentnum if $cust_main->custnum;
+
</%init>