Hi Jan,

sorry for the long delay.

On Sat, Jan 18, 2003 at 09:42:57PM +0100, Jan Kneschke wrote:
> 
> Is there a good way to get accumulated time units per customer ?
> 
> That would ease writing invoices for each customer at the end of the month a
> lot.

If would do this:

Accounted time per ticket: "SELECT tt.tn, tt.customer_id, sum(ta.time_unit) FROM 
ticket tt, time_accounting ta WHERE tt.id = ta.ticket_id AND ta.create_time >= 
'2003-01-01 00:00:01' and ta.create_time <= '2003-01-31 23:59:59' GROUP BY tt.id"

Accounted time per customer: "SELECT tt.customer_id, sum(ta.time_unit) FROM ticket tt, 
time_accounting ta WHERE tt.id = ta.ticket_id AND ta.create_time >= '2003-01-01 
00:00:01' and ta.create_time <= '2003-01-31 23:59:59' GROUP BY tt.customer_id"

You need to write a little script which do this query with the write time stamps.

Is it what you are looking for?

>   Jan

  Martin

--
Martin Edenhofer - <martin at edenhofer.de> - http://martin.edenhofer.de/
--
Noch 233 Tage bis zum G�ubodenvolksfest! ;-)
_______________________________________________
OpenTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to