summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/menu.html3
-rw-r--r--httemplate/search/cust_svc.html3
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html24
-rw-r--r--httemplate/search/report_cust_event.html10
-rwxr-xr-xhttemplate/search/svc_acct.cgi3
-rwxr-xr-xhttemplate/search/svc_broadband.cgi3
-rw-r--r--httemplate/search/svc_circuit.cgi3
-rwxr-xr-xhttemplate/search/svc_dish.cgi3
-rwxr-xr-xhttemplate/search/svc_domain.cgi3
-rwxr-xr-xhttemplate/search/svc_external.cgi3
-rw-r--r--httemplate/search/svc_fiber.html3
-rwxr-xr-xhttemplate/search/svc_forward.cgi3
-rw-r--r--httemplate/search/svc_hardware.cgi3
-rw-r--r--httemplate/search/svc_phone.cgi3
-rwxr-xr-xhttemplate/search/svc_www.cgi3
15 files changed, 60 insertions, 13 deletions
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index c385cb4c7..93bebb17a 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -320,7 +320,6 @@ tie my %report_ticketing, 'Tie::IxHash',
;
tie my %report_bill_event, 'Tie::IxHash',
- 'All billing events' => [ $fsurl.'search/report_cust_event.html', 'All billing events for a date range' ],
'Billing event errors' => [ $fsurl.'search/report_cust_event.html?failed=1', 'Failed credit cards, processor or printer problems, etc.' ],
;
@@ -404,7 +403,7 @@ tie my %report_payable, 'Tie::IxHash',
;
tie my %report_logs, 'Tie::IxHash';
-$report_logs{'Billing events'} = [ \%report_bill_event, 'Billing events' ]
+$report_logs{'Billing events'} = [ $fsurl.'search/report_cust_event.html', 'Search billing events by date and status' ]
if $curuser->access_right('Billing event reports');
$report_logs{'Credit limit incidents'} = [ $fsurl.'search/report_cust_main_credit_limit.html', '' ]
if $curuser->access_right('List rating data');
diff --git a/httemplate/search/cust_svc.html b/httemplate/search/cust_svc.html
index 7000e3048..b2826309a 100644
--- a/httemplate/search/cust_svc.html
+++ b/httemplate/search/cust_svc.html
@@ -21,6 +21,7 @@
},
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
# package?
@@ -39,6 +40,8 @@
'',
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 9f725bb0b..c6617b142 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -327,7 +327,9 @@ if ( $cgi->param('magic') ) {
#avoid posix regexes for portability
$search =
+ # Visa
" ( ( substring($table.payinfo from 1 for 1) = '4' ".
+ # is not Switch
" AND substring($table.payinfo from 1 for 4) != '4936' ".
" AND substring($table.payinfo from 1 for 6) ".
" NOT $similar_to '49030[2-9]' ".
@@ -340,13 +342,18 @@ if ( $cgi->param('magic') ) {
" AND substring($table.payinfo from 1 for 6) ".
" NOT $similar_to '49118[1-2]' ".
" )".
+ # MasterCard
" OR substring($table.payinfo from 1 for 2) = '51' ".
" OR substring($table.payinfo from 1 for 2) = '52' ".
" OR substring($table.payinfo from 1 for 2) = '53' ".
" OR substring($table.payinfo from 1 for 2) = '54' ".
" OR substring($table.payinfo from 1 for 2) = '54' ".
" OR substring($table.payinfo from 1 for 2) = '55' ".
-# " OR substring($table.payinfo from 1 for 2) = '36' ". #Diner's int'l was processed as Visa/MC inside US, now Discover
+ " OR substring($table.payinfo from 1 for 4) $similar_to '222[1-9]' ".
+ " OR substring($table.payinfo from 1 for 3) $similar_to '22[3-9]' ".
+ " OR substring($table.payinfo from 1 for 2) $similar_to '2[3-6]' ".
+ " OR substring($table.payinfo from 1 for 3) $similar_to '27[0-1]' ".
+ " OR substring($table.payinfo from 1 for 4) = '2720' ".
" ) ";
} elsif ( $cardtype eq 'Amex' ) {
@@ -363,14 +370,14 @@ if ( $cgi->param('magic') ) {
$search =
" ( substring($table.payinfo from 1 for 4 ) = '6011' ".
" OR substring($table.payinfo from 1 for 2 ) = '65' ".
- " OR substring($table.payinfo from 1 for 3 ) = '300' ".
+ " OR substring($table.payinfo from 1 for 3 ) = '300' ". # diner's 300-305
" OR substring($table.payinfo from 1 for 3 ) = '301' ".
" OR substring($table.payinfo from 1 for 3 ) = '302' ".
" OR substring($table.payinfo from 1 for 3 ) = '303' ".
" OR substring($table.payinfo from 1 for 3 ) = '304' ".
" OR substring($table.payinfo from 1 for 3 ) = '305' ".
- " OR substring($table.payinfo from 1 for 4 ) = '3095' ".
- " OR substring($table.payinfo from 1 for 2 ) = '36' ".
+ " OR substring($table.payinfo from 1 for 4 ) = '3095' ". # diner's 3095
+ " OR substring($table.payinfo from 1 for 2 ) = '36' ". # diner's 36, 38, 39
" OR substring($table.payinfo from 1 for 2 ) = '38' ".
" OR substring($table.payinfo from 1 for 2 ) = '39' ".
" OR substring($table.payinfo from 1 for 3 ) = '644' ".
@@ -379,8 +386,8 @@ if ( $cgi->param('magic') ) {
" OR substring($table.payinfo from 1 for 3 ) = '647' ".
" OR substring($table.payinfo from 1 for 3 ) = '648' ".
" OR substring($table.payinfo from 1 for 3 ) = '649' ".
- ( $country =~ /^(US|CA)$/
- ?" OR substring($table.payinfo from 1 for 4 ) = '3528' ". # JCB cards in the 3528-3589 range identified as Discover inside US/CA
+ ( $country =~ /^(US|PR|VI|MP|PW|GU)$/
+ ?" OR substring($table.payinfo from 1 for 4 ) = '3528' ". # JCB cards in the 3528-3589 range identified as Discover inside US & territories (NOT Canada)
" OR substring($table.payinfo from 1 for 4 ) = '3529' ".
" OR substring($table.payinfo from 1 for 3 ) = '353' ".
" OR substring($table.payinfo from 1 for 3 ) = '354' ".
@@ -390,7 +397,10 @@ if ( $cgi->param('magic') ) {
" OR substring($table.payinfo from 1 for 3 ) = '358' "
:""
).
- " OR substring($table.payinfo from 1 for 3 ) = '622' ". #China Union Pay processed as Discover outside CN
+ ( $country =~ /^(US|MX|AI|AG|AW|BS|BB|BM|BQ|VG|KY|CW|DM|DO|GD|GP|JM|MQ|MS|BL|KN|LC|VC|MF|SX|TT|TC)$/
+ ?" OR substring($table.payinfo from 1 for 3 ) $similar_to '62[24-68]' " #China Union Pay processed as Discover outside CN
+ :""
+ ).
" ) ";
} elsif ( $cardtype eq 'Maestro' ) {
diff --git a/httemplate/search/report_cust_event.html b/httemplate/search/report_cust_event.html
index 6453500ad..7aa4ff9d7 100644
--- a/httemplate/search/report_cust_event.html
+++ b/httemplate/search/report_cust_event.html
@@ -36,16 +36,18 @@
% } else {
% # 'initial' is not on here, since nobody needs to see it. also,
-% # 'done_Y' and 'done_N' are shorthand for "done, and no_action
-% # is null" and "done, and no_action = 'Y'".
+% # 'done_Y' = "done, and no_action is null, and statustext is null"
+% # 'done_S' = "done, and no_action is null, and statustext is not null"
+% # 'done_N' = "done, and no_action = 'Y'".
<& /elements/tr-select.html,
'label' => 'Event status',
'field' => 'event_status',
'multiple' => 1,
'all_selected' => 1,
'size' => 5,
- 'options' => [ qw( done_Y done_N failed new locked ) ],
- 'option_labels' => { done_Y => 'Completed',
+ 'options' => [ qw( done_Y done_S done_N failed new locked ) ],
+ 'option_labels' => { done_Y => 'Completed normally',
+ done_S => 'Completed, with an error',
done_N => 'Completed, no action taken',
failed => 'Failed',
new => 'Not yet processed',
diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi
index ef89f01c8..ecf37b42e 100755
--- a/httemplate/search/svc_acct.cgi
+++ b/httemplate/search/svc_acct.cgi
@@ -356,11 +356,14 @@ foreach my $pkg_field ( @pkg_fields ) {
push @header, emt('Pkg. Status');
push @fields, sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status;
};
push @links, '';
$align .= 'r';
push @color, sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
};
diff --git a/httemplate/search/svc_broadband.cgi b/httemplate/search/svc_broadband.cgi
index ff2538c93..8cdf29d1c 100755
--- a/httemplate/search/svc_broadband.cgi
+++ b/httemplate/search/svc_broadband.cgi
@@ -23,6 +23,7 @@
'ip_addr',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -46,6 +47,8 @@
(map '', @tower_fields),
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_circuit.cgi b/httemplate/search/svc_circuit.cgi
index 2174734ea..3a85375ef 100644
--- a/httemplate/search/svc_circuit.cgi
+++ b/httemplate/search/svc_circuit.cgi
@@ -21,6 +21,7 @@
'ip_addr',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -38,6 +39,8 @@
'color' => [
('') x 6,
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_dish.cgi b/httemplate/search/svc_dish.cgi
index 1e7330804..5c476085a 100755
--- a/httemplate/search/svc_dish.cgi
+++ b/httemplate/search/svc_dish.cgi
@@ -15,6 +15,7 @@
'acctnum',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -33,6 +34,8 @@
'',
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_domain.cgi b/httemplate/search/svc_domain.cgi
index c8fca9fdc..23eeba6a7 100755
--- a/httemplate/search/svc_domain.cgi
+++ b/httemplate/search/svc_domain.cgi
@@ -15,6 +15,7 @@
'domain',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -33,6 +34,8 @@
'',
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_external.cgi b/httemplate/search/svc_external.cgi
index 5f9056165..426ac1645 100755
--- a/httemplate/search/svc_external.cgi
+++ b/httemplate/search/svc_external.cgi
@@ -17,6 +17,7 @@
'title',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -38,6 +39,8 @@
'',
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_fiber.html b/httemplate/search/svc_fiber.html
index 3960a1635..a07c5f541 100644
--- a/httemplate/search/svc_fiber.html
+++ b/httemplate/search/svc_fiber.html
@@ -23,6 +23,7 @@
'ont_serial',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -40,6 +41,8 @@
'color' => [
('') x 6,
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_forward.cgi b/httemplate/search/svc_forward.cgi
index ca2c28808..c9b6012a7 100755
--- a/httemplate/search/svc_forward.cgi
+++ b/httemplate/search/svc_forward.cgi
@@ -17,6 +17,7 @@
$format_dst,
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -37,6 +38,8 @@
'',
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_hardware.cgi b/httemplate/search/svc_hardware.cgi
index 78f413e30..c41cc5a6e 100644
--- a/httemplate/search/svc_hardware.cgi
+++ b/httemplate/search/svc_hardware.cgi
@@ -25,6 +25,7 @@
'smartcard',
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -38,6 +39,8 @@
'align' => 'rlllllllr' . FS::UI::Web::cust_aligns(),
'color' => [ ('') x 8,
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_phone.cgi b/httemplate/search/svc_phone.cgi
index 29e745690..4c0b65487 100644
--- a/httemplate/search/svc_phone.cgi
+++ b/httemplate/search/svc_phone.cgi
@@ -19,6 +19,7 @@
@fields,
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -44,6 +45,8 @@
'',
( map '', @header ),
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status
diff --git a/httemplate/search/svc_www.cgi b/httemplate/search/svc_www.cgi
index 4f6611f17..6e9ba928e 100755
--- a/httemplate/search/svc_www.cgi
+++ b/httemplate/search/svc_www.cgi
@@ -23,6 +23,7 @@
},
sub {
$cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
$cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
},
\&FS::UI::Web::cust_fields,
@@ -43,6 +44,8 @@
'',
'',
sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ return '' unless $cust_pkg_cache{$_[0]->svcnum};
my $c = FS::cust_pkg::statuscolors;
$c->{$cust_pkg_cache{$_[0]->svcnum}->status };
}, # pkg status