RT# 24643 - fixed error in saving waive setup fee flag when not selected
authorChristopher Burger <burgerc@freeside.biz>
Wed, 29 Nov 2017 01:45:12 +0000 (20:45 -0500)
committerChristopher Burger <burgerc@freeside.biz>
Tue, 12 Dec 2017 16:22:21 +0000 (11:22 -0500)
FS/FS/cust_pkg.pm
httemplate/edit/process/change-cust_pkg.html

index c95d31b..b2cc874 100644 (file)
@@ -2363,7 +2363,8 @@ sub change {
     $same_pkgpart = 0;
   }
 
-  $self->set('waive_setup', $opt->{'waive_setup'}) if $opt->{'waive_setup'};
+  if ($opt->{'waive_setup'}) { $self->set('waive_setup', $opt->{'waive_setup'}) }
+  else { $self->set('waive_setup', ''); }
 
   # Before going any further here: if the package is still in the pre-setup
   # state, it's safe to modify it in place. No need to charge/credit for 
index 3d50a13..0e87ad8 100644 (file)
@@ -40,6 +40,8 @@ if ( $cgi->param('locationnum') == -1 ) {
   $change{'cust_location'} = $cust_location;
 }
 
+$change{waive_setup} = '';
+
 if ( $cgi->param('setup_discountnum') =~ /^(-?\d+)$/ ) { 
   if ( $1 == -2 ) {
     $change{waive_setup} = 'Y';