diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-05-13 17:28:09 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-05-13 17:28:09 -0700 |
commit | 2ec92076c7dae5648da28e510efa1f733da9fd76 (patch) | |
tree | a32157c57824633517caab962baf56ae89c4dacc /httemplate | |
parent | ec443f3ab9fd937325691b17974ea5aa7dce264d (diff) | |
parent | 039d72ae9e7adf98f46c3b4219100d57208c3685 (diff) |
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 4 | ||||
-rw-r--r-- | httemplate/elements/errorpage.html | 4 | ||||
-rw-r--r-- | httemplate/misc/make_appointment.html | 32 | ||||
-rw-r--r-- | httemplate/misc/process/payment.cgi | 5 | ||||
-rwxr-xr-x | httemplate/search/cust_main.cgi | 20 | ||||
-rw-r--r-- | httemplate/search/report_cust_bill_void.html | 2 |
6 files changed, 46 insertions, 21 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 82ec50c36..6961d18c0 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -97,8 +97,8 @@ if ( ($cgi->param('same') || '') eq 'Y' ) { # but explicitly avoid setting ship_ fields my $new = new FS::cust_main ( { - map { ( $_, scalar($cgi->param($_)) ) } (fields('cust_main')), - map { ( "ship_$_", '' ) } (FS::cust_main->location_fields) + (map { ( $_, scalar($cgi->param($_)) ) } (fields('cust_main'))), + (map { ( "ship_$_", '' ) } (FS::cust_main->location_fields)) } ); $new->invoice_noemail( ($cgi->param('invoice_email') eq 'Y') ? '' : 'Y' ); diff --git a/httemplate/elements/errorpage.html b/httemplate/elements/errorpage.html index 7d66e7ce0..d001bfa89 100644 --- a/httemplate/elements/errorpage.html +++ b/httemplate/elements/errorpage.html @@ -1,10 +1,10 @@ -% my $error = shift; +% my $error = $_[0]; % $m->notes('error', $error); <& /elements/header.html, mt("Error") &> % while (@_) { -<P><FONT SIZE="+1" COLOR="#ff0000"><% $error |h %></FONT> +<P><FONT SIZE="+1" COLOR="#ff0000"><% shift |h %></FONT> %} % $m->flush_buffer(); diff --git a/httemplate/misc/make_appointment.html b/httemplate/misc/make_appointment.html index 6f308e0a8..79c3c2c89 100644 --- a/httemplate/misc/make_appointment.html +++ b/httemplate/misc/make_appointment.html @@ -6,13 +6,10 @@ <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cgi->param('custnum') |h %>"> -% my @sched_item = qsearch('sched_item', { 'disabled' => '', }); -% my @username = map $_->access_user->username, @sched_item; -% foreach my $username (@username) { - <INPUT TYPE="hidden" NAME="username" VALUE="<% $username |h %>"> -% } - -Length: +<TABLE> +<TR> +<TD STYLE="text-align: right">Length:</TD> +<TD> <SELECT NAME="LengthMin"> % for ( my $hours = .5; $hours < 10.5; $hours += .5 ) { % my $min = $hours * 60; @@ -21,9 +18,26 @@ Length: ><% $hours %> hour<% $hours > 1 ? 's' : '' %> % } </SELECT> -<BR> -<BR> +</TD> +</TR> + +% my @sched_item = qsearch('sched_item', { 'disabled' => '', }); +% my @username = map $_->access_user->username, @sched_item; + +<TR> +<TD STYLE="text-align: right">Installer:</TD> +<TD> +<SELECT NAME="username" ID="username_select" MULTIPLE> +% foreach my $username (@username) { + <OPTION SELECTED><% $username |h %></OPTION> +% } +</SELECT> +</TD> +</TR> +</TABLE> + +<BR> <INPUT TYPE="submit" VALUE="Schedule appointment"> </FORM> diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index a475786dd..dcfcc0b85 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -164,7 +164,10 @@ if ( $cgi->param('save') ) { #false laziness w/FS:;cust_main::realtime_bop - check both to make sure # working correctly if ( $payby eq 'CARD' && - grep { $_ eq cardtype($payinfo) } $conf->config('cvv-save') ) { + ( (grep { $_ eq cardtype($payinfo) } $conf->config('cvv-save')) + || $conf->exists('business-onlinepayment-verification') + ) + ) { $new->set( 'paycvv' => $paycvv ); } else { $new->set( 'paycvv' => ''); diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 4e624eb51..aa8c079e1 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -704,12 +704,20 @@ sub address2search { or errorpage(emt("Illegal address2")); my $address2 = $1; - push @cust_main, qsearch( 'cust_main', - { 'address2' => { 'op' => 'ILIKE', - 'value' => $address2 } } ); - push @cust_main, qsearch( 'cust_main', - { 'ship_address2' => { 'op' => 'ILIKE', - 'value' => $address2 } } ); + # matching at the start or end of an address, but not in the middle + my @where; + foreach my $toggle (0,1) { + push @where, 'LOWER(cust_location.address2) LIKE LOWER(' + . dbh->quote($toggle ? $address2 . '%' : '%' . $address2) + . ')'; + } + + push @cust_main, qsearch({ + 'debug' => 1, + 'table' => 'cust_main', + 'addl_from' => 'JOIN cust_location ON (cust_location.locationnum IN (cust_main.bill_locationnum, cust_main.ship_locationnum))', + 'extra_sql' => 'WHERE ' . join(' OR ',@where), + }); \@cust_main; } diff --git a/httemplate/search/report_cust_bill_void.html b/httemplate/search/report_cust_bill_void.html index cb13b785a..9e9f590b1 100644 --- a/httemplate/search/report_cust_bill_void.html +++ b/httemplate/search/report_cust_bill_void.html @@ -24,7 +24,7 @@ label => mt('Customer Class'), field => 'cust_classnum', multiple => 1, - 'pre_options' => [ '' => emt('(none)') ], + 'pre_options' => [ '0' => emt('(none)') ], 'all_selected' => 1, &> |