Hi All,

I am new to otrs, and am using it for about a month now. I like the tool!

However, I would like to be able to get a report over a certain period,
with the total sum of worked time per customer.

In SQL I would do (SQL statements are in CAPITALS):

SELECT customer_id,count(tn) AS tickets, sum(time_unit) AS worktime
FROM ticket
LEFT JOIN time_accounting
ON ticket.id = time_accounting.ticket_id
WHERE tn LIKE "2009%"
GROUP BY customer_id

This will give me a list with customer, number of tickets per customer,
and total working time per customer, for all tickets in 2009. This
selection would be preferrably be adjustable.

This list I can use to bill my customers
The customer wants to know where he/she pays for, so I'll do:

SELECT * FROM ticket
LEFT JOIN time_accounting
ON ticket.id = time_accounting.ticket_id
WHERE customer_id LIKE "ACME"

Where ACME is the customer name.

Is there a way to do this?


I use LDAP as my customer backend, and version 2.2.7 of OTRS.

Thanks for any reply,

Marcel



_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to