summaryrefslogtreecommitdiff
path: root/FS/FS/TicketSystem/RT_Internal.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/TicketSystem/RT_Internal.pm')
-rw-r--r--FS/FS/TicketSystem/RT_Internal.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/FS/FS/TicketSystem/RT_Internal.pm b/FS/FS/TicketSystem/RT_Internal.pm
new file mode 100644
index 0000000..8fce918
--- /dev/null
+++ b/FS/FS/TicketSystem/RT_Internal.pm
@@ -0,0 +1,29 @@
+package FS::TicketSystem::RT_Internal;
+
+use strict;
+use vars qw( @ISA );
+use FS::UID qw(dbh);
+use FS::CGI qw(popurl);
+use FS::TicketSystem::RT_Libs;
+
+@ISA = qw( FS::TicketSystem::RT_Libs );
+
+sub sql_num_customer_tickets {
+ "( select count(*) from tickets
+ join links on ( tickets.id = links.localbase )
+ where ( status = 'new' or status = 'open' or status = 'stalled' )
+ and target = 'freeside://freeside/cust_main/' || custnum
+ )";
+}
+
+sub baseurl {
+ #my $self = shift;
+ if ( $RT::URI::freeside::URL ) {
+ $RT::URI::freeside::URL. 'rt/';
+ } else {
+ 'http://you_need_to_set_RT_URI_freeside_URL_in_SiteConfig.pm/';
+ }
+}
+
+1;
+