diff options
author | jeff <jeff> | 2007-09-24 15:47:52 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-09-24 15:47:52 +0000 |
commit | 2f3b4161da680cd0fff8c91dbdc50fe5e974610e (patch) | |
tree | b38079387c295996bd50faba7636343ac85aebd5 /FS/FS/acct_rt_transaction.pm | |
parent | 91caf036bc222d20d078e31f1d28c2d6c86805e1 (diff) |
self-service support usage improvements (1733)
Diffstat (limited to 'FS/FS/acct_rt_transaction.pm')
-rw-r--r-- | FS/FS/acct_rt_transaction.pm | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/FS/FS/acct_rt_transaction.pm b/FS/FS/acct_rt_transaction.pm index af959e47..93ce280 100644 --- a/FS/FS/acct_rt_transaction.pm +++ b/FS/FS/acct_rt_transaction.pm @@ -39,7 +39,9 @@ FS::Record. The following fields are currently supported: =item transaction_id - the id of the rt transtaction from which the time applies -=item seconds - the amount of time which applies +=item seconds - the amount of time applied from tickets + +=item support - the amount of time applied to support services =back @@ -92,7 +94,7 @@ sub insert { return "Can't find svc_acct " . $self->svcnum; } - my $error = $svc_acct->decrement_seconds($self->seconds); + $error = $svc_acct->decrement_seconds($self->support); if ( $error ) { $dbh->rollback if $oldAutoCommit; return "Error incrementing service seconds: $error"; @@ -136,7 +138,7 @@ sub delete { return "Can't find svc_acct " . $self->svcnum; } - my $error = $svc_acct->increment_seconds($self->seconds); + $error = $svc_acct->increment_seconds($self->support); if ( $error ) { $dbh->rollback if $oldAutoCommit; return "Error incrementing service seconds: $error"; @@ -173,6 +175,7 @@ sub check { || $self->ut_number('transaction_id') || $self->ut_numbern('_date') || $self->ut_snumber('seconds') + || $self->ut_snumber('support') ; return $error if $error; @@ -196,6 +199,50 @@ sub check { $self->SUPER::check; } +=item creator + +Returns the creator of the RT transaction associated with this object. + +=cut + +sub creator { + my $self = shift; + FS::TicketSystem->transaction_creator($self->transaction_id); +} + +=item ticketid + +Returns the number of the RT ticket associated with this object. + +=cut + +sub ticketid { + my $self = shift; + FS::TicketSystem->transaction_ticketid($self->transaction_id); +} + +=item subject + +Returns the subject of the RT ticket associated with this object. + +=cut + +sub subject { + my $self = shift; + FS::TicketSystem->transaction_subject($self->transaction_id); +} + +=item status + +Returns the status of the RT ticket associated with this object. + +=cut + +sub status { + my $self = shift; + FS::TicketSystem->transaction_status($self->transaction_id); +} + =item batch_insert SVC_ACCT_RT_TRANSACTION_OBJECT, ... Class method which inserts multiple time applications. Takes a list of |