diff options
author | ivan <ivan> | 2011-03-27 22:46:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-03-27 22:46:38 +0000 |
commit | 8e5fab2148c7dc492b9fffe271c3dcf8df55b01f (patch) | |
tree | c1d46b33a790b21b84c2a2617dc3554e341b6e36 /httemplate/edit | |
parent | 130940a4115c3b96e4d7b2206bea2ecf8d882d6e (diff) |
better prospect -> customer conversion, RT#7111
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 18 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 6 |
2 files changed, 15 insertions, 9 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d4217bbcc..61d92b998 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -194,6 +194,8 @@ function samechanged(what) { % } +<INPUT TYPE="hidden" NAME="locationnum" VALUE="<% $locationnum %>"> + <INPUT TYPE="hidden" NAME="usernum" VALUE="<% $cust_main->usernum %>"> %# cust_main/bottomfixup.js @@ -241,6 +243,7 @@ my($username, $password, $popnum, $saved_domsvc) = ( '', '', 0, 0 ); #svc_acct my %svc_phone = (); my %svc_dsl = (); my $prospectnum = ''; +my $locationnum = ''; if ( $cgi->param('error') ) { @@ -260,8 +263,12 @@ if ( $cgi->param('error') ) { $stateid = $cust_main->stateid; # don't mask an entered value on errors $payinfo = $cust_main->payinfo; # don't mask an entered value on errors + $prospectnum = $cgi->param('prospectnum') || ''; + $pkgpart_svcpart = $cgi->param('pkgpart_svcpart') || ''; + $locationnum = $cgi->param('locationnum') || ''; + #svc_acct $username = $cgi->param('username'); $password = $cgi->param('_password'); @@ -334,11 +341,7 @@ if ( $cgi->param('error') ) { my $contact = $contacts[0]; $cust_main->first( $contact->first ); $cust_main->set( 'last', $contact->get('last') ); - #XXX contact phone numbers - - #XXX additional/all contacts -> alas (notes for now? add add'l contact support?) - - #XXX move all contacts and locations + #contact phone numbers? #location -> address (all prospect quals have location, right?) my $cust_location = $qual->cust_location; @@ -346,9 +349,10 @@ if ( $cgi->param('error') ) { $cust_main->$_( $cust_location->$_ ) foreach qw( address1 address2 city county state zip country geocode ); - #pkgpart handled by lock_pkgpart below + #locationnum -> package order + $locationnum = $qual->locationnum; - #XXX locationnum -> package order + #pkgpart handled by lock_pkgpart below #service telephone & vendor_qual_id -> svc_dsl $svc_dsl{$_} = $qual->$_ diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index c43ffa30e..3fe7c3987 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -159,7 +159,8 @@ if ( $new->custnum eq '' ) { $cust_pkg = new FS::cust_pkg ( { #later 'custnum' => $custnum, - 'pkgpart' => $pkgpart, + 'pkgpart' => $pkgpart, + 'locationnum' => scalar($cgi->param('locationnum')), } ); #$error ||= $cust_pkg->check; @@ -226,7 +227,8 @@ if ( $new->custnum eq '' ) { tie my %hash, 'Tie::RefHash'; %hash = ( $cust_pkg => [ $svc ] ) if $cust_pkg; $error ||= $new->insert( \%hash, \@invoicing_list, - 'tax_exemption' => \@tax_exempt, + 'tax_exemption'=> \@tax_exempt, + 'prospectnum' => scalar($cgi->param('prospectnum')), ); my $conf = new FS::Conf; |