From d961044f3be505585f651dd13873f3d977cfcf9b Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Thu, 5 May 2016 18:45:11 -0500 Subject: Fixed errorpage, fallout from RT#37340 commit cb6214a6 --- httemplate/elements/errorpage.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate') 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 (@_) { -

<% $error |h %> +

<% shift |h %> %} % $m->flush_buffer(); -- cgit v1.2.1 From 77ea8306a967f5d34e98b0900cc7414f4540f04a Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Thu, 5 May 2016 22:14:36 -0500 Subject: RT#37632: Credit card validation [v3, saving from payment.cgi] --- httemplate/misc/process/payment.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'httemplate') 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' => ''); -- cgit v1.2.1 From 8d56875d788f0bc4e1dd3338e7cc7fd26d63c52f Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 9 May 2016 17:50:27 -0500 Subject: RT#41124: Backend Unti Search --- httemplate/edit/process/cust_main.cgi | 4 ++-- httemplate/search/cust_main.cgi | 20 ++++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'httemplate') 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/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; } -- cgit v1.2.1 From 223ba5f56facfc4bbb246c4cc4ce67d203bbf687 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 9 May 2016 20:15:47 -0500 Subject: RT#42236: Select installers to show on calendar when setting appointment --- httemplate/misc/make_appointment.html | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'httemplate') 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 @@ -% my @sched_item = qsearch('sched_item', { 'disabled' => '', }); -% my @username = map $_->access_user->username, @sched_item; -% foreach my $username (@username) { - -% } - -Length: + + + + + + +% my @sched_item = qsearch('sched_item', { 'disabled' => '', }); +% my @username = map $_->access_user->username, @sched_item; + + + + + +
Length: -
-
+
Installer: + +
+ +
-- cgit v1.2.1 From 1d37922a192f776936d9aeb654064df3eb9b1c2c Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 10 May 2016 12:57:54 -0700 Subject: fix voided invoice report vs. customer classes, similar to #37243 --- httemplate/search/report_cust_bill_void.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate') 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, &> -- cgit v1.2.1