X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fpart_export%2Fsqlradius.pm;fp=FS%2FFS%2Fpart_export%2Fsqlradius.pm;h=833dd9a1d3b26633dbe6d63a262be4b80cb930df;hb=8a6bdb6425eac988c19822f301a5849468f85f2e;hp=db66c39c0ca67839bec6c1f1d361297724b377d5;hpb=092d75e50a900003904f8e400d6d102ba5bd16f9;p=freeside.git diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm index db66c39c0..833dd9a1d 100644 --- a/FS/FS/part_export/sqlradius.pm +++ b/FS/FS/part_export/sqlradius.pm @@ -741,8 +741,11 @@ sub usage_sessions { } } if ( $opt->{session_status} ne 'closed' ) { - $acctstoptime = "( $acctstoptime ) OR " if $acctstoptime; - $acctstoptime .= 'AcctStopTime IS NULL'; + if ( $acctstoptime ) { + $acctstoptime = "( ( $acctstoptime ) OR AcctStopTime IS NULL )"; + } else { + $acctstoptime = 'AcctStopTime IS NULL'; + } } push @where, $acctstoptime;