[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.113.2.9, 1.113.2.10
Erik Levinson
levinse at wavetail.420.am
Thu Dec 23 09:52:25 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv18789/FS/FS/ClientAPI
Modified Files:
Tag: FREESIDE_2_1_BRANCH
MyAccount.pm
Log Message:
self-service improvements, RT10883
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.113.2.9
retrieving revision 1.113.2.10
diff -u -w -d -r1.113.2.9 -r1.113.2.10
--- MyAccount.pm 21 Dec 2010 23:44:57 -0000 1.113.2.9
+++ MyAccount.pm 23 Dec 2010 17:52:23 -0000 1.113.2.10
@@ -1941,16 +1941,24 @@
# the requested ticket was actually linked to this customer
my @custs = @{$err_or_ticket->{'custs'}};
my @txns = @{$err_or_ticket->{'txns'}};
+ my @filtered_txns;
return { 'error' => 'no customer' } unless ( $custnum && scalar(@custs) );
return { 'error' => 'invalid ticket requested' }
unless grep($_ eq $custnum, @custs);
+ foreach my $txn ( @txns ) {
+ push @filtered_txns, $txn
+ if ($txn->{'type'} eq 'EmailRecord'
+ || $txn->{'type'} eq 'Correspond'
+ || $txn->{'type'} eq 'Create');
+ }
+
warn "$me get_ticket: sucessful: \n"
if $DEBUG;
return { 'error' => '',
- 'transactions' => \@txns,
+ 'transactions' => \@filtered_txns,
'ticket_id' => $p->{'ticket_id'},
};
} else {
More information about the freeside-commits
mailing list