# Time spent to invoice bug

**URL:** <https://www.dolibarr.org/forum/t/time-spent-to-invoice-bug/19348>\
**Category:** Other native modules\
**Created:** [July 24, 2020, 5:11am UTC](https://www.dolibarr.org/forum/t/time-spent-to-invoice-bug/19348 "2020-07-24T05:11:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob123](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@rob123](https://www.dolibarr.org/forum/u/rob123)\
**Post date:** [July 24, 2020, 5:11am UTC](https://www.dolibarr.org/forum/t/time-spent-to-invoice-bug/19348/1 "2020-07-24T05:11:21Z")

</div>

New to using Dolibarr, noted a bug in the generation of invoice from time spent. With multiple tasks for the same project. Using a hosted Dolibarr with no extra modules.

When generating invoice, the mode can one liner per user or 1 line per task (or 1 line per period).

If 1 line per task works fine.  
If 1 line per user it adds all the $ values together and uses this a PU hourly rate. Which results in inaccurate billing on the invoice. for example if 0.5 hour on the task, it bills 0.5 hourly rate for the employee.
