X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Frt_transaction.html;h=fb828af844e08dd9099528905cb1d64da7b67b2b;hp=8bf193c9a35fbe3ce1e8b398e0687d8292fe4bf2;hb=64cff83a723d02a3064e08d4e69c13f9b43fed58;hpb=700eefaade6c281ef921965543e71534cd78a84d diff --git a/httemplate/search/rt_transaction.html b/httemplate/search/rt_transaction.html index 8bf193c9a..fb828af84 100644 --- a/httemplate/search/rt_transaction.html +++ b/httemplate/search/rt_transaction.html @@ -90,7 +90,7 @@ if ( $cgi->param('ticketid') =~ /^\s*(\d+)\s*$/ ) { } if ( $cgi->param('svcnum') =~ /^\s*(\d+)\s*$/ ) { - $where .= " AND acct_rt_transaction.svcnum = $1"; + $where .= " AND EXISTS( SELECT 1 FROM acct_rt_transaction WHERE acct_rt_transaction.transaction_id = Transactions.id AND svcnum = $1 )"; } my $query = { @@ -100,7 +100,7 @@ my $query = { 'Tickets.Subject', 'Users.name AS otaker', "$transactiontime AS transaction_time", - '( SELECT SUM(support) from acct_rt_transaction where Transaction_id = Transactions.id ) AS support', + '( SELECT SUM(support) from acct_rt_transaction where transaction_id = Transactions.id ) AS support', ), 'table' => 'transactions', #Pg-ism #'table' => 'Transactions',