X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;fp=httemplate%2Fedit%2Fpart_pkg.cgi;h=1702a6dc7d2fd62cc9efac7c06dc6ad5a03ac860;hp=778a0265e023e872b9a7440e5ff3f97810437703;hb=65b94bd80599a27c658b792f02c85d200488688d;hpb=0b07929c5a6f2654d91db7f7ba8951e3c2a46093 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; } }