summaryrefslogtreecommitdiff
path: root/httemplate/edit/part_pkg.cgi
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-01-28 19:28:13 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-01-28 19:28:13 -0600
commit92a327b2bc09344a7e0db93f40e34b71547bf075 (patch)
tree5dd0ea80b997a3a1b003e0dac52463aa20ac96d5 /httemplate/edit/part_pkg.cgi
parent730a14abf09f1ed8854cfded6f432fee832ea7d8 (diff)
parent3ed9d0fa90662f037f3fb2f50632ccb34066a979 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/part_pkg.cgi')
-rwxr-xr-xhttemplate/edit/part_pkg.cgi13
1 files changed, 11 insertions, 2 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 778a0265e..1702a6dc7 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -967,8 +967,17 @@ my $html_bottom = sub {
'msg' => q|You must set the 'suspend_credit_type' option in Configuration->Settings to gain access to this option.|,
'are_met' => sub{
my $conf = new FS::conf;
- my @suspend_credit_type_conf = qsearch('conf', { 'name' => 'suspend_credit_type' } );
- return 1 if (exists($suspend_credit_type_conf[0]) && $suspend_credit_type_conf[0]->{Hash}{value});
+ my @conf_info = qsearch('conf', { 'name' => 'suspend_credit_type' } );
+ return 1 if (exists($conf_info[0]) && $conf_info[0]->{Hash}{value});
+ return 0;
+ }
+ },
+ 'unused_credit_cancel' => {
+ 'msg' => q|You must set the 'cancel_credit_type' option in Configuration->Settings to gain access to this option.|,
+ 'are_met' => sub{
+ my $conf = new FS::conf;
+ my @conf_info = qsearch('conf', { 'name' => 'cancel_credit_type' } );
+ return 1 if (exists($conf_info[0]) && $conf_info[0]->{Hash}{value});
return 0;
}
}