X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fcust_main.pm;h=2d6d4590730405933df7e65cbc13cbcaaf66a111;hb=5e6bfa1548ac370d2cf316e0db44785d83baa453;hp=6afbd1cf595a05d26ceda072158adbda12e8d93d;hpb=883e34abf9c9a59cf039c2c698b930b2f305be7f;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 6afbd1cf5..2d6d45907 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4053,6 +4053,30 @@ sub tickets { (@tickets); } +=item appointments [ STATUS ] + +Returns an array of hashes representing the customer's RT tickets which +are appointments. + +=cut + +sub appointments { + my $self = shift; + my $status = ( @_ && $_[0] ) ? shift : ''; + + return () unless $conf->config('ticket_system'); + + my $queueid = $conf->config('ticket_system-appointment-queueid'); + + @{ FS::TicketSystem->customer_tickets( $self->custnum, + 99, + undef, + $status, + $queueid, + ) + }; +} + # Return services representing svc_accts in customer support packages sub support_services { my $self = shift;