summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi4
-rw-r--r--httemplate/elements/errorpage.html4
-rw-r--r--httemplate/misc/make_appointment.html32
-rw-r--r--httemplate/misc/process/payment.cgi5
-rwxr-xr-xhttemplate/search/cust_main.cgi20
-rw-r--r--httemplate/search/report_cust_bill_void.html2
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,
&>