diff options
author | ivan <ivan> | 2007-09-13 22:35:20 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-09-13 22:35:20 +0000 |
commit | db18a813b59b8254ff19f77770750a781613d79e (patch) | |
tree | da94fc86ca1b595cdfda073d10e25d2b3188e3cf /httemplate | |
parent | 24a360f232fb25bfc1e1285575b4a55a5e350c21 (diff) |
rename svc_acct_rt_transaction to acct_rt_transaction, as it is not a service, its something that hangs off of an svc_acct (like an acct_snarf). thank goodness was able to do this before its any sort of migration problem...
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/misc/process/timeworked.html | 6 | ||||
-rw-r--r-- | httemplate/search/timeworked.html | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/httemplate/misc/process/timeworked.html b/httemplate/misc/process/timeworked.html index b69c898e8..8e1a66336 100644 --- a/httemplate/misc/process/timeworked.html +++ b/httemplate/misc/process/timeworked.html @@ -11,7 +11,7 @@ die "access denied" my %multipliers = map { /^custnum(\d+)$/; ($cgi->param("custnum$1") => $cgi->param("multiplier$1")); } grep /^custnum\d+$/, $cgi->param; -my @svc_acct_rt_transaction; +my @acct_rt_transaction; foreach my $transaction ( map { /^transactionid(\d+)$/; $1; } grep /^transactionid\d+$/, $cgi->param ) { @@ -35,7 +35,7 @@ foreach my $transaction ( } foreach my $customer ( grep {$seconds{$_}} keys %seconds ) { - push @svc_acct_rt_transaction, new FS::svc_acct_rt_transaction { + push @acct_rt_transaction, new FS::acct_rt_transaction { 'custnum' => $customer, 'transaction_id' => $transaction, 'seconds' => $seconds{$customer}, @@ -44,7 +44,7 @@ foreach my $transaction ( } -my $error = FS::svc_acct_rt_transaction->batch_insert(@svc_acct_rt_transaction); +my $error = FS::acct_rt_transaction->batch_insert(@acct_rt_transaction); $cgi->param('error', $error) if $error; </%init> diff --git a/httemplate/search/timeworked.html b/httemplate/search/timeworked.html index 18af74641..858cc6281 100644 --- a/httemplate/search/timeworked.html +++ b/httemplate/search/timeworked.html @@ -55,9 +55,9 @@ push @groupby, "newvalue"; push @groupby, "oldvalue"; push @groupby, "timetaken"; -my $appliedtimeclause = "coalesce (sum(svc_acct_rt_transaction.seconds), 0)"; +my $appliedtimeclause = "coalesce (sum(acct_rt_transaction.seconds), 0)"; -my $appliedtimeselect = "SELECT sum(seconds) FROM svc_acct_rt_transaction where transaction_id = transactions.id"; +my $appliedtimeselect = "SELECT sum(seconds) FROM acct_rt_transaction where transaction_id = transactions.id"; push @groupby, "transactions.id"; my $wheretimeleft = "($transactiontime != ($appliedtimeselect) OR ($appliedtimeselect) is NULL)"; @@ -68,7 +68,7 @@ push @groupby, "transactions.created"; my $groupby = join(',', @groupby); -my $query = "SELECT tickets.id,tickets.subject,to_char(transactions.created, 'Dy Mon DD HH24:MI:SS YYYY'),$transactiontime-$appliedtimeclause,transactions.id FROM transactions JOIN tickets ON transactions.objectid = tickets.id LEFT JOIN svc_acct_rt_transaction on transactions.id = svc_acct_rt_transaction.transaction_id WHERE objecttype='RT::Ticket' AND ((transactions.type='Set' AND field='TimeWorked') OR transactions.type='Comment' OR transactions.type='Correspond') AND ($wheretimeleft) GROUP BY $groupby ORDER BY transactions.created"; +my $query = "SELECT tickets.id,tickets.subject,to_char(transactions.created, 'Dy Mon DD HH24:MI:SS YYYY'),$transactiontime-$appliedtimeclause,transactions.id FROM transactions JOIN tickets ON transactions.objectid = tickets.id LEFT JOIN acct_rt_transaction on transactions.id = acct_rt_transaction.transaction_id WHERE objecttype='RT::Ticket' AND ((transactions.type='Set' AND field='TimeWorked') OR transactions.type='Comment' OR transactions.type='Correspond') AND ($wheretimeleft) GROUP BY $groupby ORDER BY transactions.created"; my $count_query = "SELECT count(*) FROM transactions WHERE objecttype='RT::Ticket' AND ((transactions.type='Set' AND field='TimeWorked') OR transactions.type='Comment' OR transactions.type='Correspond') AND ($wheretimeleft)"; </%init> |