X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=66697efb5318b3a10f35c6be75a4c94abd34a255;hp=e28aa1870085f4d2317d2da73da84733d6414400;hb=de549dfea65bf78508b508f03e4f9637122166a6;hpb=ee27cd8eea7b135db2ba8a6b1a6ac8933171d9d0 diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index e28aa1870..66697efb5 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -237,6 +237,13 @@ sub login { $svc_x = $svc_phone; + } elsif ( $p->{'domain'} eq 'ip_mac' ) { + + my $svc_broadband = qsearchs( 'svc_broadband', { 'mac_addr' => $p->{'username'} } ); + return { error => 'IP address not found' } + unless $svc_broadband; + $svc_x = $svc_broadband; + } elsif ( $p->{email} && (my $contact = FS::contact->by_selfservice_email($p->{email})) ) @@ -1707,6 +1714,16 @@ sub update_payby { my($context, $session, $custnum) = _custoragent_session_custnum($p); return { 'error' => $session } if $context eq 'error'; + if ($p->{'payby'} eq 'CHEK') { + $p->{'payinfo1'} =~ /^([\dx]+)$/ + or return { 'error' => "illegal account number ". $p->{'payinfo1'} }; + my $payinfo1 = $1; + $p->{'payinfo2'} =~ /^([\dx\.]+)$/ # . turned on by echeck-country CA ? + or return { 'error' => "illegal ABA/routing number ". $p->{'payinfo2'} }; + my $payinfo2 = $1; + $p->{'payinfo'} = $payinfo1. '@'. $payinfo2; + } + my $cust_payby = qsearchs('cust_payby', { 'custnum' => $custnum, 'custpaybynum' => $p->{'custpaybynum'}, @@ -3572,6 +3589,11 @@ sub list_tickets { # unavoidable false laziness w/ httemplate/view/cust_main/tickets.html if ( $FS::TicketSystem::system && FS::TicketSystem->selfservice_priority ) { + + @tickets = grep { $_->{'_selfservice_priority'} + !~ /^\s*(closed?|resolved?|done)\s*/i } + @tickets; + my $conf = new FS::Conf; my $dir = $conf->exists('ticket_system-priority_reverse') ? -1 : 1; +{ tickets => [