[freeside-commits] branch master updated. 65b94bd80599a27c658b792f02c85d200488688d

Alex Brelsfoard alex at 420.am
Tue Jan 27 18:30:28 PST 2015


The branch, master has been updated
       via  65b94bd80599a27c658b792f02c85d200488688d (commit)
      from  0b07929c5a6f2654d91db7f7ba8951e3c2a46093 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 65b94bd80599a27c658b792f02c85d200488688d
Author: Alex Brelsfoard <alex at freeside.biz>
Date:   Tue Jan 27 21:29:52 2015 -0500

    RT #28256: upgrading this fix to also apply to the unused_credit_cancel package option

diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 778a026..1702a6d 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;
             }
         }


-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/part_pkg.cgi |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list