X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=9a83099de2a568ba87277c8a7e785138169287dc;hb=f786ebaff8b6704e4e180428aaaa9afeaea7ecb9;hp=4bd9114b2b0f99ae85b5060f1e8eacc0b673c18d;hpb=296b198525e573770dd2a1c686493f522c69f51f;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 4bd9114b2..9a83099de 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1756,6 +1756,8 @@ sub check { || $self->ut_name('first') || $self->ut_snumbern('signupdate') || $self->ut_snumbern('birthdate') + || $self->ut_namen('spouse_last') + || $self->ut_namen('spouse_first') || $self->ut_snumbern('spouse_birthdate') || $self->ut_snumbern('anniversary_date') || $self->ut_textn('company') @@ -2837,7 +2839,7 @@ UNIX timestamps; see L). Also see L and L for conversion functions. The empty string can be passed to disable that time constraint completely. -Available options are: +Accepts the same options as L: =over 4 @@ -2845,6 +2847,12 @@ Available options are: set to true to disregard unapplied credits, payments and refunds outside the specified time period - by default the time period restriction only applies to invoices (useful for reporting, probably a bad idea for event triggering) +=item cutoff + +An absolute cutoff time. Payments, credits, and refunds I after this +time will be ignored. Note that START_TIME and END_TIME only limit the date +range for invoices and I payments, credits, and refunds. + =back =cut @@ -4217,14 +4225,17 @@ sub cust_statuscolor { __PACKAGE__->statuscolors->{$self->cust_status}; } -=item tickets +=item tickets [ STATUS ] Returns an array of hashes representing the customer's RT tickets. +An optional status (or arrayref or hashref of statuses) may be specified. + =cut sub tickets { my $self = shift; + my $status = ( @_ && $_[0] ) ? shift : ''; my $num = $conf->config('cust_main-max_tickets') || 10; my @tickets = (); @@ -4232,7 +4243,12 @@ sub tickets { if ( $conf->config('ticket_system') ) { unless ( $conf->config('ticket_system-custom_priority_field') ) { - @tickets = @{ FS::TicketSystem->customer_tickets($self->custnum, $num) }; + @tickets = @{ FS::TicketSystem->customer_tickets( $self->custnum, + $num, + undef, + $status, + ) + }; } else { @@ -4244,6 +4260,7 @@ sub tickets { @{ FS::TicketSystem->customer_tickets( $self->custnum, $num - scalar(@tickets), $priority, + $status, ) }; }