summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-13 17:41:43 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-13 17:41:43 -0800
commit4600f6ce1fa697de8d015c83e49ff61b534ba09d (patch)
tree9ed2675c3239e12ea0f11f9e1540c4df0fda3fef /httemplate/edit
parent9d4a1a67b110523c36407e391e49fb255f596465 (diff)
email addresses on detach customer, RT#25954, RT#22185
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/process/detach-cust_pkg.html15
1 files changed, 11 insertions, 4 deletions
diff --git a/httemplate/edit/process/detach-cust_pkg.html b/httemplate/edit/process/detach-cust_pkg.html
index ab87eb536..782ffa5e0 100644
--- a/httemplate/edit/process/detach-cust_pkg.html
+++ b/httemplate/edit/process/detach-cust_pkg.html
@@ -30,16 +30,23 @@ my $cust_location = new FS::cust_location {
map { $_ => scalar($cgi->param($_)) } FS::cust_main->location_fields
};
+#false laziness w/process/cust_main.cgi
+my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') );
+push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST');
+push @invoicing_list, 'FAX' if $cgi->param('invoicing_list_FAX');
+$cgi->param('invoicing_list', join(',', @invoicing_list) );
+
my $cust_main = new FS::cust_main {
( map { ( $_, scalar($cgi->param($_)) ) } fields('cust_main') ),
( map { ( "ship_$_", '' ) } FS::cust_main->location_fields ),
- 'bill_location' => $cust_location,
- 'ship_location' => $cust_location,
+ 'bill_location' => $cust_location,
+ 'ship_location' => $cust_location,
};
my $pkg_or_error = $cust_pkg->change( {
- 'keep_dates' => 1,
- 'cust_main' => $cust_main,
+ 'keep_dates' => 1,
+ 'cust_main' => $cust_main,
+ 'cust_main_insert_args' => [ {}, \@invoicing_list ],
} );
my $error = ref($pkg_or_error) ? '' : $pkg_or_error;