diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-05-03 00:31:07 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-05-03 00:31:07 -0700 |
commit | e0d4d66f670371a0c8a40dc471352634f9fd6017 (patch) | |
tree | 6196fe59c73b43ea6d2057345bb55684be8cfada /httemplate/misc/merge_cust.html | |
parent | 4a3e900ad42a15a6a999e1d1461b816d7fac2230 (diff) |
merging is now attaching by default, with the old destructive merge operation as an option when deletecustomers is enabled, RT#22185
Diffstat (limited to 'httemplate/misc/merge_cust.html')
-rw-r--r-- | httemplate/misc/merge_cust.html | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/httemplate/misc/merge_cust.html b/httemplate/misc/merge_cust.html index ad075be2f..9c869fa21 100644 --- a/httemplate/misc/merge_cust.html +++ b/httemplate/misc/merge_cust.html @@ -1,6 +1,6 @@ -<% include('/elements/header-popup.html', 'Merge customer' ) %> +<& /elements/header-popup.html, 'Merge customer' &> -<% include('/elements/error.html') %> +<& /elements/error.html &> <FORM NAME="cust_merge_popup" ID="cust_merge_popup" ACTION="<% popurl(1) %>cust_main-merge.html" METHOD=POST onSubmit="submit_merge(); return false;"> @@ -35,13 +35,43 @@ function do_submit_merge() { <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>"> <TABLE BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto"> - <% include('/elements/tr-search-cust_main.html', + + <& /elements/tr-search-cust_main.html, 'label' => 'Merge into: ', 'field' => 'new_custnum', 'find_button' => 1, 'curr_value' => scalar($cgi->param('new_custnum')), - ) - %> + &> + +% if ( $conf->exists('deletecustomers') ) { + +% if ( scalar($cust_main->ncancelled_pkgs) ) { + <TR> + <TD COLSPAN=2> + <& /elements/radio.html, + 'field' => 'merge', + 'value' => '', + 'curr_value' => scalar($cgi->param('merge')), + &> + Merge packages only. + </TD> + </TR> +% } else { +% $cgi->param('merge', 'Y'); +% } + + <TR> + <TD COLSPAN=2> + <& /elements/radio.html, + 'field' => 'merge', + 'value' => 'Y', + 'curr_value' => scalar($cgi->param('merge')), + &> + Merge invoices, payments/credits, notes, tickets and delete this customer. + </TD> + </TR> +% } + </TABLE> <P ALIGN="CENTER"> @@ -54,6 +84,8 @@ function do_submit_merge() { <%init> +my $conf = new FS::Conf; + $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; my $custnum = $1; |