[rt-users] Generate a billing report?

roger roger at computer-surgery.co.uk
Thu Feb 28 17:36:07 EST 2008


On Thu, 2008-02-28 at 16:12 -0600, John Arends wrote:
> I'm curious if anyone has used RT for job billing? It's pretty easy to 
> record the time for each task you perform but there really isn't a good 
> mechanism for generating a bill to send to a client.
> 
> Has anyone tried anything like that?

We do exactly this.

We have a custom field for Customer and another for invoice Number.

Invoice number is filled in by the invoicing script normally, but an
engineer could add 'FOC' or 'Warranty' instred to it as we only bill
tickets with an empty invoice number field. This is also how we track
ticket which need to billed as opposed to one already billed.

Then we grab all the id's with the following command:-
rt list -i  "status='resolved' and  Queue='MyQueue' and Created <
'$date'  and TimeWorked >'0' and CF.{invoicenr} IS NULL "

Date is normally set to the beginning of the month so we get all
the tickets up till then.

The a hidoeus SQL query then creates the line items and joins it
with the customer_id custom field. And then through some perl
magic pass it to our billing system.

If I could get the Timeworked and customerid field in output 
from the rt command line, I could drop sql against mysql completely
which would at least mean I'm using rt's api everywhere - which
might stay more stable.

This seems fine for stuff billed in units of minutes or hours I'm
not to usre about it for our project work which tends to be billed in
days. But for that we just reassign the ticket to our invoice queue
instead of resolving it and handle it manaully.

Was that helpful?


-- 
roger <roger at computer-surgery.co.uk>



More information about the rt-users mailing list