# Project in supplier invoice lines

**URL:** <https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044>\
**Category:** Other native modules\
**Tags:** v13\
**Created:** [August 10, 2021, 6:16pm UTC](https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044 "2021-08-10T18:16:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessio.spoto](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@alessio.spoto](https://www.dolibarr.org/forum/u/alessio.spoto)\
**Post date:** [August 10, 2021, 6:16pm UTC](https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044/1 "2021-08-10T18:16:53Z")

</div>

Hello, i have this kind of need :  
When i buy materials from a supplier, this materials can be used for different projects and customers

I would assign the projcet for every single line of the invoice, so when i che the project overview i can estimate the real charge of my project

Is this possible ?

Hope to have explained well the question

Best Regards  
Alessio

---

<div class="post-metadata">

**Author:** ![rauldobrota](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/rauldobrota/32/3508_2.png) [@rauldobrota](https://www.dolibarr.org/forum/u/rauldobrota)\
**Post date:** [August 15, 2021, 4:23pm UTC](https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044/2 "2021-08-15T16:23:44Z")

</div>

Hello,  
You can add an extrafield on Invoices module setup at Extrafields(lines). Type should be select from table(referenced table is llx\_projet)

---

<div class="post-metadata">

**Author:** ![cfoellmann](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/cfoellmann/32/2887_2.png) [@cfoellmann](https://www.dolibarr.org/forum/u/cfoellmann)\
**Post date:** [August 16, 2021, 9:37am UTC](https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044/3 "2021-08-16T09:37:39Z")

</div>

it is not as easy as @rauldobrota suggests.

You can add the field as suggested but it will not give you the data on the project details page.  
You also need to implement these data points via the hook system.

We are running a patched version of [GitHub - jere63fr/dolibarr.consumption: Module Consumption for Dolibarr](https://github.com/jere63fr/dolibarr.consumption) to do that for consumption of a project.  
Please watch that repo. I will send the change to the repo soon.

---

<div class="post-metadata">

**Author:** ![alessio.spoto](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@alessio.spoto](https://www.dolibarr.org/forum/u/alessio.spoto)\
**Post date:** [August 16, 2021, 5:58pm UTC](https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044/4 "2021-08-16T17:58:15Z")

</div>

Thank You everybody  
Ok Roul yes, the way is to extend the invoice rows with the project field, but as said by [cfoellmann] the target is to see the results in the project Overview

Interesting your module, let’s keep in touch

Best Regards

---

<div class="post-metadata">

**Author:** ![cfoellmann](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/cfoellmann/32/2887_2.png) [@cfoellmann](https://www.dolibarr.org/forum/u/cfoellmann)\
**Post date:** [August 23, 2021, 7:53pm UTC](https://www.dolibarr.org/forum/t/project-in-supplier-invoice-lines/21044/5 "2021-08-23T19:53:07Z")

</div>

Have a look at

> <https://github.com/jere63fr/dolibarr.consumption/blob/4.0-test/class/actions_consumption.class.php>

Here I uploaded our current working code for adding stuff to the element.php
