From abfb5eb4df9efd4be4fbf6ef60e770505e0f4151 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 28 Nov 2017 20:45:12 -0500 Subject: [PATCH] RT# 24643 - fixed error in saving waive setup fee flag when not selected --- FS/FS/cust_pkg.pm | 3 ++- httemplate/edit/process/change-cust_pkg.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index c70a6795f..7d683235b 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2372,7 +2372,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 diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html index a90693cae..7fcc1da07 100644 --- a/httemplate/edit/process/change-cust_pkg.html +++ b/httemplate/edit/process/change-cust_pkg.html @@ -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'; -- 2.11.0