From 36197f0e2889826ddb9a64790150c7c232ba1afb Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 9 Apr 2006 23:39:49 +0000 Subject: add "spool_cdr" to cust_main fields --- httemplate/edit/cust_main.cgi | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 144d5405c..80fec9359 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -70,7 +70,11 @@ my $action = $custnum ? 'Edit' : 'Add'; -<%= header("Customer $action", '', ' onUnload="myclose()"') %> +<%= include('/elements/header.html', + "Customer $action", + '', + ' onUnload="myclose()"' +) %> <% if ( $error ) { %> Error: <%= $error %> @@ -271,7 +275,8 @@ function bottomfixup(what) { var billing_bottomvars = new Array( 'tax', - 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX' + 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX', + 'spool_cdr' ); for ( f=0; f < topvars.length; f++ ) { @@ -348,7 +353,8 @@ function copyelement(from, to) { 'paid', 'tax', - 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX' + 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX', + 'spool_cdr' ) { %> -- cgit v1.2.1 From 2c757d7db4cb6a7b9655de13206fcc84fb7ce61f Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 14 May 2006 16:47:31 +0000 Subject: first part of ACL and re-skinning work and some other small stuff --- httemplate/edit/cust_main.cgi | 105 ++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 44 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 80fec9359..bb2a8618e 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -397,49 +397,66 @@ unless ( $custnum ) { if ( @part_pkg ) { -# print "

First package", &itable("#cccccc", "0 ALIGN=LEFT"), -#apiabuse & undesirable wrapping - print "
First package", &ntable("#cccccc"), - qq!"; - - #false laziness: (mostly) copied from edit/svc_acct.cgi - #$ulen = $svc_acct->dbdef_table->column('username')->length; - my $ulen = dbdef->table('svc_acct')->column('username')->length; - my $ulen2 = $ulen+2; - my $passwordmax = $conf->config('passwordmax') || 8; - my $pmax2 = $passwordmax + 2; - print <Username - -Password - -(blank to generate) -END - - print 'Access number' - . - &FS::svc_acct_pop::popselector($popnum). - '' - ; - } -} + # print "

First package", &itable("#cccccc", "0 ALIGN=LEFT"), + #apiabuse & undesirable wrapping + + %> +
First package + <%= ntable("#cccccc") %> + + + + + + + + <% + #false laziness: (mostly) copied from edit/svc_acct.cgi + #$ulen = $svc_acct->dbdef_table->column('username')->length; + my $ulen = dbdef->table('svc_acct')->column('username')->length; + my $ulen2 = $ulen+2; + my $passwordmax = $conf->config('passwordmax') || 8; + my $pmax2 = $passwordmax + 2; + %> + + + Username + + MAXLENGTH=<%= $ulen %>> + + + + + Password + + MAXLENGTH=<%= $passwordmax %>> + (blank to generate) + + + + + Access number + <%= FS::svc_acct_pop::popselector($popnum) %> + + + + <% } %> + +<% } %> -my $otaker = $cust_main->otaker; -print qq!!, - qq!

!, - "", -; + +
+"> +
+ + +<%= include('/elements/footer.html') %> -%> -- cgit v1.2.1 From e47e9758f480c664bfc3917d798cd69c7d354999 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 11 Aug 2006 08:02:26 +0000 Subject: virtualize referrals on customer addition --- httemplate/edit/cust_main.cgi | 80 +++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 49 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index bb2a8618e..45cb69fc2 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -66,6 +66,8 @@ if ( $cgi->param('error') ) { $cgi->delete_all(); my $action = $custnum ? 'Edit' : 'Add'; +my $r = qq!* !; + %> @@ -77,38 +79,29 @@ my $action = $custnum ? 'Edit' : 'Add'; ) %> <% if ( $error ) { %> -Error: <%= $error %> +Error: <%= $error %>

<% } %>
-Customer # <%= $custnum ? "$custnum" : " (NEW)" %> - - - -<% +<% if ( $custnum ) { %> + Customer #<%= $custnum %> - + + <%= ucfirst($cust_main->status) %> + +

+<% } %> -my $r = qq!* !; +<%= &ntable("#cccccc") %> -my %agent_search = dbdef->table('agent')->column('disabled') - ? ( 'disabled' => '' ) : (); -my @agents = qsearch( 'agent', \%agent_search ); -#die "No agents created!" unless @agents; -eidiot "You have not created any agents (or all agents are disabled). You must create at least one agent before adding a customer. Go to ". popurl(2). "browse/agent.cgi and create one or more agents." unless @agents; -my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first + +<%= include('/elements/tr-select-agent.html', $cust_main->agentnum, + 'label' => "${r}Agent", + 'empty_label' => 'Select agent', + ) %> -<% if ( scalar(@agents) == 1 ) { %> - -<% } else { %> -

<%=$r%>Agent -<% } %> - <% @@ -118,28 +111,9 @@ if ( $custnum && ! $conf->exists('editreferrals') ) { -<% - } else { - - my(@referrals) = qsearch('part_referral',{}); - if ( scalar(@referrals) == 0 ) { - eidiot "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.cgi and create one or more advertising sources."; - } elsif ( scalar(@referrals) == 1 ) { - $refnum ||= $referrals[0]->refnum; -%> - - - <% } else { %> -

<%=$r%>Advertising source - -<% } %> + <%= include('/elements/tr-select-part_referral.html') %> <% } %> @@ -153,14 +127,20 @@ if ( $cust_main->referral_custnum ) { %> -

Referring Customer: - <%= $cust_main->referral_custnum %>: <%= $referring_cust_main->name %> + + Referring customer + + <%= $cust_main->referral_custnum %>: <%= $referring_cust_main->name %> + + <% } elsif ( ! $conf->exists('disable_customer_referrals') ) { %> -

Referring customer number: - + + Referring customer + + <% } else { %> @@ -168,6 +148,8 @@ if ( $cust_main->referral_custnum <% } %> + +

@@ -377,10 +359,10 @@ unless ( $custnum ) { #false laziness, copied from FS::cust_pkg::order my $pkgpart; + my @agents = $FS::CurrentUser::CurrentUser->agents; if ( scalar(@agents) == 1 ) { # $pkgpart->{PKGPART} is true iff $custnum may purchase PKGPART - my($agent)=qsearchs('agent',{'agentnum'=> $agentnum }); - $pkgpart = $agent->pkgpart_hashref; + $pkgpart = $agents[0]->pkgpart_hashref; } else { #can't know (agent not chosen), so, allow all my %typenum; -- cgit v1.2.1 From b19897e1db4c110d7d7e8b52800cda5ab58ce9e0 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 14 Aug 2006 12:13:40 +0000 Subject: sprinkle some magic ajax fairy dust on referring customer SELEKTAH. rewind! make smart search smarter, re-layout the top search bars and add an invoice one --- httemplate/edit/cust_main.cgi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 45cb69fc2..c3d1804bc 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -64,7 +64,9 @@ if ( $cgi->param('error') ) { @invoicing_list = (); } $cgi->delete_all(); + my $action = $custnum ? 'Edit' : 'Add'; +$action .= ": ". $cust_main->name if $custnum; my $r = qq!* !; @@ -139,7 +141,13 @@ if ( $cust_main->referral_custnum Referring customer - + + + <%= include('/elements/search-cust_main.html', + 'field_name' => 'referral_custnum', + ) + %> + <% } else { %> -- cgit v1.2.1 From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/edit/cust_main.cgi | 464 +++++++++++++++++++++--------------------- 1 file changed, 237 insertions(+), 227 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index c3d1804bc..dfcd0401f 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -1,160 +1,164 @@ -<% - - #for misplaced logic below - #use FS::part_pkg; - - #for false laziness below (now more properly lazy) - #use FS::svc_acct_pop; - - #for (other) false laziness below - #use FS::agent; - #use FS::type_pkgs; - -my $conf = new FS::Conf; - -#get record - -my $error = ''; -my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); -my(@invoicing_list); -my $same = ''; -if ( $cgi->param('error') ) { - $error = $cgi->param('error'); - $cust_main = new FS::cust_main ( { - map { $_, scalar($cgi->param($_)) } fields('cust_main') - } ); - $custnum = $cust_main->custnum; - $saved_pkgpart = $cgi->param('pkgpart_svcpart') || ''; - if ( $saved_pkgpart =~ /^(\d+)_/ ) { - $saved_pkgpart = $1; - } else { - $saved_pkgpart = ''; - } - $username = $cgi->param('username'); - $password = $cgi->param('_password'); - $popnum = $cgi->param('popnum'); - @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') ); - $same = $cgi->param('same'); - $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid'); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum=$1; - $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - if ( $cust_main->dbdef_table->column('paycvv') - && length($cust_main->paycvv) ) { - my $paycvv = $cust_main->paycvv; - $paycvv =~ s/./*/g; - $cust_main->paycvv($paycvv); - } - $saved_pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; - @invoicing_list = $cust_main->invoicing_list; -} else { - $custnum=''; - $cust_main = new FS::cust_main ( {} ); - $cust_main->otaker( &getotaker ); - $cust_main->referral_custnum( $cgi->param('referral_custnum') ); - $saved_pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; - @invoicing_list = (); -} -$cgi->delete_all(); - -my $action = $custnum ? 'Edit' : 'Add'; -$action .= ": ". $cust_main->name if $custnum; +% +% +% #for misplaced logic below +% #use FS::part_pkg; +% +% #for false laziness below (now more properly lazy) +% #use FS::svc_acct_pop; +% +% #for (other) false laziness below +% #use FS::agent; +% #use FS::type_pkgs; +% +%my $conf = new FS::Conf; +% +%#get record +% +%my $error = ''; +%my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); +%my(@invoicing_list); +%my $same = ''; +%if ( $cgi->param('error') ) { +% $error = $cgi->param('error'); +% $cust_main = new FS::cust_main ( { +% map { $_, scalar($cgi->param($_)) } fields('cust_main') +% } ); +% $custnum = $cust_main->custnum; +% $saved_pkgpart = $cgi->param('pkgpart_svcpart') || ''; +% if ( $saved_pkgpart =~ /^(\d+)_/ ) { +% $saved_pkgpart = $1; +% } else { +% $saved_pkgpart = ''; +% } +% $username = $cgi->param('username'); +% $password = $cgi->param('_password'); +% $popnum = $cgi->param('popnum'); +% @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') ); +% $same = $cgi->param('same'); +% $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid'); +%} elsif ( $cgi->keywords ) { #editing +% my( $query ) = $cgi->keywords; +% $query =~ /^(\d+)$/; +% $custnum=$1; +% $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); +% if ( $cust_main->dbdef_table->column('paycvv') +% && length($cust_main->paycvv) ) { +% my $paycvv = $cust_main->paycvv; +% $paycvv =~ s/./*/g; +% $cust_main->paycvv($paycvv); +% } +% $saved_pkgpart = 0; +% $username = ''; +% $password = ''; +% $popnum = 0; +% @invoicing_list = $cust_main->invoicing_list; +%} else { +% $custnum=''; +% $cust_main = new FS::cust_main ( {} ); +% $cust_main->otaker( &getotaker ); +% $cust_main->referral_custnum( $cgi->param('referral_custnum') ); +% $saved_pkgpart = 0; +% $username = ''; +% $password = ''; +% $popnum = 0; +% @invoicing_list = (); +%} +%$cgi->delete_all(); +% +%my $action = $custnum ? 'Edit' : 'Add'; +%$action .= ": ". $cust_main->name if $custnum; +% +%my $r = qq!* !; +% +% -my $r = qq!* !; - -%> -<%= include('/elements/header.html', +<% include('/elements/header.html', "Customer $action", '', ' onUnload="myclose()"' ) %> +% if ( $error ) { + +Error: <% $error %>

+% } -<% if ( $error ) { %> -Error: <%= $error %>

-<% } %> - -<% if ( $custnum ) { %> - Customer #<%= $custnum %> - - - <%= ucfirst($cust_main->status) %> + +% if ( $custnum ) { + + Customer #<% $custnum %> - + + <% ucfirst($cust_main->status) %>

-<% } %> +% } + -<%= &ntable("#cccccc") %> +<% &ntable("#cccccc") %> -<%= include('/elements/tr-select-agent.html', $cust_main->agentnum, +<% include('/elements/tr-select-agent.html', $cust_main->agentnum, 'label' => "${r}Agent", 'empty_label' => 'Select agent', ) %> +% +%my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; +%if ( $custnum && ! $conf->exists('editreferrals') ) { +% -<% -my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; -if ( $custnum && ! $conf->exists('editreferrals') ) { -%> - + +% } else { -<% } else { %> - <%= include('/elements/tr-select-part_referral.html') %> + <% include('/elements/tr-select-part_referral.html') %> +% } -<% } %> +% +%my $referring_cust_main = ''; +%if ( $cust_main->referral_custnum +% and $referring_cust_main = +% qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) +%) { +% -<% -my $referring_cust_main = ''; -if ( $cust_main->referral_custnum - and $referring_cust_main = - qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) -) { -%> Referring customer - <%= $cust_main->referral_custnum %>: <%= $referring_cust_main->name %> + <% $cust_main->referral_custnum %>: <% $referring_cust_main->name %> - + +% } elsif ( ! $conf->exists('disable_customer_referrals') ) { -<% } elsif ( ! $conf->exists('disable_customer_referrals') ) { %> Referring customer - <%= include('/elements/search-cust_main.html', + <% include('/elements/search-cust_main.html', 'field_name' => 'referral_custnum', ) %> +% } else { -<% } else { %> +% } -<% } %> @@ -162,18 +166,20 @@ if ( $cust_main->referral_custnum

Billing address -<%= include('cust_main/contact.html', $cust_main, '', 'bill_changed(this)', '' ) %> +<% include('cust_main/contact.html', $cust_main, '', 'bill_changed(this)', '' ) %> +% if ( defined $cust_main->dbdef_table->column('ship_last') ) { -<% if ( defined $cust_main->dbdef_table->column('ship_last') ) { %> +% +% my $checked = ''; +% my $disabled = ''; +% my $disabledselect = ''; +% unless ( $cust_main->ship_last && $same ne 'Y' ) { +% $checked = 'CHECKED'; +% $disabled = 'DISABLED style="background-color: #dddddd"'; +% foreach ( +% qw( last first company address1 address2 city county state zip country +% daytime night fax ) +% ) { +% $cust_main->set("ship_$_", $cust_main->get($_) ); +% } +% } +% -<% - my $checked = ''; - my $disabled = ''; - my $disabledselect = ''; - unless ( $cust_main->ship_last && $same ne 'Y' ) { - $checked = 'CHECKED'; - $disabled = 'DISABLED style="background-color: #dddddd"'; - foreach ( - qw( last first company address1 address2 city county state zip country - daytime night fax ) - ) { - $cust_main->set("ship_$_", $cust_main->get($_) ); - } - } -%>
Service address -(>same as billing address) -<%= include('cust_main/contact.html', $cust_main, 'ship_', '', $disabled ) %> +(>same as billing address) +<% include('cust_main/contact.html', $cust_main, 'ship_', '', $disabled ) %> +% } -<% } %> -<%= include( 'cust_main/billing.html', $cust_main, +<% include( 'cust_main/billing.html', $cust_main, 'invoicing_list' => \@invoicing_list, ) %> @@ -317,136 +327,136 @@ function copyelement(from, to) { - - -<% foreach my $hidden ( - 'custnum', 'agentnum', 'refnum', 'referral_custnum', - 'last', 'first', 'ss', 'company', - 'address1', 'address2', 'city', - 'county', 'state', 'zip', 'country', - 'daytime', 'night', 'fax', - - 'same', - - 'ship_last', 'ship_first', 'ship_company', - 'ship_address1', 'ship_address2', 'ship_city', - 'ship_county', 'ship_state', 'ship_zip', 'ship_country', - 'ship_daytime','ship_night', 'ship_fax', - - 'select', #XXX key - - 'payauto', - 'payinfo', 'payinfo1', 'payinfo2', - 'payname', 'exp_month', 'exp_year', 'paycvv', - 'paystart_month', 'paystart_year', 'payissue', - 'payip', - 'paid', - - 'tax', - 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX', - 'spool_cdr' - ) { -%> - -<% } %> + +% foreach my $hidden ( +% 'custnum', 'agentnum', 'refnum', 'referral_custnum', +% 'last', 'first', 'ss', 'company', +% 'address1', 'address2', 'city', +% 'county', 'state', 'zip', 'country', +% 'daytime', 'night', 'fax', +% +% 'same', +% +% 'ship_last', 'ship_first', 'ship_company', +% 'ship_address1', 'ship_address2', 'ship_city', +% 'ship_county', 'ship_state', 'ship_zip', 'ship_country', +% 'ship_daytime','ship_night', 'ship_fax', +% +% 'select', #XXX key +% +% 'payauto', +% 'payinfo', 'payinfo1', 'payinfo2', +% 'payname', 'exp_month', 'exp_year', 'paycvv', +% 'paystart_month', 'paystart_year', 'payissue', +% 'payip', +% 'paid', +% +% 'tax', +% 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX', +% 'spool_cdr' +% ) { +% + + +% } +
Comments -<%= &ntable("#cccccc") %> +<% &ntable("#cccccc") %> - + +% +% +%unless ( $custnum ) { +% # pry the wrong place for this logic. also pretty expensive +% #use FS::part_pkg; +% +% #false laziness, copied from FS::cust_pkg::order +% my $pkgpart; +% my @agents = $FS::CurrentUser::CurrentUser->agents; +% if ( scalar(@agents) == 1 ) { +% # $pkgpart->{PKGPART} is true iff $custnum may purchase PKGPART +% $pkgpart = $agents[0]->pkgpart_hashref; +% } else { +% #can't know (agent not chosen), so, allow all +% my %typenum; +% foreach my $agent ( @agents ) { +% next if $typenum{$agent->typenum}++; +% #fixed in 5.004_05 #$pkgpart->{$_}++ foreach keys %{ $agent->pkgpart_hashref } +% foreach ( keys %{ $agent->pkgpart_hashref } ) { $pkgpart->{$_}++; } #5.004_04 workaround +% } +% } +% #eslaf +% +% my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } +% qsearch( 'part_pkg', { 'disabled' => '' } ); +% +% if ( @part_pkg ) { +% +% # print "

First package", &itable("#cccccc", "0 ALIGN=LEFT"), +% #apiabuse & undesirable wrapping +% +% -<% - -unless ( $custnum ) { - # pry the wrong place for this logic. also pretty expensive - #use FS::part_pkg; - - #false laziness, copied from FS::cust_pkg::order - my $pkgpart; - my @agents = $FS::CurrentUser::CurrentUser->agents; - if ( scalar(@agents) == 1 ) { - # $pkgpart->{PKGPART} is true iff $custnum may purchase PKGPART - $pkgpart = $agents[0]->pkgpart_hashref; - } else { - #can't know (agent not chosen), so, allow all - my %typenum; - foreach my $agent ( @agents ) { - next if $typenum{$agent->typenum}++; - #fixed in 5.004_05 #$pkgpart->{$_}++ foreach keys %{ $agent->pkgpart_hashref } - foreach ( keys %{ $agent->pkgpart_hashref } ) { $pkgpart->{$_}++; } #5.004_04 workaround - } - } - #eslaf - - my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } - qsearch( 'part_pkg', { 'disabled' => '' } ); - - if ( @part_pkg ) { - - # print "

First package", &itable("#cccccc", "0 ALIGN=LEFT"), - #apiabuse & undesirable wrapping - - %>
First package - <%= ntable("#cccccc") %> + <% ntable("#cccccc") %> - - <% - #false laziness: (mostly) copied from edit/svc_acct.cgi - #$ulen = $svc_acct->dbdef_table->column('username')->length; - my $ulen = dbdef->table('svc_acct')->column('username')->length; - my $ulen2 = $ulen+2; - my $passwordmax = $conf->config('passwordmax') || 8; - my $pmax2 = $passwordmax + 2; - %> +% +% #false laziness: (mostly) copied from edit/svc_acct.cgi +% #$ulen = $svc_acct->dbdef_table->column('username')->length; +% my $ulen = dbdef->table('svc_acct')->column('username')->length; +% my $ulen2 = $ulen+2; +% my $passwordmax = $conf->config('passwordmax') || 8; +% my $pmax2 = $passwordmax + 2; +% + Username - MAXLENGTH=<%= $ulen %>> + MAXLENGTH=<% $ulen %>> Password - MAXLENGTH=<%= $passwordmax %>> + MAXLENGTH=<% $passwordmax %>> (blank to generate) Access number - <%= FS::svc_acct_pop::popselector($popnum) %> + <% FS::svc_acct_pop::popselector($popnum) %> - - <% } %> +% } +% } -<% } %> - +
-"> +">
-<%= include('/elements/footer.html') %> +<% include('/elements/footer.html') %> -- cgit v1.2.1 From 30c3ff2acf90e1386fae00759078899c859faf36 Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 3 Oct 2006 22:44:28 +0000 Subject: Enhanced customer notes --- httemplate/edit/cust_main.cgi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index dfcd0401f..99f849fc8 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -359,17 +359,20 @@ function copyelement(from, to) { % } - +% +% my $ro_comments = $conf->exists('cust_main-use_comments')?'':'readonly'; +% if (!$ro_comments || $cust_main->comments) {
Comments <% &ntable("#cccccc") %> - + % +% } % %unless ( $custnum ) { % # pry the wrong place for this logic. also pretty expensive -- cgit v1.2.1 From 3050434f62122e73d748dac26a5e70193b444c0a Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 4 Oct 2006 21:22:08 +0000 Subject: DoB --- httemplate/edit/cust_main.cgi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 99f849fc8..e0dd3c8ea 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -160,6 +160,19 @@ % } + + + + +
+<% ntable("#cccccc", 2) %> +<% include ('/elements/tr-input-date-field.html', + 'birthdate', + $cust_main->birthdate, + 'Date of Birth', + $conf->config('date_format') || "%m/%d/%Y") +%> + @@ -247,6 +260,8 @@ Service address function bottomfixup(what) { var topvars = new Array( + 'birthdate', + 'custnum', 'agentnum', 'refnum', 'referral_custnum', 'last', 'first', 'ss', 'company', @@ -329,6 +344,8 @@ function copyelement(from, to) {
% foreach my $hidden ( +% 'birthdate', +% % 'custnum', 'agentnum', 'refnum', 'referral_custnum', % 'last', 'first', 'ss', 'company', % 'address1', 'address2', 'city', -- cgit v1.2.1 From 2baa6eb779a7f344903a7bbec7a5efa57239b40b Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Oct 2006 16:56:26 +0000 Subject: fix stickiness bug when editing advertising sources --- httemplate/edit/cust_main.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index e0dd3c8ea..23254b6a8 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -119,7 +119,7 @@ % } else { - <% include('/elements/tr-select-part_referral.html') %> + <% include('/elements/tr-select-part_referral.html', $refnum ) %> % } -- cgit v1.2.1 From 7c0ec6fb521584a93a93e456dbb923870f059308 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Oct 2006 17:10:46 +0000 Subject: add a conf checkbox to turn DOB on --- httemplate/edit/cust_main.cgi | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 23254b6a8..6f4c98ea5 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -164,16 +164,20 @@ -
-<% ntable("#cccccc", 2) %> -<% include ('/elements/tr-input-date-field.html', - 'birthdate', - $cust_main->birthdate, - 'Date of Birth', - $conf->config('date_format') || "%m/%d/%Y") -%> +<% if ( $conf->exists('cust_main-enable_birthdate') ) { - +
+ <% ntable("#cccccc", 2) %> + <% include ('/elements/tr-input-date-field.html', + 'birthdate', + $cust_main->birthdate, + 'Date of Birth', + $conf->config('date_format') || "%m/%d/%Y") + %> + + + +<% } %> -- cgit v1.2.1 From 5f916c133ea7b29af6d8d82e0e323d7ad0b4662a Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 16 Oct 2006 17:13:51 +0000 Subject: its not my monday morning --- httemplate/edit/cust_main.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 6f4c98ea5..57d4dac5e 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -164,7 +164,7 @@ -<% if ( $conf->exists('cust_main-enable_birthdate') ) { +% if ( $conf->exists('cust_main-enable_birthdate') ) {
<% ntable("#cccccc", 2) %> @@ -177,7 +177,7 @@ -<% } %> +% } -- cgit v1.2.1 From 7c1d5f4ce778b4ab56301a042076e7c1dce46152 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 16 Nov 2006 06:20:38 +0000 Subject: switch birthdate to DateTime --- httemplate/edit/cust_main.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 57d4dac5e..daddd8ece 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -172,7 +172,8 @@ 'birthdate', $cust_main->birthdate, 'Date of Birth', - $conf->config('date_format') || "%m/%d/%Y") + $conf->config('date_format') || "%m/%d/%Y", + 1) %> -- cgit v1.2.1 From 6837ca2c7a45033a566238bb3e5f3f262d85fc0e Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 15 Dec 2006 08:25:44 +0000 Subject: eliminate funkiness with reappearing "Postal invoice" on errors --- httemplate/edit/cust_main.cgi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index daddd8ece..748cdde5f 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -62,6 +62,8 @@ % $password = ''; % $popnum = 0; % @invoicing_list = (); +% push @invoicing_list, 'POST' +% unless $conf->exists('disablepostalinvoicedefault'); %} %$cgi->delete_all(); % -- cgit v1.2.1 From da757c2af713bedd8706e30ac002658b0c97ce28 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 24 Dec 2006 01:28:38 +0000 Subject: fix more paymask regressions: allow editing records with existing expired cards, fix masking just-entered values when erroring out, fix echeck entry inserting as empty routing code and "xxEK" account number, remove old/deprecated/unused payinfo_maksed subs and calls --- httemplate/edit/cust_main.cgi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 748cdde5f..e2ed0f1da 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -17,6 +17,7 @@ %my $error = ''; %my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); %my(@invoicing_list); +%my $payinfo; %my $same = ''; %if ( $cgi->param('error') ) { % $error = $cgi->param('error'); @@ -36,6 +37,7 @@ % @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') ); % $same = $cgi->param('same'); % $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid'); +% $payinfo = $cust_main->payinfo; # don't mask an entered value on errors %} elsif ( $cgi->keywords ) { #editing % my( $query ) = $cgi->keywords; % $query =~ /^(\d+)$/; @@ -52,6 +54,7 @@ % $password = ''; % $popnum = 0; % @invoicing_list = $cust_main->invoicing_list; +% $payinfo = $cust_main->paymask; %} else { % $custnum=''; % $cust_main = new FS::cust_main ( {} ); @@ -64,6 +67,7 @@ % @invoicing_list = (); % push @invoicing_list, 'POST' % unless $conf->exists('disablepostalinvoicedefault'); +% $payinfo = ''; %} %$cgi->delete_all(); % @@ -259,6 +263,7 @@ Service address <% include( 'cust_main/billing.html', $cust_main, + 'payinfo' => $payinfo, 'invoicing_list' => \@invoicing_list, ) %> -- cgit v1.2.1 From 8e95986bf97e83e00b0375dd1517c4bd0afb23e5 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 27 Dec 2006 01:07:28 +0000 Subject: fix county selector --- httemplate/edit/cust_main.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index e2ed0f1da..896472d2b 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -204,17 +204,19 @@ function bill_changed(what) { what.form.ship_<%$_%>.value = what.form.<%$_%>.value; % } - what.form.ship_country.selectedIndex = what.form.country.selectedIndex; + + function fix_ship_county() { + what.form.ship_county.selectedIndex = what.form.county.selectedIndex; + } + function fix_ship_state() { what.form.ship_state.selectedIndex = what.form.state.selectedIndex; + ship_state_changed(what.form.ship_state, fix_ship_county ); } + ship_country_changed(what.form.ship_country, fix_ship_state ); - function fix_ship_county() { - what.form.ship_county.selectedIndex = what.form.county.selectedIndex; - } - ship_state_changed(what.form.ship_state, fix_ship_county ); } } function samechanged(what) { @@ -242,7 +244,7 @@ function samechanged(what) { % my $disabledselect = ''; % unless ( $cust_main->ship_last && $same ne 'Y' ) { % $checked = 'CHECKED'; -% $disabled = 'DISABLED style="background-color: #dddddd"'; +% $disabled = 'DISABLED STYLE="background-color: #dddddd"'; % foreach ( % qw( last first company address1 address2 city county state zip country % daytime night fax ) -- cgit v1.2.1 From 7ea0611f6171748a32d41421174e39c4990a25cd Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 13 Feb 2007 01:16:47 +0000 Subject: another place to alphabetize --- httemplate/edit/cust_main.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 896472d2b..83eda7fcd 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -427,7 +427,7 @@ function copyelement(from, to) { % #eslaf % % my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } -% qsearch( 'part_pkg', { 'disabled' => '' } ); +% qsearch( 'part_pkg', { 'disabled' => '' },'','ORDER BY pkg' ); # case? % % if ( @part_pkg ) { % -- cgit v1.2.1 From c193fc003020c040668cd801fca6447939c07e6c Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 14 Feb 2007 23:32:22 +0000 Subject: selectable domain on first package in edit/cust_main --- httemplate/edit/cust_main.cgi | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 83eda7fcd..a843772d2 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -15,7 +15,7 @@ %#get record % %my $error = ''; -%my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); +%my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart, $saved_domsvc); %my(@invoicing_list); %my $payinfo; %my $same = ''; @@ -25,6 +25,12 @@ % map { $_, scalar($cgi->param($_)) } fields('cust_main') % } ); % $custnum = $cust_main->custnum; +% $saved_domsvc = $cgi->param('domsvc') || ''; +% if ( $saved_domsvc =~ /^(\d+)$/ ) { +% $saved_domsvc = $1; +% } else { +% $saved_domsvc = ''; +% } % $saved_pkgpart = $cgi->param('pkgpart_svcpart') || ''; % if ( $saved_pkgpart =~ /^(\d+)_/ ) { % $saved_pkgpart = $1; @@ -50,6 +56,7 @@ % $cust_main->paycvv($paycvv); % } % $saved_pkgpart = 0; +% $saved_domsvc = 0; % $username = ''; % $password = ''; % $popnum = 0; @@ -61,6 +68,7 @@ % $cust_main->otaker( &getotaker ); % $cust_main->referral_custnum( $cgi->param('referral_custnum') ); % $saved_pkgpart = 0; +% $saved_domsvc = 0; % $username = ''; % $password = ''; % $popnum = 0; @@ -427,7 +435,7 @@ function copyelement(from, to) { % #eslaf % % my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } -% qsearch( 'part_pkg', { 'disabled' => '' },'','ORDER BY pkg' ); # case? +% qsearch( 'part_pkg', { 'disabled' => '' }, '', 'ORDER BY pkg' ); # case? % % if ( @part_pkg ) { % @@ -441,15 +449,12 @@ function copyelement(from, to) { - + <% include('cust_main/select-domain.html', + 'pkgparts' => \@part_pkg, + 'saved_pkgpart' => $saved_pkgpart, + 'saved_domsvc' => $saved_domsvc, + ) + %> % @@ -469,6 +474,15 @@ function copyelement(from, to) { + + Domain + + + + + Password -- cgit v1.2.1